skip to Main Content

I am getting the above error after updating my deployment target (as the store now demands this min version)

<preference name="deployment-target" value="14.0" />

It is the same error as in this post, however I already have target-device set to universal, and also I don’t get any Available destinations

Ionic Info is

       Ionic:

       Ionic CLI                     : 5.2.7 (/usr/local/lib/node_modules/ionic)
       Ionic Framework               : @ionic/angular 4.11.13
       @angular-devkit/build-angular : 0.802.2
       @angular-devkit/schematics    : 8.3.29
       @angular/cli                  : 8.2.2
       @ionic/angular-toolkit        : 2.3.3

    Cordova:

       Cordova CLI       : 9.0.0 ([email protected])
       Cordova Platforms : ios 5.1.1
       Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 14 other plugins)

    Utility:

       cordova-res : 0.14.0 (update available: 0.15.3)
       native-run  : not installed

    System:

       Android SDK Tools : 26.1.1 (/Users/Development/.android-sdk-macosx/)
       ios-deploy        : 1.9.4
       ios-sim           : 8.0.2
       NodeJS            : v12.18.0 (/usr/local/bin/node)
       npm               : 7.11.2
       OS                : macOS Catalina
       Xcode             : Xcode 11.4 Build version 11E146

My build.json is

enter image description here

The full error output is

cordova build ios --release --buildConfig platform_build_files/ios/build.json
Reading build config file: /Users/Development/dev/myProductSuite/myApp/platform_build_files/ios/build.json
No simulator found for ". Falling back to the default target.
Building for "iPhone 11 Pro Max" Simulator (com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro-Max, iPhone-11-Pro-Max).
Building project: /Users/Development/dev/myProductSuite/myApp/platforms/ios/MyApp.xcworkspace
        Configuration: Release
        Platform: emulator
        Target: iPhone 11 Pro Max
Adding xcodebuildArg: EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
Adding xcodebuildArg: ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
Adding xcodebuildArg: LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"
Running command: xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration Release -sdk iphonesimulator -destination platform=iOS Simulator,name=iPhone 11 Pro Max build CONFIGURATION_BUILD_DIR=/Users/Development/dev/myProductSuite/myApp/platforms/ios/build/emulator SHARED_PRECOMPS_DIR=/Users/Development/dev/myProductSuite/myApp/platforms/ios/build/sharedpch EMBEDDED_CONTENT_CONTAINS_SWIFT = YES ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace "MyApp.xcworkspace" -scheme "MyApp" -configuration Release -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 11 Pro Max" build CONFIGURATION_BUILD_DIR=/Users/Development/dev/myProductSuite/myApp/platforms/ios/build/emulator SHARED_PRECOMPS_DIR=/Users/Development/dev/myProductSuite/myApp/platforms/ios/build/sharedpch "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES" ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO "LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks""

Build settings from command line:
    ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
    CONFIGURATION_BUILD_DIR = /Users/Development/dev/myProductSuite/myApp/platforms/ios/build/emulator
    EMBEDDED_CONTENT_CONTAINS_SWIFT =  YES
    LD_RUNPATH_SEARCH_PATHS =  "@executable_path/Frameworks"
    SDKROOT = iphonesimulator13.4
    SHARED_PRECOMPS_DIR = /Users/Development/dev/myProductSuite/myApp/platforms/ios/build/sharedpch

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
                { platform:iOS Simulator, OS:latest, name:iPhone 11 Pro Max }

        Ineligible destinations for the "MyApp" scheme:
                { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
                { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
xcodebuild: Command failed with exit code 70
[ERROR] An error occurred while running subprocess cordova.

I have put my project into a fresh folder, so the xcode project is regenerated, but no luck.

Where is it picking to this destination list, and how can I solve this?

2

Answers


  1. Your virtual machine’s Xcode version is 11.4. This only supports iOS 13.4 as seen here: https://developer.apple.com/documentation/xcode-release-notes/xcode-11_4-release-notes
    So your deployment target of iOS 14.0 is higher than your simulators’ OS versions of iOS 13.4, which is why they aren’t showing up. I’m unfamiliar with Ionic Cordova, but you need to find a way to use Xcode 12 or later in your VM.

    Login or Signup to reply.
  2. I had a similar issue to this. I’m sure that what caused it was my removal of all of my simulators. The fix I came across was in xcrun simctl

    1. run xcrun simctl list --json to view all of the know devices
    2. run xcrun simctl delete unavailable (or xcrun simctl delete all if you want to get rid of everything.
    3. Now, You could maybe to this through the Devices & Simulators menu, but I wanted to stick with xcrun to create a new simulated device. By typing the command xcrun simctl create you will get usage. I used the commmand:

    xcrun simctl create iPhone 12 "iPhone 12"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search