0

I am working on project and use parse service as a backend. I have check it's sample and document but Still i am not able to solve the below error

Undefined symbols for architecture i386:
  "_FBTokenInformationExpirationDateKey", referenced from:
      -[PFFacebookTokenCachingStrategy cacheTokenInformation:] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy expirationDate] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setExpirationDate:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_FBTokenInformationTokenKey", referenced from:
      -[PFFacebookTokenCachingStrategy accessToken] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setAccessToken:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_FBTokenInformationUserFBIDKey", referenced from:
      -[PFFacebookTokenCachingStrategy facebookId] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setFacebookId:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_OBJC_CLASS_$_FBAppCall", referenced from:
      objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBRequest", referenced from:
      objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBSession", referenced from:
      objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
      _OBJC_CLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
  "_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
      _OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have Added all the framework which are added in the sample.

After working more on this project and I found the exact problem.

I have added two library, One is admob to show ad for that I need to set other linker flag to -ObjC other wise App will get crash as per this link AdMob crashes with [GADObjectPrivate changeState:]: unrecognized selector

If I set this flag then the error as per the above is coming and If I remove this flag then the error will not come but the app will crash as google load it's ad.

Can any know the solution to add both lib and work on the project

Community
  • 1
  • 1
  • You need to add facebook SDK. – Priyatham51 Oct 21 '13 at 18:13
  • I told that this problem is occur only in simulator not in device, I have also added facebook framework. When I have create sample using same framework then this problem is not coming. – user2904261 Oct 23 '13 at 17:28
  • I have work more on this project and find the exact problem. I have added two library, One is admob to show ad for that I need to set other linker flag to -ObjC other wise App will get crash as per this link http://stackoverflow.com/questions/12635283/admob-crashes-with-gadobjectprivate-changestate-unrecognized-selector If I set this flag then the error as per the above is coming and If I remove this flag then the error will not come but the app will crash as google load it's ad. Can any know the solution to ad both lib and work on the project – user2904261 Oct 23 '13 at 19:52
  • so you found the problem ?? – Priyatham51 Oct 23 '13 at 19:55
  • No I have not found solution. Still working on that problem. Do you understand the problem? – user2904261 Oct 23 '13 at 20:00

2 Answers2

1

I guess your Facebook Installation from ~/Documents/FacebookSDK is older than the one which Parse framework was used to build. Install the latest Facebook SDK from https://developers.facebook.com/resources/facebook-ios-sdk-current.pkg and try building again.

Rajiv
  • 306
  • 2
  • 5
0

At the I found the solution for this problem

We need to set other linker flag as per below

-force_load "Lib Path"

In this case I have set as per below

-force_load "$(SRCROOT)/Admob/libGoogleAdMobAds.a"

means load only that library which is need for the project