Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (brightcove)
Viewing all articles
Browse latest Browse all 2

iOS module fails to build after pod installed Brightcove SDK

$
0
0

Hi, so I'll try to make this as simple to follow as possible! I'm trying to create a native iOS module for our appcelerator app that uses the new Brightcove iOS SDK to play streaming videos from our library. So far I can create the module using the usual titanium create command, eg:


titanium.py create --platform=iphone --type=module --dir=/Users/me/path/to/code/ --name=videotest --id=com.example.videotest

This with no modifications will obviously build fine and show the hello world output when using the titanium run command to launch the ios simulator. Now the problem is to include the new iOS Brightcove SDK it seems to need to be installed using cocoapods. So I make the example Podfile:


platform :ios, '7.0' # (or whatever version you want to target)

pod 'Brightcove-Player-SDK', '~> 4'

And then run pod install from the terminal (This is all in OSX by the way). One installed along with Reactive cocoa the build process no longer works, you get build failures due to this error from the Libtool part of the build script:


/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods is not an object file (not allowed in a library)

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1

Through a lot of experimentation and reading the build.py I managed to get the build failures to go away by copying the libPods.a file into the build folders manually and it no longer complains. I also found as I now had two xcconfig files (titanium.xcconfig and Pods.xcconfig) I had to add $(inherited) to the search paths within them.

As I say it builds but it doesn't seem to do so correctly as if I change even simple things like the exampleProp value in the module.m file after build these changes are not reflected in the simulator or terminal output.

Anyone been here before, used pods with modules or even better used the new brightcove apis in a module yet? I noticed the old ti.brightcove module seems to have vanished these days due to the new SDK I guess but has anyone managed to update? Thanks all!


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images