Back to Cordova

2022 07 26

slack-digest/2022-07-26.md

latest4.6 KB
Original Source

Cordova Slack Digest

Tue, 26 Jul 2022 08:21:43 GMT

User count: 4695

Join the conversation at slack.cordova.io

Channel #cordova-ios (15 messages)


Mon, 25 Jul 2022 21:06:03 GMT

@jessica says

hey guys, i posted in here about this a couple of months ago and didn't get any reply, now i'm doing another release of my app and running into it again.

can anyone help me out with the syntax for setting the destination simulator device to ipad, either in the cordova cli, or using build.json? i'm ashamed to say i'm stumped

Mon, 25 Jul 2022 21:08:09 GMT

@norman137 says

Not sure how to do it via the cli but usually I just open up the xcode project and select the simulator from there.

Mon, 25 Jul 2022 21:13:27 GMT

@norman137 says

Looking at the code... https://github.com/apache/cordova-ios/blob/480a3c26bdd02e1a97844467e79bfa5a49ae5800/lib/run.js#L37-L42

looks like if you run cordova run --emulator --list it should list out the available emulators, presumably with names that you can use to specify the emulator you want to run.

Mon, 25 Jul 2022 21:46:01 GMT

@jessica says

right, i have the name of the emulator i need, my trouble isn't that i need help selecting an emulator to run my app. my problem is that my build fails

Mon, 25 Jul 2022 21:47:29 GMT

@jessica says

the reason is because the build command is using this:

Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace "Box Office.xcworkspace" -scheme "Box Office" -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone SE (3rd generation)" build CONFIGURATION_BUILD_DIR=/Users/jessica/Projects/filmbot/filmbot-pos/git/cordova/attended/platforms/ios/build/emulator SHARED_PRECOMPS_DIR=/Users/jessica/Projects/filmbot/filmbot-pos/git/cordova/attended/platforms/ios/build/sharedpch

i added the bold

Mon, 25 Jul 2022 21:48:23 GMT

@jessica says

if the iphone isn't checked in xcode, then the iphone se simulator isn't available, and it can't make the build with those xcodebuild params. i just want to change the xcodebuild params to specify an ipad destination, so i can just run my build command

Mon, 25 Jul 2022 21:51:59 GMT

@norman137 says

Ahh... Seems like I misunderstood your original question. Afraid that this is a bit above my knowledge though... not sure what controls those deployment info parameters.

Mon, 25 Jul 2022 21:53:04 GMT

@jessica says

right, there is the buildFlag option in build.json, i tried:

ios:
      "buildFlag": [
        "-destination platform=iOS Simulator,name=iPad (9th generation)"
      ]
    }```

Mon, 25 Jul 2022 21:53:22 GMT

@jessica says

but i get

> No simulator found for ". Falling back to the default target. so i think i must just have the punctuation wrong or something

Mon, 25 Jul 2022 21:56:23 GMT

@norman137 says

This is just a hunch, but try escaping the parenthesis

"-destination platform=iOS Simulator,name=iPad \(9th generation\)"

Mon, 25 Jul 2022 21:57:06 GMT

@norman137 says

Actually you might need

"-destination platform=iOS Simulator,name=iPad \\(9th generation\\)"

Mon, 25 Jul 2022 21:57:25 GMT

@jessica says

ok i'll try it

Mon, 25 Jul 2022 21:57:31 GMT

@norman137 says

So that the \ gets fed into the cli as \(

If that works, then there might be a security issue with cordova-ios

Mon, 25 Jul 2022 21:57:38 GMT

@jessica says

right

Mon, 25 Jul 2022 21:58:31 GMT

@jessica says

btw just found this, others having the same issue on SO, but looks like they were able to solve by always specifying the buildflag on the cli command, which i'd rather not have to do every time, but it's an option https://stackoverflow.com/questions/58374192/how-to-specify-cordova-build-target-in-build-json

Channel #frameworks (1 messages)


Tue, 26 Jul 2022 04:57:31 GMT

@erisu says

has renamed the channel from "framework-mixins" to "frameworks"

Channel #issue-tracker (1 messages)


Tue, 26 Jul 2022 04:57:03 GMT

@erisu says

has renamed the channel from "issues" to "issue-tracker"

Channel #taco (1 messages)


Tue, 26 Jul 2022 04:44:10 GMT

@erisu says

archived the channel

Channel #extensions (1 messages)


Tue, 26 Jul 2022 04:36:20 GMT

@erisu says

archived the channel

Channel #ios-control (1 messages)


Tue, 26 Jul 2022 04:56:27 GMT

@erisu says

has renamed the channel from "ios-deploy" to "ios-control"