I was looking for some advice on provisioning profiles / certificates etc... I use an iMac at work to develop on, and I also sometimes find myself checking out my code from git onto my MacBook Pro at home but I always run into issues when I want to test on my iPhone from another computer.
Obviously my provisioning profiles on the device match the certificate issued to my iMac from work, so from my laptop, I can't test on the device because the provisioning profile doesn't match a certificate. so I get a code sign error.
What can I do to bypass this ?
Thanks in advance.
Open up a project in Xcode and click on the device near the Run ▶ button at the top left of your Xcode screen. Plug your iPhone into your computer. You can select your device from the top of the list. Unlock your device and (⌘R) run the application.
A signing certificate with the public and private key. On iOS, iPadOS, watchOS, or tvOS you need a distribution certificate; on macOS you need a development certificate.
If you need to add a testing device, you should go to developer.apple.com -> Member Center -> iOS Provisioning Portal -> Select Devices on the left tab menu-> Press Add Device button -> insert test device UDID and save this new device.
Apple provides an easy solution to working on multiple machines.
You can export your developer profile from your work iMac and move it onto your Macbook Pro.
In Xcode 4, bring up the Organizer. Click on "Devices"/
Now, click on "Developer Profiles" in the sidebar.
Then, on the bottom of the screen you will see a button called "Export" and a button called "Import". On the computer with the original certificates click "export" and save the profile. You may be prompted to enter a password.
On the second computer, use "import" to install the certificates.
You should be able to develop and test seamlessly between the two machines now.
Edit:
According to Topher Fangio in the comments below, you may need to:
open Keychain Access, then find [your] iPhone Developer Certificate on my desktop, and export it. Then import it on your [second machine]. If you see the dropdown and associated private key on one machine, but not the other, then you need to export it apparently.
Hopefully Topher's insight will help anyone who has trouble with using Xcode to do this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With