Upgrading your Oracle JET hybrid mobile app to use Xcode 9

If you have been using Oracle JavaScript Extension Toolkit (JET) to develop a hybrid mobile app and you’ve recently upgraded to Xcode 9, the first time you deploy to an iOS device you will likely see the following error:

Error Domain=IDEProvisioningErrorDomain Code=9 “”HybridBasic.app” requires a provisioning profile.” UserInfo={NSLocalizedDescription=”HybridBasic.app” requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the “provisioningProfiles” dictionary in your Export Options property list.}

Your first thought is likely that there’s something wrong with your provisioning profile, but actually what you need to do is update your Cordova installation.

First step is to update your Cordova CLI to the latest release:

$ npm -g install cordova@latest

If you are on macOS, you will need to do this as ‘sudo’.

The npm output should report what version was installed, but you can check this by typing:

$ cordova --version

This should report 7.1.0 or later.

Then within your existing app’s top-level folder, you need to remove the old cordova-ios and add the latest:

$ ojet remove platform ios
$ ojet add platform ios

The latter command will report which version of cordova-ios was installed, but to double-check you can type:

$ ojet list platforms

This should report cordova-ios@4.5.3 or later.

Following the update, a build or serve should now work:

$ ojet serve ios --device --build-config=buildConfig.json

As you scaffold new JET hybrid mobile apps, they will contain the latest cordova-ios release that is compatible with your Cordova CLI installation.

Remember to keep your tooling up-to-date and happy coding!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.