Brian
Brian

Reputation: 161

Salesforce iOS SDK - linker issues with sqlite3 symbol

I am using version 2 of the SalesforceMobileSDK. I am building a Release version of the static library target ( SalesforceSDKCore ).

Once the build succeeds, I copy Universal static library that was created ( ~/Library/Developer/Xcode/DerivedData/Build/Products/Release-iphoneos/ ) into my project.

I have added the libSalesforceSDKCore.a lib to the Link Binary With Libraries in the Build Phases tab.

I have also set the Library Search Paths in the Build Settings to the path of the libSalesforceSDKCore.a lib in my project.

However, when I go to build my project I continually get linker errors :

"_sqlite3_key", referenced from:
  -[FMDatabase setKey:] in libSalesforceSDKCore.a(FMDatabase.o)
"_sqlite3_rekey", referenced from:
  -[FMDatabase rekey:] in libSalesforceSDKCore.a(FMDatabase.o)
"_deflate", referenced from:
  -[NSData(SFzlib) gzipDeflate] in libSalesforceCommonUtils.a(NSData+SFAdditions.o)
"_deflateInit2_", referenced from:
  -[NSData(SFzlib) gzipDeflate] in libSalesforceCommonUtils.a(NSData+SFAdditions.o)
"_deflateEnd", referenced from:
  -[NSData(SFzlib) gzipDeflate] in libSalesforceCommonUtils.a(NSData+SFAdditions.o)

My questions are

  1. How can I build libSalesforceSDKCore.a so that it contains the sqlite3_key symbol

  2. How can I find the "deflate" implementation code for the missing symbols referenced in libSalesforceCommonUtils.a

If I left out any relevant information, please ask me. There is a lot I could provide but In the interest of providing only useful information I've kept this question sparse.

Upvotes: 0

Views: 248

Answers (1)

rp1818
rp1818

Reputation: 1

I faced similar issue, adding libz.tbd to Build Phase->Link Binaries to Libraries solved my problem.

Upvotes: 0

Related Questions