Hot answers tagged

12

This is currently NOT possible in Salesforce1. This is because A) Canvas is for integrating external web applications and mobile-web based apps (both of which have a public URL) NOT native mobile applications which are installed and run on a user's device B) Both custom Chatter publisher actions and global actions work with VF pages and Canvas apps NOT with ...


7

I wrote ForcePad. Check out item 3 under the getting started section: (Optional) ForcePad connects to environments that are not otherwise API-enabled, like GE and PE orgs, by using a partner token. If you have a Salesforce partner token, paste it into RootViewController.h under PartnerTokenId. That said, getting a partner token is a little ...


7

When you log in through an API, the login response includes the current user's ID. You can use this ID value to filter queries tailored to that specific user. See the Force.com REST API Developer's Guide for details.


7

You can do it like this: jsonStr = EncodingUtil.base64Decode(jsonData).toString(); List<Attachment> attaches = new List<Attachment>(); for(Records record : parse(jsonStr).records) { attaches.addAll(buildAttachment(record)); } insert attaches; global static List<Attachment> buildAttachment(Records data) { List<Attachment> ...


6

Here is a one way to launch native app's on Salesforce1 http://www.meetingassistantapp.com/how-to-launch-native-apps-on-salesforce1/ Please let me know if it helps!


5

The platform can convert JSON into simple Apex classes for you. Usually you can just include the root object in the @HttpPost method signature, but Blob is not supported in that context. So for data including Blob fields you need to use this pattern: @RestResource(urlMapping='/MyWebService/*') global class MyWebService { @TestVisible private static Id ...


5

@RestResource(urlMapping='/MyWebService/*') global class MyWebService { @HttpPost global static void receiveData(String a) { Blob blbdata = EncodingUtil.base64Decode(a);//Keep it in blob itself .Dont convert to string again JSONParser parser = JSON.createParser(jsonStr); while (parser.nextToken() != null) { if (parser....


5

I found the answer, thanks in part to a post from @Mobiral: add the following lines to the code of the .m (implementation) file of the class you want to use the info in, for example - see below, you could display the name of the current logged in user in a label on the first/home page of the app (using the ViewWIllAppear method to update the label): #...


5

One option is to keep a reference to the SFRestRequest objects you create and, in your response delegate method, determine which request has just completed and process accordingly. A far better option, in my (not-so) humble opinion, is to use the nifty block interfaces I contributed to the SDK. :)


5

The Datetime format that Salesforce uses cannot be formatted using NSDateFormatter. MobileSDK has a util class SFDateUtil that can be used to convert NSDate into formatted string. NSString *dateInString = [SFDateUtil toSOQLDateTimeString:[NSDate date] isDateTime:true]; This gives the datetime in yyyy-mm-ddThh:mm:ss.000Z. This String can be used in query. ...


5

I presume this is a native app built using the Force.com Mobile SDK for iOS. This is a standard iOS procedure to disable caching on your NSURLRequest Some sample code as provided here NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60.0]; Then create the connection ...


5

It is handled via the following key-value pair in your <appname>-Info.plist file: <key>SFDCOAuthLoginHost</key> <string>your_community_login_url_minus_the_https://_prefix</string> You can find more details about it here


5

This has been a known issue with iOS9 but the good thing is that it's already fixed in 3.3.1 release. The root cause is that TheunarchiveObjectWithFile: message of the NSKeyedUnarchiver class now returns nil upon failure, instead of throwing an exception. Either update your Mobile SDK to 3.3.1 or update SFUserAccountManager.m from this pull request.


5

If you are getting an error about these files not being found, then it means either your pod isn't installed or the pod configuration file is not correct. The sequence of steps to be followed here is 1) Edit your podfile and add this line pod 'DesignSystem' 2) Run pod install 3) Then import the file #import <DesignSystem/DesignSystem.h> 4) Try ...


4

Sandboxes don't run in the same context as production, so you'll need a Connected App identified on a Sandbox org and use those keys for OAuth.


4

You can convert a lead through the SOAP API. Check out ZKSforce, an Objective-C wrapper around the SOAP API. I contributed some async block methods that make this very easy.


4

Try to modify your LastModifiedDate to the following format: 2013-06-21T00:00:00.000Z So add T00:00:00.000Z to the 2013-06-21 without white space (generally format it like this: yyyy-mm-ddThh:mm:ss.000Z)


4

With the Partner API you can use the CallOptions.value to identify the client application. This populates the Application column. Or at least it does in the Login History view. I don't think you can utilise this with the REST API, which is probably what backs the iOS Native SDK. The same login using OAuth for a connected app also populates the Application ...


4

This is actually a known issue which has been reported by other users as well. I've reproduced it at my end also. The issue is being tracked on the Mobile SDK iOS Github repo here. It is also discussed on the Mobile SDK Google+ community page.


4

There is no way you can officially get access to the Salesforce1 IPA and APK files. Of course, there are other tricks in which you can recover these files from the device but they wilL NOT obviously be re-signed for 3rd party testing. Considering your requirement, the best way to do mobile automation testing is to use the Chrome iOS emulation capabilities ...


4

We're aware of this issue and have addressed it for our next SDK release. We've namespaced our sqlite usage so that it can play more fairly within an app. This will be released later this month; please let us know how it works for you! Brian M. Criscuolo, Senior Mobile Engineer


3

Salesforce1 makes a few assumptions about where your custom Visualforce pages can be surfaced, and does not support the ability to link to a page via the /apex/MyPage syntax. The places where Visualforce can be surfaced include: The Navigation menu, via a Visualforce tab The publisher, via a custom action Mobile cards on a record’s related ...


3

By default, the iOS behavior is is to not show an alert if the app is running when a push comes in. MobilePush respects this default behavior, and will process the push but not display an alert. If you'd like to change this, you may do one of the two following things. In the SDK, call the following method to tell the SDK to show an alert: [[ETPush ...


3

I would download source code for ForcePad to see how they do it. ForcePad was created by Salesforce Labs group and is an open source. https://github.com/ForceDotComLabs/ForcePad


3

Are you looking for the Product2 sObject? If you're on OS X, SoqlXplorer is a great admin tool. You should familiarise yourself with the schemas in the orgs in which you are working. :P


3

You should check the operation response and handle any exception. If the response is an 401 containing this JSON: [ { message: 'Session expired or invalid' , errorCode: 'INVALID_SESSION_ID' } ] , you could call a refresh_token flow like this : However, you only get the refresh token from the Web server and User-Agent as is indicated here. If the ...


3

I wrote another answer along these lines that explores a few options. tl;dr - You are almost certainly better-served, and your users will have a far superior install and update experience, if you list on the public app store. Why do you not want to list publicly? I can see only a few good reasons why you wouldn't (and some of those reasons aren't good at ...


3

iOS does not allow access to the keychain while your app is in the background. The Salesforce iOS SDK does not support executing API requests in the background. So if you want to fetch/query Salesforce in the background, you will have to roll your own network calls outside of the Salesforce SDK. Consider also that you are returning ...


3

Dsw, Essentially this means that you're trying to include Sqlite3 twice. The Marketing Cloud SDK requires Sqlite3, but there's nothing to say you can't piggy back on it. Essentially remove your sqlite3.a file from the project and that should resolve it for you. Additionally, you can get this error if you accidentally import the .m file, instead of the .h ...


3

We've been making improvements to our SDK; please see https://salesforce.stackexchange.com/a/131089/34325 for details on the changes we'll be releasing to support this use case. Brian M. Criscuolo, Senior Mobile Engineer


Only top voted, non community-wiki answers of a minimum length are eligible