IBM Worklight - App hang at splash screen after applying FixPack - ios

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.

Related

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!

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 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)...

App crashing immediately after start

EDIT: My problem was because the plist file was corrupted . So if you have the same issue, probably is because of something in you plist file.
SO i have this app and everything worked just fine until i updated my device to IOS 6. After that i couldn't install the app on the device . The app worked just fine on IOS 5.0 simulator and IOS 6.0 simulator . When i try to build it for device , the splash screen appears for two second and then the app closes . In Xcode i receive this error :
timed out waiting for app to launch
I searched the web and it said that it is a AdHoc provisioning problem but my provisioning profiles are in order . I even changed the app id and deleted the old provisioning and i got the same error .
In the device console i receive this weird error :
Oct 15 23:48:23 iPad2-3G backboardd[51] <Warning>: Launch Services: Registered unknown app identifier InvoiceAppDev
��Oct 15 23:48:23 iPad2-3G backboardd[51] <Warning>: Launch Services: Unable to find app identifier InvoiceAppDev
Oct 15 23:48:23 iPad2-3G backboardd[51] <Warning>: Can't create application "InvoiceAppDev" without a bundle path
Oct 15 23:48:44 iPad2-3G mobile_house_arrest[200] <Error>: Max open files: 78
��Oct 15 23:48:44 iPad2-3G installd[30] <Error>: 0x2ff81000 handle_install: Install of "/var/mobile/Media/PublicStaging/InvoiceApp.app" requested by mobile_installation_proxy
Oct 15 23:48:44 iPad2-3G installd[30] <Error>: 0x2ff81000 MobileInstallationInstall_Server: Installing app InvoiceAppDev
��Oct 15 23:48:44 iPad2-3G installd[30] <Error>: Oct 15 23:48:44 SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Oct 15 23:48:45 iPad2-3G installd[30] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
��Oct 15 23:48:45 iPad2-3G installd[30] <Error>: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by a provisioning profile
I don't have any clue what happened . Does anybody has any idea why this happened ?
I saw the same error caused by the accidental entry of the following blank field in app.plist:
+ <key>LSApplicationCategoryType</key>
+ <string></string>
I had the exact same symptoms. Believe it or not, I changed my target code signing from distribution to developer and everything worked as expected.
Thanks #nycynik - that solved the problem.
In xcode open the the "Organizer", choose the device (ex. iPhone), select "Application" and delete the previous Version of the
App. Than run again.

Resources