Test iOS app on device without apple developer program or jailbreak
Asked Answered
E

11

435

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.

Evaluate answered 10/2, 2011 at 2:36 Comment(5)
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.Palliasse
Check this answer for using free provisioning in details #30974299Ahab
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.Beeck
Here is another step by step guide: stackoverflow.com/a/33928777Mitigate
@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.Greerson
G
480

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):

  1. In Xcode, add your Apple ID to Accounts preferences, described in Adding Your Apple ID Account in Xcode.

  2. In the project navigator, select the project and your target to display the project editor.

  3. Click General and choose your name from the Team pop-up menu.

  4. Connect the device to your Mac and choose your device from the Scheme toolbar menu.

  5. 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.

  6. 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).

Greerson answered 10/2, 2011 at 2:41 Comment(13)
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 :)Materially
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.Theresiatheresina
@Greerson 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.Photogram
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)"Falciform
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.Salty
FYI: I have to change the project's bundle identifier to my Apple ID name to run app on device.Motorcycle
And to distribute an app, just target "Generic iOS Device", hit Build, then grab your .app, drop it into iTunes, and you'll have an IPA, read to distribute however you want.Hard
Do we have to use Xcode7? I mean I am not a Mac user; I use windows, what are the options for windows users?Militarist
The "Fix issue" button below the Team menu didn't work. It tells me to add a device in the member center, where I don't see such an option with a free account. But when trying to just run it on the device anyway, it gave me another "Fix issue" button in a dialog, and that one worked!Barrens
(no idea why I deleted my replies to Miscreant earlier) Someone has edited this info in now, but I honestly don't see why it was so necessary that an edit adding just that got approved. Apple has already introduced this feature. The "Seven years" was meant to highlight just how ridiculously long Apple was taking (had I not left the Program early on I would have had to pay almost a grand where I live in total just to keep using a private app). The very fact that most people don't even remember how long it has been shows that the exact date is so far off that it doesn't matter anymore.Greerson
Anyone curious about the exact date could easily find this out for themselves without depending on my answer. Those who couldn't be bothered to find this out for themselves presumably already had their priorities straight and I commend them for it. And I've yet to see any of them complain about not being able to download Xcode 7 or provision their devices or deploy their apps because they didn't know the exact date the App Store was launched.Greerson
The signing certificate changes to "IOS Developer" when I switch to the phone I plugged inCurrey
Also need to ensure the bundle ID is unique (probably globally)Munmro
K
83

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

Keshiakesia answered 10/2, 2011 at 4:33 Comment(24)
This will build a non-signed app, but how are you going to install/run it on a non-jailbroken device?Milord
It will install it onto your device.Keshiakesia
It may install but it will never open.Mum
If you know what you are doing it will. I do it quite often.Keshiakesia
you can also look into ldid. it's used to fake sign the app. I dont think it is required though.Keshiakesia
So you claim it is possible to run your app on your iDevice w/o paying the 100$ dev fees? Didn't work for me on IOS5, it complained that the build was not signed.Eponym
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=ldidKeshiakesia
If you upgraded your SDK, then you need to repeat the steps above again because the files were replaced.Keshiakesia
This thread seems to be a bit old. I tried your technique in the answer but I still get "No code signature found" message while building the code. I am using Xcode 3.2, iOS SDK 4.3 and testing on iphone 4Lagrange
The thread is old, but I still use this method with the latest SDK.Keshiakesia
@Keshiakesia I tried exactly what you mentioned, I get an error that: "The application does not have a valid signature."Lagrange
now building a fresh project and the error says: "No code signature found"Lagrange
Done everything as WRight said but got this error > Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychainCoprophagous
@Coprophagous you need to make sure that you have all of your Code Signing Identities set to Do Not Code Sign Make sure you check your Project settings and your Target settings.Keshiakesia
Needless to say, make sure you actually sign your stuff before submitting them to Apple!Greerson
I've followed the steps you mentioned, connected the device and clicked build and run but I get the message 'No provisioned iOS device is connected. Please check the Organizer to view the status of any connected devices.'Questionnaire
New SDKSettings.plist for 5.1 can be found here: #9898539Agee
the OP asked for a non jailbreak solutionEmmuela
@indiekiduk my solution has nothing to do with jailbreaking. This works on non-jailbreoken devices as well.Keshiakesia
This works on iOS6 for a jailbroken device (3GS) but gives the error No code signature found. for an iPhone 5, non-jailbroken.Titular
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.Casa
in Xcode 7.2 work correctly! -- correct path is [Xcode Package content]>Contents>Developer>Platforms>iPhoneOS.platform>Developer>SDKs>iPhoneOS.sdk>SDKSettings.plistUnrounded
I have to buy a device and then break it, seriously??Alberik
@Z.Khullah break it? No. You "jailbreak" it, but I never heard of anyone "breaking" their iOS device. Other than dropping it or throwing it in a blender.Keshiakesia
D
59

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

enter image description here

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.

Detail answered 9/6, 2015 at 10:30 Comment(8)
It's official, still in beta mode thoughEconomical
Did anyone managed to use this new feature? Does not work for meScoutmaster
Worked for me. Are you using XCode 7?Detail
Any tutorials? Compiling a pythonista app for my iPadNoninterference
What's the bundle identifier have to be?Noninterference
what ios are you running on your iphone? i am on 8.4, i have Xcode 7, i've assigned my icloud account to my project's Team Identity, all good. i but when i connect my iphone it shows as unavailable under ineligible devicesPoetry
i have 8.3, what should i do?Echoechoic
@Detail I have logged in as iCloud account (free) from xCode ->pref but I am getting this error => An App ID with Identifier 'com.jamesappv2' is not available. Please enter a different string.Timbre
J
18

Steps for Latest Xcode and iOS with Free Xcode provisioning

  1. Open Xcode -> Preferences -> Accounts

    add account -> login using your Apple ID

  2. Choose the target -> Signing and Capabilities

    In the team choose Personal team

  3. Make sure Automatic signing is enabled

  4. Connect your device and choose it in Xcode

  5. Run the project it'd probably fail

  6. Open the iOS device settings -> General -> Device Management -> Click Trust for the app

Juggernaut answered 4/3, 2021 at 23:6 Comment(3)
For you that Ctrl+F for "untrusted" in this page: please do step 6 in this answer.Gifu
care, since im using iPhone just for testing so WiFi only, to verify app you need other internet connection or it fails without errorUnemployable
7. If you want to run your app release mode, just edit the scheme and run -> debug To Release and you are good to test your iOS build.Knurled
S
13

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.

Surtax answered 12/6, 2012 at 15:12 Comment(3)
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.Cloison
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.Surtax
This is outdated and does not address the requirement set forth in the question, to do this without jailbreaking.Playreader
B
10

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.

enter image description here

Banausic answered 22/10, 2015 at 17:2 Comment(0)
G
7

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

Guglielmo answered 14/2, 2013 at 12:34 Comment(1)
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.Malnourished
L
3

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

Lipetsk answered 28/6, 2012 at 12:13 Comment(0)
D
1

1)You need to make your bundle identifier uniq:
So if you automatically have something like this en.app.my-app, just replace it wit uniq one de.obeta.beta.shop-new-random-323

2)Remove all push notification staff and leve just signing option in xcode tab
After:

enter image description here

before

enter image description here

3)Run build and when it succeeded just go to vpn and device management on your phone and choose trust device

Duodecimal answered 29/9, 2023 at 10:48 Comment(0)
D
0

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.

Dilatometer answered 17/10, 2016 at 13:58 Comment(0)
B
-2

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.

Beethoven answered 28/3, 2013 at 10:39 Comment(1)
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.Gastric

© 2022 - 2024 — McMap. All rights reserved.