avivais / phonegap-parse-plugin

Phonegap 3.0.0 plugin for Parse.com push service
195 stars 315 forks source link

FacebookSDK / -ObjC flag issues #15

Open gsautr opened 10 years ago

gsautr commented 10 years ago

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) "_OBJCCLASS$_FBAppCall", referenced from: objc-class-ref in Parse(PFFacebookAuthenticationProvider.o) "_OBJCCLASS$_FBRequest", referenced from: objc-class-ref in Parse(PFFacebookAuthenticationProvider.o) "_OBJCCLASS$_FBSession", referenced from: objc-class-ref in Parse(PFFacebookAuthenticationProvider.o) "_OBJCCLASS$_FBSessionTokenCachingStrategy", referenced from: _OBJCCLASS$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o) "_OBJCMETACLASS$_FBSessionTokenCachingStrategy", referenced from: _OBJCMETACLASS$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)

lauborges commented 9 years ago

+1

hellosmithy commented 9 years ago

+1

desamtralized commented 9 years ago

+1

ianalexander commented 9 years ago

+1

igmt commented 9 years ago

+1

preppypiet commented 9 years ago

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

pskl commented 9 years ago

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

preppypiet commented 9 years ago

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.

idlework commented 9 years ago

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
tiagojdf commented 9 years ago

@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.

idlework commented 9 years ago

@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.

tiagojdf commented 9 years ago

@idlework thanks, but I eventually solved the problem.

idlework commented 9 years ago

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

ihsanberahim commented 9 years ago

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

bluety commented 9 years ago

@ihsanberahim thank you very much

idlework commented 9 years ago

@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.