Hello,
I’m facing a problem that I can’t resolve.
I have an existing app, that is already available in the app store.
An another development company has provide us a unity xcode projet. We have to include this unity game into our existing app.
The unity xcode projet compiles fine and I can run it on my device.
The problem is coming from the fact that, when I include this xcode unity projet into my xcode app projet, The projet does not compile. Here is the error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_UnityAppController", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here is my config:
xcode: version 5.1
os: mavericks 10.9.2
xcode app config:
[24295-screen+shot+2014-03-26+at+11.49.23.png|24295]
xcode unity app config:
[24296-screen+shot+2014-03-26+at+11.50.58.png|24296]
What I have done:
- I added the unity xocde projet into my xcode app projet with a “add files” (copy element is checked)
- In the build settings of the xcode app projet, in the target of my app, I added in the "Header Search Paths” settings the path to the folder containing my xcode unity projet
- In my “Appdelegate.h” class of my app, I added a reference to the “UnityAppController.h” via:
`#import “UnityAppController.h"
and adding @property (strong, nonatomic) UnityAppController *unityController; `
Until there, my code compiles fine. My Appdelegate.h recognise the UnityAppController class.
-
in my Appdelegate.m, in the method “didFinishLaunchingWithOptions”, I added the simple following code
` //*************** unity integration ***************************
// unity
BOOL returnBOOL;
if (_unityController == nil) {
_unityController = [[UnityAppController alloc] init];
}
returnBOOL = [_unityController application:application didFinishLaunchingWithOptions:launchOptions];//*************** unity integration ***************************`
With this code, it doesn’t compile. I have the following error without telling me which lines is faulty:
Undefined symbols for architecture armv7: "_OBJC_CLASS_$_UnityAppController", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
!
What I have done wrong. Did I miss something about the xocde project config?
Has anyone succeed by adding an ios unity game into a existing app?
Thank you for your answer
Martin