9 Replies Latest reply on Jan 18, 2016 4:09 AM by Mark Nongkhlaw

    Support for Xcode 7.0.1

    Wissam Aoufan

      Hi,

       

      What is the most stable rhomobile version that supports Xcode 7.0.1?

        • Re: Support for Xcode 7.0.1
          Jon Tara
          What is the most stable rhomobile version that supports Xcode 7.0.1?

           

          A future one!

           

          Like Lucy (from the Peanuts comic strip), Apple moves the football every time they make a major-version release of XCode, and it requires a major rewrite of the Rhodes build scripts. So, you wind-up kicking air.

           

          Tau Platform purportedly support XCode 7, at least according to checkin comments. It's forked from Rhodes 5.2.2, and doesn't seem to have much change other than that at this point. But if you need RhoElements, I think you are out of luck, as that is proprietary to RhoMobile, and I don't know if supported on Tau Platform (even if you have a Rhodes license).

           

          I don't want to spam about the "competition" (much! ) but I do want to encourage sharing back and forth of the open-source bits. Zebra could adopt this build code, and perhaps already has plans to, I dunno. (And I see Tau borrowed much of this code from the Chromium Project, of all places... In the past, some build code has been borrowed from Cordova. Ain't open-source wonderful! Kudos to Zebra for keeping it open!)

           

          I haven't tried it, as I don't have a current need to build with XCode7/iOS9, as current projects target iOS8. (So I don't even have XCode7 installed...)

           

          You can build with XCode6 for iOS 8.4 and it will run on iOS9, though. If you need to release for App Store, not sure when the window will close for apps built for iOS8. Probably quite some time yet.

           

          I need to do some testing next week to see what issues apps face if built for iOS8 and run on iOS9. I know there are some UI formatting issues (if using jQuery Mobile) that appear easily solved with some judicious application of width:100% CSS. (e.g. some elements that one would expect to be full-width no longer are...) looks like there were some subtle UIWebView CSS cascade changes. And a big issue if you use window.history or jQuery Mobile "back" mechanism. (Thankfully, my apps don't, so navigation hasn't been broken...)

           

          FWIW, here's the commit (or at least the major one) that adds XCode 7 support to Tau. As you can see, it is a lot of change. I'm not sure that this is the only related change. Posting this just to show the magnitude of the change, and that I don't think one should expect current versions to work. (Though somehow, I think some have purported success?)

           

          Support XCode 7.0 and iOS 9.0 · tauplatform/tau@f80ec32 · GitHub

            • Re: Support for Xcode 7.0.1
              Jon Tara

              Actually, looking at that commit, (Tau support for XCode7/iOS9) most of it is support for iOS simulator. If you don't need that (only building for hardware) perhaps you might have some luck with current 5.2.2 if you apply the patch to the Info.plist. (    Which has already been discussed here.)

            • Re: Support for Xcode 7.0.1
              Debraj Dhar

              Hi 4df15434-fc90-4149-b9cf-e3aead0382a2

              Rhomobile officially doesnt support Xcode7 and IOS 9, The support will be available in upcoming release.(in november) .

              However  You can still build RMS project(using version  5.1.1 /5.2.2) with Xcode 7 using the following changes.

               

              1.Clean existing iphone builds by running rake clean:iphone in terminal

              2.Create an Xcode project by running rake build:iphone:setup_xcode_project in terminal

              3: Info.plist changes (located in project folder(app_folder/project/iphone/Info.plist)) .

              <key>NSAppTransportSecurity</key>

                <dict>

                      <key>NSAllowsArbitraryLoads</key><true/>

                </dict>

               

              4: open the code project and disable bitcode in build settings.

               

              Find the screenshot available at .

              https://zebra.box.com/shared/static/9kuh35s9vox7c4azveb4csup8i4k6rgm.png

              https://zebra.box.com/shared/static/kqi88mvdw2nk6pk6j3qt1q2g85xnbhce.png

               

              Note: With these changes you can launch application on devices not on ios9 simulator

              1 of 1 people found this helpful
                • Re: Support for Xcode 7.0.1
                  Jon Tara

                  I'm afraid that even with Rhodes 5.3.2 it will not launch the simulator, at least not with command-line build. I am able to build for hardware and install, though.

                   

                  ----

                  I get:

                   

                  -$TIME$- message [ application was launched in simulator ] time is { 2015-12-27T19:40:12Z } milliseconds from start (134953)

                  start waiting for run application in Simulator

                  start thread with execution of application

                  ... still waiting

                  use iphonesim tool - open iPhone Simulator and execute our application, also support device family (iphone/ipad)

                  Execute command: /Users/jon/.rvm/gems/ruby-2.3.0@watusi-rhodes-5.3.2-97dd01b/gems/rhodes-5.3.2/res/build-tools/iphonesim/build/Release/iphonesim_6 launch "/Users/jon/workspace/some_project/mobile_app/build/ios/some_product/development/simulator/9.2/project/iphone/build/Release-iphonesimulator/rhorunner.app" 9.2 iphone "/Users/jon/workspace/some_project/mobile_app/build/ios/some_product/development/simulator/9.2/rholog.txt"

                  2015-12-27 11:40:12.841 iphonesim_6[2840:31895] +[SimDeviceType supportedDeviceTypesByName]: unrecognized selector sent to class 0x10c38a968

                  2015-12-27 11:40:12.844 iphonesim_6[2840:31895] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[SimDeviceType supportedDeviceTypesByName]: unrecognized selector sent to class 0x10c38a968'

                  *** First throw call stack:

                  (

                    0   CoreFoundation                      0x00007fff9df0cae2 __exceptionPreprocess + 178

                    1   libobjc.A.dylib                     0x00007fff94b2073c objc_exception_throw + 48

                    2   CoreFoundation                      0x00007fff9df0fa9d +[NSObject(NSObject) doesNotRecognizeSelector:] + 205

                    3   CoreFoundation                      0x00007fff9de48601 ___forwarding___ + 1009

                    4   CoreFoundation                      0x00007fff9de48188 _CF_forwarding_prep_0 + 120

                    5   iphonesim_6                         0x000000010bb2f66b iossim_main + 1323

                    6   iphonesim_6                         0x000000010bb31af3 -[iPhoneSimulator runWithArgc:argv:] + 35

                    7   iphonesim_6                         0x000000010bb3168d main + 141

                    8   libdyld.dylib                       0x00007fff9b3f55ad start + 1

                    9   ???                                 0x0000000000000006 0x0 + 6

                  )

                  libc++abi.dylib: terminating with uncaught exception of type NSException

                  stop waiting - application started

                  application is started in Simulator

                  ----

                   

                  It seems the Rhodes simulator install is using a method that no longer exists. Other similar installers have faced the same problem. See:

                   

                  Fixes #632, in which an exception is raised on invalid destinations · facebook/xctool@941fffd · GitHub

                    • Re: Support for Xcode 7.0.1
                      Jon Tara

                      It seems the above problem is due to Rhodes trying to list the available simulator targets using a method that no longer exists (because I gave what is now an invalid emulator target.)

                       

                      I realized eventually that the documentation on command-line build for iOS is woefully out-of-date. X Code 7.2 doesn't support an "iPhone' target (hasn't been supported for several XCode versions now...) and it's (apparently) no longer acceptable to give just a prefix (I was building with emulatortarget of 'iphone', which was actually launching on an 'iphone 5s' target.

                       

                      Why was I using 'iphone'? Because according to the documentation, the only possibilities here are 'iphone' and 'ipad'.

                       

                      And previous versions of Rhodes (not sure how far back) indeed did not accept any other choices.

                       

                      I changed the target now to 'iphone 5s', and get a little further.

                       

                      I found a bit of code in other similar launchers to list the available targets using a different method, but really not a primary issue here, since the code is only used if you specify an invalid target. But will probably apply this patch to avoid frustration.

                       

                      Now I get a different error.

                       

                      Does anybody know how to build for iOS simulator with 5.3.2 and actually run on Apple simulator 9.x?

                       

                      cd /Users/jon/.rvm/gems/ruby-2.3.0@watusi-rhodes-5.3.2-97dd01b/gems/rhodes-5.3.2

                      -$TIME$- message [ build:iphone:rhodes FINISH ] time is { 2015-12-27T20:35:11Z } milliseconds from start (14427)

                      -$TIME$- message [ run:buildsim START ] time is { 2015-12-27T20:35:11Z } milliseconds from start (14427)

                      kill "iPhone Simulator"

                      No matching processes belonging to you were found

                      No matching processes belonging to you were found

                      No matching processes belonging to you were found

                      No matching processes belonging to you were found

                      No matching processes belonging to you were found

                      No matching processes belonging to you were found

                      -$TIME$- message [ run:buildsim FINISH ] time is { 2015-12-27T20:35:11Z } milliseconds from start (14469)

                      -$TIME$- message [ run:iphone:run START ] time is { 2015-12-27T20:35:11Z } milliseconds from start (14470)

                      mkdir -p /Users/jon/workspace/some_project/mobile_app/build/ios/some_product/development/simulator/9.2/project/iphone/bin/tmp

                      kill "iPhone Simulator"

                      No matching processes belonging to you were found

                      No matching processes belonging to you were found

                      No matching processes belonging to you were found

                      No matching processes belonging to you were found

                      No matching processes belonging to you were found

                      No matching processes belonging to you were found

                      start thread with execution of application

                      use old execution way - just open iPhone Simulator

                      -$TIME$- message [ application was launched in simulator ] time is { 2015-12-27T20:35:11Z } milliseconds from start (14518)

                      The file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app does not exist.

                      -$TIME$- message [ run:iphone FINISH ] time is { 2015-12-27T20:51:51Z } milliseconds from start (1014535)

                      end build iphone app

                        • Re: Support for Xcode 7.0.1
                          BHAKTA RANJAN SATAPATHY

                          Hello,

                           

                          Xcode7.2(IOS9.2 and iPhone Simulator 9.2) support will be available in RMS 5.4 during Mid January 2016.

                           

                          Thanks

                            • Re: Support for Xcode 7.0.1
                              Jon Tara
                              Xcode7.2(IOS9.2 and iPhone Simulator 9.2) support will be available in RMS 5.4 during Mid January 2016.

                              And iOS9 has been available to the public since September. The lag after an OS release until Rhodes supports it seems to get longer and longer.

                               

                              (To be fair, you can build for hardware with XCode 7.2/iOS 9.2 "out of the box". But lack of iOS simulator support is a huge negative for developers.)

                               

                              I back-ported your code to 5.3.2. For others that don't want to wait, the repo is available on GitHub:

                               

                              watusi/rhodes · GitHub

                               

                              Or just the Gem:

                               

                                             65.3 MB watusi-rhodes-5.3.2-4ece5ef.gem            

                                • Re: Support for Xcode 7.0.1
                                  Jon Tara

                                  Note I was wrong about simulator device target in a comment above.

                                   

                                  Rhodes still does not support specific simulator device target. It only offers the choice of "iphone" or "ipad". "iphone" will get you iPhone 6 (for XCode 7.2) and ipad will get you iPad Air.

                                   

                                  Since XCode6, each specific device gets it's own VM, and so it's no longer possible to just switch devices and versions from the simulator menu. Well, literally, you can, but when you switch, you will find your app is not present, because each one is treated as a different device, and you need to load your code into each one. Rhodes doesn't provide any way to do that.

                                   

                                  You might be able to use some third-party loader, or even the one built-in (which comes from the Chromium project, of all places...), with some command-line wizardry. I think PhoneGap has a loader with full support.

                                  • Re: Support for Xcode 7.0.1
                                    Mark Nongkhlaw

                                    The lag after an OS release until Rhodes supports it seems to get longer and longer.

                                    +1

                                     

                                    And iOS 9.3 has been released.