Hello I am new in WSDL salesforce API integration in iOS. And I got some WSDL to OBJC library files included into xcode project. And my first task is to go with app login screen. And as per android version we need to connect salesforce api with our app using :
ConnectorConfig config = new ConnectorConfig();
config.setUsername(username);
config.setPassword(password);
config.setAuthEndpoint(authEndPoint);
config.setTraceMessage(true);
config.setPrettyPrintXml(true);
partnerConnection = Connector.newConnection(config);
And in the response received sessionID. and set to sessionHeader.
So I think, I need same thing in iOS version. So please guide me to access the salesforce webservices.
Your best bet it to use a pre-existing SDK for Salesforce that is for iOS, rather than trying to map from some java/android code. Check out the Salesforce iOS SDK or ZKSforce
Related
We have an open API and I was wondering how I could securely tell if my own app is making the api request. I recently figured this out on android (use the sha1 fingerprint), what would the iOS equivalent of this be?
Here's a quote from the android question that was asked:
I have an android app. Now I want that only my App can access my database on server. I know any body can decompile my app and can find the API urls and can access my database from the browser. Is there any way to protect my database from such API calls which are not generated by my Android App ?
I want to add any secret in Android App which change or destroy if anybody de-compile my Android App.
https://www.quora.com/How-can-I-check-if-that-API-call-is-from-my-Android-app-or-from-outside-on-the-server-side
Is it possible to use the AWS mobile services (Cognito, Analytics, etc) without linking all the SDK in an Xcode project?
Background:
* While I am not new to AWS nor mobile programming, the following case is challenging:
We are shipping a mobile "framework" (not app) that uses our AWS for some parts (Authentication, logs).
And, as the AWS SDK has to be linked in the app project itself, this will require us asking all the clients (developers) to download and link it in their own projects.
What is used in the framework is just one request for authentication and one for logging (success/failure, disconnection), so no need for all the SDK.
I wonder if there is a possibility to request AWS services without linking against the SDK?
I know it's possible to put then under an umbrella SDK, or do some cherry picking from their git repository, but both of these seem like overkill.
As the request itself is a simple URL with Get/Post, is there a possibility (or tutorial) on constructing the request manually via NSURLConnexion/NSURLSession, etc?
Thank you
Talking to the AWS APIs is actually not that hard. The main difficulty is signing your http requests, and that's not nearly as bad as it sounds. Which leaves xml parsing accounting for most of the unpleasantness.
I've done it in go. The most informative part is probably the signing tests.
Indeed, it is possible. You will have to code calls to AWS at the REST level. Everything you need is in the documentation of AWS.
For instance, if you needed to execute actions on EC2, here's what you'd have to code:
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#structure-of-a-get-request
You can call the HTTP APIs directly. Since the AWS Mobile SDK for iOS and Android are open source, you can look at them directly. Find the AWS Mobile SDK for iOS Source on Github, and the AWS Mobile SDK for Android on Github. Since you mentioned you need authentication request on iOS I am guessing you're looking for the Cognito Identity in AWSCore source.
Has anyone had success in using the Gmail API's authorization in a Phonegap application? I found this (http://phonegap-tips.com/articles/google-api-oauth-with-phonegaps-inappbrowser.html) that describes using the generic Google API OAuth with Phonegap's inappbrowser plugin, but the newly released Gmail API does OAuth authorization differently, and I'm not sure how to get it to work with Phonegap.
Note: It does work when I try a web version of my app, but the button that brings up the authorization screen doesn't do anything in Phonegap..not sure why. I do have the appropriate Android credentials for the app in the Google Developer's Console.
UPDATE: Using OAuth's Phonegap SDK (found after registering your app here: https://oauth.io/), I am able to authenticate a Google Account. However, I am unsure how to then call Gmail API methods or correctly pass whatever authentication tokens from the OAuth SDK to any Gmail API code. Has anyone done this and can share their knowledge?
I found a solution using the OAuthio Phonegap SDK. Then I can call the appropriate HTTPS requests from the Gmail API.
If you want to login your users via Google on iOS and Android, then use this new plugin I just created: https://github.com/EddyVerbruggen/cordova-plugin-googleplus
You will also receive the name and gender etc from the plugin. The plugin will also try SSO with any other Google apps installed on your device by using the Google+ SDK on both platforms.
I am having issues with my API key for the iOS Google Maps SDK.
Currently I have multiple applications one using the Javascript API, and Android one and now and iOS app. The Web and Android app works fine but I always receive and invalid api key. Bundles are definitely matching and the iOS SDK is enabled under services.
I created an api key on my personal gmail account and linked it to the bundle and it worked fine. Removed it and create the api key back on the console for the other api's and it fails. Has anyone come across this problem before?
I'm using oAuth2, and I have a project in my google API console with an iOS client and a Web client registered.
I'd like to auth in from my iOS app, and have my web backend retrieve an access token so it can do the heavy processing work with the Google api.
I've tried following these instructions which are for android: https://developers.google.com/accounts/docs/CrossClientAuth
But I keep getting an invalid scope when I assign the scope as:
oauth2:server:client_id:MY.WEB.CLIENT.ID:api_scope:http://www.google.com/m8/feeds/ https://mail.google.com/ https://www.googleapis.com/auth/plus.login
Anyone successfully implement a similar set up for iOS? If so please explain or share documentation? What libraries or SDKs did you use to get the code from google on the iOS app that the web backend could use to generate a proper access token of it's own?
As of June 18th, the google iOS SDK 1.7.0 supports one-time authorization code which is consistent with the Android feature: https://developers.google.com/+/release-notes/