I see lots of posts on this subject, and I am experiencing the same issue. I fail to see why this change in the SDK was put forth, as it has made development a real pain for iOS. In the AIR SDK 4.0 this worked fine. According to the new method, we are supposed to use an environment variable to control which simulator we want to debug in, but this does not work either when multiple iOS SDKs are installed. If this can be controlled by an environment variable, then why can't it be controlled by a command line option to adt? That would be a much more robust solution versus having to change your OS's environment every time you need to switch simulators.
Any response from development on why it is this way now?
Thanks for reporting the issue.
At our end there is no problem when there are multiple iOS SDKs. We used the following commands:
Package App :
adt -package -target ipa-test-interpreter-simulator -storetype <type> -keystore < Certificates > -storepass < password > <.ipa> <.xml> <swf> -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/
Install App :
adt -installApp -platform ios -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -device ios-simulator -package < ipa >
Launch App :
adt -launchApp -platform ios -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -device ios-simulator -appid <APP ID>
Could you please share the adt packaging, install and launch commands?
P.S: In case you are using SDK path as: -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk,
kindly use the SDK path containing the SDK version eg, If you want to use iOS 8.0 simulator use -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk and in case you want to use iOS 7.1 simulator use -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk
I am using this in IntelliJ IDEA, but to simplify troubleshooting I tried from the command line as you did. I am using the following command, but it does not install the ipa file on any iOS simulator. I have set the following variable: AIR_IOS_SIMULATOR_DEVICE=iPad 2
~/SDKs/flex_4.13_15/bin/adt -installApp -platform ios -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -device ios-simulator -package Ipg.ipa
~/SDKs/flex_4.13_15/bin/adt -launchApp -platform ios -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -device ios-simulator -appid com.cat.bcp.mobile.Ipg
Also note that while the iPad 2 simulator is running, running this command yields no devices listed, which is weird:
CM000979654:Ipg leejk$ ~/SDKs/flex_4.13_15/bin/adt -devices -platform ios
No connected device found.
After entering the second adt command, it does launch the app, but launches it on the iPhone 5 simulator, which is undesired. So the documented environment variable setting is not being used. Why is this not a command line option instead?
I order to launch iPad 2 simulator you have to set variable as AIR_IOS_SIMULATOR_DEVICE=iPad, Could you please try this and get back to us with your findings.
As variable is set incorrectly, iPhone 5 simulator get launched, which is default simulator.
Hope this will resolve your problem.
Ok, that was the problem. I would advise that the docs be updated to show that, as it's not clear that only a category of device can be specified instead of specific devices using that variable.
Which brings up another question: How can specific devices be targeted? If it launches the iPad 2 simulator and I want to debug in the iPad AIR simulator, how can I? Or if it launches iPhone 5 by default and I want iPhone 6?
I use flash cc2014 .
AIR_IOS_SIMULATOR_DEVICE=iPad might work with flex,
but it don't work using adt on the command line on my install of AiR 18.104.22.1682..
Graham, be sure that after setting variable in the terminal, you quit Terminal and restart it, then type env to see if the variable is present. I had that problem initially, using the same SDK version.