Introduction
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.
Main Article
Installation Instructions
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:
- Launch the Apple App Store
- Search for XCode
- Install 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.
Maintaining Separate Xcode installations
To maintain separate Xcode 5 and Xcode 6 installations, follow these steps:
- Rename the location of the XCode.app (e.g. Xcode5.app)
- Launch the Apple App Store
- Search for XCode
- Install XCode 6
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:
- To make Xcode 6 active: sudo xcode-select -s /Applications/Xcode6.app
- To make Xcode 5 active: sudo xcode-select -s /Applications/Xcode5.app
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.
What you need to know about iOS Simulators
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:
- Launch Xcode 6
- Select Preferences > Downloads
- Select the Down Arrow to the iOS 7.1 Simulator NOTE: This process will take some time to complete
JDeveloper Setup and Requirements
Maintaining Separate JDeveloper installations
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:
- Shut down the existing JDeveloper, which has the MAF 2.0.1 extension installed
- Open the $JDEV1_HOME/jdev/bin/jdev.boot in a text editor
- Replace the ide.user.dir.var property with ide.user.dir and then set a unique location
- Install JDeveloper 12.1.3 again using Java 7. However, choose a separate location from the other JDeveloper (with MAF 2.0.1)
- Shut down the new installation of JDeveloper
- Open the $JDEV2_HOME/jdev/bin/jdev.boot in a text editor
- Replace the ide.user.dir.var property with ide.user.dir and then set a unique location
- Install Java 8 (Note where the installation directory is located. This will be needed when MAF 2.1.0 is installed)
- Launch JDeveloper and install the MAF 2.1.0 extension from the Help > Check for Updates
- Once the extension is installed allow JDeveloper to restart. Upon restart MAF will prompt for the Java 8 installation directory (e.g. /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home)
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.
iOS Platform Preferences
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:
- Launch Keychain Access
- Double-click the appropriate certificate
- Copy (or note down) the value for Common Name
- Paste (or enter) this value into the Signing Identity text entry box
File differences with using Xcode 6
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
All content listed on this page is the property of Oracle Corp. Redistribution not allowed without written permission