I have an iOS Build command on Mac and I want to create a script that will receive arguments like iOS version, Device etc and run a build with it. For some reason I am unable to pass the arguments successfully from the cmd to the script itself. Here's the script:
#!/usr/bin/env node
DEVICENAME="iPhone 5s"
OS="9"
xcodebuild -scheme MyScheme -destination 'platform=iOS Simulator,name=iPhone 5s,OS=9.2' -project /Users/etc/etc/Application.xcodeproj
I tried substituting like this:
xcodebuild -scheme MyScheme -destination 'platform=iOS Simulator,name=$DEVICENAME,OS=$OS' -project /Users/etc/etc/Application.xcodeproj
And like this:
xcodebuild -scheme MyScheme -destination 'platform=iOS Simulator,name=${DEVICENAME},OS=${OS}' -project /Users/etc/etc/Application.xcodeproj
Neither works and I can't seem to find a fix online. Anybody knows what should I do here?