Start a new topic

Help to include wikitude into titanium project

Help to include wikitude into titanium project


I have made a complete app with Titanium and Wikitude for Android with no problem , i need to make the same app on iOS .

I'm sure that using the simulator is not the problem , because i want to start the simulator and see the black screen , but 

xcode stops when he try to build the module, not when the App runs , and give this error:

** BUILD FAILED **

:  The following build commands failed:

:  Ld build/Debug-iphonesimulator/ModuleSamples.app/ModuleSamples normal i386

:  (1 failure)

And i don't own an iphone for now so i can't try on that xD 

I have update OSX to 10.9.0 , xcode to 5.0.2 and Titanium Studio to 3.2.0 . 

EDIT: 13/01/2014

The real problem is that my xcode , for some unknown reason , can't compile the com.wikitude.it module of ios , but the android version run perfectly. And the IOSsimulator work just fine , i started it with only the module for android and everything goes well until i try to open the ArchitectView , as expected it say that there is no module .

So i don't have any clue .   

 

Hi,

looks to me like a problem with the TI Core since the missing symbol has something to do with there internal ad view. (change the log level in titanium studio to verbose to see the actual linker error)

But you can work around the issue if you append a -framework iAd to the OTHER_LDFLAGS or the SIMULATOR ONLY in the Wikitude module.xcconfig (Using the module.xcconfig is the easiest way to add another framework which is not necessarily used by the module, but by the Titanium Core itself).

OTHER_LDFLAGS=$(inherited) -F$(SRCROOT)/../../modules/iphone/com.wikitude.ti/3.2.1/platform/iphone -lc++ -lsqlite3 -lz -ObjC -framework AssetsLibrary -framework CoreMedia -framework CoreMotion -framework CoreVideo -framework Security -framework iAd -framework WikitudeSDK

 

Best regards

Andreas

Sorry to ask this question again, but after reading all these messages still unclear to me where I have to store WikitudeSDK.Framework to compile and run Titanium apps.

I've downloaded the com.wikitude.ti from MarketPlace. Then I've downloaded the WikitudeTitaniumSample. I've create the new workspace as indicated in the Titanium documentation from Wikitude Developer page here: http://developer.wikitude.com/documentation/appcelerator and com.wikitude.ti module is configure in tiapp.xml.

Now, I can't compile the sample app for iphone emulator. LD is not able to find the Wikitude lib/framework and therefore cannot complete its compilation.

:  ** BUILD FAILED **

:  The following build commands failed:

:  Ld build/Debug-iphonesimulator/ModuleSamples.app/ModuleSamples normal i386

:  (1 failure)

However I can compile it for Android, but I am not sure if it is working or not, because every sample/option that I try exits with an error by forcing the app to close.

So after reading all the messages here and considering the updated versions of Titanium as well as Wikitude SDK and Wikitude samples files, I get confused. so:

Should I create/copy folder of WikitudeSDK to list WikitudeSDK.Framework... if so, where should I put that folder (i.e. in Library/ApplicationSupport/Titanium/modules or as new folder in the application workspace/build/iphone folder? If that's the case, do I edit module.xcconfig? Which one (the one located in Library/../../modules/iphone or the one in the workspace/buid/iphone folder?  

Then, how can I verify if the corresponding Wikitude framework/library is included in the Titanium build folder? What file should I have there?

Could someone here that already has had the luck to compile and run this sample app on both platforms (Android and iOS), post a step-by-step based on current builds of Titanium, WikitudeSDK and sample files?

It would be much appreciated !

For additional information of my config, here's a screenshoot of this situation (android fail, iOS error, tiapp.xml properties and workspace folders/files): https://www.dropbox.com/s/j73vxdv0ket6aj0/Image1.png

Thanks and regards,

OKFP

Thanks for the answer i have added the framework iAd in the IoSsimulator LD but nothing changed ,  the console give me only this , with any level of verbose :

Titanium Command-Line Interface, CLI version 3.2.0, Titanium SDK version 3.2.0.GA

Copyright (c) 2012-2013, Appcelerator, Inc.  All Rights Reserved.

Please report bugs to http://jira.appcelerator.org/

:   Found Titanium module id=com.wikitude.ti version=3.2.1 platform=iphone deploy-type=development path=/Users/sinergy/Library/Application Support/Titanium/modules/iphone/com.wikitude.ti/3.2.1

:   Deploy type: development

:   Building for target: simulator

:   Building using iOS SDK: 7.0.3

:   Building for iOS iPhone Simulator: 7.0.3

:   Building for device family: iphone

:   Minimum iOS version: 6.1

:   Debugging disabled

:   Profiler disabled

:   Forcing rebuild: /Users/sinergy/Desktop/Ios_appsSimo/titanium_workspace2/WikitudeTitaniumSample/build/iphone/build-manifest.json does not exist

:   Initiating prepare phase

:   Cleaning old build directory

:   Performing full rebuild

:   Copying Xcode iOS files

:   Creating Xcode project directory: /Users/sinergy/Desktop/Ios_appsSimo/titanium_workspace2/WikitudeTitaniumSample/build/iphone/ModuleSamples.xcodeproj

:   Writing Xcode project data file: Titanium.xcodeproj/project.pbxproj

:   Writing Xcode project configuration: project.xcconfig

:   Writing Xcode module configuration: module.xcconfig

:   Injecting native libraries into Xcode project file

:   Forcing rebuild: ApplicationDefaults.m has changed since last build

:   Writing application defaults: /Users/sinergy/Desktop/Ios_appsSimo/titanium_workspace2/WikitudeTitaniumSample/build/iphone/Classes/ApplicationDefaults.m

:   Initiating Xcode pre-compile phase

:   Processing JavaScript files

:   Compiling localization files

:   Checking for Splash Screen localization

:   Invoking xcodebuild

:  ** BUILD FAILED **

:  The following build commands failed:

:  Ld build/Debug-iphonesimulator/ModuleSamples.app/ModuleSamples normal i386

:  (1 failure)

Can this give you more information than before ? 

Hi,

both of you should change the log level to verbose to that you can see why the linker fails (and maybe post the linker output here again). After that, you should see that the TiAdView is causing the problems (that was the problem that we could find) because the iAd.framework was missing. Maybe a project clean helps after you have changed the linker flags for the simulator.

The WikitudeSDK is included in the module, so you don't have to copy the Wikitude SDK somewhere on the file system. It is included in the platform/iphone folder of the Wikitude module and the module is configured to look in the correct location during linking.

 

But please remember, although that your application will compile and link for the simualtor, the Wikitude SDK will only showing a black screen on the simulator because of the missing camera and sensors in the simulaltor.

 

Best regards

Andreas

Thanks for the reply.

The only way that I managed to run this sample in iOS simulator was to manually add the Framework to xcode project and run it from there. However I can't run it from Titanium IDE directly due its error.

On the other hands, even when I add the -framework iAd declartive in the module.xcconfig, every time that I hit Run on Titanium, of course, it replaces this file with the standard one without the iAd.

So, do I add the iAd framework in Titanium IDE in order to avoid this problem? How should I do that (where do I add it)?

Thanks and regards,

Flavio

Hi All,

This is the error that I have after activate trace log:

:  Ld build/Debug-iphonesimulator/ModuleSamples.app/ModuleSamples normal i386

:      cd /Users/fpassa/Documents/Titanium/WikitudSamples/WikitudeTitaniumSample/build/iphone

:      setenv IPHONEOS_DEPLOYMENT_TARGET 6.0

:      setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin"

:      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/fpassa/Documents/Titanium/WikitudSamples/WikitudeTitaniumSample/build/iphone/build/Debug-iphonesimulator -L/Users/fpassa/Documents/Titanium/WikitudSamples/WikitudeTitaniumSample/build/iphone/lib -L/Users/fpassa/Documents/Titanium/WikitudSamples/WikitudeTitaniumSample/modules/iphone/com.wikitude.ti/3.2.1 -F/Users/fpassa/Documents/Titanium/WikitudSamples/WikitudeTitaniumSample/build/iphone/build/Debug-iphonesimulator -filelist /Users/fpassa/Documents/Titanium/WikitudSamples/WikitudeTitaniumSample/build/iphone/build/ModuleSamples.build/Debug-iphonesimulator/ModuleSamples.build/Objects-normal/i386/ModuleSamples.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -F$ /Library/Application Support/Titanium/modules/iphone/com.wikitude.ti/3.2.1/platform/iphone -lc++ -lsqlite3 -lz -ObjC -framework AssetsLibrary -framework CoreMedia -framework CoreMotion -framework CoreVideo -framework Security -framework iAd -framework WikitudeSDK -F$ /Library/Application Support/Titanium/modules/iphone/com.wikitude.ti/3.2.1/platform/iphone -lc++ -lsqlite3 -lz -ObjC -framework AssetsLibrary -framework CoreMedia -framework CoreMotion -framework CoreVideo -framework Security -framework iAd -framework WikitudeSDK -weak_framework iAd -fobjc-link-runtime -Xlinker -no_implicit_dylibs -stdlib=libstdc++ -mios-simulator-version-min=6.0 -weak_framework CoreText -framework EventKit -framework EventKitUI -weak_framework Security -licucore -framework Foundation -weak_framework UIKit -framework CoreGraphics -weak_framework AddressBook -framework AddressBookUI -framework CFNetwork -framework CoreLocation -weak_framework MapKit -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -lsqlite3 -lz -framework AudioToolbox -weak_framework MediaPlayer -framework AVFoundation -lxml2 -framework StoreKit -lTiCore -lcom.wikitude.ti -framework ExternalAccessory -ltiverify -lti_ios_debugger -lti_ios_profiler -Xlinker -dependency_info -Xlinker /Users/fpassa/Documents/Titanium/WikitudSamples/WikitudeTitaniumSample/build/iphone/build/ModuleSamples.build/Debug-iphonesimulator/ModuleSamples.build/Objects-normal/i386/ModuleSamples_dependency_info.dat -o /Users/fpassa/Documents/Titanium/WikitudSamples/WikitudeTitaniumSample/build/iphone/build/Debug-iphonesimulator/ModuleSamples.app/ModuleSamples

:  clang: error: no such file or directory: '/Library/Application'

:  clang: error: no such file or directory: 'Support/Titanium/modules/iphone/com.wikitude.ti/3.2.1/platform/iphone'

:  clang: error: no such file or directory: '/Library/Application'

:  clang: error: no such file or directory: 'Support/Titanium/modules/iphone/com.wikitude.ti/3.2.1/platform/iphone'

:  ** BUILD FAILED **

:  The following build commands failed:

:  Ld build/Debug-iphonesimulator/ModuleSamples.app/ModuleSamples normal i386

:  (1 failure)

 

I've also checked the path indicated and I already have the framework there, but Titanium(Xcode Link) seems that library can't be found. Any idea?


/Library/Application Support/Titanium/modules/iphone/com.wikitude.ti/3.2.1/platform/iphone/WikitudeSDK.framework


 

Regards,

Flavio

I experienced the same issue. It seems each scenario is slightly different but the way I fixed it was by:

Find the module.xcconfig file situated within the com.wikitude.ti directory where you extracted the module .zip file. Edit the line below to match where the framework and your TiSDK version is located on your machine:

-F$(SRCROOT)/../../modules/iphone/com.wikitude.ti/3.2.1/platform/iphone

For example, I put it in a /Framework directory and altered the module.xcconfig file to match:

-F/Users/hardbyte/Documents/Titanium Studio\ Workspace/WikitudeTest/Framework

Don't forget to clean build etc..

http://developer.appcelerator.com/question/154093/using-wikitude-in-titanium

Hi,

Thanks Craig for pointing this out!

The Wikitude Module is supposed to be dragged into a existing project and then extracted inside the project. If you install the module 'globally' on your machine, it might be necessary to edit the search path for the Wikitude SDK since it's reference is configured for a local project usage.

Best regards
Andreas

Hi Andreas,

Yes that's what I figured but this confuses quite a few Titanium Developers as we are used to extracting the .zip to our global module directory, for example: /Users//Library/Application Support/Titanium/modules/iphone etc..

It was only really figured out when using Xcode... which is never a pleasant experience to us TiDev's ;)

All working ok for me now apart from the Video examples.

Hi Craig,
I wasn't aware of the fact that TiDev's prefer to use the global installation of modules. As long as two framework search paths will not result in unnecessary linker warnings, I will include both paths in the future to make the Wikitude Module integration as smooth as possible.

Are you aware of any additional possibility to include modules in the Titanium World (Studio)?

Best regards
Andreas

Hi Andreas,

It's not a problem as such, just that TiDev's (mainly newbies - sorry folks) who download modules from the Appcelerator Marketplace are instructed to extract the .zip to their global module directory as explained here - modules usually then run 'out of the box', they will be unaware to change the paths in the module.xcconfig file.

Many thanks

Craig

 

 

Hi Craig,

Thanks for pointing me to the link, I was always referring to this one.

I guess that most Modules also don't depend on any other library/framework than standard iOS ones, so there is no more configuration to be done since the iOS frameworkd don't require a specific search path.

So thanks again for your reply, I will keep it in mind for the next SDK/Module update which should be public in Q1 or maybe  there will be a seperate Module release.

Best regards
Andreas

 

Hi Andreas,

I completely understand. Once upon a time when I was a TiDev newbie, adding modules to the global directory was a godsend because of ease of use amongst shared projects - I also got used to extracting *all* modules and implementing them this way.

However, I'm all grown up now and usually extract to the project root directory to avoid any conflicts with other modules.

This is how I became aware of the issue related to this forums post. Hope it helps clear up the **Build Failed** issue for some people.

Many thanks

Craig

 

 

Sorry but i'm a noob with TI what i need to do to solve the problem ? How can i install only the module for the single project ?
Login or Signup to post a comment