create-capacitor-plugin
create-capacitor-plugin copied to clipboard
chore: run clean, build and test with verify:ios
Currently unit tests are not run with verify:ios.
verify:android runs clean build test, so verify:ios should probably do the same.
LGTM
I guess my only concern would be how to keep the "preferred simulator" up to date if it's hard-coded in each plugin's package.json.
Thanks for your feedback. I also don't like the hard-coded iPhone version, but didn't find another way.
Without the -destination ... flag, I was getting:
Testing failed:
Signing for "PluginTests" requires a development team. Select a development team in the Signing & Capabilities editor.
Testing cancelled because the build failed.
I also tried -sdk iphonesimulator instead of the -destination ..., but then I was getting:
xcodebuild: error: Failed to build workspace Plugin with scheme Plugin.
Reason: Cannot test target “PluginTests” on “Any iOS Simulator Device”: A build only device cannot be used to run this target. No supported devices are available running a compatible version of iOS Simulator. Connect a device with a newer version of iOS Simulator in order to run your application (or choose a simulated device as the destination).
If anyone has another idea, I'm happy to try it.
Seems that adding -destination \"platform=iOS Simulator,name=iPhone 12\" can also help with some pod dependency problems, see https://getcapacitor.slack.com/archives/C8AGVAMPZ/p1615813430012300