Search code examples
iosxcodebuild-errorcommand-line-tool

iOSOpenDev command line tool build error


Okay, so i have spent all day searching the web for why this is happening. I have installed the iOSOpenDev XCode Templates, and I opened a new command line tool project, and its giving me this error:

target specifies product type 'com.apple.product-type.tool', but there's no such product type for the 'iphoneos' platform

Does anyone know how to fix this? thanks in advance.


Solution

  • This must be an installation issue. Re-install iOSOpenDev and check if there are errors in its installer log. I had the same problem and resolved it with the following two steps.

    1) xcode-select must point to the correct xcode location, for example run the following line in Terminal:
    $ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    
    2) You must agree xcode license in Terminal
    $ sudo xcodebuild -license
    $ xcodebuild -license
    

    After that, reinstall the tool and it should work.