5 Replies Latest reply on May 8, 2013 2:23 PM by Kutir Mobility

    Integrating the rhomobile application with XCode

      Hi,

       

      I am using XCode 4.6. I created a RhoMobile application using RhoMobile Suite installed in my iMac. I want to build that RhoMobile application with XCode. I read the steps given on http://docs.rhomobile.com/rhodes/build#building-a-rhodes-application-for-iphoneipad but not able to understand. Please help.

       

      Regards,

      Saurabh

        • Re: Integrating the rhomobile application with XCode

          Hi Saurab,

           

          The steps are very easy..

           

          1. From the terminal navigate to the app folder
          2. run the command "$ rake switch_app"
          3. Then run the "$ rake build:iphone:setup_xcode_project"
          4. Then ope the folder and you can see an .xcodeProject file.
          5. Click it and a rho project will be opened in the xcode
          6. There after the process of building and creating a iPA is as usual as noram iOS application.

           

          Hope this helps for you...

          • Re: Integrating the rhomobile application with XCode
            Kutir Mobility

            Hi Saurabh

             

            Steps to run the app in xcode are

             

            1. Run rake switch_app from your app folder

            2. Then run rake build:iphone:setup_xcode_project

            3. Open rhorunner.xcodeproj which is located in platform folder inside where your rhodes gem is installed. For example /Users/yourname/.rvm/gems/ruby-1.9.3-p327/gems/rhodes-3.4.2/platform/

            4. In xcode, you have to change the schema menu as per your need. For example if in case you need to run in Iphone 4.3 simulator, you have to choose Iphone 4.3 simulator under rhorunner library from the menu

            5. Finally, Running the project will open up iphone simulator in your mac

             

            You even have log window at the bottom of xcode for the purpose of debugging

             

            Hope it helps

             

            Thanks

            Dhepthi

            Kutir Mobility


              • Re: Integrating the rhomobile application with XCode
                Thanks Dhepthi and Vamsi.

                 

                Now I am able to create the XCode project. The RhoMobile application contains the BarCode implementation. When I try to run directly from RhoStudio in iPhone Simulator, it gives the following error.

                 

                I 05/08/2013 09:19:34:532 b0261000        RhodesApp| Trying to get free listening port.
                I 05/08/2013 09:19:34:532 b02e3000     AppCallbacks| Starting main routine...
                I 05/08/2013 09:19:34:532 b02e3000     AppCallbacks| ThreadQueue blocked for 4294967295 seconds...
                I 05/08/2013 09:19:34:532 b0261000        RhodesApp| Trying to bind of 0 port...
                I 05/08/2013 09:19:34:532 b0261000        RhodesApp| Got port to bind on: 49230
                I 05/08/2013 09:19:34:532 b0261000        RhodesApp| Free listening port: 49230
                I 05/08/2013 09:19:34:533 b0261000        RhodesApp| Rhodes started
                I 05/08/2013 09:19:34:535 b0261000     AppCallbacks| addCommand: UI-CREATED
                I 05/08/2013 09:19:34:535 b03e7000        RhodesApp| Starting RhodesApp main routine...
                I 05/08/2013 09:19:34:535 b02e3000     AppCallbacks| Received command UI-CREATED which is greater than expected (LOCAL-SERVER-STARTED) - postpone it
                I 05/08/2013 09:19:34:535 b02e3000     AppCallbacks| ThreadQueue blocked for 4294967295 seconds...
                I 05/08/2013 09:19:34:543 b03e7000          RhoRuby| Init_RhoBlobs: /Users/saurabhkhemka/Library/Application Support/iPhone Simulator/6.1/Applications/F9472C9D-500C-4616-9A8A-06532BE29211/Documents/db/db-files
                E 05/08/2013 09:19:34:546 b03e7000          RhoRuby| require_compiled: error: can not find digest
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM| <main>:  [BUG]
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM| Bus Error
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM| Description: ruby 1.9.2p290 (2011-07-09) [x86_64-darwin10.7.0]
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM| -- control frame ----------
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM| c:0001
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM| p:0000
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM| s:0002 b:0002
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM| l:002284
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM| d:002284
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM| TOP  
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM|
                E 05/08/2013 09:19:34:547 b03e7000           RubyVM| ---------------------------
                E 05/08/2013 09:19:34:551 b03e7000           RubyVM| -- C level backtrace information -------------------------------------------
                E 05/08/2013 09:19:34:551 b03e7000           RubyVM| 0   rhorunner                       0x00368542 rb_vm_bugreport + 178
                E 05/08/2013 09:19:34:551 b03e7000           RubyVM| 1   rhorunner                       0x0020b3dd report_bug + 413
                E 05/08/2013 09:19:34:551 b03e7000           RubyVM| 2   rhorunner                       0x0020b22f rb_bug + 63
                E 05/08/2013 09:19:34:551 b03e7000           RubyVM| 3   rhorunner                       0x002d9fb0 sigsegv + 0
                E 05/08/2013 09:19:34:551 b03e7000           RubyVM| 4   libsystem_c.dylib               0x915a559b _sigtramp + 43
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 5   ???                             0xffffffff 0x0 + 4294967295
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 6   rhorunner                       0x00213652 rb_exc_raise + 98
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 7   rhorunner                       0x0020c44f rb_raise + 79
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 8   rhorunner                       0x003aae1c rb_require_compiled + 172
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 9   rhorunner                       0x002565a2 rb_require + 130
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 10  rhorunner                       0x001741ff Init_ossl_digest + 31
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 11  rhorunner                       0x00164979 Init_openssl + 713
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 12  rhorunner                       0x003ca67b Init_Extensions + 11
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 13  rhorunner                       0x003a8159 RhoRubyStart + 217
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 14  rhorunner                       0x00415538 _ZN3rho6common10CRhodesApp3runEv + 168
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 15  rhorunner                       0x00400ac5 _ZN3rho6common10CRhoThread9runObjectEv + 37
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 16  rhorunner                       0x00437e65 _ZN3rho6common7runProcEPv + 37
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 17  libsystem_c.dylib               0x9154ded9 _pthread_start + 335
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM| 18  libsystem_c.dylib               0x915516de thread_start + 34
                E 05/08/2013 09:19:34:552 b03e7000           RubyVM|

                 

                And when I try to create a XCode project and run that in the device, the application crashes as soon as the app icon is clicked.

                 

                This is my build.yml file.

                 

                sdkversion: "3.5.0"

                name: "barcodeapp"

                version: "1.0"

                vendor: "rhomobile"

                build: "debug"

                bbver: "4.6"

                applog: "rholog.txt"

                capabilities:

                  - camera

                iphone:

                  configuration: "Debug"

                  emulator: 5.0

                  sdk: "iphonesimulator6.1"

                  codesignidentity:

                  entitlements:

                  extensions:

                    - barcode

                    - openssl.so

                    - openssl

                    - ezcrypto

                    - rawsensors

                    - audiocapture

                  entitlements_file: "./production/Entitlements.plist"

                  BundleIdentifier: "com.ricoh.rhomobile"

                  BundleURLScheme: "barcodeapp"

                wm:

                  extensions:

                    - digest

                    - digest-md5

                    - digest-sha1

                    - digest-sha2

                    - openssl.so

                    - openssl

                    - ezcrypto

                    - barcode

                  sdk: "Windows Mobile 6 Professional SDK (ARMV4I)"

                  emulator: "Windows Mobile 6.5 Professional Emulator"

                wp:

                  productid: "310481c1-92d9-0130-fbfe-4437e656491a"

                  extensions:

                    - barcode

                symbian:

                  uid: "0xe2a28fd9"

                android:

                  extensions:

                    - barcode

                  capabilities:

                    - network_state

                    - sdcard

                    - calendar

                  mapping: true

                  version: 4.0

                extensions:

                  - json

                  - another-extension

                  - rhoxml

                  - rhodes_translator

                app_type: "rhoelements"

                sdk: "/Users/saurabhkhemka/.rvm/gems/ruby-1.9.3-p392/gems/rhodes-3.5.1.13"

                 

                Please suggest.