问题
I need to mock test data instead of trying to use the camera while debugging with the simulator.
回答1:
You should be able to use the value of Titanium.Platform.model
for this. IIRC, it returns x86_64
on the simulator.
来源:https://stackoverflow.com/questions/13090844/how-can-i-tell-if-my-titanium-app-is-running-on-the-simulator-or-not