Getting Sharekit to work

I followed these steps: https://github.com/ShareKit/ShareKit/wiki/Installing-sharekit to install Sharekit. But I still encounter some errors. I am not sure how to solve these problems.

Errors:

Undefined symbols for architecture i386: "_ACAccountTypeIdentifierFacebook", referenced from: +[FBSession renewSystemAuthorization] in libShareKit.a(FBSession.o) "_ACFacebookAppIdKey", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) "_ACFacebookAudienceEveryone", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) "_ACFacebookAudienceFriends", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) "_ACFacebookAudienceKey", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) "_ACFacebookAudienceOnlyMe", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) "_ACFacebookPermissionsKey", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) "_OBJC_CLASS_$_ACAccountStore", referenced from: objc-class-ref in libShareKit.a(FBSession.o) "_OBJC_CLASS_$_ASIdentifierManager", referenced from: objc-class-ref in libShareKit.a(FBSettings.o) "_OBJC_CLASS_$_SLComposeViewController", referenced from: objc-class-ref in libShareKit.a(FBNativeDialogs.o) "_SLServiceTypeFacebook", referenced from: +[FBNativeDialogs composeViewControllerWithSession:handler:] in libShareKit.a(FBNativeDialogs.o) "_sqlite3_bind_double", referenced from: -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _writeEntryInDatabase:] in libShareKit.a(FBCacheIndex.o) "_sqlite3_bind_int", referenced from: -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _writeEntryInDatabase:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _trimDatabase] in libShareKit.a(FBCacheIndex.o) "_sqlite3_bind_text", referenced from: -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _writeEntryInDatabase:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _readEntryFromDatabase:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _readEntriesFromDatabase:excludingFragment:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _removeEntryFromDatabaseForKey:] in libShareKit.a(FBCacheIndex.o) "_sqlite3_close", referenced from: ___23-[FBCacheIndex dealloc]_block_invoke_0 in libShareKit.a(FBCacheIndex.o) "_sqlite3_column_double", referenced from: -[FBCacheIndex _createCacheEntityInfo:] in libShareKit.a(FBCacheIndex.o) "_sqlite3_column_int", referenced from: -[FBCacheIndex _createCacheEntityInfo:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _fetchCurrentDiskUsage] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _trimDatabase] in libShareKit.a(FBCacheIndex.o) "_sqlite3_column_text", referenced from: -[FBCacheIndex _createCacheEntityInfo:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _trimDatabase] in libShareKit.a(FBCacheIndex.o) "_sqlite3_errmsg", referenced from: ___23-[FBCacheIndex dealloc]_block_invoke_0 in libShareKit.a(FBCacheIndex.o) _releaseStatement in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in libShareKit.a(FBCacheIndex.o) _initializeStatement in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _writeEntryInDatabase:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _readEntryFromDatabase:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _readEntriesFromDatabase:excludingFragment:] in libShareKit.a(FBCacheIndex.o) ... "_sqlite3_exec", referenced from: ___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in libShareKit.a(FBCacheIndex.o) "_sqlite3_finalize", referenced from: _releaseStatement in libShareKit.a(FBCacheIndex.o) "_sqlite3_open_v2", referenced from: ___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in libShareKit.a(FBCacheIndex.o) "_sqlite3_prepare_v2", referenced from: _initializeStatement in libShareKit.a(FBCacheIndex.o) "_sqlite3_reset", referenced from: _initializeStatement in libShareKit.a(FBCacheIndex.o) "_sqlite3_step", referenced from: -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _writeEntryInDatabase:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _createCacheEntityInfo:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _fetchCurrentDiskUsage] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _removeEntryFromDatabaseForKey:] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _dropTrimmingTable] in libShareKit.a(FBCacheIndex.o) -[FBCacheIndex _trimDatabase] in libShareKit.a(FBCacheIndex.o) ... ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) 

You need to be guided by how to solve this ... Thank you for your help ...

+8
ios facebook ios6 sharekit
source share
4 answers

I have the same problem switching to the ShareKit library with the new SDK 3.0 for Facebook.

You need to add these frameworks and libraries for troubleshooting:

 Social.framework AdSupport.framework Accounts.framework libsqlite3.dylib 
+20
source share

I do not think that removing other linking flags is a good idea.

See the objective-c category link in the static library and http://www.cocoanetics.com/2011/12/sub-projects-in-xcode/

The new facebook SDK requires several frameworks, do not forget to add them to your project:

  • social.framework
  • accounts.framework
  • AdSupport.framework
  • libsqlite3.dylib
+3
source share

Just add

libsqlite3.dylib

from the related frameworks and libraries of your project in Xcode

+2
source share

This is what finally worked for me: http://t2526.codeinpro.us/q/51501c3fe8432c042610dc68

Removing -ObjC and -all_load from other linker flags in the Xcode build settings.

0
source share

All Articles