- Home /
Empty project + empty apple watch does not compile in Xcode
Hi,
I have been playing with Apple watch in simulator for a few weeks now and was able to figure out what kind of visuals I want on it. I did all this without any Unity project, just Xcode work.
This week I started looking into using my own project and add the visual design of apple watch I made into it and after 4 days of struggling, I'm no where near compiling it. I'm using Unity 5.
So today I started with making an empty Unity project added a simple text on screen and update it with a number:
private int i = 0; public Text _label = null;
void Update () { i++; PlayerPrefs.SetString ("i", i.ToString()); _label.text = i.ToString (); }
this compiles without problem and once I add a watch kit app I get failed build. I browsed around the forum a bit and found some1 with same issue but never answered:
[QUOTE="Streamside7, post: 1967049, member: 459811"]Thanks for your reply, however after upgrading to 4.6.2p2, I have created the simplest Unity app imaginable, have switched to the iOS platform, built the app, have opened the project in Xcode and have added the Watchkit target/extension and I receive the following message in Xcode:
error: /Users/rpinglet/Desktop/SimpleApp/Simple/build/Unity-iPhone/Build/Products/ProductName WatchKit Extension.appex: No such file or directory
This should be a very simple thing to do, but it is not. Have you been able to add a Watchkit extension and compile successfully?
Thanks for your help[/QUOTE]
Any1 has any experience with this on what needs to be done? cause at the moment it seems even google doesn't know everything these day...
updated version to 5.0.1 still same error extra info: I'm using Unity pro
Answer by PuzzleMaster1967 · Apr 06, 2015 at 05:12 AM
The fix is actually quite easy. After you create the Xcode project, add the Watchkit target. Select the Unity-iPhone project in the (Project/Target selection dropdown) Change the Supported Platforms from iPhone to "iOS".
Hut run and everything just magically works!
Hey, I am stuck in the same problem and I followed your procedure but i am getting the same error error: /Users/rpinglet/Desktop/SimpleApp/Simple/build/Unity-iPhone/Build/Products/ProductName Watch$$anonymous$$it Extension.appex: No such file or directory
$$anonymous$$u unity version is 4.6.0f3 and xcode version is Beta Version 6.2 (6C86e)
Can anyone one of you guide me please
if you read first comment made:
Basically the appex file not found problem is caused by the Unity xcode project's build location (with simulator SD$$anonymous$$ checked) is set to build/Debug-iphonesimulator, but the Watch$$anonymous$$it extension's output location is build/Debug-iphoneos. I have copied the generated watchkit app and extension files into the Debug-iphonesimulator to fix this copy file error.
answer is right there ;) somewhere in /users//libraries/... you need to move files from debug-ios to debug/simulator ;)
Was it the same like you or something is different. . And if it is same then can you please tell where to go ahead because I am not getting what you said . Thanks
go to Finder, go to Users and select your name, go to library (it is a hidden folder so if you don't see it google how to display it (ez way to do so with ter$$anonymous$$al) where you ahve to be is:
Users/your macook's name here/Library/Developer/Xcode/DerivedData/
there you can see the different Builds you made. Look up in Xcode (see error msg) where the build is missing go there (should be a Debug-iphonesimulator folder) and you should have a same folder called Debug-iphoneos you copy from the iphoneos folder to the iphonesimulator your watchkit files & folders and will work ;)
Can anyone of guys please tell me how you got Unity Exported ios project with simulator SD$$anonymous$$ checked being compiled successfully on xcode after adding the target of watchApp. Please I really need it. Lots of thanks
Answer by schchang1 · Apr 03, 2015 at 12:25 AM
Sorry I don't have an answer for you but my Unity WatchKit app got a little bit farther.
Basically the appex file not found problem is caused by the Unity xcode project's build location (with simulator SDK checked) is set to build/Debug-iphonesimulator, but the WatchKit extension's output location is build/Debug-iphoneos. I have copied the generated watchkit app and extension files into the Debug-iphonesimulator to fix this copy file error.
After that I encountered another error, the build failed with code signing error (null): error: Embedded binary is not signed with the same certificate as the parent app. Verify the embedded binary target's code sign settings match the parent app's.
I fix this issue by setting the target's identity/team to the same team for the parent app and the watch kit app targets. To set the identity team for the parent app is tricky since the General tab is hidden when using Simulator SDK. I have to change the targeted device family to iOS 8 so the General Tab will be visible.
So I got it compiled and built, but I got another error when running on the simulator when the watch app is being installed on the watch simulator. The error message is SPErrorGizmoInstallNeverFinishedErrorMessage
I am stucked again. I will keep posting my progress, please also share your progressed with me too. Thanks!
Answer by Nik0s · Apr 28, 2015 at 01:15 PM
Hi - just wanted to add that I've written a step by step tutorial on integrating the WatchKit api to Unity: http://devgallery.com/unity/watchkit-unity/
Please let me know how you get on!
Answer by NG_Matthieu · Apr 03, 2015 at 03:26 PM
k, I got it to build also, bit different way I think...
I tried adding the team to my parent app, but after lot of cleaning and rebuilding it kept telling me my parent app was not being signed.
Solution for that was to put parent app in correct team, go to Unity, build app again, go to Xcode when done and add new apple watch kit to it and problem was solved
Current error I'm getting now is
Installation Failed Invalid argument
when I try to run it...
So far my status update, hope to have some better news later
lot of googling later, found 2 possible solutions:
could be related to product name or to project name, product name changed to be same doesn't work and product name is ($PRODUCT_NA$$anonymous$$E) so can't be problem...
noticed on apple developer site that bug report was filed about this: 20204431but not sure that is same as $$anonymous$$e. Also still trying to find where the darn log is so can see what argument is invalid, no success there either...
found the log, just empty no warning no nothing just white :( so no help from there either... back to looking around
I wonder could it be the Unity or Xcode version that may have caused the problems.
$$anonymous$$y Xcode is 6.2(6C121e), and my Unity is 5.0.0f4 personal. iOS Simulator is iOS 8.2 iPhone6 with Apple Watch 42 mm simulator.
I am going to try the process on a different development computer and see if it would magically work.
I have Unity 5.0.1 (same as 5.0.0p3) tried all different devices 5, 5S, 6, 6S and both 38 and 42mm xcode: Version 6.2 (6C131e)
next option would be to try with latest unity 4.6 but that wouldn't me much as main project I need watch for is on Unity 5 to support metal.
I tried Unity 4.6p3 and I got a build error after I add the Watch$$anonymous$$it target No architectures to compile for (ARCHS=armv6, VALID_ARCHS=arm64 armv7 armv7s).
Answer by ThomasPP · Apr 20, 2015 at 03:09 AM
After encountering most of the issues mentioned here and trying lots of the suggestions, I finally got a simulator/watch build running.
The key was to make sure that I changed the 'Supported Platform' field on both the Unity-iPhone target and the Watchkit Extension target to 'iOS' from 'iphonesimulator' - previously I was just setting it for the Unity-iPhone target. Once this was set, I didn't need to copy any files or change any team or code signing or anything - just one step.
This was with Unity 5.0.1p1 and XCode 6.2.