ChatGPT解决这个技术问题 Extra ChatGPT

Test iOS app on device without apple developer program or jailbreak

How can I test an iOS application on my iPod Touch without registering for the Apple Developer Program or jailbreaking my iPod?

Neither is a viable option at the moment.

I'd like to test on the device itself instead of the onscreen simulator to see how it performs on an actual iPod.

On June 8th, Apple announced that with Xcode 7, installation of any apps they develop on their devices without an Apple Developer Program Certificate is possible. The Apple Developer website says we only need to log in with an Apple ID.
Check this answer for using free provisioning in details stackoverflow.com/questions/30973799/…
Is the paid developer account your issue? Or is it that you don't want to register your UDID with Apple? Even the free account in the accepted answer requires you to have a free, registered account with Apple's developer program, and to add the device's UDID to a iOS development provisioning profile.
Here is another step by step guide: stackoverflow.com/a/33928777
@wottle: "paid developer account" is a safe bet, considering registering the UDID with a free account wasn't an option, like, five years ago (the time this question was asked). And at the time, the accepted answer (mine) simply said there were no other options.

C
Community

Seven years after the inception of the App Store (July 10, 2008), Apple has finally introduced a new feature in Xcode 7 that allows you to deploy and run any number of apps on any of your devices, simply by logging in with your Apple ID. You will no longer need a paid Program membership to deploy apps on your own device (and you certainly no longer have to jailbreak your device if you're not comfortable doing so).

Well, not for the majority of use cases anyway. For obvious reasons, certain capabilities and entitlements that require Program membership such as Game Center and in-app purchases will not be available to apps deployed using this method. From Apple's developer documentation:

Launch Your App on Devices Using Free Provisioning (iOS, watchOS) If you don’t join the Apple Developer Program, you can still build and run your app on your devices using free provisioning. However, the capabilities available to your app, described in Adding Capabilities, are restricted when you don’t belong to the Apple Developer Program.

The precise steps to getting your app onto your iOS device or Apple Watch follow immediately thus (screenshots omitted for ease of skimming):

In Xcode, add your Apple ID to Accounts preferences, described in Adding Your Apple ID Account in Xcode. In the project navigator, select the project and your target to display the project editor. Click General and choose your name from the Team pop-up menu. Connect the device to your Mac and choose your device from the Scheme toolbar menu. Below the Team pop-up menu, click Fix Issue. Xcode creates a free provisioning profile for you and the warning text under the Team pop-up menu disappears. Click the Run button. Xcode installs the app on the device before launching the app.

Prior to Xcode 7, a Program membership was indeed required in order to sign the provisioning certificates required to deploy apps to devices. The only other alternative was jailbreaking. With Xcode 7, you no longer need to jailbreak your device just to run apps distributed outside the App Store, or to test apps if you cannot afford to join the Program, or to deploy and use apps that you have developed for your own personal use if you do not intend to distribute them through the App Store (in which case you probably don't need the entitlements offered by Program membership anyway).


Just FYI: I installed Xcode 7 and tried running on my phone but I couldn't get all the build dependencies right, so I switched back to Xcode 6 and finally was able to run on my own device! Xcode 7 must add some license to your account that Xcode 6 recognizes :)
I just deployed some of the sample apps I have building over the past couple of weeks on my iPAD Air using Xcode7. Gives a much better experience to actually getting to test your app without having to pay for the subscription. This post has been really helpful. Thanks Guys.
@BoltClock I also think you should state more clearly when this change was made by Apple. "Seven years after the inception of the App Store" -> most people probably don't remember when the App Store was created and don't want to look it up or do the arithmetic.
Instead of Scheme, I had to go to Product->Destination. There I had to select my device. Then it worked. Also remember to allow installing such apps on your iPhone by going to Settings -> General -> Profile You will see your dev account. Tap it. You should see the app listed there. Tap on it. Tap "Trust (name here)"
Swift 2 adopts a functional design paradigm, and will shortly be open sourced. Xcode 7 and iOS 9 bring free device provisioning to the impecunious and potentially revolutionary upcoming developers. We truly are living in an ideologically reformed era, and what a time it is to be alive.
C
Community

There's a way you can do this.

You will need ROOT access to edit the following file.

Navigate to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk and open the file SDKSettings.plist. In that file, expand DefaultProperties and change CODE_SIGNING_REQUIRED to NO, while you are there, you can also change ENTITLEMENTS_REQUIRED to NO also.

You will have to restart Xcode for the changes to take effect. Also, you must do this for every .sdk you want to be able to run on device.

Now, in your project settings, you can change Code Signing Identity to Don't Code Sign.

Your app should now build and install on your device successfully.

UPDATE:

There are some issues with iOS 5.1 SDK that this method may not work exactly the same. Any other updates will be listed here when they become available.

UPDATE:

You can find the correct path to SDKSettings.plist with xcrun.

xcrun --sdk iphoneos --show-sdk-path

New SDKSettings.plist location for the iOS 5.1 SDK:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/SDKSettings.plist


This will build a non-signed app, but how are you going to install/run it on a non-jailbroken device?
It may install but it will never open.
Yes, as of iOS5 it is still possible. You will still need ldid to fake code sign your binary. code.google.com/p/networkpx/downloads/detail?name=ldid
the OP asked for a non jailbreak solution
Please consider cleaning up this answer. The answer itself mentions nothing about fake code signing with ldid. In your comments, you make one comment saying that signing with ldid is not needed, and in another comment, you say that it is. You also say that this answer has nothing to do with jailbreaking, but I'm pretty sure it does. Jailbreaking allows binaries to run that do not have valid signatures. If your app is not signed, or fake signed with ldid, it's not going to run on a stock iOS device ... unless you're doing something else that you haven't described here.
C
Community

With Xcode 7 you are no longer required to have a developer account in order to test your apps on your device:

https://i.stack.imgur.com/A0jvo.png

Check it out here.

Please notice that this is the officially supported by Apple, so there's no need of jailbroken devices or testing on the simulator, but you'll have to use Xcode 7 (currently in beta by the time of this post) or later.

I successfully deployed an app to my iPhone without a developer account. You'll have to use your iCloud account to solve the provisioning profile issues. Just add your iCloud account and assign it in the Team dropdown (in the Identity menu) and the Fix Issue button should do the rest.

UPDATE:

Some people are having problems with iOS 8.4, here is how to fix it.


It's official, still in beta mode though
Did anyone managed to use this new feature? Does not work for me
Worked for me. Are you using XCode 7?
Any tutorials? Compiling a pythonista app for my iPad
What's the bundle identifier have to be?
Y
Yogesh Suthar

I never tried, but doing a google search, Jailcoder looks like a solution. The problem is the device need to be jailbroken. If anyone try this, please comment and let us know how it worked.


Worked perfectly for me. Only annoying part is that they want you to approve the addition of some certificates to keychain without telling you exactly what they're doing. They look to be the same as if you were to try doing this as a manual process, though. It's pretty seamless. I went from a clean install of Xcode to one of my apps running on my iPhone in less than 5 minutes. I'm running Xcode 4 & iOS 5.0.1 Jailbroken.
Great! thanks for reply back @cool_me5000. Your experience with it will help other people who wants to give it a try. I will test it someday.
This is outdated and does not address the requirement set forth in the question, to do this without jailbreaking.
A
Atul Kaushik

Go to Build Settings, under Code Signing, set Code Signing Identity as iOS Developer & Provisioning Profile as Automatic.

Select your device (now visible) from drop down list and run your app.

https://i.stack.imgur.com/zsrIl.png


A
Amogam

Steps for Latest Xcode and iOS with Free Xcode provisioning

Open Xcode -> Preferences -> Accounts add account -> login using your Apple ID Choose the target -> Signing and Capabilities In the team choose Personal team Make sure Automatic signing is enabled Connect your device and choose it in Xcode Run the project it'd probably fail Open the iOS device settings -> General -> Device Management -> Click Trust for the app


For you that Ctrl+F for "untrusted" in this page: please do step 6 in this answer.
M
MatthewPearson

The JailCoder references above point to a site that does not exist any more. Looks like you should use http://oneiros.altervista.org/jailcoder/ or https://www.facebook.com/jailcoder


jailcoder is a very nice and simple utility to have fake code sign and download app to a real device. You need iPhone Developer and iPhone Distribution certificates created.
r
razor7

just tested JailCoder www.jailcoder.com and i'm able to run and debug on jailbroken devices. You just need a fresh untouched install of xCode, if not, just uninstall and install xCode again and run JailCoder


R
Rob Vermeulen

It's worth the buck to apply for the Apple developer program. You will be able to use ad-hoc provisioning to distribute your app to testers and test devices. You're allowed to add 100 ad-hoc provisioning devices to your developer program.


It would be worth a buck, sure. But 99 bucks? The last time I paid someone 99 bucks to let me install a program I wrote onto my own machine was... never. And I've written a lot of programs and owned a lot of machines.
P
Preetha

Follow these Steps:

1.Open the Xcode->Select the project->select targets->Tick an automatically manage signing->then add your apple developer account->clean the project->build the project->run,everything works fine.