iOS 9 new feature Free Provisioning (Run your app on a device, just with your Apple ID, without Apple developer membership) - ios

Would like to know about the new feature Free Provisioning introduced in iOS9 & Xcode 7.
How Apple is now achieving that, as before we knew our device ids were enrolled in the profiles and hence it was possible to deploy the app on devices.
Now only with Apple ID how the things in the background are achieved, also is there any restrictions on how many number of devices I can add my build with Free Provisioning.
Any help is greatly appreciated thanks...

1. How it works?
Apple Ref : How to use free provisioning
As stated in above link under Launch Your App on Devices Using Free Provisioning point 6. "Xcode creates a free provisioning profile for you"
Update: Above point 6 is removed from link, but there is no change in the way it works and steps in above link still work!
Profile created in this way is tied to your apple id, when you try to run app on new device that device's UDID gets added in this profile.
2. How to use free provisioning?
Requirements: Apple ID, XCode 7 or above
Steps:
Go to XCode Preference
Go to Accounts tab and hit plus "+" button on bottom left to add your Apple ID.
After successfully adding Apple ID click on view details on bottom right
Click the Create button next to "iOS Development"
Connect your device and select your device as build destination.
In target's general setting,
a. Set app identifier you want to give to your free profile
b. set team id as your apple id
c. If using XCode 7, hit Fix Issue button below provisioning profile warning.
If using XCode 8, there is no Fix Issue button XCode will automatically do this.
In both cases of XCode versions, Xcode will either create new profile if not found for your apple id or add new device to your existing profile.
Run the app, this will install app.
Click app icon to start app manually, you will get "Untrusted Developer" dialog. To trust your apple id, Go to iPhone setting > General > Device Management > Select your apple id and click trust.
After step 8 you can run and debug app using free provisioning.
3. What are the Limitations?
I tried to install app with free provisioning and could run/debug app. But there are few catches. Profile created by XCode is bit different than our usual developer profiles
From profile raw file
There is new key LocalProvision with value true
<key>LocalProvision</key>
<true/>
Many services like following are not available, See full list of services
Apple Pay, Game Center, iCloud, In-App Purchasing, Push Notifications, Wallet (Was Passbook)
Expires in 7 days (this was changed sometime in May, previously it was 90 days).
<key>TimeToLive</key>
<integer>7</integer>
Old: 90 days
New: 7 days
Under <key>ProvisionedDevices</key> there is list of devices on which I tried to install app, still unknown maximum number of devices possible, I tried to install on 3 devices which worked successfully.
This is not alternative to publishing app for free on app store, you still need to enroll to developer program to publish apps.
Testflight based internal / External testing is not possible.

Apple haven't disclosed the thing like, how they are managing on their developer portal. But I think they just removed the restriction of Paid Developer program & rest of the thing kept as it is.
For standard developer Program Apple support 100 device so I think same will apply here.
Refer this link for more info..

Copied from: https://developer.xamarin.com/guides/ios/getting_started/installation/device_provisioning/free-provisioning/
Limitations
Apple has imposed a number of limitations on when and how you can use free provisioning to run your application on an iOS device, ensuring that you can only deploy to your device. These are listed in this section.
Access to iTunes Connect is also limited and therefore services such as publishing to the App Store and TestFlight are unavailable to developers provisioning their applications freely. An Apple Developer Account (Enterprise or Personal) is required to distribute via Ad Hoc and In-House means.
Provisioning Profiles created in this way will expire after three months, Signing Identities after one year. Furthermore, provisioning profiles will only be created with explicit App IDs and so you will need to follow the instructions above for every app that you wish to install.
Provisioning for most application services is also not possible with free provisioning. This includes:
Apple Pay
Game Center
iCloud
In-App Purchasing
Push Notifications
Wallet (Was Passbook)

Some more informations.
You can archive app with free provisioning profile. But You can't export ipa in "XCode 7"
But you can use XCode 5 or Command line "xcodebuild" to export ipa file.
I tried using OTA to install this ipa file. And it's work!
So... If there has a way to add UUID to your account without XCode (REST api calls). You can distribute your app to anyone you want.

Related

In an Enterprise iOS app, how to replace the *.mobileprovision file on device after existing profile expired, but without re-signing the IPA?

We have a series of iOS Enterprise applications that were built with Telerik Cordova (discontinued in May 2018). Those apps are in the process of being converted to a new platform, but in the mean time they must continue to service client needs.
The distribution certificate the apps were built with is valid for another 14 months or so, but the provisioning profiles expire in a few days. Since these are Enterprise apps they will expire with the profiles.
Unfortunately, Telerik can no longer rebuild the apps using an updated profile for us. We have re-signed the apps using new provisioning profiles (using both iReSign and Terminal). When we try to side-load the resulting IPAs through the XCode Devices panel, we get an error stating that the entitlements do not match and the apps are not installed.
The question was raised as to whether or not we not need to re-sign the apps since the certificates are still valid. Perhaps it would be possible to just replace the .mobileprovision file on the device somehow? I gave it a try using iTunes Sync but I cannot confirm whether the file actually went to the device or not.
Question: Is it possible to just update the *.mobileprovision on the device without re-signing the app? If so, could someone please give me the steps or direct me to a link to perform the steps?
Alternate Question: Otherwise, any thoughts on how to resolve my Entitlements issue? The app only needs Push Notifications, but Game Center and In-App Purchases are also enabled. These are reflected in the App ID and provisioning profile, and the distribution certificate is of type Apple Push Services.
I should point out that I am not an admin on the Apple Developer portal for the project as I am an outside consultant, so my portal access is strictly read-only.
Thanks in advance for any direction provided!
If the applications were distributed to the devices by an MDM, then you can push a new provisioning profile to them using the MDM.
If the applications were installed over the air from a web server or directly using iTunes or Apple Configurator, then you need to replace the entire application package on the device. This requires the app to be re-signed, since the changed .mobileprovision file will change the package signature.
If you don't have the original, app ID with matching entitlements in the developer portal, then you will need to delete the existing application from the device before installing the new, re-signed application. You won't be able to do an in-place upgrade.

Xcode 8 asks for a device to be registered to create provisioning profile

I am trying to publish an app for testing, without having to connect a device in my mac.
I have created a developer account, created an app in itunes, generated bundle id, signed into xcode with the developer account, generated a distributor certificate.
When I tried to archive the app, I got the error "conflict provisioning setting. app is automatically signed for development ..."
I read in this post and followed the tip of unchecking and rechecking the option "Automatically manage signing". After re-choosing my team, I get the error "There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it".
The goal all along was that I wouldn't need an ios device, because I intended to immediately publish the application and invite people to test it via testflight. Is it not possible to do it like this? Am I missing something.
I have read lots of documentation, but being a first timer in this, everything seems confusing.
Edit: I created a provisioning profile as distributor. Even after creating and installing the distributor profile (it now appears also in xcode at Account -> provisioning profiles), I still get that same error. I also noticed that in signing, The signing certificate is iOS Developer. I am sure
I fixed it by plugging in my iPhone and going to the Product menu > Destination > iPhone (my device).
Then after clicking Try Again on this properties page the warnings went away.
Source
The solution (though I would welcome more elaborate, insightful explanations):
#General -> Signing, disable the option "Automatically manage signing"
#General -> Signing and certificates choose your team
Though in my case that was not the issue, I would recommend making sure that in the device list, you choose Generic iOS device in your target devices.
This really sucked to figure out.
What you do is add a distribution profile in https://developer.apple.com/account/resources/profiles/add. Don't choose development! Don't let the Xcode Automatically manage signing!!
Then, you download the provision.
Then, in the Signing & Capabilities -> Signing Section of the project.xcodeproj file, turn off Automatcially manage signing, choose import and import the file you just downloaded.
Then, in the top, you choose Any iOS Device (arm64, armv7) and then you go Product -> Archive.
What happened to me was that I was about to run my app on a physical device for the first time and I didn't have a Team. So I created it in the process before connecting my phone with the USB cable. After I created the team a message like the listed above appeared. I did some research on internet but nothing found.
So here's what I did: I connected my phone, did all the trusted process, then restarted Xcode, and it worked. I am not sure what happened, but it was some of my first experiences using Xcode. It could sounds silly but it helped me. Hope to you too.
If you do not wish to register a device follow this advice:
https://stackoverflow.com/a/44157307/499581
* In short use "Generic" as the device while archiving.
If you do wish to register a device then the solution to:
"There are no devices registered in your account on the developer
website. Plug in and select a device to have Xcode register it".
Is to physically plug-in your device (an actual iPhone, or iPad) so that Xcode can register it for development use (note: this will not affect the normal everyday use of the device). After the device is registered it can then be used for development testing, load provisioning profiles onto it, etc.
↳ Disabling and Enabling Devices Using Your Developer Account
For those who are trying to develop without a mac computer using MacInCloud don't follow the standard advice out there. Its will lead you down a hole. I have wasted hours of my time.
The reason it say something about "a device to be registered to create provisioning profile" is that you need to provision an iOS device that you can test on before you can get it signed. If you are using MacInCloud you probably can't physically connect an iPhone or iPad to the MacInCloud and therefore it can't automatically provision devices for you.
Before you get to far into this you will need to get your iPhone/iPad UDID. Which I was able to do with https://get.udid.io/ on my iPhone, but it didn't work on my iPad. Instead, with the iPad I had to download iTunes from the Windows store and connect my iPad. Then click on the little gray square in the menu that's inline with Library tab.
image of itunes
Then when it pops up with your device info (mine didn't come up with my info at first, I had to sync my device). You will see your SN. Click on your SN and it will change to your UDID. Once you have your UDID you are ready to create a provisioning profile. What is confusing is this isn't done in the appstoreconnect section of your account online. Its done in your developer account: https://developer.apple.com/account
developer.apple.com account screen shot
When you go there you will want to click: Certificates, Ids & Profiles
Here you will need to add your devices and then with auto signing checked in Xcode that made the problem go away. NOTE: I originally tried to create a profile, download it, and import into Xcode under the Provisioning Profile dropdown in Signing & Capabilities. As described in another answer here, but that proved more problematic and wasn't necessary.
Then you can chose Any iOS Device from emulator device drop down then go to Product > Archive > Distribute App and create a certificate to place it on the app store (TestFlight).
you can also plug an iphone, run the app the app on your iphone as the target, it will ask you to register the device and then the certificates will be generated
Have you paid the $99/year developer fee? TestFlight is only available for paid developers. I would highly recommend plugging in an iOS device, though. It's more fun and rewarding testing that way.

How to run iOS application in real device through terminal without a paid apple developer account?

First this not duplicate of Test iOS app on device without apple developer program or jailbreak
I know it is possible to run app on device using Xcode 7 and free AppleId but i want to achieve this using terminal only Or in other words, Is there any way to generate provisioning profile & certificate using unpaid Apple Id through terminal.
If i will follow mentioned steps then my app installed and run successfully in device but i want to generate IPA using this free certificate and provisioning profile using terminal only.
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.
I am working on some automation task and want to generate and install this signed iPA using unpaid Apple Id through Terminal.
I do not believe this is possible. The challenge is not just extracting the provisioning profile that is created in Xcode. That will not work because Xcode also manages the devices in the profile. So if your devices change, you need Xcode to register the new device and add it to the profile on Apple's servers, before re-downloading it. It also manages the bundle ID.
In theory, if you were to set up the app and all devices in Xcode before grabbing the provisioning profile from ~/Library/MobileDevice/Provisioning Profiles, maybe it would work.
If you can successfully get the profile. maybe you can use these instructions to build and install on the device as long as it was set up ahead of time: install application in iphone device through command line

Deploying an app without Provisional Profile

I'm quite new to IOS app development, I have Xcode and an iPhone. I want to deploy my app to my phone but as yet have no Apple Developer licence ($99).
My code signing is set to Apple developer but the compiler complains 'Failed to Codesign MyApp' and then offers to Fix Issue. After selecting Fix Issue I'm told that I need to add an Apple Id account that is enrolled in the Developer Program.
Is there any way forward to load my app on my iPhone other than signing up for a Developer account and then creating my own profiles?
Actually no way to deploy in real device without developer account and provision, certificate.
If you want to see how it works in device, just use simulator
With XCode 7 Apple provided new way to install application - Free provisioning.
You don't need to enroll to any of the developer program, all you need is just Apple ID.
Apple Ref : How to use free provisioning
From release notes, section Free Provisioning
XCode7 Release Notes
Please see my detail answer for using free provisioning here
Nope, Its not possible to load application on device without provisional profile.

Showing beta versions of an app to a customer

Can I send to my customer a beta version of my iOS app that he can run in the Simulator ?
Can I install Simulator only (without Xcode) on a Mac ?
I actually need an efficient methodology to send him the beta versions of the app, without having to meet him at each update.
Also, (3.) is there a way to install a beta version of the app, I developed in my xCode on its iOS device without app store ?
Thanks
No, I do not believe you can.
No, I don't think so. If you could, however, you'd also have to put all your source code on that machine and build your app there, just to run it in the simulator.
Yes, it's called an Ad Hoc build. You create a special provisioning profile through the provisioning portal on Apple's Developer portal. You then sign the build with that provisioning profile (actually, "Build and Archive"). Then you can, through the Xcode Organizer, share that build via e-mail with your customer. The Organizer creates an .ipa file and includes it along with the provisioning profile into an e-mail message which you can then compose and send.
Edit: The Ad Hoc provisioning profile will, of course, need to include the UDID's of your customer's device(s) on which they would like to test. That is the missing piece here that ties it all together: UDIDs, Ad Hoc profile, signed app with that profile, e-mail it to the customer and they can install both files (ipa and profile) via iTunes.
Lots of documentation on this, right in the Developer portal.
TestFlightApp.com is a great way to easily manage and distribute beta tests and ad-hoc builds. It's nothing you couldn't do yourself, manually, but it really helps make it easy, and is free.

Resources