ios - Registration of Xcode Project to Bluemix -
imfclient.sharedinstance().initializewithbackendroute
each time try line in xcode 6, getting error:
'use of unresolved identifier imf client'
is there way resolve this?
you have make sure have imported correct header files configured frameworks/pods correctly. seems using swift add instructions below:
1) make sure have configured pod file correctly. below standard pod file using imf services, need include resources need (imfcore in case above):
source 'https://github.com/cocoapods/specs.git' # copy following list , remove dependencies not need pod 'imfcore' pod 'imfgoogleauthentication' pod 'imffacebookauthentication' pod 'imfurlprotocol' pod 'imfpush' pod 'imfdata'
2) terminal, go project folder , install dependencies following command:
pod install
3) open {appname}.xcworkspace instead of .xcproject. .xcworkspace has of pods , decencies configured correctly after pod install has been completed successfully.
4) in swift need add correct import statements header files in bridging-header.h. again show standard bridging-header.h file when using imf services, need include ones require (at least imfcore in case):
#import <foundation/foundation.h> #import <cdtdatastore/cloudantsync.h> #import <cloudanttoolkit/cloudanttoolkit.h> #import <imfcore/imfcore.h> #import <imfpush/imfpush.h> #import <facebooksdk/facebooksdk.h> #import "imffacebookauthenticationhandler.h" #import "imfgoogleauthenticationhandler.h" #import <imfdata/imfdata.h>
once have installed , configured dependencies correctly should able register client backend using following:
imfclient.sharedinstance().initializewithbackendroute(applicationroute, backendguid: applicationid)
please note: need add applicationroute , applicationid above. these variables shown on ama dashboard when registered client.
if want see similar instructions when using objective-c please see following:
https://www.ng.bluemix.net/docs/starters/mobilefirst/gettingstarted/existingproject.html#createapp
Comments
Post a Comment