You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/01/10 05:35:58 UTC

[jira] [Commented] (CB-12287) Issues with default simulator target

    [ https://issues.apache.org/jira/browse/CB-12287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15813961#comment-15813961 ] 

ASF GitHub Bot commented on CB-12287:
-------------------------------------

GitHub user kerrishotts opened a pull request:

    https://github.com/apache/cordova-ios/pull/286

    CB-12287: Remove hardcoded simulator build destination

    <!--
    Please make sure the checklist boxes are all checked before submitting the PR. The checklist
    is intended as a quick reference, for complete details please see our Contributor Guidelines:
    
    http://cordova.apache.org/contribute/contribute_guidelines.html
    
    Thanks!
    -->
    
    ### Platforms affected
    
    iOS 4.3.1 and below
    
    ### What does this PR do?
    
    In `cordova-ios@4.3.1` and below, the Xcode build destination when building for a simulator is hardcoded as "iPhone 5s". This works as long as the user has an iPhone 5s simulator installed, but if they remove it, the build process breaks.
    
    This PR follows the same logic as `cordova emulate ios` in choosing a default destination, but also respects `--target` if specified. For example:
    
    ```
        $ cordova emulate ios       # will currently select iPhone SE simulator to build against and emulate
        $ cordova emulate ios --target="iPhone-7-Plus"  # will build against and emulate on the iPhone 7+
    ```
    
    If there are no simulators available, the behavior is undefined, but Xcode wouldn't be able to build either.
    
    ### What testing has been done on this change?
    
    Manual tests and `npm test`
    
    ### Checklist
    - [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
    - [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [X] Added automated test coverage as appropriate for this change.
        - Note: a couple of tests were modified so that they could pass, but they don't actually test this issue. Tests covering the inner logic will come in a separate PR


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kerrishotts/cordova-ios CB-12287

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-ios/pull/286.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #286
    
----
commit 3c0ba16324c44440892beec1fd4c741714836cd2
Author: Kerri Shotts <ks...@apache.org>
Date:   2017-01-10T05:29:00Z

    CB-12287: Remove hardcoded simulator build destination

----


> Issues with default simulator target
> ------------------------------------
>
>                 Key: CB-12287
>                 URL: https://issues.apache.org/jira/browse/CB-12287
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 4.3.1, 6.4.0
>            Reporter: Raymond Camden
>            Assignee: Kerri Shotts
>
> A few days ago I loaded up the XCode Devices menu and deleted a bunch of simulators. I wanted to get rid of old ones and try to get both Cordova and Ionic defaulting to a modern simulator. I didn't delete everything of course, but I did delete a bunch.
> Now I am unable to emulate. When I make a vanilla project, add ios (version is 4.3.1) and do cordova emulate ios, i get:
> xcodebuild: error: Unable to find a destination matching the provided destination specifier:
> 		{ platform:iOS Simulator, OS:latest, name:iPhone 5s }
> 	The requested device could not be found because no available devices matched the request.
> 	Available destinations for the "HelloCordova" scheme:
> I can't even target another emulator. If I open the xcodeproj file though I can run it just fine from XCode.
> I noticed that /cordova/lib/start-emulator has this:
> DEFAULT_TARGET="iPhone 5s"
> I don't know why. I tried changing it, just for the heck of it, and I *still* get the same error.
> So... any ideas?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org