We are going to walk through the process of ADF Mobile application installation on iPhone device. I will use application from my previous post - ADF Mobile - Secured Web Service Access. Besides deployment process, I will describe how I'm testing on device application through my local wireless network. I would recommend first to go through very useful video tutorial from Oracle related to ADF Mobile deployment on iPhone device - video. Read section from developer guide - 16 Deploying ADF Mobile Applications.
Here you can download a set of sample applications (described in blog post above) I will use today - mobilesecuredws.zip.
If you want to deploy on iPhone device, first you should purchase Apple Developer program access. Once you will get access to Apple Developer program, go to iOS Provisioning Portal:
You should launch Development Provisioning Assistant from iOS Provisioning Portal - it helps to setup deployment environment literally in minutes:
You will generate development certificate on iOS Provisioning Portal:
Copy this certificate to your Apple machine and register it in Key Chain for authenticated user, it should appear under Certificates section. You will need this long certificate name a bit later - to copy it and save into JDeveloper preferences:
Register your iPhone device on iOS Provisioning Portal:
Last registration step - setup Application ID and Development Provisioning Profile (download it to your Apple machine). Application ID is very important thing - make sure to add your package name and put * at the end - this will allow to reuse the same Application ID for multiple applications (you will see it below):
There is Organizer utility from Apple, packaged into Xcode. This utility allows to manage your iPhone device deployment from single central place - open it from Xcode -> Organizer menu and manage applications, provisioning profiles, etc.:
Very important thing - you should get URL for Provisioning Profile from Organizer (select Reveal Profile in Finder). You can simply drag and drop Provisioning Profile downloaded from iOS Provisioning Portal into Organizer window. URL in JDeveloper preferences should point to Provisioning Profile imported into Organizer:
ADF Mobile application is packaged as *.ipa file - you can drag and drop this file directly into Organizer and it will be uploaded and installed automatically on iPhone device (installation process is pretty simple as you can see):
Provisioning Profile URL in JDeveloper should point to the file imported into Organizer. Certificate is a long name from Key Chain utility:
Very important: if you want to avoid error about missing Application ID in Provisioning Profile - be careful when setting Application Bundle Id in JDeveloper deployment profile for your application. This Id must start with the same package name as it is set in Provisioning Profile, it can be appended with application custom package (* replacement):
Same Id should be set in adfmf-application.xml file:
Deploy to *.ipa file by deploying to distribution package from JDeveloper:
When application is installed, you can test connection to the server side (secured Web Service in my case) on the local network. Make sure that ADF Mobile application contains local IP configuration in connections.xml file, verify your local network IP for development machine (ADF Mobile application should be able to access this IP):
Here you can see my phone screenshot with ADF Mobile application login screen:
Secured Web Service invocation:
Successful access on the server side:
Here you can download a set of sample applications (described in blog post above) I will use today - mobilesecuredws.zip.
If you want to deploy on iPhone device, first you should purchase Apple Developer program access. Once you will get access to Apple Developer program, go to iOS Provisioning Portal:
You should launch Development Provisioning Assistant from iOS Provisioning Portal - it helps to setup deployment environment literally in minutes:
You will generate development certificate on iOS Provisioning Portal:
Copy this certificate to your Apple machine and register it in Key Chain for authenticated user, it should appear under Certificates section. You will need this long certificate name a bit later - to copy it and save into JDeveloper preferences:
Register your iPhone device on iOS Provisioning Portal:
Last registration step - setup Application ID and Development Provisioning Profile (download it to your Apple machine). Application ID is very important thing - make sure to add your package name and put * at the end - this will allow to reuse the same Application ID for multiple applications (you will see it below):
There is Organizer utility from Apple, packaged into Xcode. This utility allows to manage your iPhone device deployment from single central place - open it from Xcode -> Organizer menu and manage applications, provisioning profiles, etc.:
Very important thing - you should get URL for Provisioning Profile from Organizer (select Reveal Profile in Finder). You can simply drag and drop Provisioning Profile downloaded from iOS Provisioning Portal into Organizer window. URL in JDeveloper preferences should point to Provisioning Profile imported into Organizer:
ADF Mobile application is packaged as *.ipa file - you can drag and drop this file directly into Organizer and it will be uploaded and installed automatically on iPhone device (installation process is pretty simple as you can see):
Provisioning Profile URL in JDeveloper should point to the file imported into Organizer. Certificate is a long name from Key Chain utility:
Very important: if you want to avoid error about missing Application ID in Provisioning Profile - be careful when setting Application Bundle Id in JDeveloper deployment profile for your application. This Id must start with the same package name as it is set in Provisioning Profile, it can be appended with application custom package (* replacement):
Same Id should be set in adfmf-application.xml file:
Deploy to *.ipa file by deploying to distribution package from JDeveloper:
When application is installed, you can test connection to the server side (secured Web Service in my case) on the local network. Make sure that ADF Mobile application contains local IP configuration in connections.xml file, verify your local network IP for development machine (ADF Mobile application should be able to access this IP):
Here you can see my phone screenshot with ADF Mobile application login screen:
Secured Web Service invocation:
Successful access on the server side:
4 comments:
Do we need to have Mac/XCode/etc, or can you directly deploy it through JDev running on Windows?
Also, once deployed, can anybody see the application, or is it available just for you? Thank you!
Yes, you need to have Mac Book with XCode, you cant use Windows for iPhone deployment.
Andrejus
Hi admin
i follow exactly the way you did, but i received this error ..
[10:55:45 AM] error: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign iPhone Developer: aaaaaaa (XXXXXXXX) --resource-rules=/var/folders/hy/6b__npdd11qggj__5_zjjwkw0000gn/T/tRtHgIsMja/Payload/TestiPhone.app/ResourceRules.plist /var/folders/hy/6b__npdd11qggj__5_zjjwkw0000gn/T/tRtHgIsMja/Payload/TestiPhone.app failed with error 1. Output: /var/folders/hy/6b__npdd11qggj__5_zjjwkw0000gn/T/tRtHgIsMja/Payload/TestiPhone.app: replacing existing signature
[10:55:45 AM] Program /usr/bin/codesign returned 1 : [/var/folders/hy/6b__npdd11qggj__5_zjjwkw0000gn/T/tRtHgIsMja/Payload/TestiPhone.app: replacing existing signature
[10:55:45 AM] Command-line execution failed (Return code: 1)
[10:55:45 AM] Deployment cancelled.
[10:55:45 AM] ---- Deployment incomplete ----.
[10:55:45 AM] Failed to package the XCode application.
[10:55:45 AM] Failed to build the iOS application bundle.
[10:55:45 AM] 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 --force --preserve-metadata=identifier,entitlements,resource-rules --sign iPhone Developer: aaaaaaa (XXXXXXXX) --resource-rules=/var/folders/hy/6b__npdd11qggj__5_zjjwkw0000gn/T/tRtHgIsMja/Payload/TestiPhone.app/ResourceRules.plist /var/folders/hy/6b__npdd11qggj__5_zjjwkw0000gn/T/tRtHgIsMja/Payload/TestiPhone.app failed with error 1. Output: /var/folders/hy/6b__npdd11qggj__5_zjjwkw0000gn/T/tRtHgIsMja/Payload/TestiPhone.app: replacing existing signature
Program /usr/bin/codesign returned 1 : [/var/folders/hy/6b__npdd11qggj__5_zjjwkw0000gn/T/tRtHgIsMja/Payload/TestiPhone.app: replacing existing signature
Probably something wrong with your environment or certificate, it took me 3 times to install everything correctly myself.
Andrejus
Post a Comment