0

I have a hybrid app written using Xcode5.02 and Mobile SDK as of last November (DF13!) which installs fine on iOS6 and iOS7 devices. It won't install on iSO8 devices. I'm distributing it as an adhoc distribution with an apple developer Distribution provisioning profile.

Based on the StackOverflow answer here I've already added the 'display-image' and 'full-size-image' images which are apparently mandatory in iOS8, to the plist manifest. That helped a little, as the install got almost to the end (icon appeared on desktop) before dying with "Unable to Download App. [app name] could not be installed at this time." Without those 2 images in the plist I got that result straight away.

So my question is, do I have to repackage the app using Xcode6 to get it to install on iOS8? I've already downloaded Xcode6.01 and it failed to build the app against iPhone6 simulator, as it complains about "missing required architecture x86_64" for a whole pack of .a files. It does build the app against iPhone5 simulator.

Other questions:

  • Has anyone got a mobile sdk app to build against iPhone6? I remember reading that there's no 64bit support yet but I can't remember where.
  • If I do build the app in Xcode6 / for iOS8 can it still be installed on iOS7 devices? Or do I need to maintain 2 builds?

Updates: I have started a new project using Xcode 6.01, MobileSDK 2.3.0 and forceios 2.3.0 and imported the files from the old project. It runs, authenticates with OAuth but doesn't start. The simulator loads index.html but nothing happens after that. It's based on the AccountEditor sample, which I notice has some changes since MobileSDK 2.1.0

Account editor (which does run properly) logfile says

...
2014-09-28 08:12:47.253 AccountEditor[5799:67753] Finished load of: file:///Users/dominic/Library/Developer/CoreSimulator/Devices/9473FAB4-8940-4CD5-8002-8104F15F079B/data/Containers/Bundle/Application/E99D84C7-499D-45EA-A765-75F4FF3865CA/AccountEditor.app/www/AccountEditor.html
2014-09-28 08:12:47:271 AccountEditor[5799:607] DEBUG|SFHybridViewController|webView:shouldStartLoadWithRequest: Loading URL 'about:blank'
2014-09-28 08:12:47:272 AccountEditor[5799:607] DEBUG|SFHybridViewController|webView:shouldStartLoadWithRequest: Loading URL 'gap://ready' 
... etc ...

but mine stops at

2014-09-28 08:24:39:935 XXXXXX[6506:607] INFO|SFHybridViewController|Setting file:///Users/dominic/Library/Developer/CoreSimulator/Devices/9473FAB4-8940-4CD5-8002-8104F15F079B/data/Containers/Bundle/Application/FBC7C904-011E-4324-BFE1-14B2FFDA6DFC/XXXXXX.app/www/index.html as the 'home page' URL for this app.
2014-09-28 08:24:39.936 XXXXXX[6506:72175] Finished load of: file:///Users/dominic/Library/Developer/CoreSimulator/Devices/9473FAB4-8940-4CD5-8002-8104F15F079B/data/Containers/Bundle/Application/FBC7C904-011E-4324-BFE1-14B2FFDA6DFC/XXXXXX.app/www/index.html

so no "should start load..."

Any idea what I'm missing? Also helpful would be a way to build a standalone copy of the AccountEditor app, and I'd start rebuilding mine by copying my files into it.

  • Partial answer: the cordova plugin paths have changed so what was "salesforce/plugin/oauth" needs changing to "com.salesforce.plugin.oauth". App appears to start now but just get a blank screen. And console.log doesn't log to the console. I suspect cordova plugins again but can't find a reference to change. – Dominic Sep 28 '14 at 8:31
1

Based on the StackOverflow answer here I've already added the 'display-image' and 'full-size-image' images which are apparently mandatory in iOS8, to the plist manifest.

This is specific to enterprise distributions with an OTA install. Those images are not otherwise mandatory.

"Unable to Download App. [app name] could not be installed at this time."

This could be a few different things but I don't think it's an iOS 8 issue. Generally this means that your app's entitlements do not match those specified in your provisioning profile, or that the device you are installing on does not have its UDID included in your adhoc provisioning profile. The latter seems particularly likely given you are trying to install on a new device and you may not have updated your provisioning profile to include it.

So my question is, do I have to repackage the app using Xcode6 to get it to install on iOS8?

No. You can install apps built for iOS 7 (and earlier) on devices running iOS 8, like any of the thousands of apps on the app store that have yet to be updated for iOS 8.

That said, you will save yourself time in the long run by staying up to date with Apple's developer tools. And you will certainly want to install Xcode 6 if you plan to develop for iOS 8.

it complains about "missing required architecture x86_64" for a whole pack of .a files

You are building an app that includes libraries that do not have an x86_64 slice for the iOS simulator.

Has anyone got a mobile sdk app to build against iPhone6? I remember reading that there's no 64bit support yet but I can't remember where.

The Salesforce iOS SDK includes 64-bit support for native apps as of release 2.2 and hybrid apps as of 2.3.

If I do build the app in Xcode6 / for iOS8 can it still be installed on iOS7 devices? Or do I need to maintain 2 builds?

There are two build settings to be aware of here:

  • SDKROOT is the version of the iOS SDK against which your app is linked. This determines the headers and libraries that will be available to your app.
  • IPHONEOS_DEPLOYMENT_TARGET is the minimum version of iOS required to run your app.

For example, I have an app built with the iOS 8 SDK that specifies a minimum deploy target of iOS 7. That means any device running iOS 7 or later can install my app, but I must be careful to check at runtime for the current OS -- or, better, I can check for the existence of iOS 8 classes before trying to instantiate them.

  • thanks for the detailed response. So theoretically my app which is built using SFMobileSDK 2.1.0 with a minimum os version of iOS6 should install and run on iOS8. That's what I was expecting and I was disappointed it failed. I'm pretty sure I added the device UDID to the provisioning profile correctly but I'll check again. – Dominic Sep 29 '14 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.