Reputation: 43
I'm currently working on embedding an Apple Watch app in a previously existing iOS application, for my company.
Since it is a vast project, with multiple libraries and developers, we are using Premake to build the projects files.
This is where it gets tricky : Premake doesn't seem to allow multiple targets for projects, whereas it is needed for Apple Watch development (the typical targets being the regular iOS app, the WatchKit extension and the WatchKit app).
Manually, I managed to create two new projects, containing only one target, for the extension and the watch app. I fixed all build errors I encountered and it now looks like my watch app is correctly built and embedded in the iOS app. I feel I'm getting close to something.
Now when I select my watch app scheme and try to run it on the simulator, I get a message box saying "Installation failed - Invalid argument".
My iOS app shows in Apple's new "Apple Watch" settings app, which makes me think it's correctly recognized as containing a watch app.
Of course I tried everything I could think of, messed with the projects/targets/schemes settings but at this point ran out of ideas.
Do you know what could be the cause of this error ?
Do you know how I could get more details about what goes wrong ?
Any advice/experience on how to build a WatchKit project with Premake, or any other suggestion ?
Upvotes: 0
Views: 209
Reputation: 43
I finally found the cause of my issue.
My parent app used custom build locations, which somehow seemed to cause trouble when installing. I put them all back to the default "build" directory which expands to "~/Library/Developer/Xcode/DerivedData".
That might be an Xcode bug, since the build locations for my app extension and watch app were inherited from those custom ones, but still the targets were built in "DerivedData".
Upvotes: 1