Unable to merge Unity 5 into our iOS application
I dont have enough reputation here to comment, so i write it as an answer:After 3 Edits i am not sure what problems are still left...
GetAppController is an inline function in UnityAppController.h If it isnt linked to you project, you probably didnt include the file (but instead only declared GetAppController() somewhere yourself).
The other errors looks like you have conflicts with the basic c-libs. Is your other code using the c++ std lib? and if yes, which one? Which one is stated in Your BuildSettings under "C++ Standard Library"? It should be libc++
The "Solution" to switch "Always Search User Paths" to "No" sounds even more like a problem with other included projects.
Most of my answers are in the question. The core solution was setting "Always Search User Paths" to "No" in the XCode project settings.
As for the last edit, I believe they are bugs. I don't use GetAppController
, instead I have my own method. I have reported the CPU issue, it isn't a major problem as it is only ~3% on phones and ipads.
I've this problem too recently trying to integrate my Unity 5 project into an existing iOS project. How I managed to integrate is
1) Drag Class
and Libraries
files from your Unity
project into your iOS project. Same like the tutorial from the-nerd. Uncheck copy items, and select create group radio box.
2) Update your Header Search Path
and Library Search Path
under Build Settings
. The folders should point to your Unity
project folder.
Header Search Path -> Unity's Classes folder
Library Search Path -> Unity's Library folder
This part is really important, it made me solve those errors.
3) Under Build Phases, remember to create a run script and make sure the script points to the correct path in Unity's Data
folder.
rm -rf "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Data"cp -Rf "$PROJECT_DIR/../CHANGE THIS TO YOU PATH/Data" "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Data"
4) Compare the Build Settings
from the Unity's project and your current iOS project. Make sure you select the correct C++ and C compiler. Your iOS project should match the one of Unity. Also the Linker Flag
have to be in the correct order.
-weak_frameworkCoreMotion-weak-lSystem
That is all I did to make my iOS project compile with the Unity project I have. I hope it helps.