Export IPA for Testing instead Appstore with (ad-hoc) - ios

i'm create All Devices in (3 iphone + 1 ipad)
Developer Apple account
i'm Generate certificate inf Developer Apple and i'm selected all device in this certificate
i'm download certificate and Generate in xcode . everything is good now
when i'm click in Build sitting => signin =>Provisioning Profile=>
its show this message :
The UUID of a valid provisioning profile. A missing or invalid profile will cause a build error (deprecated, use [PROVISIONING_PROFILE_SPECIFIER] instead).
however i'm exporte IPA with ad-hoc
and i'm see the code i'm change Myapp.ipa to Myapp.zip for lock the code
that what i'm se is there the all provisioning profile in the certificate
<string>iOS Team Provisioning Profile: com.myApp.name</string>
<key>ProvisionedDevices</key>
<array>
<string>653125008b5277640d4f640ab94241a4</string>
<string>h5856dd83f2e34952cae17eb849736ef6</string>
<string>945a65b488deb77903ab9cc335bc2a9b0</string>
<string>6654f70cc52dab5c371c22b63e200e916</string>
</array>
when i'm add the ipa to my IPhone or IPad is not installe is give me erore so what is wrong ?
Thnak you for your time to reading all this :)

Make sure you've followed all these steps, then you should be good to go.
Give it a try and let me know!
On developer.apple.com:
navigate to your account & login
click Certificates, IDs & Profiles in the side menu on the left
on the left, find Devices & click +
register multiple devices by uploading a spreadsheet including the UDIDs and names of the devices
follow the steps to finalize the registration process
You might need to wait 24 hours; I found, it sometimes takes really long for the changes to take effect.
Inside Xcode:
prep: open Xcode settings, accounts, your account and then re-download all the profiles and certificates
archive the product
open the Organizer window and find the archive you've just created
click Distribute App
choose Ad-Hoc
make sure to have include manifest for OTA installation enabled
follow the steps
finally, click export and choose a location to save the files
Upload all the files (icons, .plist & .ipa) to your server. Note that the server needs to be https, this is mandatory. If your's isn't, upload it to Dropbox or some other cloud service. If you're using Dropbox, make sure to replace www.dropbox.com with dl.dropboxusercontent.com.
Manifest
open the manifest.plist file and insert all the new urls
again, for dropbox: replace www.dropbox.com with dl.dropboxusercontent.com
upload the manifest plist to a secure server.
Link:
itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/YourURLHere/manifest.plist
Taken from here.

You should use automatically manage signing.
For that you should select your team.
In navigator click on your project name - under targets - you will find signing section.
In that check the checkbox for automatically manage signing and select your team. If you have not any team available then you can add it from Preferences of your xcode -> Accounts -> + -> add your apple developer id and password.
After selecting team it will automatically create provisioning profile if your developer account includes your bundle id!
Make sure your device is connected with xcode!

When I exporting to ad-hoc, I created a simple WEB with manifest file. This file will generated automatically when you exporting app to AD-HOC. Thanks this web site you can install app from internet.
Sample code for WEB:
<html>
<a style="font-size:48px;margin-top:150px;margin-left:250px;float:left;color:#22788D;"
href="itms-services://?action=download-manifest& url=https://yourAppServer/manifest.plist">Install your APP </a>
</html>
Sample of Manifest.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>https://yourServercom/YourApp.ipa</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>url</key>
<string>https://yourServercom/Icon.png</string>
</dict>
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>url</key>
<string>https://yourServercom/iTunesArtwork.png</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>UserAPP.YourApp</string>
<key>bundle-version</key>
<string>1.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>YourApp</string>
</dict>
</dict>
</array>
</dict>
</plist>
It works perfectly for me.
Good luck!

Related

How to get local path in bitrise

I have an iOS project in bitrise in which I have set manually manage signing.
So I have to provide my certificate in bitrise code signing section.
I put my certificate and provisioning profile in each subsection and now I have to provide the path from which me workflow step will take these certificates.
The step I use is the Certificate and profile installer
This is what it says:
URL of the certificate to download. Multiple URLs can be specified,
separated by a pipe (|) character.
You can specify a local path as well, using the file:// scheme. For
example file://./Cert.p12
In my case I want to take the local path but whatever I tried didn't work
(for example I tried with file://cert_id or file://cert_id.mobileprovision or file://cert_name etc)
Note: I don't want to do it via GENERIC FILE STORAGE.
Thank you in advance
As bitrise support helped me you cannot take the path like this.
My problem started when I had to provide more than one profile and certificate as I had more than one target and bitrise support up to 5 generic files.
So the answer is:
First of all upload all of your provisioning profiles (ad-hoc development appstore enterprise, if you will use one you can upload just one) in code signing section (you don't need anything in generic file storage).
Then add only one certificate and profile installer step and don't change anything.
Finally in Xcode Archive & Export for iOS step you have to navigate in Debug section and add a value in Custom export options plist content (this can be found when you archive and export an ipa locally in your machine by opening ExportOptions.plist file).
This is a sample of the value you will have to put:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>destination</key>
<string>export</string>
<key>method</key>
<string>app-store</string>
<key>provisioningProfiles</key>
<dict>
<key>bundleID</key>
<string>bundleID-provisioning profile</string>
<key>target-bundleID</key>
<string>target-bundleID-provisioning profile</string>
<key>target2-bundleID</key>
<string>target2-bundleID-provisioning profile</string>
</dict>
<key>signingCertificate</key>
<string>Apple Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
<string>yourTeamID</string>
<key>uploadBitcode</key>
<true/>
<key>uploadSymbols</key>
<true/>
</dict>
</plist>

How to distribute enterprise iPA files

First of all, let me explain that I have no experience with xcode or any apple products whatsoever. I recently have been working with a developer to create a iOS app for my business. I'm posting this because my experience with this developer has been less than awesome and I need some more professional guidance.
The app my developer was creating is intended just to be used to communicate with my employees who are out in the field and not in my office. I'm using a PHP program I created to push out notifications to each device the app is installed on. The app simply looks up information on my database and displays it to the user and allows them to respond. A very simple communication app.
When my developer submitted the app to apple for review it was rejected stating that, it was determined to be an in-house app intended for business purposes. Apples response was that I required the enterprise version of their developer account.
I ended up paying $299 to set up the enterprise developer account and notified my developer about Apples response. This is where my developer hit a road block. I'm pretty certain they never had to produce an app under the enterprise account.
My request was to have an easy way for my employees to install the app on their devices. Something like a link on my website that allows them to install the app or better yet, placement in the app store.
What I received was clunky at best. They ended up sending me the iPA file and told me the only way to distribute the app to my employees was to upload the iPA file to Daiwi and individually email each employee the download link that is produced from Diawi.
This allows my employees to install the app but in order to actually use it, they have to go into the setting and "trust" the app manually.
It seems to me this is not the proper way of distributing an app that I have to pay $299 a year for. I could be wrong, but that's why I'm reaching out. Can anyone give me advice on what's the proper way of distributing an enterprise app?
I usually generate IPA for "Enterprise" distribution, then load on Dropbox, but it's okay for your server.
I create a plist of this type:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>LINK OF YOUR IPA FILE</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>YOUR BUNDLE IDENTIFIER</string>
<key>bundle-version</key>
<string>1.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>YOUR APP NAME</string>
</dict>
</dict>
</array>
</dict>
</plist>
After loading the .plist file on Dropbox and plist url (dropbox or your server) is to download the application.
Generally, for "in-house" apps using Apple's Enterprise Developer program, the apps are distributed via a Mobile Device Management (MDM) system.
Here is a good place to start: https://support.apple.com/business
As you have learned, distribution should have been fully ironed out in your initial discussions with your developer.

How can I add iCloud Documents capabilities to my application without using Xcode?

My app crashes with an "Application initializing document picker is missing the iCloud entitlement" when either of the following two lines is executed:
UIDocumentPickerViewController* documentPicker =
[[UIDocumentPickerViewController alloc]
initWithDocumentTypes:#[#"public.data"]
inMode:UIDocumentPickerModeImport];
UIDocumentMenuViewController *documentMenu =
[[UIDocumentMenuViewController alloc]
initWithDocumentTypes:#[#"public.data"]
inMode:UIDocumentPickerModeImport];
The Document Picker Programming Guide states that "Before your app can use the document picker, you must turn on the iCloud Documents capabilities in Xcode."
However, my app is not built with Xcode: it is built using third-party tools (the cross-platform toolkit, Marmalade), so I cannot do this.
It should still be possible to turn on iCloud Documents capabilities for this app manually — the switch in iCloud simply automates the process — but my attempts to do so have not fixed the crash.
What I've tried so far
Xcode displays the steps it carries out when switching on iCloud:
Add the "iCloud" entitlement to your App ID
Add the "iCloud containers" entitlement to your App ID
Add the "iCloud" entitlement to your entitlements file
Link CloudKit.framework
I also found Apple's Entitlements Troubleshooting TechNote, which describes steps that can be taken to check that the following steps have been carried out correctly.
I have enabled iCloud on my App ID:
I'm not certain whether this is necessary to use the document picker's simple import and export operations, but I also set up an iCloud container with the id iCloud.com.[company].[app].
I have generated an updated provisioning profile that includes the iCloud entitlements:
I inspected the downloaded provisioning profile using the command:
security cms -D -i /path/to/iOSTeamProfile.mobileprovision
It includes the following entries:
<key>com.apple.developer.icloud-services</key>
<string>*</string>
<key>com.apple.developer.icloud-container-environment</key>
<array>
<string>Development</string>
<string>Production</string>
</array>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.[company].[app]</string>
</array>
<key>com.apple.developer.icloud-container-development-container-identifiers</key>
<array>
<string>iCloud.com.[company].[app]</string>
</array>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
<string>iCloud.com.[company].[app]</string>
</array>
Marmalade uses this provisioning profile to generate the entitlements file for the app.
I have inspected the generated entitlements using the following command:
codesign -d --ent :- [App.app]
Which gives the following output:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>[team-id].com.[company].[app]</string>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.icloud-container-development-container-identifiers</key>
<array>
<string>iCloud.com.[company].[app]</string>
</array>
<key>com.apple.developer.icloud-container-environment</key>
<array>
<string>Development</string>
<string>Production</string>
</array>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.[company].[app]</string>
</array>
<key>com.apple.developer.icloud-services</key>
<string>*</string>
<key>com.apple.developer.team-identifier</key>
<string>[team-id]</string>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
<string>iCloud.com.[company].[app]</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>[team-id].*</string>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>[team-id].com.[company].[app]</string>
</array>
</dict>
</plist>
However, the app still crashes whenever the functions are called.
I also found this old guide to setting up iCloud in Marmalade apps. Most of the steps seem no longer to be necessary/possible, but I followed the suggestion to add the application-identifier key to my Info.plist.
What else do I need to do to add iCloud Documents capabilities to my app?
Marmalade generates the .xcent entitlements file used when signing the app by copying over the "Entitlements" dict from the provisioning profile.
The problem was caused by the value associated with the undocumented key:
<key>com.apple.developer.icloud-services</key>
<string>*</string>
This appears to be valid in the provisioning profile, but invalid when signed into the app. Replacing those elements in the generated .xcent file with the following and then re-signing the app fixed the issue:
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudDocuments</string>
</array>
(N.B. If you also use CloudKit, you will also need to add a CloudKit string to the array.)
In practice, we fixed this by editing Marmalade's sign_app.py script to use a pre-prepared .xcent file (copied over from the DerivedData directory of the functioning app we built with Xcode) when signing the app:
In file /Applications/Marmalade.app/Contents/s3e/deploy/plugins/iphone edit line 557:
cmd += ['--entitlements', xcentfile.name]
...replacing xcentfile.name with the path to the pre-prepared .xcent file.

iOS Beta Testers Can't Download App Distributed OTA

I've been using "OTA" distribution of my ad hoc distribution for beta testing for years. It's always worked. Last version was in May. Worked great.
The general idea is that the .ipa and .plist are on our server. I have a page with a itms-services: link to the .plist, which contains the URL of the .ipa, which is also on our server.
Just uploaded a new version for our beta testers. I can download it to my iPhone and iPad OTA just fine. Beta testers say they click the link on our website and nothing happens at all. When I do it, I get the normal message asking me if it's OK to install the app. I answer yes, then the app is downloaded and everything works great.
I have connected my iPad to XCode and removed all mobile provision files and the app. Then I did an install from the website and it worked fine. But every single one of my beta testers say it doesn't work. They don't even get the prompt that asks if it's OK to install. They say nothing happens when they tap the itms-services link.
I've confirmed that all their UDIDs are in the provisioning profile.
Here's what the itms-services link looks like:
Install Application
Here's what the .plist looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>https://www.example.com/example.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.example.example</string>
<key>bundle-version</key>
<string>3.3.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>Example</string>
</dict>
</dict>
</array>
</dict>
</plist>
I've substituted "example" for my domain and app; there are no spaces in either name (others have mentioned that problem in other questions -- just wanted to clear that up).
I was finally able to find an answer here which links to this blog article. Turns out this is a bug in iOS 8 that Apple hasn't bothered to fix. iOS 8 will not download an ad hoc distribution when there is a previous version of the app already installed (or perhaps, installed before the iOS 8 upgrade). It works if there's a developer certificate on the device, which is why it works for my devices even though I removed the provisioning profiles from the devices.
EDIT: This is fixed in iOS 9, but I find that iOS 9 users must first delete the released App Store version of the app before installing the beta. Other than that, Ad Hoc distribution is working great in iOS 9, especially with the expansion of the number of devices that can be registered in a provisioning profile (100 iPads, 100 iPhones, 100 iPod touches, instead of 100 total devices).

iOS Developer Enterprise program - can device users install the app directly?

I wish to enrol in the iOS Developer Enterprise program. I cannot find an answer to my question - and for that matter Apple themselves aren't sure when I ask on the phone.
My question: can I deliver an app over-the-air directly to the target device, if that app is developed using the iOS Developer Enterprise program?
Ideally this is the case, and I can deliver the app to "road warrior" colleagues who do not wish to open a laptop and start iTunes to install an app on their iOS device (almost always an iPhone).
What is your experience?
This is possible. We are doing the same thing in the company I work in.
We put .ipa and .plist file on the server and provide link to .plist file. When user clicks on the link from their mobile device they are prompted to install application.
The only necessary thing is to include UDIDs of all devices to the provisioning profile with which you are signing your application.
This is the content of the .plist file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>http://location of your .ipa file</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>your.app.identifier</string>
<key>bundle-version</key>
<string>3.5.2</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>app_title</string>
</dict>
</dict>
</array>
</dict>
</plist>
And then add link to your plist file:
<a href="itms-services://?action=download-manifest&url=http://location-of-plist.plist">
Download application</a>
I think, here is limit for number of devices you register per licence. – preetam Aug 16 at 12:46
Yes, 100 devices per licence. – JPetric Aug 16 at 13:04
iOS Developer Enterprise program allow you to distribute "In-House" apps to unlimited number of devices. There is no such 100 devices limitation.
From Distributing Enterprise Apps for iOS Devices: About deploying apps (which requires Apple developer login) it describes 4 different ways of distributing Apps including over the air:
Distribute the app for your users to install using iTunes.
Have an IT administrator install the app on devices using iPhone Configuration Utility or Apple Configurator.
Post the app on a secure web server; users access and perform the installation wirelessly.
Use your MDM server to instruct managed devices to install an in-house or App Store app, if your MDM server supports it.

Resources