phonegap-parse-plugin icon indicating copy to clipboard operation
phonegap-parse-plugin copied to clipboard

FacebookSDK / -ObjC flag issues

Open gsautr opened this issue 9 years ago • 16 comments

Looks like these can be resolved if building natively but not when running this plugin. Can you take a look please?

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)

gsautr avatar Jul 31 '14 12:07 gsautr

+1

lauborges avatar Dec 22 '14 01:12 lauborges

+1

hellosmithy avatar Jan 14 '15 15:01 hellosmithy

+1

desamtralized avatar Jan 14 '15 15:01 desamtralized

+1

ianalexander avatar Mar 02 '15 18:03 ianalexander

+1

igmt avatar Mar 02 '15 19:03 igmt

+1. Is there any workaround? I know next to nothing about ios dev

preppypiet avatar Mar 22 '15 02:03 preppypiet

Yup, same problem here. Build fails everytime, now I need to dwelve into XCode imports.

pskl avatar Mar 24 '15 15:03 pskl

I managed to solve it by downloading the facebook sdk and adding that to the project. I guess this replaces the internal dependency in the parse api sdk? Either way, it somehow works now! Apparently this is a known bug and fb is investigating. Something to do with a dependency of parse and both fb clashing.

preppypiet avatar Mar 24 '15 16:03 preppypiet

To solve this problem is to remove the -objc compiler flag. This way you don't have to add the Facebook framework to solve this bug.

  1. Open the project in xcode
  2. Navigate to Build Settings
  3. Scroll down to the entry: Other Linker Flags
  4. Remove the -objc entry from Other Linker Flags
  5. You solve the problem by not adding extra junk to your project and removed an old compiler setting

idlework avatar Apr 03 '15 15:04 idlework

@idlework that does solve the issue, but I am now unable to register the device using the initialize function. Did you manage to register an iOS device? If so, could you describe the procedure.

tiagojdf avatar May 04 '15 13:05 tiagojdf

@Tiagojdferreira No problems here. My devices are registered correctly in Parse

The tutorial I used to setup Parse and my implementation gist.

Hop that helps... let me know.

idlework avatar May 06 '15 13:05 idlework

@idlework thanks, but I eventually solved the problem.

tiagojdf avatar May 06 '15 16:05 tiagojdf

@Tiagojdferreira Glad to hear you solved your problem. Maybe it is good to share what your problem was and how you solved it.

idlework avatar May 07 '15 10:05 idlework

by removing the -ObjC your cordova on ready event will never fired. That's mean your cordova not work well.

I got this problem solved. https://github.com/ihsanberahim/phonegap-parse-plugin/blob/master/README.md

Just add the frameworks;

Twitter.framework
Social.framework
Accounts.framework
libsqlite3.dylib
libsqlite3.0.dylib

Additional Resources: http://blog.ihsanberahim.com/2015/05/install-parse-plugin-with-ionic.html

ihsanberahim avatar May 09 '15 15:05 ihsanberahim

@ihsanberahim thank you very much

bluety avatar May 11 '15 08:05 bluety

@ihsanberahim That problem doesn't occur in my project. Also when I create a simple project with only this framework the ready event is dispatched.

idlework avatar May 11 '15 10:05 idlework