function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Niklas AlvaeusNiklas Alvaeus 

Using SwiftlySalesforce to call Chatter API

I'm succesfully using SwiftlySalesforce to auth a user and load and save custom object from the Salesforce instance.

However, I'm now trying to talk to Chatter API and all it comes back with is The requested resource does not exist.

I presume I'm mean to use the salesforce.apexRest but struggling in how to build the path, or am I missing some setup on the Chatter Admin? Are there any good tutorials on this for iOS?

I'm trying

salesforce.apexRest(method: .get, path: "/services/data/v38.0/chatter/feed-elements", parameters: query, headers: nil).then

But not sure what the app instance is I need to add infront of /services
Niklas AlvaeusNiklas Alvaeus
Found out:

        salesforce.custom(path: "/services/data/v37.0/chatter/users/me").then {
            (queryResult) -> () in
            print("here")
            debugPrint(queryResult)
            }.catch { (error) in
                print((error as! SalesforceError).debugDescription)
        }