1

I've searched a lot about this, but found no answer(maybe because my question has no answer).

I have an iOS app, written with Titanium. I have the native build code of this app, and I can run it using Xcode. This build code is in the folder: /build/iphone

I have a native iOS app written all in Objective-C, and I have to integrate the Titanium app into my native app. At some point in my native app I have to instantiate a ViewController of the Titanium written app. So I have to use the Titanium project as a sort of library. Is that possible?

I've already tried to import the titanium build project into my native project(using this guide), by dragging the .xcodeproj from the finder into my native project, tried adding the path of the titanium project to the header search path, and tried to instantiate the TiRootViewController by doing:

TiRootViewController ti = [[TiRootViewController alloc]init];
[self presentViewController:ti animated:YES completion:nil];

But when I try to run my project the build fails with these errors:

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TiRootViewController", referenced from:
objc-class-ref in BigliettiViewController.o
"_TiLogMessage", referenced from:
-[BigliettiViewController clearTextFieldPart:] in BigliettiViewController.o
-[BigliettiViewController trovaBiglietti] in BigliettiViewController.o
___41-[BigliettiViewController trovaBiglietti]_block_invoke203 in BigliettiViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any idea? Is what I need to do possible?

Community
  • 1
  • 1
allemattio
  • 1,836
  • 17
  • 33

0 Answers0