Note that there are some explanatory texts on larger screens.

plurals
  1. POXcode 4 - command line target with initial setup
    text
    copied!<p>I am implementing an app which has a dependency to a command line tool.<br> This is because there are some presets to do.<br> The command line tool is responsible to create a sqlite file with all initial information needed by the app (clearly speaking: its just a tool to add some initial data to the app). </p> <p>Now the problem is, that during debugging everything works fine but if I'll do a release build, some errors occur.<br> The first error was</p> <pre><code>target specifies product type 'com.apple.product-type.tool', but there's no such product type for the 'iphoneos' platform" </code></pre> <p>This was because my main app had the command line tool as a target dependency. I solved this by removing the target dependency and added the build to a run script phase:</p> <pre><code>#Build the initial setup target xcodebuild -target InitialCoreDataSetup -sdk macosx -configuration $CONFIGURATION #Run initializing data target to get current sqlite file cd "$CONFIGURATION_BUILD_DIR" cd .. cd "$CONFIGURATION" current_dir=$(pwd) ./InitialCoreDataSetup "$current_dir" "$SRCROOT" "$CONFIGURATION" </code></pre> <p>Now the problem is, that I get the following error:</p> <pre><code>=== BUILD NATIVE TARGET InitialCoreDataSetup OF PROJECT XY WITH CONFIGURATION AdHoc === Check dependencies SDK Configuration Error: no wrapper for product type @ </code></pre> <p>I have absolutely no idea how to fix this. Any suggestions?</p> <p>How do you provide your app with an initial sqlite file?</p> <p>Thanks in advance for any help!<br> <strong>EDIT</strong> At the moment the build phases of my app target are the following: <img src="https://i.stack.imgur.com/q4RHf.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload