2
votes

I am trying to create an module for an third party framework in iOS. The framework is AdjustSdk.framework. My Modules name is vgueAdjust.

I created the module like in

the docs of appcelerator.com

shown and integrated it in my testapplication.

But the testapplication builds with Errors:

[ERROR] : ** BUILD FAILED ** [ERROR] : The following build commands failed: [ERROR] : Ld build/Intermediates/testapplication.build/Debug-iphoneos/testapplication.build/Objects-normal/arm64/testapplication normal arm64 [ERROR] : Ld build/Intermediates/testapplication.build/Debug-iphoneos/testapplication.build/Objects-normal/armv7/testapplication normal armv7 [ERROR] : (2 failures)

I use:

Titanium SDK: 5.3.0

Module:

-Architectures: $(ARCHS_STANDARD)

-Build Active Architectures Only: NO

-Valid Architectures: arm64 armv7 armv7s

The AdjustSdk.framework is listed my vgueAdjust.xcodeproj in "Build Phases/Link Binary With Libraries"

In my "Framework Search Paths" and "Library Search Paths" is "$(inherited)"

The module is also build vor i386 and x86_64

vgue:1.0.0 vgue$ xcrun lipo -info libvgue.adjust.a Architectures in the fat file: libvgue.adjust.a are: armv7 i386 x86_64 arm64

My tiapp.xml contains:

<modules>
    <module platform="commonjs">ti.cloud</module>
    <module platform="iphone">vgue.adjust</module>
</modules>

and my module-manifest: architectures: armv7 arm64 i386 x86_64

1

1 Answers

0
votes

I guess that you have to add following line to your module.xcconfig:

OTHER_LDFLAGS=$(inherited) -framework AdjustSdk

In any case you need to find full description of error but not only "Ld failed"

Also you need to put AdjustSdk into platforms/iphone (or iphone/Resources after 5.2.0) folder.

iphone/Resources

Directory for platform-specific assets. This is analogous to the app/platform directory in a standard Titanium application project, and contains platform-specific assets that are not processed by Titanium but copied over to the module's package. For example, place any third-party frameworks or bundles you want to use with the module in this folder. Note: This directory will only be recognized in Titanium Mobile 5.2.0.GA and later.

http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Module_Project