6 Replies Latest reply: Oct 19, 2012 6:44 PM by Joe Huang-Oracle RSS

    iOS simulator not starting on Deploy from JDeveloper

    Chandresh
      OS - 10.7.3
      XCode - 4.2.1

      I am trying to run HelloWorld sample application and it does not start iOS Simulator. Here is the log from Deployment console. I see Xcode application starting, but simulator does not come up.

      ---------------------------------------------------------------------------------------------------------
      [06:52:52 AM] Updating iOS Native Framework profile dependencies with FAR profiles created from application projects...
      [06:52:53 AM] ---- Deployment started. ----
      [06:52:53 AM] Target platform is (iOS Native Framework).
      [06:52:53 AM] Beginning deployment of ADF Mobile application 'HelloWorld' to iOS using profile 'IOS_MOBILE_NATIVE_archive1'.
      [06:52:55 AM] Verifying Application Controller project exists...
      [06:52:55 AM] Verifying application dependencies...
      [06:52:55 AM] Validating application XML files...
      [06:53:01 AM] Validating XML files in project ApplicationController...
      [06:53:11 AM] Validating XML files in project ViewController...
      [06:53:18 AM] Copying common javascript files...
      [06:53:19 AM] Running dependency analysis...
      [06:53:20 AM] Building...
      [06:53:20 AM] Deploying 3 profiles...
      [06:53:21 AM] Wrote Archive Module to /Users/c06621/jdeveloper/mywork/PublicSamples/HelloWorld/ApplicationController/deploy/ApplicationController.jar
      [06:53:22 AM] WARNING: No Resource Catalog enabled ADF components found to package
      [06:53:22 AM] Wrote Archive Module to /Users/c06621/jdeveloper/mywork/PublicSamples/HelloWorld/ViewController/deploy/ViewController.jar
      [06:53:24 AM] Copying FARs to the ADF Mobile Framework application...
      [06:53:24 AM] Copying FAR from source: ViewController...
      [06:53:24 AM] Copying FAR from source: ApplicationController...
      [06:53:24 AM] Deploying skinning files...
      [06:53:25 AM] Copying the CVM SDK files built for the x86 processor...
      [06:53:27 AM] Copying the CVM JDK files built for the x86 processor...
      [06:53:29 AM] Command-line executed from path: /Users/c06621/jdeveloper/mywork/PublicSamples/HelloWorld/deploy/IOS_MOBILE_NATIVE_archive1/temporary_xcode_project/
      [06:53:29 AM] Command-line executed: /Developer/usr/bin/xcodebuild clean install -configuration Debug -sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk DSTROOT=/Users/c06621/jdeveloper/mywork/PublicSamples/HelloWorld/deploy/IOS_MOBILE_NATIVE_archive1/Destination_Root/ ARCHS=i386 IPHONEOS_DEPLOYMENT_TARGET=5.0 TARGETED_DEVICE_FAMILY=1,2 PRODUCT_NAME=HelloWorld
      [06:53:45 AM] Deploying ADF Mobile Framework application to iOS simulator.
      [06:53:53 AM] Elapsed time for deployment: 1 minute, 0 seconds
      [06:53:53 AM] ---- Deployment finished. ----
      ---------------------------------------------------------------------------------------------------------

      IF i run Deploy again, i get following error. If i manually remove the link mentioned here, it deploys fine again, but simulator does not start.

      ---------------------------------------------------------------------------------------------------------
      [06:57:00 AM] Updating iOS Native Framework profile dependencies with FAR profiles created from application projects...
      [06:57:00 AM] ---- Deployment started. ----
      [06:57:00 AM] Target platform is (iOS Native Framework).
      [06:57:00 AM] Beginning deployment of ADF Mobile application 'HelloWorld' to iOS using profile 'IOS_MOBILE_NATIVE_archive1'.
      [06:57:01 AM] Verifying Application Controller project exists...
      [06:57:01 AM] Verifying application dependencies...
      [06:57:01 AM] Validating application XML files...
      [06:57:01 AM] Validating XML files in project ApplicationController...
      [06:57:01 AM] Validating XML files in project ViewController...
      [06:57:01 AM] Copying common javascript files...
      [06:57:02 AM] Running dependency analysis...
      [06:57:02 AM] Building...
      [06:57:02 AM] Deploying 3 profiles...
      [06:57:02 AM] Wrote Archive Module to /Users/c06621/jdeveloper/mywork/PublicSamples/HelloWorld/ApplicationController/deploy/ApplicationController.jar
      [06:57:02 AM] WARNING: No Resource Catalog enabled ADF components found to package
      [06:57:02 AM] Wrote Archive Module to /Users/c06621/jdeveloper/mywork/PublicSamples/HelloWorld/ViewController/deploy/ViewController.jar
      [06:57:02 AM] Copying FARs to the ADF Mobile Framework application...
      [06:57:02 AM] Copying FAR from source: ViewController...
      [06:57:02 AM] Copying FAR from source: ApplicationController...
      [06:57:02 AM] Deploying skinning files...
      [06:57:02 AM] Copying the CVM SDK files built for the x86 processor...
      [06:57:04 AM] Copying the CVM JDK files built for the x86 processor...
      [06:57:05 AM] Command-line executed from path: /Users/c06621/jdeveloper/mywork/PublicSamples/HelloWorld/deploy/IOS_MOBILE_NATIVE_archive1/temporary_xcode_project/
      [06:57:05 AM] Command-line executed: /Developer/usr/bin/xcodebuild clean install -configuration Debug -sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk DSTROOT=/Users/c06621/jdeveloper/mywork/PublicSamples/HelloWorld/deploy/IOS_MOBILE_NATIVE_archive1/Destination_Root/ ARCHS=i386 IPHONEOS_DEPLOYMENT_TARGET=5.0 TARGETED_DEVICE_FAMILY=1,2 PRODUCT_NAME=HelloWorld
      [06:57:20 AM] Deploying ADF Mobile Framework application to iOS simulator.
      [06:57:21 AM] Deployment cancelled.
      [06:57:21 AM] ---- Deployment incomplete ----.
      [06:57:21 AM] Failed deploying to the iOS simulator. Encountered exception: "oracle.jdeveloper.deploy.DeployException: Failed to create alias file "/Users/c06621/Library/Application Support/iPhone Simulator/5.0/Applications/com.oraclecorp.internal.HelloWorld/Library/Preferences/.GlobalPreferences.plist" as a symbolic link to hidden target file "/Users/c06621/Library/Application Support/iPhone Simulator/5.0/Library/Preferences/.GlobalPreferences.plist". Encountered exception: "java.io.IOException: Deployment failed due to one or more errors returned by 'ln'. The following is a summary of the returned error(s):
      Command-line execution failed (Return code: 1)".". (oracle.adfmf.framework.dt.deploy.ios.deployers.EmulatorDeployer)
      ---------------------------------------------------------------------------------------------------------
        • 1. Re: iOS simulator not starting on Deploy from JDeveloper
          Chandresh
          I had picked xcode as simulator application, when i first launched application from JDeveloper. I did not get a chance to correct that mistake, as it does not prompt again. I am not sure where is that configuration stored, but today i logged with different user id, then was prompted for selection of simulator application, picked "iOS Simulator" and it worked fine. Where is this configuration stored ?

          Chandresh

          Edited by: Chandresh on May 25, 2012 12:10 PM
          • 2. Re: iOS simulator not starting on Deploy from JDeveloper
            Joe Huang-Oracle
            Hi, Chandresh, can you please try to manually start the simulator by itself, shut it down, and then try to deploy from JDeveloper? We have a developer who has never started simulator by itself when he first try to deploy from JDeveloper. He ran into similar issue. When he ran the simulator by itself first, shut it down, and then deploy, it worked.

            Not sure if it helps?

            Anyways, we are trying to get more clarification internally on more debugging steps.

            Thanks,

            Joe Huang
            • 3. Re: iOS simulator not starting on Deploy from JDeveloper
              Joe Huang-Oracle
              Also, Chandrash, can you please clarify what you mean by "I had picked xcode as simulator application, when i first launched application from JDeveloper. I did not get a chance to correct that mistake, as it does not prompt again. "? I assume it means that, first time you try to deploy to simulator, you got a dialog that asks you to pick the location of the simulator when JDeveloper is trying to launch the simulator, is this correct?

              Thanks,

              Joe Huang
              • 4. Re: iOS simulator not starting on Deploy from JDeveloper
                Chandresh
                Yes, when i first tried to deploy to simulator, got a dialog asking for location of Simulator. I picked Xcode. Subsequent deployments, i did not get the prompt again, so was not able to correct that mistake. This information must be stored somewhere in user's settings. This is not a big issue, as i was able to login as a different user on this Mac and first deploy operation again prompted me, this time i picked iOS Simulator and everything is working fine. Just curious, where is that setting stored?
                • 5. Re: iOS simulator not starting on Deploy from JDeveloper
                  Joe Huang-Oracle
                  Hi, Chandresh, this configuration is actually not something JDev manages. Our internal team has never seen this dialog box as matter of fact, probably because of some difference in environment setup. What combination of Mac/Xcode are you running? What is your setting for the iOS SDK location?

                  Thanks,

                  Joe Huang
                  • 6. Re: iOS simulator not starting on Deploy from JDeveloper
                    Joe Huang-Oracle
                    This issue was discussed during beta, but for the benefit of others - after installing XCode, please start the iOS simulator first from the Xcode. This would set up some necessary files needed to call simulator by JDeveloper. If you have simply created an app directly and try to deploy to simulator, and you did not start the simulator by itself, then JDeveloper may not be able to invoke the simulator properly.

                    Thanks,

                    Joe Huang