0
votes

I'm writing an application with Appcelerator/Titanium, currently I am trying to use a third-party framework on my native module and i've been following all the steps on the iOS Module Project - Add a Third-Party Framework documentation so far.

I've added the frameworks to the platforms folder (inside of my module project's folder) and linked them.

Linked Files

then i've added the FRAMEWORK_SEARCH_PATHS and OTHER_LDFLAGS to my module.xcconfig file

FRAMEWORK_SEARCH_PATHS=$(SRCROOT)/../../modules/iphone/module/version/platform/iphone ~/Library/Application\ Support/Titanium/modules/iphone/module/version/platform/iphone /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library /* had to add this, otherwise the app would not even compile */

OTHER_LDFLAGS=$(inherited) -framework CoreBluetooth -framework ExternalAccessory -framework AWSCore -framework AWSCognito -framework AWSKinesis

I'm able to build it and "install" the module on my app, even compiling is ok, but when i try to open the app installed on the device (physical device or emulator), it opens and then closes.

I've checked the logs written on my device and found this

Dyld Error Message: Dyld Message: Library not loaded: @rpath/AWSCore.framework/AWSCore Referenced from: /var/containers/Bundle/Application/DCE36838-FA72-4EEC-879B-7C2C8785742F/Project.app/Fiat Live On Reason: image not found Dyld Version: 390.7

I already tried bunch of different approaches, but with some of them my app fails to compile because of undefined symbols, with others my app fails on finding the framework while compiling, I tried adding i386 and x86_64 architectures on valid architectures and nothing, it compiles, install and then errror.

am I missing something? I've already tried LOTS of things, but NOTHING seems to work...


[Edit 1]

I don't know if versions have anything to do with it but checked my appcelerator/titanium and SDK versions and I got this.

appc -v [5.2.2]

appc ti -v [5.0.6]

ti -v [5.0.8]

appc ti sdk [5.2.2.GA]

AWS SDK Version: aws-ios-sdk-2.4.7

Well, Thanks.

1
Well, leaving my solution here, after some time of research i finally made it work, i had to use a workaround to embed the frameworks on my application project. I found the solution on this case that is open on the appcelerator's issue tracker jira.appcelerator.org/browse/TIMOB-20557pogramos

1 Answers

0
votes

This is a snippet from the aws module we use

module.xcconfig:

FRAMEWORK_SEARCH_PATHS=$(SRCROOT)/../../modules/iphone/com.featherdirect.tiawss3/0.8.3/platform "~/Library/Application Support/Titanium/modules/iphone/com.featherdirect.tiawss3/0.8.3/platform"
OTHER_LDFLAGS=$(inherited) -framework AWSCore -framework AWSS3 -framework AWSCognito

The aws frameworks live in platform at the same level as your .xcodeproj

You are correct, you shouldn't need to be referencing system library. But what I do see, is that you are possibly not actually referencing the final location of the frameworks.