[TIMOB-5199] Some machines are returing "Simulator" and some are returning "iPhone Simulator" for Titanium.Platform.name
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2016-08-19T23:31:33.000+0000 |
Affected Version/s | Release 1.8.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | training |
Reporter | Natalie Huynh |
Assignee | Ingo Muschenetz |
Created | 2011-09-02T11:15:40.000+0000 |
Updated | 2017-03-23T22:35:09.000+0000 |
Description
Steps to Reproduce:
1. Create a new application
2. add alert(Titanium.Platform.name) to the following code
3. Run the application on iPhone simulator
Actual Result:
Some machine returns "Simulator" and some return "iPhone Simulator"
Expected Result:
To return the same value
Additional Information:
- Community users seems to be doing the check against "Simulator"
- Tested with xCode 4.0.2 and 4.2 and different SDK, did not make a difference, machines that return Simulator always returned Simulator and vice versa
When running an app on the iOS Simulator, the platform name is not guaranteed to be the same. It's up to Apple whatever they want to display. For iOS 10 simulator, the platform name is "iPhone OS".
When
Titanium.Platform.name
is used on an iOS 10 device it returnsiOS
as theTitanium.Platform.name
instead ofiPhone OS
. This is due to apple as Chris said above.Closing ticket as Won't Fix with reference to the above comments.