Apple today announced that OS X El Capitan
will be available on Wednesday, September 30 as a free update for Mac users.
There have been reports of incompatibility
between beta releases of OS X El Capitan and Xcode, with Apple suggesting a
workaround on the Apple Developer Forums here. Whilst that post makes it clear that Xcode 7
will be fully supported on OS X El Capitan, it remains unclear whether Xcode 6
will be fully supported.
MAF 2.1.3 requires Xcode 6.
As soon as OS X El Capitan is released, the
MAF development team will commence certification of MAF 2.1.3 using Xcode 6 on
OS X El Capitan. Until this
certification has been completed, you may wish to remain on your current OS X
As most of you are aware, ADF Mobile can hook into JDeveloper's Remote
Debugging to support Java code debugging, such as setting breakpoints
and stepping through the code interactively from an emulator or an
actual device. The steps to enable debugging are described in the
latest ADF Mobile Developer Guide, and Shay also had a
nice entry on how to enable debugging on Android.
The developer guide also contains details on how to enable more refined
levels of logging, and view log output using either the Mac Console
application or the Android Monitor application. Let's explore how
all this works in a bit more detail.
Furthermore, log output to the Mac
console may not display certain logging messages - for example ones
coming from the embedded Java Virtual Machine. This is due to
some compatibility issues between Mac OS (Mountain Lion) and the log
output mechanism. In this article, we will also discuss how to
properly output all logging messages and perform more in-depth
debugging and analysis using device native tools, with the same
capability that native application developers enjoy when debugging an
application written in native code such as Objective C.
iOS Debugging Using Xcode Utilities
Unreliable logging from the Java Virtual Machine is a major issue with
debugging ADF Mobile application on iOS devices or simulator. The
underlying cause is incompatibility issues with Java Virtual Machine
running on the latest Mac OS (Mountain Lion). Furthermore, it is
difficult to debug on an actual device - necessary when debugging
issues with invoking device services such as camera or GPS.
However, you can use Xcode and a tethered iOS device to display all
logging messages from the device, ADF Mobile container, and the
embedded JVM, while running the ADF Mobile application. To do
this, you will need:
A Mac running Moutain Lion or Lion
Latest version of Xcode - as of May 2013, the latest version is
4.6.2. Latest version of Xcode is necessary to properly recognize
devices running latest version of iOS, as older versions of Xcode
cannot properly connect to the most recent version of the iOS.
One frequently asked question here is that ADF Mobile does not
always officially support the latest version. In general,
officially supported version has been thoroughly tested by Oracle QA,
and therefore is recommended for most development purposes.
However, the latest version of Xcode would typically be compatible -
please check JDeveloper
Forum for any reports of issues.
If indeed ADF Mobile for some reason can't use the latest
Xcode version to deploy an application, you can still follow the steps
below. When you open the temporary Xcode project generated by
JDeveloper, you would simply use the latest version of Xcode. The
rest of the instructions would still be valid.
Oracle JDeveloper and ADF Mobile
An iOS device
Obtain and install Apple iOS Developer Certificates and
Provisioning Profiles. When you deploy your ADF Mobile
application, you must deploy in Debug Mode, using Developer
Certificates and Provisioning Profile.
Here is a short video of how to modify the temporary Xcode project and
use Xcode utilities to display all logging messages from an ADF Mobile
application running on a device.
Android Debugging Using Android Debug Monitor
Shay recently published a blog article on viewing
logs and debugging on Android devices.
Debugging using an Android device using Android Debug Monitor is much
simpler to set up. There is no need to work with the temporary
Android application project. Instead, you will just need:
A PC, Mac, or Linux machine supported by the Android SDK
Latest version of Android SDK Tools - this refers to the set of
tools and utilities that are part of the Android SDK. Android
Debug Monitor is part of that.
Oracle JDeveloper and ADF Mobile
An Android-based Device and associated device driver installed
(for PC and Linux Machines)
Please note that the appropriate drivers on PC and Linux are
typically needed for proper connection to the device. If the
machine cannot properly recognize the device, then debugging will not
In addition to what Shay discussed in his blog article, a couple of
additional notes that might be useful if you are looking at
logging messages outside the embedded Java Virtual Machine:
In the LogCat window, set the filter by application ID. You
would see all logging messages related to the application, which
includes events coming from the native part of the application (i.e.
container), Cordova, device services, etc.
You can optionally set your application as a "Debugging
Application" by going to your device Settings-Developer options-Select
debug app, and then select the ADF Mobile application you want to
debug. All applications compiled in "Debug" mode will show up
here. This will allow you to select the ADF Mobile application
process in the Android Debug Monitor app, and perform additional
debugging - most likely much more info than you will ever want (or
care) to know.
Please let us know if there are any issues or questions.
When you are doing ADF Mobile development, and you need to deploy the
application to an iOS device, you would need to compile/deploy the app
with iOS App Certificates and Provisioning Profile. This means you
would need to "Deploy to Package" or "Deploy to iTunes" during
deployment, and configure JDeveloper with the proper
certificates/profiles. In some instances (exact combination is still
not clear), deploy and signing the application to generate the ipa file
may fail with similar error message at the end of the deployment log:
[01:04:45 PM] Deployment failed due to one or more errors returned by
'/usr/bin/xcrun'. The following is a summary of the returned error(s):
Command-line execution failed (Return code: 1) error: /usr/bin/codesign
--sign iPhone Distribution: Oracle Corporation
failed with error 1. Output:
replacing existing signature Program /usr/bin/codesign returned 1 :
replacing existing signature
This blog is is dedicated to announcements,tips and tricks and other items related to developing, integrating, securing, and managing mobile applications using Oracle's Mobile Platform. It is created and maintained by the Oracle Mobile product development team.