Forum Stats

  • 3,814,885 Users
  • 2,258,923 Discussions
  • 7,892,883 Comments

Discussions

MAF OEPE - Issues deploying to iOS device

user1704589
user1704589 Member Posts: 9
edited Sep 25, 2018 4:51PM in Mobile Application Framework

OSx Mavericks

oepe-12.1.3.1-luna for Mac 64bit

xCode 5.1.1 (only version installed)

I have created a distribution certificate and ad-hoc provisioning files (wildcard app id *) from Apple and have used them to successfully build and install an app on my iPhone using another build system.

In MAF, I create a new run configuration following the instructions described in chapter "19.2.6 How to Create an iOS Deployment Configuration" of the instructions.

However, when selecting the provisioning profile, which contains the cert and provision files, the window shows an error message in the upper right corner "Error loading Mobile Provision Profile Adhoc" (see second link below).

Any idea what might be going wrong?

Screenshots are posted here:

http://heffdev.com/screenshots/Provision.png

http://heffdev.com/screenshots/Run_Configuration.png

This is from the Eclipse Exception Log.

eclipse.buildId=4.4.0.I20140606-1215

java.version=1.7.0_51

java.vendor=Oracle Corporation

BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US

Framework arguments:  -keyring /Users/Brandon/.eclipse_keyring -showlocation

Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/Brandon/.eclipse_keyring -showlocation

org.eclipse.core.databinding

Error

Sun Jul 13 16:08:59 CEST 2014

Unhandled exception: null

java.lang.UnsupportedOperationException

  at org.eclipse.core.databinding.observable.list.ObservableList$2.remove(ObservableList.java:190)

  at oracle.eclipse.tools.adf.mobile.preferences.IOSMobileProvisionPreferencePage$16.createObservable(IOSMobileProvisionPreferencePage.java:582)

  at oracle.eclipse.tools.adf.mobile.common.ui.BindableSection.createPropertyObservable(BindableSection.java:100)

  at oracle.eclipse.tools.adf.mobile.common.ui.ComboViewerSection.bindContents(ComboViewerSection.java:255)

  at oracle.eclipse.tools.adf.mobile.common.ui.ComboViewerSection.refreshBindings(ComboViewerSection.java:179)

  at oracle.eclipse.tools.adf.mobile.common.ui.BindableSection.refresh(BindableSection.java:196)

  at oracle.eclipse.tools.adf.mobile.common.ui.BindableSection.access$3(BindableSection.java:194)

  at oracle.eclipse.tools.adf.mobile.common.ui.BindableSection$1.handleValueChange(BindableSection.java:171)

http://heffdev.com/screenshots/IOSMobileProvisionPreferencePage.html

Tagged:
franciscoB-Oracle
«1

Answers

  • Hi user1704589,

    The one thing that stands out in the screen shots is that in the preference page the provisioning profile is called "Adhoc" but the error in the launch configuration says "Adoc".  Is it possible that something is out of sync?  In the preference page, when you click "Show Certificate" is able to show you the associated certificate?

    I will try to reproduce this issue locally and reply on this thread.


    Thanks,


    Cameron Bateman

  • Hi Cameron,

    I've removed the configurations, closed Eclipse, restarted my computer and followed these steps:

    1. Opened the ios mobile provisioning screen from the workspace preferences screen

    2. I created an Adhoc profile using the cert and provisioning file in the previous screenshots

    3. I immediately attempted to create another provision using my development cert and provisioning file, however, all of the input fields remained with the Adhoc data. I canceled this creation process

    4. In the run configuration, I selected iTunes as the deployment target the Adhoc provisioning profile. Again, the same error message was shown as in the screen shot.

    Also, at the same time a new exception was shown in the Error Log view (it is the same as the one I pasted into the original post - I can give you the full stack trace if that is helpful). This happened when the window opens to select the provisioning file during the create provision profile process.

    I repeated the steps above but used my developer cert and prov file...same results.

    Regarding your question " In the preference page, when you click "Show Certificate" is able to show you the associated certificate?" - yes, for the first provision profile, the correct cert is selected and visible when I click "Show Certificate". However, on the second profile that I created, the data in the window is not updated and therefore the wrong cert is also shown.

  • Hi user1704589,

    Any stack traces (or even the whole .metadata/.log) would be very helpful.  OEPE seems to be having a problem loading your mobileprovision files.  I need to do some research to see if there is any reason why your mobileprovision's would be different than the ones we test with.  I will try to get back with an answer as soon as I can.

    One possible workaround we could try, if you are willing, would be to try to call the target's ant scripts directly to do the deployment.  This is behavior that will be supported in a future release (it's not been documented or certified in the current release) but which we could try as a workaround if you want the steps.


    Thanks,

    Cameron

  • Attached are two .metadata/.log files.

    I'd be willing to give the workaround you described a try.

    I've used MyEclipse Mobile Tools and for their build system I am always

    required to specify my private key as well (for versions of MyEclipse

    2013,2014 & 2015). In OEPE there is no such requirement - or have I missed

    that somewhere?

    On Mon, Jul 14, 2014 at 8:01 PM, community-admin <

  • OEPE uses the Mac Keychain to manage Apple Developer keys, so OEPE won't ask you to provide that key.  This may be the issue.  Have a look at section 19.2.7.4 of the document you referenced above.  I will see if I can provide more specific troubleshooting steps for you.


    The manual workaround probably won't work if it's the keychain that is missing something, but I'll provide some steps to try anyway.  I'm using the HelloWorld application from Examples wizard just to keep the app requirements minimal.  I'm assuming the following:


    Code Sign Identity: iPhone Distribution: Cameron Bateman

    Mobile Provisioning Path: /Users/cbateman/ios/CameronBateman.mobileprovision

    iTunes Target Directory: "/Users/cbateman/Music/iTunes/iTunes Media/Automatically Add to iTunes.localized"

    My Workspace Path: /Users/cbateman/Documents/workspace-luna-test-features

    The entitlement id prefix for my mobileprovision: com.cameron.bateman

    1) First disable the filter on your Eclipse navigator so you can see "." files.  Depending on whether you are using Package Explorer or one of the Common Navigator's this will vary slightly but it will be an action off the view actions bar for "Filters.." or "Customize View"->Filters.  Disable the filter for ".* resources".

    2) You should now see a folder in the root the HelloWorld (assembly) project called ".main.ios".  If you expand this along ".main.ios"->bin you will see a build.xml file (amongst others).

    3) Right-click on the build.xml and select Run As->Ant Build...

    4) Under the main tab of the dialog got under "Arguments" and enter the "-D" entries listed below, making sure to change the specific information for your setup.  Note that any value that has spaces in it (esp. paths) needs to be surrounded in double quotes.

    -Dbasedir=/Users/cbateman/Documents/workspace-luna-test-features/HelloWorld/.main.ios/bin

    -Doepe.adfmf.assembly.project.dir.1=/Users/cbateman/Documents/workspace-luna-test-features/HelloWorldApplication

    -Doepe.adfmf.assembly.project.dir.2=/Users/cbateman/Documents/workspace-luna-test-features/HelloWorldView

    -Doepe.adfmf.assembly.project.dir.3=/Users/cbateman/Documents/workspace-luna-test-features/HelloWorld

    -Dadf.deploy.bundle.identifier=com.cameron.bateman.HelloWorld

    -Dadf.deploy.target.name=iphoneos

    "-Dadf.deploy.code.sign.identity=iPhone Distribution: Cameron Bateman"

    "-Dadf.deploy.mobileprovision.path=/Users/cbateman/ios/CameronBateman.mobileprovision"

    "-Dios.deploy.itunes.target.dir=/Users/cbateman/Music/iTunes/iTunes Media/Automatically Add to iTunes.localized"

    5) Switch to the Targets tab of the dialog and select "build" and "deploy".  Make sure they appear in that order in the "Target execution order" text box near the bottom of the page (i.e. "build, deploy").

    6) Go to the JRE tab and make sure the radio button for "Separate JRE" is selected and that the combo box selection contains a valid JRE for either Java 7 or Java 8 (Java 7 is preferred).

    Thanks,

    Cameron

    user1704589
  • Update:

    Still getting error loading the provisioning profile, even after I've deleted all provisioning files, revoked my certificates, deleted the old .csr and:

    1. Created a new .csr using the Mac Keychain tool

    2. Created a new distribution.cert on the iOS developer console, using the csr created in step 1.

    3. Imported the certificate into my keychain (see screenshot 1 and 2).

    4. Created an ahoc distribution provisioning file using the wildcard app ID * in the iOS developer console

    5. Created a MAF provisioning using the provisioning file created in step 4

    6. Created a MAF Runtime Config using the provisioning created in step 6

    Not sure what else I can try to get rid of this error, which is preventing me from building the app.

    I will try the steps mentioned above to see if I can still build with the workaround.

    Brandon

  • Hi Brandon,

    When you open Xcode and got to Preferences->Accounts, do you see your deployment appear in the bottom table?  Sometimes Xcode doesn't associate your cert/private key with your Apple ID properly.

    Also, I can't seem to see your .log attachments mentioned above.  Is there a link I'm not seeing?

    Thanks,

    Cameron

  • Hi Brandon,

    I'm stil trying to determine what the issue is here.  I got an Adhoc certificate issued through the Oracle internal mechanism that I am required to use and the design time seems to be able to read it.  There seems to be a short-coming in our logging for this issue, so even with the logs we're going to be limited in getting diagnositics. (this will be improved in future).

    Some possible causes of the exception that is causing the error you are seeing in the launch configuration:

    1) the mobile provision file doesn't exist or can't be read (fs permission problems etc.).

    2) the mobile provision file is not in the expected format (cms encoded plist)

    Can you try this:

    Go to a bash shell and dump your mobile provision file:

    > security cms -D -i /Users/Brandon/Documents/Temp/Adhoc.mobileprovision

    and see what it puts out.  If you copy the first two or three lines of non-identifying information, that would be helpful.

    For example, the first three lines of my output look like this:

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

    <plist version="1.0">

  • Here it is:

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

    <plist version="1.0">

    <dict>

      <key>AppIDName</key>

      <string>Xcode iOS Wildcard App ID</string>

      <key>ApplicationIdentifierPrefix</key>

      <array>

      <string>4TXXXXXXNC</string>

      </array>

  • Just wanted to let you know that the workaround described works. I was able to build the Barcode Demo app, install and run it on my iPhone.

    I've uploaded the logs and the links are below. Hopefully they can help track down the issue.

    http://heffdev.com/maf/logs/.log

    http://heffdev.com/maf/logs/.bak_0.log

    Best regards,

    Brandon