Reputation: 133
I am building a 3D game over command line with. My script works for all other applications without a problem. Unfortunately the built IPA of the game crashes when I start it on my iPhone. If I build it with the Xcode GUI, it works fine. This error only appears for Xcode projects with SceneKit Assets.
Any idea how I can prevent this error?
Upvotes: 1
Views: 467
Reputation: 166
Seems like Xcode forgets to generate the scnassets when building on command line (xcodebuild). we fixed it with the following build rule:
Script:
${DEVELOPER_TOOLS_DIR}/../usr/bin/copySceneKitAssets "${INPUT_FILE_PATH}" -o "${DERIVED_FILE_DIR}/${INPUT_FILE_NAME}”
Output Files:
$(DERIVED_FILE_DIR)/${INPUT_FILE_NAME}
Upvotes: 1