ios - Unable to download application but app installed correctly - ios

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.

Related

iOS8 Enterprise app install issue

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

IBM Worklight - App hang at splash screen after applying FixPack

After applying FixPack 1 (for Worklight 6.1.01) on the device, we notice some unexpected behaviour in iOS. We had tried on both iOS 6 and 7.1 and they both display the same behavior.
We had increase the version number of the app (i.e. from 1.2 to 1.3) for the deployment. When the user try to update the app via the AppCenter Mobile Client, after installing, the app will just stop at the splash screen with the IBM logo. Only by delete / uninstall the app and reinstall again the app can work as per usual.
We check the console log in xcode and got the following print out:
May 26 13:16:42 MY-iPad profiled[713] <Notice>: (Note ) profiled: Service stopping.
May 26 13:16:42 MY-iPad kernel[0] <Debug>: launchd[714] Container: /private/var/mobile/Applications/284CEAF0-8B89-467C-BA55-0F277FFA6521 (sandbox)
May 26 13:16:42 MY-iPad backboardd[28] <Error>: HID: The 'Passive' connection 'MyMobileApp' access to protected services is denied.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [WORKLIGHT] -[WLCordovaAppDelegate handleAppWebResources:] in WLCordovaAppDelegate.m:373 :: NativeInitUntilWebViewLoad : START
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [OCLogger] Max file size exceeded for log messages.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Web resources integrity test is disabled.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Application windows are expected to have a root view controller at the end of application launch
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Multi-tasking -> Device: YES, App: YES
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Unlimited access to network resources
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [CDVTimer][splashscreen] 15.210986ms
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [CDVTimer][TotalPluginStartup] 17.367005ms
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: WARNING: AutoHideSplashScreen key in Cordova.plist is missing or set to NO! SplashScreen will display indefinitley unless you manually hide it. Set value to YES to autohide.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [WORKLIGHT] -[WLCordovaAppDelegate postInitOnMainThread:] in WLCordovaAppDelegate.m:303 :: NativeInitUntilWebViewLoad : END
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [OCLogger] Max file size exceeded for log messages.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Resetting plugins due to page load.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Failed to load webpage with error: The requested URL was not found on this server.
Some googling on the issue lead to this Worklight 6.1 "access to protected services is denied" after app is deployed to App Store. It is a similar issue albeit with a different behaviour.
For now we had instructed the user to clear all their data before they upgrade the app, but we can't use this method going forward as there will be crucial data in the device that we can't erase simply for upgrading the app.
Any info or idea on this is appreciated.
UPDATE
We tried to redeploy the app by using the Server Configuration Tool but still the same problem persists. We checked the log for the Fixpack installation and there was no error reported. Also the IBM Installation Manager shows that the version installed is the latest 6.1.01 and it doesn't allow me to Update it, only Modify.
UPDATE 2
After deleting the native folder and redeploy the apps (from the .wlapp file to the .ipa file), the same issue still appear. However a pattern is observed.
If the app is rebuild and redeploy, the first install from the AppCenter will run as per usual with no problem, meaning the data will be preserved and the apps run normally, even though there are no changes in the code and version no. However if you click on the install button another time to install again, then the problem will appear.
I figured it out - there's a bug in worklight (not cordova).
In the file:
helloHelloIphone/Classes/hello.m, the Xcode debugger reported that the following auto-generated worklight code was loading an incorrect value for "startPage":
-(void)wlInitDidCompleteSuccessfully
{
UIViewController* rootViewController = self.window.rootViewController;
// Create a Cordova View Controller
CDVViewController* cordovaViewController = [[CDVViewController alloc] init] ;
cordovaViewController.startPage = [[WL sharedInstance] mainHtmlFilePath];
Because the value of “startPage” turned out to be:
#"worklight:///Users/mrhines/Library/Application Support/iPhone Simulator/6.1/Applications/A2E1427C-7DFF-4843-BF3D-0B7E4B470E43/hello.app/www/default/(null)”
This is clearly wrong - the end of the string should say “index.html”, not null.
So, by replacing the last line of code above with the following line:
cordovaViewController.startPage = [[[WL sharedInstance] mainHtmlFilePath] stringByReplacingOccurrencesOfString:#"(null)" withString:#"index.html"];
My application reliably starts up and moves past the hung splash screen, fixing the bug in Worklight.
IBM had released a quick fix patch for the issue, and after installing onto the development server, things look fine.

iOS Ad-Hoc Install fails with proper provisions made

I have done this a dozen times successfully and cannot figure out what is wrong for this instance. I created the deployment certificate, added my devices, and then created my ad-hoc profile using the deployment cert and all devices.
I have a website that allows the user to install the profile and app. The app starts to install and gets to where it is almost done and then it just sits there. It fails for all devices with different flavors of iOS on them.
Any ideas what could be wrong? This is the console output where (altered) line 3 is bugging me. I think this is the primary failure point and I am investigating further. It works fine from my desktop.
Aug 5 09:08:29 MFI-Test-iPad-Mini installd[62] <Notice>: 0x3cf000 MobileInstallationInstall_Server: Installing app com.marketforce.Auditor
Aug 5 09:08:36 MFI-Test-iPad-Mini profiled[213] <Notice>: (Note ) profiled: Service stopping.
Aug 5 09:08:37 MFI-Test-iPad-Mini securityd[78] <Notice>: http asynchttp_timer_proc Timeout during GET http://ocsp.apple.com/ocsp-wwdr01/ThisHasBeenChangedInTheInterestOfSecurity%2BThisHasAlsoBeenAlteredForSecuritym67h1P0%3D.
Aug 5 09:08:37 MFI-Test-iPad-Mini installd[62] <Error>: entitlement 'keychain-access-groups' has value not permitted by provisioning profile 'Adhoc Distribution'
Aug 5 09:08:37 MFI-Test-iPad-Mini installd[62] <Error>: 0x3cf000 verify_signer_identity: MISValidateSignatureAndCopyInfo failed for /var/tmp/install_staging.nkJObR/foo_extracted/Payload/Auditor.app/Auditor: 0xe8008016
Aug 5 09:08:37 MFI-Test-iPad-Mini installd[62] <Error>: 0x3cf000 do_preflight_verification: Could not verify executable at /var/tmp/install_staging.nkJObR/foo_extracted/Payload/Auditor.app
Aug 5 09:08:37 MFI-Test-iPad-Mini installd[62] <Error>: 0x3cf000 install_application: Could not preflight application install
Aug 5 09:08:37 MFI-Test-iPad-Mini itunesstored[89] <Error>: 0x1c3e000 MobileInstallationInstallForLaunchServices: failed with -1
Aug 5 09:08:37 MFI-Test-iPad-Mini itunesstored[89] <Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
Aug 5 09:08:37 MFI-Test-iPad-Mini lsd[166] <Warning>: LaunchServices: installation failed for app com.marketforce.Auditor
Aug 5 09:08:37 MFI-Test-iPad-Mini itunesstored[89] <Warning>: LaunchServices: installPhaseFinishedForProgress: com.marketforce.Auditor.Installing - <NSProgress: phase=Installing; state=Failed;
When I hit ad-hoc distribution errors, I have a couple troubleshooting steps to try to narrow it down.
Can you install just the provisioning profile? You should have either a developer or a distribution profile (depending, often times I install both to be sure).
Can you install the app via the iPhone Configuration Utility?
Answering those two questions will point you in the right direction at least. Good luck!
The app was originally created under a developer's appleID and the published in the Business To Business site. The developer left the company and the company created an appleID to be used for the company's development purposes. (Which is what should have been done to begin with).
The app was then transferred to the company's ID however the transfer didn't work right as it left the AppID under the old developer account so any attempt to use certificates and profiles against either account was doomed to failure while using the original AppID. To do any sort of internal deployment, a different AppID had to be created.
After Apple finally got the app transfer fully complete, all was good and the original AppID could once again be used.

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.

Ad hoc OTA deployment working on all ipads except iPad 3 with IOS 6

I am running into a weird issue for my Company. I have setup a build for my ipad app that is built with an AD hoc profile. I followed all the directions on how to set this up and is working correctly with the provision profile and the app for 5 other ipads. What i have noticed is that for some reason its not working on iPad 3 with IOS6. Here is the error i get in the console when trying:
Oct 31 12:00:56 Scotts-iPad SpringBoard[66] <Warning>: could not save thumbnail for downloading icon: image=(null) path='/var/mobile/Library/SpringBoard/DownloadingIconImageCache/com.localbix.online.ipad-9885BA22-13CA-4388-96A0-08EDCABF459E'
Oct 31 12:00:56 Scotts-iPad SpringBoard[66] <Warning>: could not save thumbnail for downloading icon: image=(null) path='/var/mobile/Library/SpringBoard/DownloadingIconImageCache/com.localbix.online.ipad-5C37022E-5875-4C48-A135-03ADD4AA75B8'
Oct 31 12:00:56 Scotts-iPad installd[30] <Error>: 0x343000 handle_install: Install of "/var/mobile/Media/Downloads/8020495531107338408/6723207522652074632" requested by itunesstored
Oct 31 12:00:56 Scotts-iPad installd[30] <Error>: 0x343000 extract_package: Could not extract archive
Oct 31 12:00:56 Scotts-iPad installd[30] <Error>: 0x343000 stage_package: Could not extract /var/mobile/Media/Downloads/8020495531107338408/6723207522652074632 to /var/tmp/install_staging.oIwDCd/foo_extracted
Oct 31 12:00:56 Scotts-iPad installd[30] <Error>: 0x343000 MobileInstallationInstall_Server: Could not stage the package
Oct 31 12:00:56 Scotts-iPad itunesstored[64] <Error>: 0x1c65000 MobileInstallationInstall: failed with -1
Oct 31 12:00:56 Scotts-iPad installd[30] <Error>: 0x343000 handle_install: API failed
Oct 31 12:01:05 Scotts-iPad profiled[4231] <Notice>: (Note ) profiled: Idled.
Oct 31 12:01:05 Scotts-iPad profiled[4231] <Notice>: (Note ) profiled: Service stopping.
The cert does have those ipad UUID's listed so its not that issue. I have ran out of ideas on what could be the issue. Any ideas? I have talked to a few others and said they have noticed the issue on the latest ipads also but have no idea. Any one else running into this issue?
Much Appreciated!
I figured the answer out. It was as simple as my wifi setup on my ipad had our corporate proxy server defined. Because of this websense was blocking downloading of .ipa file. So if i took that same URL and put it on a desktop browser i could see it was getting blocked. Switching off the proxy fixed the issue!
I had something similar, though no VPN, just a plain Wi-Fi setup.
iPhone4, iPhone5 and iPad2 all running iOS6 can install OTA with no issues.
At the same time, iPhone4S and iPad1 running iOS5 fail to install the app OTA.
Normal installation via iTunes sync works fine for all devices.
It's obviously an issue with OS version, but I have no idea where to look for next.
Is it in the build settings for the app or something related to server config (IIS in this case)...

Resources