Setting up
Before using SDK you need to be sure everything is configured correctly for your app:
- iOS platform is added to your app’s platforms list;
- client authorization is enabled;
- redirect_uri ok{APP_ID}://authorize is added to redirect_uri’s list;
- application has all required API permissions. It is recommended to have LONG_ACCESS_TOKEN permission enabled for native apps.
To enable SDK do the following:
- add SDK files to the project, i.e. as git submodule
- update Info.plist according to the example
- add ok{APP_ID} and okauth schemes
- add following code block
- update didFinishLaunchingWithOptions method in AppDelegate
- add method openURL to AppDelegate
SDK usage example
Authorization (authorizeWithPermissions)
REST method invocation (invokeMethod)