Question

We're trying to upload our OSX 10.9 Mac App with Xcode 5. It worked fine with Xcode 4 but now Apple seems to be more restrict with signing sub projects. We get the following error when uploading:

App Store Error

We're using a Core-project that are common for both iOS and OSX. This uses Core Data.

Following this answer https://stackoverflow.com/a/10507330/511299 the solution seems to be to convert our Core project to a static library. However when doing so, the app crashes as it seems that a static library can't include resources (core datas model is a resource).

Following this answer https://stackoverflow.com/a/4610584/511299 we got the app working again with the resource in bundle alongside a static library. However, point 5 states that you should include the bundle in you main project, which results in the same warning from Apple again :(

Any thoughts or ideas?

Was it helpful?

Solution

We finally solved it by copying the file from the Core project to the OSX project via a shell script. We added a "placeholder" xcdatamodeld so we could include it in the OSX project file Build phases / Compile sources. We then added a new "Run Script" with the following code before the "Compile sources" phase:

fromPath=${PROJECT_DIR}/../xxx-Core/xxx-Core-Shared/Resources/db/IBModel.xcdatamodeld
toPath=${PROJECT_DIR}/xxx-Mac/Resources/db/IBModel.xcdatamodeld
rm -rf $toPath
cp -r $fromPath $toPath

Before that we tried to "link" in the file from the Core project to the OSX project, but that did not seem to work. The xcdatamodeld file did not get compiled.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top