Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use devicectl for launching on iOS 17 or greater. #214

Closed

Conversation

simlay
Copy link
Contributor

@simlay simlay commented Feb 23, 2024

Related to #204.

As of b22d5ed, I've tested this on:

  • iPhone 7 - iOS 15.8.1
  • iPhone 8 - iOS 16.7.5
  • iPhone 15 - iOS 17.3.1

Comment on lines +128 to +135
let signing = xcode::look_for_signature_settings(&self.id)?
.pop()
.ok_or_else(|| anyhow!("no signing identity found"))?;
let app_id = signing
.name
.split(" ")
.last()
.ok_or_else(|| anyhow!("no app id ?"))?;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can tell, devicectl requires using the app bundle id. It fails when just Dinghy is used.

Ideally, this would just use the already called xcode::look_for_signature_settings that was used in make_app. I every way I looked, this required modifying BuildBundle or the Device trait both seemed worse than this option.

@@ -24,6 +24,10 @@ pub fn add_plist_to_app(
plist,
"<key>CFBundleExecutable</key><string>Dinghy</string>",
)?;
writeln!(
plist,
"<key>CFBundleName</key><string>Dinghy</string>",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why but devicectl wouldn't work without this key.

@kali
Copy link
Collaborator

kali commented Feb 23, 2024

Nice ! I'm gonna work on an alternative solution based on pymobiledevice because many things we do rely on more than just launching (fetching stdout and return value for instance). But it may be nice to have an alternative workflow like this for simple cases.

@simlay
Copy link
Contributor Author

simlay commented Feb 23, 2024

Nice ! I'm gonna work on an alternative solution based on pymobiledevice because many things we do rely on more than just launching (fetching stdout and return value for instance). But it may be nice to have an alternative workflow like this for simple cases.

Thanks! This solution doesn't get any stdout. To verify things actually work, I either use a bevy example to draw stuff or use the macOS console app to view the logs that go into the apple unified logging system using oslog.

I spent a bit of time yesterday trying to how xcrun xcdevice is suppose to be used. The flutter project uses xcdevice but it's unclear how/if they actually get stdout or the exit status from the process on the device.

@simlay simlay mentioned this pull request Feb 28, 2024
@simlay
Copy link
Contributor Author

simlay commented Feb 29, 2024

Superseeded by #215.

@simlay simlay closed this Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants