burtonageo / cargo-bundle

Wrap rust executables in OS-specific app bundles
Other
1.03k stars 69 forks source link

Interest in install and launching bundled app for iOS? #89

Open simlay opened 4 years ago

simlay commented 4 years ago

I use cargo-bundle pretty regularly for testing out some rust integration with iOS frameworks on the iOS simulator. While building the bundle isn't all that difficult, I've come to realize that installing it on the simulator and running it can be annoying due to all the iOS specific crap there is.

For example, I'm currently playing around with iOS support for iced (the GUI library) and this is how I rebuild, install and launch the example: cargo bundle --format ios --target x86_64-apple-ios && xcrun simctl install booted $PWD/../../target/x86_64-apple-ios/debug/bundle/ios/ios-example.app && xcrun simctl launch booted com.github.iced.simple

To describe what's going on, after the bundle is built xcrun simctl install booted $PATH_TO_BUNDLE installs the bundled iOS app on a booted simulator. One can also specify the ios simulator ID. The xcrun simctl launch booted $BUNDLE_ID launches the bundled iOS app. In my case, it's the bundled identifier used in the package.metadata.bundle from the Cargo.toml.

Anyway, if there's interest in accepting a PR adding something like --install and --launch as parameters to cargo-bundle, I'd be to do it.

mdsteele commented 4 years ago

Sounds like a great idea to me!