Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

iOS Xcode Simulator Problem

Discussion in 'Editor & General Support' started by steveg2357, Oct 28, 2015.

  1. steveg2357

    steveg2357

    Joined:
    Aug 21, 2014
    Posts:
    34
    I was having a problem using simulators in Xcode so I created a simple 2D scene in Unity consisting of a panel that contained a text box. The Target SDK was set to Device SDK and I built the project. When I double clicked the file Unity-iPhone.xcodeproj, Xcode opened with my iPad in the scheme menu. I was able to select the Run button and successfully deploy the app to my iPad.

    I then changed the Target SDK to Simulator SDK in Unity and rebuilt the project. When I double clicked the file Unity-iPhone.xcodeproj, Xcode opened with Unity-iPhone -> My Mac in the scheme menu. There were no other options, such as simulators, when I tried to change this. I received the message "The run destination My Mac is not valid for running the scheme Unity-iPhone" when I selected the Run button.

    I next created a simple project as a Single View Application directly in Xcode and it gave me the option to select one of several simulators so it looks like simulators are available in Xcode.

    I'm running El Capitan 10.11.1, Xcode 7.1 and Unity 5.2.2. Is this a bug in Unity or am I doing something wrong?

    [BTW, there are 238 issues in Xcode for this simple project, including unused variables L_5 and L_6, implicit conversion loses integer precision, extern variable has an initializer, etc.]
     
  2. AndreasX12

    AndreasX12

    Joined:
    Jul 12, 2012
    Posts:
    12
    I have the exact same problem and I have found no solution yet.
     
  3. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Hello, this is a known issue with Xcode 7.1. A work around is to set the Supported Platforms build setting to "iOS". You need to do this in both the project settings and in the build target.

    A fix is expected in the next patch release of both 5.2 and 4.6.9
     
  4. steveg2357

    steveg2357

    Joined:
    Aug 21, 2014
    Posts:
    34
    Please explain how to set both of these settings to iOS.

    When will the next patch release of 5.2 be available?
     
    Last edited: Oct 29, 2015
  5. steveg2357

    steveg2357

    Joined:
    Aug 21, 2014
    Posts:
    34
    After double clicking the file Unity-iPhone.xcodeproj, Xcode opened with Unity-iPhone -> My Mac in the scheme menu. To fix this, I did the following.
    • Clicked on Unity-iPhone in the Xcode project navigator pane
    • Selected the Build Settings tab
    • Changed Supported Platforms from iphonesimulator to iOS in the Architectures section
    • Changed iOS Deployment target from 4.0 to iOS 9.0 in the (null) - Deployment section
    • Changed the My Mac scheme to a simulator, such as iPhone 6s Plus
    I was then able to select the Run button and it successfully launched the simulator with my app.

    NOTE: I did not change the Base SDK from iphonesimulator (SDK not found) in the Architectures section
     
    Last edited: Oct 29, 2015
    ilmario, AizenSSK and AndreasX12 like this.
  6. Chetim

    Chetim

    Joined:
    Jan 30, 2013
    Posts:
    12
    In Xcode, near the left side of the screen, you'll see PROJECT with Unity-iPhone underneath, and TARGETS with the same. Just select Unity-iPhone under PROJECT and TARGETS and near the top, under Architectures of both, is the field "Supported Platforms" and change both of those from iphonesimulator to just iOS.
     
  7. zapjonny

    zapjonny

    Joined:
    Jul 22, 2016
    Posts:
    2
    This is not fixed yet.