Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5199] Some machines are returing "Simulator" and some are returning "iPhone Simulator" for Titanium.Platform.name

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2016-08-19T23:31:33.000+0000
Affected Version/sRelease 1.8.0
Fix Version/sn/a
ComponentsiOS
Labelstraining
ReporterNatalie Huynh
AssigneeIngo Muschenetz
Created2011-09-02T11:15:40.000+0000
Updated2017-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

Comments

  1. Chris Barber 2016-08-19

    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".
  2. Josh Longton 2016-08-24

    When Titanium.Platform.name is used on an iOS 10 device it returns iOS as the Titanium.Platform.name instead of iPhone OS. This is due to apple as Chris said above.
  3. Lee Morris 2017-03-23

    Closing ticket as Won't Fix with reference to the above comments.

JSON Source