When distributing an iOS app for a client using the "Enterprise Distribution" option, the app downloads and installs but then quickly disappears from the home screen. After rebooting the iOS device, it reappears.
In my situation I actually just reuse the .plist file between builds that is generated if you were to click the "Save for Enterprise Distribution" checkbox when you are about to save the .ipa file. The value I had typed in for the "bundle-identifier" key had an old APPID instead of the one the app is currently distributed under. Correcting this error and reinstalling the app from our website fixed the problem.
Essentially adding a missing .app. to our bundle-identifier allowed the application to install properly and stay on the homes creen without need for reboot.
from:
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.mycompany.MyApp</string>
to:
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.mycompany.app.MyApp</string>
#ThaDon Thanks! I upvoted you for this post. I had a similar problem. I had a plist which I reused from someone else and didn't pay careful enough attention to the value I put in for the bundle-identifier (the previous person used just the app name as the bundle identifier, but I used the recommended reverse domain notation com.. . It worked fine on iOS 6, but on iOS 5 it downloaded/installed and then disappeared, as you described. Once I put the exact same bundle identifier I had in my Xcode project, it worked the way I expected it to.
Related
First before anyone suggests this has been answered elsewhere on SO, I submit that ALL of those answers assume you are compiling with XCode, which is not the case for me. I am using Adobe Animate to compile an Adobe AIR application and deploy to an iPad.
Updated Adobe air SDK to latest 32.0 and have tried re-creating my certificates and provisioning profile from scratch.
If I try to deploy directly from Adobe AIR I get an error message
"Application verification failed"
If instead I publish an .ipa and try and deploy via XCode I get the following
If I furthermore check entitlements on my app.bundle I see
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>foo.domain.app</string>
<key>get-task-allow</key>
<true/>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
but checking entitlements in my Provisioning profile I see
<key>get-task-allow</key><false/>
Could this be the source of my error? If so, how do I get both these values to be the same?
Any replies welcome as I need to launch this!
Here are a few ideas/things to check.
Check beta reports key is removed from the app descriptor.
When changing iOS certificates, delete the old ones via Keychain Access, then restart the computer before creating the Certificate Signing Request for the new cert.
Check that the new assets.cer has been created for the icons and it has been included in the package.
Check that all icons are present and all casing is correct in the naming on icon files as well as in xml.(e.g. icon and Icon)
Ensure path to SDK is correct. e.g. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk
If you still cannot install the app from Animate, try including the beta reports key, publish the app and upload it to TestFlight.
I have a mobileconfig which is used to add APN into iphone, whereas it does work for iOS8/9/10, but not iOS11. In iOS11, it says "invalid profile". If install this mobileconfig again, it says "UUID is not unique".
Later on, I found out the main cause. It is because the "username" parameter is missing from APN key, so that the iOS11 claimed the profile installation is failed, but it did installed the value "ABCDE" into APN, and set as default APN value too. (clicking “reset” button in APN setting will figure out that it has been set to be default). However, from the setting>profile, I can see NO profile is yet installed, so I can't further install or reinstall another APN profile mobileconfig. The reason behind is that the existing one (hidden one) is not able to uninstall.
<key>apns</key>
<array>
<dict>
<key>apn</key>
<string>ABCDE</string>
<key>username</key> <<--missing
<string></string> <<--missing
</dict>
</array>
So, I am looking for any solution, the way to remove the existing mobileconfig by building a app to tackle this abnormal situation. Should you have any ideas or further discussion, it is highly appreciated to share your inputs with me. Thanks in advance!
I encountered this problem as well. I did some combination of this to solve it:
1) manually add the corrected .mobileconfig as a ".stub" file in the directory "/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles/Library/ConfigurationProfiles" (see the format of other .stub files in the directory)
2) add the PayloadIdentifier from the .mobileconfig file as a to the in the "PayloadManifest.plist" file also in the directory "/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles/Library/ConfigurationProfiles"
Your profile should now show in the "Settings -> General -> Profiles & Device Management." menu
3) Delete your profile using the interactive menu. It will not delete from the menu structure, but it will not give an error either.
4) Delete your ".stub" file from step (1)
5) Maybe also (I can't remember if I did this or not) remove the added entry in "PayloadManifest.plist" (I can't remember if I did this or not)
6) Maybe also (I can't remember if I did this or not) remove the corresponding entry in "ProfileTruth.plist" in "/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles/Library/ConfigurationProfiles"
7) Delete "/private/var/Managed Preferences/mobile/com.apple.managedCarrier.plist"
8) You will now be able to add (and remove) your corrected mobileconfig file using your regular means
All of this was done on a jailbroken iPhone running 11.3.1
I am trying to submit to iTunes Connect with Xcode 6.4. I am getting this error
Unable to Validate Your Application
The application you have selected does not exist.
I am able to find the provisioning profile through my dev account on the previous step. I have double-checked all identifiers. I tried Application Loader as well and got basically the same error. What is weird is that I submitted another app several hours before to the same account with no issues. Any help would be greatly appreciated.
I tried Application Loader and it worked. It did not work 2 hours earlier. What is weird is that I tried to download an app from the App Store and they could not find my account. Some new terms of service popped up and I agreed. After that I was then able to download with the previous "non-existent" account. That's when I tried App Loader and it worked. Must be something on Apple's side that will be fixed shortly.
I was having the same issue, here's what I did to send the app to the app store:
On XCODE create generate the "Archive", once you get the "Organizer" window/popup, validate it as you normally do. If validated, then click "Export" and select "Save for iOS app store deployment". Save it somewhere and take note of this location, you'll need the IPA file.
Install the "Application Loader" from https://itunesconnect.apple.com/apploader/ApplicationLoader_3.1.dmg, if you don't have it already.
Follow the easy steps to push the app to the app store. That is "Deliver your app", select the IPA file and that's it!
While other are having success with Application Loader, I did not and received a different error « You are not authorized to use this service » Great!
Since iOS 9.1 was just released yesterday perhaps Xcode 6.x is being phased out, but we're not ready to migrate to Xcode 7.x for this particular project.
I was successful by archiving in Xcode 6.x and using the Organizer in Xcode 7.1 to submit to the App Store. The procedure is as follows:
Rename Xcode 6.x (In my case Xcode632.app).
Download and install Xcode 7.1 from .dmg file, not as an upgrade.
Build and archive your app in Xcode 6.x
Close Xcode 6.x
Launch Xcode 7.1 but do not open your project.
In Xcode 7 Select Window->Organizer.
Submit to App Store.
Hopefully this helps you if both the Xcode and Application Loader uploads fail.
Download Xcode 7 and try to upload new build make sure that you changed version or (and) build number of app, it should work.
It seems to be a bug/"feature" of iTC not related to Xcode version. Bundled frameworks should bump their versions(CFBundleShortVersionString) to match the version of the app.
Related topics:
https://github.com/CocoaPods/CocoaPods/issues/4421
https://github.com/Carthage/Carthage/issues/859
Exporting and uploading via Application Loader worked for me.
Failed to upload archive using Xcode 6.4 and 7.1, but successfully uploaded with Xcode 7.0.1.
http://adcdownload.apple.com/Developer_Tools/Xcode_7.0.1/Xcode_7.0.1.dmg
UPDATE: It appears that Apple has remedied this bug. I just successfully uploaded a build using Xcode 6.4 to iTunes Connect. I believe this was either an organizer bug or an iTC bug but they've fixed it.
Before the solution was to use application loader.
You should be able to submit using Xcode 6.x now. We need to upload build from 6.x still because Xcode 7 requires a lot of refactoring due to ATS. The standard "AllowArbitraryLoads" doesn't cut it for my project.
It looks like this can be caused by some new version number validation logic on Apple's end. In our case, tacking an extra ".1" onto the end of the version number strings for the app allowed it to be uploaded with Application Loader.
Really weird/deceptive that the error message for this would be "The application you have selected does not exist", though.
I was having the same issue. I tried to upload with Application loader then got descriptive errors about the bundle version. After removing all third party info.plist from pods and static libs, will work to upload my build.
I fixed this issue. I had to update my OSX to 10.10.5 and XCode to 7.0.1. In XCode you need to set few keys. NSAppTransportSecurity Key is required if your app or game needs internet access. After this setup it works perfectly from xcode it self. And no issue on live itunes connect.
<key>UIRequiresFullScreen</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSExceptionDomains</key>
<dict>
<key>domain.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<false/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<false/>
<key>NSThirdPartyExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
My solution for similar problems is use of Fastlane Tools https://fastlane.tools
First You can use GYM tool for build/archive your project, and then Pilot for send it to iTunesConnect Testflight.
This tool fixes all of my problems with Code signing, submitting, etc. so I can recommend it.
I have a relatively complicated problem, described below for the context. The solution seems to boil down to editing the entitlements plist file manually.
I cannot find any entitlements.plist file in my project, and could not find any "entitlements" sections in other plist files I found.
The question is, how can I locate the entitlements plist file?
Now for the background story:
I need to create a new provisioning profile for an enterprise app we have deployed (the old one will expire shortly). There are several versions out there running in different environments (all with the same app ID). For some reason the current version of the app no longer includes the entitlement "com.apple.developer.team-identifier". When renewing the provisioning profile, this entitlement is automatically removed from the profile as well. This causes all the older versions of the app to stop working. They fail to start with this error in the console log:
entitlement 'com.apple.developer.team-identifier' has value not permitted by provisioning profile 'My Profile'
According to Apple Support, we have to update all those apps to the latest version, which of course is not possible since some are in production on older environments and are not all compatible with the newest capabilities. (We are not planning to give all customers a free upgrade either). So, Apple's official solution is not an option.
According to this comment on a related issue it should be possible to re-introduce the dependency on the missing entitlement. I figured that if I could add the entitlement to the current app, regenerate it and then generate a new provisioning profile for it, the problem might be solved.
Answer
My app was using the default capabilities in which case there is no entitlements.plist file. I was able to add one by adding some capabilities in the UI (and then removing them again).
Follow up
In the end this did not solve my problem, which turned out to be different since this entitlement was already in the previously generated profile (with default capabilities). I only noticed this when comparing the generated profiles (they were identical).
The error in the console log seems to be caused by a difference in the plist:
Previous provisioning profile:
<key>com.apple.developer.team-identifier</key>
<array>
<string>SomeIdentifier</string>
</array>
New provisioning profile:
<key>com.apple.developer.team-identifier</key>
<string>SomeIdentifier</string>
It may be possible to get the provisioning profile compatible again by adding an extra team-identifier so that it becomes an array again, but that's a different question that the one I asked here.
If I create an application on my Mac, is there any way I can get it to run on an iPhone without going through the app store?
It doesn't matter if the iPhone has to be jailbroken, as long as I can still run an application created using the official SDK. For reasons I won't get into, I can't have this program going through the app store.
Official Developer Program
For a standard iPhone you'll need to pay the US$99/yr to be a member of the developer program. You can then use the adhoc system to install your application onto up to 100 devices. The developer program has the details but it involves adding UUIDs for each of the devices to your application package. UUIDs can be easiest retrieved using Ad Hoc Helper available from the App Store. For further details on this method, see Craig Hockenberry's Beta testing on iPhone 2.0 article
Jailbroken iPhone
For jailbroken iPhones, you can use the following method which I have personally tested using the AccelerometerGraph sample app on iPhone OS 3.0.
Create Self-Signed Certificate
First you'll need to create a self signed certificate and patch your iPhone SDK to allow the use of this certificate:
Launch Keychain Access.app. With no items selected, from the Keychain menu select Certificate Assistant, then Create a Certificate.
Name: iPhone Developer
Certificate Type: Code Signing
Let me override defaults: Yes
Click Continue
Validity: 3650 days
Click Continue
Blank out the Email address field.
Click Continue until complete.
You should see "This root certificate is not trusted". This is expected.
Set the iPhone SDK to allow the self-signed certificate to be used:
sudo /usr/bin/sed -i .bak 's/XCiPhoneOSCodeSignContext/XCCodeSignContext/' /Developer/Platforms/iPhoneOS.platform/Info.plist
If you have Xcode open, restart it for this change to take effect.
Manual Deployment over WiFi
The following steps require openssh, and uikittools to be installed first. Replace jasoniphone.local with the hostname of the target device. Be sure to set your own password on both the mobile and root users after installing SSH.
To manually compile and install your application on the phone as a system app (bypassing Apple's installation system):
Project, Set Active SDK, Device and Set Active Build Configuration, Release.
Compile your project normally (using Build, not Build & Go).
In the build/Release-iphoneos directory you will have an app bundle. Use your preferred method to transfer this to /Applications on the device.
scp -r AccelerometerGraph.app root#jasoniphone:/Applications/
Let SpringBoard know the new application has been installed:
ssh mobile#jasoniphone.local uicache
This only has to be done when you add or remove applications. Updated applications just need to be relaunched.
To make life easier for yourself during development, you can setup SSH key authentication and add these extra steps as a custom build step in your project.
Note that if you wish to remove the application later you cannot do so via the standard SpringBoard interface and you'll need to use SSH and update the SpringBoard:
ssh root#jasoniphone.local rm -r /Applications/AccelerometerGraph.app &&
ssh mobile#jasoniphone.local uicache
Yes, once you have joined the iPhone Developer Program, and paid Apple $99, you can provision your applications on up to 100 iOS devices.
Build your app
Upload to a crack site
(If you app is good enough) the crack version will be posted minutes later and ready for everyone to download ;-)
With the help of this post, I have made a script that will install via the app Installous for rapid deployment:
# compress application.
/bin/mkdir -p $CONFIGURATION_BUILD_DIR/Payload
/bin/cp -R $CONFIGURATION_BUILD_DIR/MyApp.app $CONFIGURATION_BUILD_DIR/Payload
/bin/cp iTunesCrap/logo_itunes.png $CONFIGURATION_BUILD_DIR/iTunesArtwork
/bin/cp iTunesCrap/iTunesMetadata.plist $CONFIGURATION_BUILD_DIR/iTunesMetadata.plist
cd $CONFIGURATION_BUILD_DIR
# zip up the HelloWorld directory
/usr/bin/zip -r MyApp.ipa Payload iTunesArtwork iTunesMetadata.plist
What Is missing in the post referenced above, is the iTunesMetadata. Without this, Installous will not install apps correctly. Here is an example of an iTunesMetadata:
<?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>appleId</key>
<string></string>
<key>artistId</key>
<integer>0</integer>
<key>artistName</key>
<string>MYCOMPANY</string>
<key>buy-only</key>
<true/>
<key>buyParams</key>
<string></string>
<key>copyright</key>
<string></string>
<key>drmVersionNumber</key>
<integer>0</integer>
<key>fileExtension</key>
<string>.app</string>
<key>genre</key>
<string></string>
<key>genreId</key>
<integer>0</integer>
<key>itemId</key>
<integer>0</integer>
<key>itemName</key>
<string>MYAPP</string>
<key>kind</key>
<string>software</string>
<key>playlistArtistName</key>
<string>MYCOMPANY</string>
<key>playlistName</key>
<string>MYAPP</string>
<key>price</key>
<integer>0</integer>
<key>priceDisplay</key>
<string>nil</string>
<key>rating</key>
<dict>
<key>content</key>
<string></string>
<key>label</key>
<string>4+</string>
<key>rank</key>
<integer>100</integer>
<key>system</key>
<string>itunes-games</string>
</dict>
<key>releaseDate</key>
<string>Sunday, December 12, 2010</string>
<key>s</key>
<integer>143441</integer>
<key>softwareIcon57x57URL</key>
<string></string>
<key>softwareIconNeedsShine</key>
<false/>
<key>softwareSupportedDeviceIds</key>
<array>
<integer>1</integer>
</array>
<key>softwareVersionBundleId</key>
<string>com.mycompany.myapp</string>
<key>softwareVersionExternalIdentifier</key>
<integer>0</integer>
<key>softwareVersionExternalIdentifiers</key>
<array>
<integer>1466803</integer>
<integer>1529132</integer>
<integer>1602608</integer>
<integer>1651681</integer>
<integer>1750461</integer>
<integer>1930253</integer>
<integer>1961532</integer>
<integer>1973932</integer>
<integer>2026202</integer>
<integer>2526384</integer>
<integer>2641622</integer>
<integer>2703653</integer>
</array>
<key>vendorId</key>
<integer>0</integer>
<key>versionRestrictions</key>
<integer>0</integer>
</dict>
</plist>
Obviously, replace all instances of MyApp with the name of your app and MyCompany with the name of your company.
Basically, this will install on any jailbroken device with Installous installed. After it is set up, this results in very fast deployment, as it can be installed from anywhere, just upload it to your companies website, and download the file directly to the device, and copy / move it to ~/Documents/Installous/Downloads.
With the upcoming Xcode 7 it's now possible to install apps on your devices without an apple developer license, so now it is possible to skip the app store and you don't have to jailbreak your device.
Now everyone can get their app on their Apple device.
Xcode 7 and
Swift now make it easier for everyone to build apps and run them
directly on their Apple devices. Simply sign in with your Apple ID,
and turn your idea into an app that you can touch on your iPad,
iPhone, or Apple Watch. Download Xcode 7 beta and try it yourself
today. Program membership is not required.
Quoted from: https://developer.apple.com/xcode/
Update:
XCode 7 is now released:
Free On-Device Development
Now everyone can run and test their own app
on a device—for free. You can run and debug your own creations on a
Mac, iPhone, iPad, iPod touch, or Apple Watch without any fees, and no
programs to join. All you need to do is enter your free Apple ID into
Xcode. You can even use the same Apple ID you already use for the App
Store or iTunes. Once you’ve perfected your app the Apple Developer
Program can help you get it on the App Store.
See Launching Your App on Devices for detailed information about
installing and running on devices.
It's worth noting that if you go the jailbroken route, it's possible (likely?) that an iPhone OS update would kill your ability to run these apps. I'd go the official route and pay the $99 to get authorized. In addition to not having to worry about your apps being clobbered, you also get the opportunity (should you choose) to release your apps on the store.
After copying the the app to the iPhone in the way described by #Jason Weathered, make sure to "chmod +x" of the app, otherwise it won't run.
*Changes/Notes to make this work for Xcode 3.2.1 and iPhone SDK 3.1.2
Manual Deployment over WiFi
2) Be sure to restart Xcode after modifying the Info.plist
3) The "uicache" command is not found, using killall -HUP SpringBoard worked fine for me.
Other then that, I can confirm this works fine.
Mac users, using PwnageTool 3.1.4 worked great for Jailbreaking (DL via torrent).
If you patch /Developer/Platforms/iPhoneOS.platform/Info.plist and then try to debug a application running on the device using a real development provisionen profile from Apple it will probably not work. Symptoms are weird error messages from com.apple.debugserver and that you can use any bundle identifier without getting a error when building in Xcode. The solution is to restore Info.plist.