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

feat: replace ios-deploy with devicectl #2614

Merged

Conversation

cgoldsby
Copy link
Contributor

@cgoldsby cgoldsby commented Feb 28, 2025

Summary

Replace ios-deploy with Apple's supported xcrun devicectl:

  • Remove ios-deploy healthcheck
  • Update installApp to support simulators & devices
  • Remove ios-deploy from runOnDevices

#2610

Test Plan

We will be testing two cli commands: doctor and run-ios.

Setup

First, check out the feature/remove-ios-deploy from the fork and link the packages.

gh repo clone cgoldsby/cli
cd /path/to/cloned/cli/
git checkout feature/remove-ios-deploy
(cd packages/cli-platform-apple ; yarn link)
(cd packages/cli-doctor ; yarn link)
yarn

In your react native project, link the packages. Here's how I did it:

cd /my/new/react-native/project/
git clean -xdf
yarn link @react-native-community/cli-platform-apple
yarn link @react-native-community/cli-doctor
yarn
(cd ios ; pod install)
(cd ios ; xed) # Open Xcode. Fix any provisioning profiles; if needed
npm run start -- --reset-cache

Testing

cd /my/new/react-native/project/
npx react-native doctor

✅ The ios-deploy check no longer appears in the diagnostic output.

npm run ios -- -i

Run the command twice, once for a simulator and then a device.
✅ The app installs and launches successfully.

Tear down

cd /my/new/react-native/project/
yarn unlink @react-native-community/cli-platform-apple
yarn unlink @react-native-community/cli-doctor
yarn install --force

Console snippet for installing and launching on device

Launching on a device works even on WiFI!

info Installing "~/Library/Developer/Xcode/DerivedData/MyApp-brunndkayjnymleykdsmccuusyhk/Build/Products/Debug-iphoneos/MyApp.app
07:58:07  Acquired tunnel connection to device.
07:58:07  Enabling developer disk image services.
07:58:08  Acquired usage assertion.
1%... 2%... 3%... 4%... 5%... 6%... 7%... 8%... 9%... 10%... 11%... 12%... 13%... 14%... 15%... 16%... 18%... 19%... 20%... 21%... 22%... 23%... 24%... 25%... 26%... 27%... 28%... 30%... 31%... 33%... 34%... 35%... 36%... 37%... 38%... 40%... 41%... 42%... 43%... 44%... 45%... 46%... 47%... 48%... 49%... 50%... 51%... 52%... 54%... 55%... 56%... 57%... 59%... 60%... 62%... 66%... 68%... 72%... 76%... 80%... 84%... 88%... 92%... 96%... Complete!
App installed:
• bundleID: org.reactjs.native.example.MyApp
• installationURL: file:///private/var/containers/Bundle/Application/0923D851-C8DF-44F8-82E4-178D8C53C6CC/MyApp.app/
• launchServicesIdentifier: unknown
• databaseUUID: CE2D9C68-7897-4CE3-ADF9-49E91CC96304
• databaseSequenceNumber: 3008
• options:
info Launching "org.reactjs.native.example.MyApp"
success Successfully launched the app

Checklist

  • Documentation is up to date.
  • Follows commit message convention described in CONTRIBUTING.md.
  • For functional changes, my test plan has linked these CLI changes into a local react-native checkout (instructions).

- Remove ios-deploy healthcheck
- Update installApp to support simulators & devices
- Remove ios-deploy from runOnDevices
@cgoldsby cgoldsby changed the title feat: Replace ios-deploy with devicectl feat: replace ios-deploy with devicectl Feb 28, 2025
Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

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

LGTM

@thymikee thymikee merged commit 6ce55a2 into react-native-community:main Mar 4, 2025
4 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants