With the release of MAF 2.1.0 there are a few important items that will need to be considered when upgrading the iOS environment and with JDeveloper. For example, MAF 2.1.0 requires an upgrade to Xcode 6.1. This post will cover these details, which will include installation guidelines and enable the possibility to have MAF 2.1.0 co-exist with the previous MAF (2.0.1) version.
MAF 2.1.0 requires OS X 10.9.5 or above (e.g. OS X 10.10) and an update of Xcode to version 6.1.x. However, it is possible to have both Xcode 5.1.1 and Xcode 6.1 installed on the same machine. For example, in the case where you wish to maintain separate MAF 2.0.1 and MAF 2.1.0 environments.
If you only wish to develop with MAF 2.1.0, then following steps are to install (or upgrade) to Xcode 6:
With this type of installation process, Xcode 6 will replace Xcode 5. No other changes are required, since JDeveloper will now uses the active Xcode installation.
To maintain separate Xcode 5 and Xcode 6 installations, follow these steps:
Xcode 6 will be installed in /Applications/Xcode.app location. NOTE: Rename the new Xcode 6 location to /Applications/Xcode6.app to help eliminate any future versions.
Once the two Xcode.app's have been installed, you must now manually control which Xcode installation is active at any given time. Use the xcode-select command in a terminal window to perform this procedure:
Important: Remember to set Xcode 5 active even when you are using MAF 2.0.1, otherwise the settings specified in the JDeveloper preferences will not be sufficient to ensure that Xcode 5 tools are used by JDeveloper.
Xcode 6 now supports separate device simulators. When you deploy from JDeveloper to an iOS Simulator with MAF 2.1.0, you must specify which device simulator you desire via the deployment profile:
By default, Xcode 6 has only iOS 8.1 simulators (MAF 2.1.0 does not support iOS 6). However, you can install an iOS 7.1 simulator pack as follows:
If you wish to alternate development between MAF 2.0.1 and MAF 2.1.0, separate JDeveloper versions will also need to be maintained. The following steps will enable this ability:
Important: Remember to use xcode-select to set the active Xcode installation each time you switch between MAF development environments.
Important: Remember to 'clean all' each time you switch between MAF development environments on the same app, otherwise you could have unpredictable build results.
MAF 2.1 does not require you to enter the location of your Xcode installation, since it now uses the active Xcode installation.
MAF 2.1 provides a drop-down selector for you to select the appropriate Provisioning Profile
In MAF 2.1 the Certificate field has been re-labelled as Signing Identity. You must specify this in the same manner as before, typically as follows:
In Xcode 6 the location of both the deployed files and data files such as the application.log (used for debugiing) have been moved. For example, in Xcode 5 the location of the application.log file was pretty easy to find: /Users/<userid>/Library/Application Support/iPhone Simulator/7.1/Applications/<AppID>/Documents/logs/application.log In Xcode 6, files are located by it’s “DEVICE” ID(entifier). What is considered the device IDENTIFIER? It is iPhone 4, 5, 6, iPad, .etc. To find out what is the device id, you can look in Xcode itself:
Open Xcode and from the menu options, select Window > Devices. For you true Mac users that is: ⇧⌘2 (Shift+Command+2) This will open up this view:
So let’s say I am looking for my app, which is running on an iPad. I can see from the identifier is AA6E3A2B-0EEC-4563-8F08-759A7E61ED5B. The (starting) location to all of the files will be: /Users/[user]/Library/Developer/CoreSimulator/Devices. Navigating to this location in the Finder you can view the entire directory structure, which are separated by the device ids. Continuing to look for my specific application.log, I navigate in the directory that matches my device id:
The data directory is where most of the files that you could be searching for. So where is my application.log? Buried inside the Containers directory:
Unfortunately, unlike Xcode 5, the name of the directory for the application is not identified by the application bundle id (defined in the deployment profile > e.g. myexample.myDemoApp) but by a unique GUID. So one way to look for the application.log is to simply do a find –name , since there is no way to figure out what is the specific apps GUID. This GUID also changes with every deployment of the application. In my search the location was here: AA6E3A2B-0EEC-4563-8F08-759A7E61ED5B/data/Containers/Data/Application/BF585977-52C0-4790-BA9E-FB1EAACF86A9/Documents/logs/application.log