iOS8 Enterprise app install issue - ios

I have been looking into this issue for a long time now and have gone over many questions on here which have helped clear up somethings but I am now getting some new warnings and errors in the device logs and I am unable to decipher them.
Firstly I was getting the following:
<Warning>: LoadExternalDownloadManifestOperation: Ignore manifest download, already have bundleID:
which wouldn't even kick the install off but I followed the steps in the following link: iOS 8 - Can't Install Enterprise App made some changes to the bundle identifier and the manifest file and it would try and kick off the download.
However I am now getting the following errors/warnings and I am unsure what is causing them:
<Notice>: 0x101dcc000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.bundle-name; Version=3.0, ShortVersion=(null)>
<Error>: 0x198de7310 Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such process
<Error>: 0x198de7310 Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
<Error>: 0x198de7310 Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
<Error>: 0x198de7310 Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
<Error>: 0x198de7310 Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
<Error>: 0x198de7310 Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
<Error>: 0x198de7310 Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
as well as:
<Warning>: LaunchServices: Creating installProgressForApplication:<LSApplicationProxy: 0x13cf84870> com.bundle-name(Placeholder) withPhase:3
<Warning>: LaunchServices: installPhaseFinishedForProgress: com.bundle-name.InstallingPlaceholder - <NSProgress: 0x13e003120> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 100 called, removing progress from cache
and:
<Error>: Could not set socket option SO_OPPORTUNISTIC: Invalid argument
Any Help deciphering these and shedding some light would be greatly appreciated.
Update:
I went back and checked iOS 7.1.1 and it was failing to installing there so I switched the manifest file iPA url back to being ftp:// and it worked on 7.1.1 again but iOS8 throws the following warning and fails to download the app:
<Notice>: Invalid URL scheme for background tasks: ftp. Valid schemes are http or https
but switching the IPA url over to HTTPS means the app doesn't download for both iOS 7.1.1 or iOS 8.1

I found the solution to my problem and here is everything I did to get it working.
Our setup + backstory:
We have an AWS webserver with an HTTPS website running on it. Since iOS 7.1 our manifest (plist) is hosted on the server but the IPA was stored on an FTP and this worked fine throughout iOS 7. The introduction of iOS 8 meant the FTP could no longer be used for the IPA so we wanted to move it onto the webserver the same as the PLIST. Before doing this though we had other issues that were preventing the iPad from even trying to download because I was getting the following error message:
Ignore manifest download, already have bundleID: {bundle_id}
The Fix:
Firstly I followed the steps in this question and made sure that both full-size-image and display-image exist in the manifest file.
I then made some other changes to the manifest file based on another answer in this question. These changes were to the bundle-identifier and bundle-version
In doing this my iOS 8 test iPad would pick up the install display the shadow icon but then fail to install, however the iOS 7 iPad would still install I saw the following message:
<Notice>: Invalid URL scheme for background tasks: ftp. Valid schemes are http or https
Which led me to move all the files onto the webserver, but then both iOS 7 and iOS 8 wouldn't install.
I originally thought one of the above errors / warnings might have been causing it to fail but couldn't seem to find an answer. After hours of searching and trying to fix I had an epiphany because when trying to view the IPA in a web browser I was getting a 404 and I remembered we had a similar issue when moving the PLIST file onto the server. To fix this I had to add the IPA MIME type on the IIS 7 server. As soon as I did this my 7 build of our app will download an install on both the iOS 7 and iOS 8 iPads. The correct MIME type for an application/octet-stream

Related

Unable to install enterprise app - This provisioning profile cannot be installed on this device

I'm setting up Jenkins to build an enterprise version of an app in order to be distributed in our internal app store.
If I archive the app in Xcode and then download the built .ipa on the phone the app is installed without any issue; but when I use the .ipa generated with Jenkins with the same private key/certificate/provisioning profile, installation fails with the following error: "Unable to Download App - App name could not be installed at this time"
If I check the console in Xcode I can see some more details errors as "This provisioning profile cannot be installed on this device"
Here is part of the log
<Notice>: 0x16e12f000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=af11a784-f15d-4291-92a1-0e0c54fc4ee9; Version=13, ShortVersion=0.0.1>
<Notice>: attempt to install invalid profile: 0xe8008012
<Error>: 0x16e12f000 -[MIInstallableBundle _installEmbeddedProfileInBundle:]: Could not install embedded profile: 0xe8008012 (This provisioning profile cannot be installed on this device.)
<Error>: 0x16e12f000 MIMachOUnhideArchsSavingOriginalHeader: Failed to open "/private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.YMpQfe/extracted/Payload/appName.app/appName": No such file or directory
<Error>: 0x16e12f000 -[MIInstallableBundle performVerificationWithError:]: 696: Failed to unhide archs in executable file:///private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.YMpQfe/extracted/Payload/appName.app/appName
<Error>: 0x16e12f000 -[MIInstaller performInstallationWithError:]: Verification stage failed
<Error>: 0x16e247000 __MobileInstallationInstallForLaunchServices_block_invoke222: Returned error Error Domain=MIInstallerErrorDomain Code=14 "Failed to unhide archs in executable file:///private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.YMpQfe/extracted/Payload/appName.app/appName" UserInfo={SourceFileLine=696, NSLocalizedDescription=Failed to unhide archs in executable file:///private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.YMpQfe/extracted/Payload/appName.app/appName, FunctionName=-[MIInstallableBundle performVerificationWithError:]}
<Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
Anyone any idea?
This has nothing with provisioning. Offending line Failed to unhide archs means that you're not compiling for given architecture (armv7 or arm64 depending on the device you install to).
I had also different errors like
Failed to unhide archs in executable file
as well as
error MT0000: Unexpected error
or
Error: error MT1006: Could not install the application
or
AMDeviceSecureInstallApplicationBundle returned: 0xe800801c
Now I got it running again after:
Cleaning solution
Deleting content of obj/bin folders
Multiple restart of devices (Mac, iPad, PC, ...)
In general, I recommend to update you development/build environment and to also check your certificates.

Could not inspect the application package

I have final version of XCode 6 (version 6.0.1). In my project, I have problem when running it.
I got
"App installation failed - Could not inspect the application package."
If I run project again, it runs ok. Another run, problem again... etc. So every second run ends in this error, right after that application run just fine.
I have no problem in XCode 5.
If you have moved or copied a folder named resources or resource into your project, try renaming it. Then perform a clean.
I had the same issue, And was unable to install the ipa. It always ended with an error "Could not inspect the application package." and some warnings in device console
Feb 10 17:38:16 iPhone mobile_installation_proxy[356] <Warning>: LaunchServices: Please include the kCFBundleIdentifierKey in the options dictionary when installing an app.
Feb 10 17:38:16 iPhone mobile_installation_proxy[356] <Warning>: LaunchServices: installing app with unknown bundleID
.
.
Feb 10 17:38:16 iPhone installd[44] <Error>: 0x101bcc000 -[MIBundle _validateWithError:]: 28: Failed to load Info.plist from bundle at path
Feb 10 17:38:16 iPhone installd[44] <Error>: 0x101bcc000 + [MIInstallable installablesAtURL:packageFormat:userOptions:error:]: Failed to create bundle for …
After spending hours, I got it fixed by adding the "Application requires iPhone environment" in info.plist
<key>LSRequiresIPhoneOS</key>
<true/>

ios - Unable to download application but app installed correctly

I distribute my iOS App from HTTP server as enterprise distribution. When a user download App directly from web browser, the app installed correctly and no errors occur.
On the other hand, the app have a process for automatic updates. When user start application if a new version of the application on the server, be show a alert for starting download. If user accept, it begins download. During the installation process, the following message is displayed:
"Unable to download application"
but the application has been installed correctly. I use this code for download app:
NSURL *url = [NSURL URLWithString:serverUrlDownload];
[[UIApplication sharedApplication] openURL:url];
This occurs when user used iPhone 5s.
Showed following error in log:
<Warning>: Download url: itms-services://?action=download-manifest&url=http://server_update/ios/IOS_WF.plist
<Warning>: LaunchServices: installing placeholder for app10.IOS-WF
<Notice>: 0x1005a4000 handle_install_for_ls: Install of "/var/mobile/Library/Caches/com.apple.itunesstored/AppPlaceholders/-6609911948116439539.app" requested by itunesstored
<Notice>: 0x1005a4000 MobileInstallationInstall_Server: Installing app app10.IOS-WF
<Notice>: 0x1005a4000 install_application: Installing parallel placeholder
<Notice>: 0x1005a4000 MobileInstallationInstall_Server: Staging: 0.00s; Waiting: 0.00s; Installation: 0.12s; LS Sync: 0.00s; Overall: 0.12s
<Warning>: No se ha obtenido ningún flujo
<Warning>: LaunchServices: Creating installProgressForApplication:LSApplicationProxy: app10.IOS-WF (Placeholder) withPhase:0
<Warning>: LaunchServices: installation failed for app app10.IOS-WF
<Warning>: LaunchServices: installPhaseFinishedForProgress: app10.IOS-WF.Loading - <NSProgress: phase=Loading; state=Failed; fractionCompleted=1.000000> called, removing progress from cache
Reproduce Issue in iPhone 5s.
I couldn't reproduce error in iPhone 4s.
Any idea? Can be a problem of server configuration?
If you have not already done so, you might want to try to supply the app via https instead of http.
As of iOS 7.1, https is required for at least the manifest file, although there are some reports saying http would still work anyway.
The whole story with https being required came as a surprise to most devs and appears to have hickup at the same time. I can well imagine differences of the implementation of the process across different devices due to different OS builds, especially since there's 32 and 64 bit architectures now.
This is a wild guess, but it won't hurt to try. If you don't have a SSL capable server at hand, you might want to use dropbox as workaround, as has been explained here.

Testflight Ad-hoc distribution does not work if the GoogleMaps.bundle is added to the apps resources

I started to develop an iOS application that needs to use the Google Maps SDK. I followed the steps on the Google web page and added it successfully to the project. The problem is that now my testers cannot download the app via TestFlight, which is distributed with Ad-hoc provision profile and signing. There is an error at the last stage of the progress bar "Unable to download the application right now". -> Done, Retry. I do not know the exact message as it is not English for me. But the message is such small, and the meaning is correct.
The app runs well on the ios simulator, and also on my iphone device, with the working map display as well.
I went through the process now 4 times and finally I was able to identify which step causes this: the step to add the googleMaps.bundle to my resources inside the app. So if I remove the bundle from the list of Frameworks (keep the SDK itself) then the app is compilable, downloadable via TestFlight. If I put it back, it is not. Of course I have runtime crash if the bundle is missing, so I cannot do that.
When i open the console log in the Organizer it tell this:
Nov 26 09:42:17 -iPhone-keszuleke installd[1030] <Error>: 0x2ffe6000 MobileInstallationInstall_Server: Installing app hu.vivify.muzeumtura
Nov 26 09:42:18 -iPhone-keszuleke installd[1030] <Error>: Nov 26 09:42:18 SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Nov 26 09:42:18 -iPhone-keszuleke installd[1030] <Error>: 0x2ffe6000 verify_signer_identity: MISValidateSignatureAndCopyInfo failed for /var/tmp/install_staging.sFC3ox/foo_extracted/Payload/muzeumtura.app/muzeumtura: 0xe8008017
Nov 26 09:42:18 -iPhone-keszuleke installd[1030] <Error>: 0x2ffe6000 do_preflight_verification: Could not verify executable at /var/tmp/install_staging.sFC3ox/foo_extracted/Payload/muzeumtura.app
Nov 26 09:42:18 -iPhone-keszuleke itunesstored[72] <Error>: 0x1698000 MobileInstallationInstall: failed with -1
Nov 26 09:42:18 -iPhone-keszuleke installd[1030] <Error>: 0x2ffe6000 install_application: Could not preflight application install
Nov 26 09:42:18 -iPhone-keszuleke installd[1030] <Error>: 0x2ffe6000 handle_install: API failed
Then after a few more hours I have found the advice of trying the terminal for the codesign command. This gives a lot of missing resources in the googleMaps.bundle:
Desktop/Payload/muzeumtura.app: a sealed resource is missing or invalid
In architecture: armv7
resource missing: /Users/daz/Desktop/Payload/muzeumtura.app/GoogleMaps.bundle/GMSCoreResources.bundle/._polyline_colors_texture.png
resource missing: /Users/daz/Desktop/Payload/muzeumtura.app/GoogleMaps.bundle/GMSCoreResources.bundle/nl.lproj/._GMSCore.strings
resource missing: /Users/daz/Desktop/Payload/muzeumtura.app/GoogleMaps.bundle/GMSCoreResources.bundle/._tr.lproj
resource missing: /Users/daz/Desktop/Payload/muzeumtura.app/GoogleMaps.bundle/GMSCoreResources.bundle/de.lproj/._GMSCore.strings
resource missing: /Users/daz/Desktop/Payload/muzeumtura.app/GoogleMaps.bundle/GMSCoreResources.bundle/el.lproj/._GMSCore.strings
resource missing: /Users/daz/Desktop/Payload/muzeumtura.app/GoogleMaps.bundle/GMSCoreResources.bundle/._ru.lproj
resource missing: /Users/daz/Desktop/Payload/muzeumtura.app/GoogleMaps.bundle/GMSCoreResources.bundle/._ms.lproj
... and so on. It is strange that these files listed are all hidden (starting with ._) I do not know it this has any connection to the Testflight problem, or whether this issue in the terminal is critical or not (this is the first time to use the codesign command for me). But I guess so. Please help me find this out, as it must be something trivial, because the app is very simple and I am sure I am not the only one on this planet who wants to integrate the googleMaps SDK into the ios app.
Some more info:
I have XCode 5.0, OSX 10.8.4
I have enabled to show hidden files in Finder
I want to build for armv7
This is the issue with testflight, sometimes happened with me too. This is not particularly related with google maps, try other methods
Distribute ipa to client
OK, that was my fault. When the GoogleMaps.bundle was added to the project by the drag-n-drop, the bundle was on a disk with exFAT partition table! Who would have thought that this can be a reason? I am sad because one and half day of my life and the project had gone. But I am happy that now it works. Good advice: do not use exFAT for iPhone development!

Ad-hoc distribution fail

I work for a big company, and I'm developing an iOS app for iOS 5+. The only way the app will be distributed will be through ad-hoc deployment.
I have had my own server for some time, hosted by o2switch (french hoster). As I started the development, we used it to deploy the app for beta testing purposes. It was working pretty well.
As the app entered its final phase, the company bought the same (in fact, they only have a single one) plan at o2switch (as it was working fine on my server). The "new" server works fine, we have the files required by the iOS app on it and we access them correctly.
My problem is that when I deploy over to the company's server, the install keeps crashing ! The bar below the app's icon is empty, the almost full (in no time), and I get an error saying the app could not be installed. (classic)
I have the so-well-known crash log :
unknown itunesstored[1657] <Notice>: MS:Notice: Installing: com.apple.itunesstored [itunesstored] (690.10)
unknown wifid[23] <Error>: WiFi:[375199765.346102]: Client itunesstored is background application
unknown securityd[1659] <Notice>: MS:Notice: Installing: (null) [securityd] (690.10)
unknown SpringBoard[62] <Warning>: could not save thumbnail for downloading icon: image=(null) path='/var/mobile/Library/SpringBoard/DownloadingIconImageCache/***********'
unknown sandboxd[1661] <Notice>: MS:Notice: Installing: (null) [sandboxd] (690.10)
unknown installd[1663] <Notice>: MS:Notice: Installing: (null) [installd] (690.10)
unknown SpringBoard[62] <Warning>: could not save thumbnail for downloading icon: image=(null) path='/var/mobile/Library/SpringBoard/DownloadingIconImageCache/***********'
unknown keybagd[1665] <Notice>: MS:Notice: Installing: (null) [keybagd] (690.10)
unknown securityd[1667] <Notice>: MS:Notice: Installing: (null) [securityd] (690.10)
unknown SpringBoard[62] <Warning>: Killing *********** for app installation
unknown installd[1663] <Error>: 2ffc1000 extract_package: Could not extract archive
unknown installd[1663] <Error>: 2ffc1000 stage_package: Could not extract /var/tmp/install_staging.I0rwBH/foo.zip to /var/tmp/install_staging.I0rwBH/foo_extracted
unknown com.apple.itunesstored[1657] <Notice>: MobileInstallationInstall: failed with -1
unknown installd[1663] <Error>: 2ffc1000 MobileInstallationInstall: Could not stage the package
unknown installd[1663] <Error>: 2ffc1000 handle_install: API failed
unknown installd[1663] <Error>: 2ffc1000 send_message: failed to send mach message of 71 bytes: 10000003
unknown installd[1663] <Error>: 2ffc1000 send_error: Could not send error response to client
I've tried a lot to get rid of this error, but nothing seemed to work. I've read every single answer on SO talking about this issue, and tried everything I could. I re-downloaded the profiles, updated the build number, checked the ipa's url, and so many other things.. Nothing worked.
I had to deliver the app quickly, so I tried one last thing : put it on my server. And it worked perfectly. First try, and with no problem (maybe one, the bar did not load progressively but stayed grey then filled in blue very quick, but that's not a problem, I know it downloaded the online version). Then I re-tried uploading to the new server, same problem.
BTW, I tested with: iPhone4/iOS5, iPhone4S/iOS6, iPhone5/iOS6, iPad3/iOS6 and a couple other devices, over 3G (3 different providers) and Wifi, same problem every single time.
So, my question is the following :
Does / how can the server impact the ad-hoc deployment ?
I can give information on the server's config if required. Please tell me what info you need.
O2switch is investigating, but they don't know much about iOS ad-hoc deployment, so they don't really know where to look, what service the install calls, etc.
So I'm turning (once again) to you, SO's community ! Any ideas ?
Check the mime-type configuration in the web-server. You need:
application/xml for the .plist file, and
application/octet-stream for the .ipa file.
Did you edit the App.plist file before you moved it to the new server?
The assets url must be absolute, like this: <string>http://someurl.com/App-1.0.0.ipa</string>.
If you are absolutely sure that server returns proper mime types, checked by:
lynx -mime_header http://www.serveraddress/App.plist | head -10
If you are sure that you don't have spaces or new lines in link to your .plist file in your html file.
If you are sure that you have added devices to provisioning profile
And if you have read: http://www.informit.com/articles/article.aspx?p=1829415&seqNum=16
I have all files: .plist, .html, .ipa in the same folder
Then I don't know what is the issue and would suggest you to distribute it from your working server.

Resources