1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    17
    Vote Rating
    3
    Trayak is on a distinguished road

      1  

    Default Native App with Sencha Architect and Apple Provisioning Question

    Native App with Sencha Architect and Apple Provisioning Question


    Hi,

    I created a very simple Sencha Touch 2.1 application using Sencha Architect. When I try to dispatch my application to iPad, I get an error saying the iTunes Sync has failed. From my research, the most likely culprit is some sort of problem between my Apples application provisioning and my Sencha Touch application. My provisioning looks fine, however.

    Is there any documentation of creating and dispatching a native application from the latest version of Sencha Architect? The best thing for me would be some sort of documentation showing what information I take from the Apple developer websites and what PackageSettings need to get set.

    Here is my PackageSettings file from Sencha Architect:

    {


    /**
    * @cfg {String} applicationName
    *
    * This is the name of your application, which is displayed on the device when the app is installed. On IOS, this should match
    * the name of your application in the Apple Provisioning Portal.
    */
    "applicationName": "SenchaNative",


    /**
    * @cfg {String} applicationId
    *
    * This is the name namespace for your application. On IOS, this should match the name of your application in the Apple Provisioning Portal.
    */
    "applicationId": "com.trayak.senchanative",


    /**
    * @cfg {String} bundleSeedId
    *
    * A ten character string which stands before aplication ID in Apple Provisioning Portal
    */
    "bundleSeedId": "Y8ZN49TAN2",


    /**
    * @cfg {String} versionString
    *
    * This is the version of your application.
    */
    "versionString": "1.0",


    /**
    * @cfg {String} versionCode
    *
    * This is the integer version code of your application, or you can refer to it as a build number. Used only for Android builds.
    */
    "versionCode": 1,


    /**
    * @cfg {Object} icon
    *
    * For iOS, please refer to their documentation about icon sizes:
    * https://developer.apple.com/library/...onsImages.html
    *
    * For Android, please refer to the Google Launcher icons guide:
    * http://developer.android.com/guide/p..._launcher.html
    */
    "icon": {
    "57": "resources/icons/Icon.png",
    "72": "resources/icons/Icon~ipad.png",
    "114": "resources/icons/Icon@2x.png",
    "144": "resources/icons/Icon~ipad@2x.png"
    },


    /**
    * @cfg {String} inputPath
    *
    * This is location of your Sencha Touch 2 application, relative to this configuration file.
    */
    "inputPath": "./",


    /**
    * @cfg {String} outputPath
    *
    * This is where the built application file with be saved. Make sure that output path is not in your input path, you may get into endless recursive copying
    */
    "outputPath": "../build/",


    /**
    * @cfg {String} configuration
    *
    * This is configuration for your application. `Debug` should always be used unless you are submitting your app to an online
    * store - in which case `Release` should be specified.
    */
    "configuration": "Debug",


    /**
    * @cfg {String} platform
    *
    * This is the platform where you will be running your application.
    * Available options are:
    * - iOSSimulator
    * - iOS
    * - Android
    * - AndroidEmulator
    */
    "platform": "iOSSimulator",


    /**
    * @cfg {String} deviceType
    *
    * This is device type that your application will be running on.
    * If you are developing for Android, this is not necessary.
    * Available options are:
    * - iPhone
    * - iPad
    * - Universal
    */
    "deviceType": "Universal",


    /**
    * @cfg {String} certificateAlias
    *
    * This is the name of your certificate.
    * IF you do not specify this on OSX, we will try and automatically find the certificate for you using the applicationId.
    * This can be just a simple matcher. For example, if your certificate name is "iPhone Developer: Robert Dougan (ABCDEFGHIJ)", you can just put "iPhone Developer".
    * When using a certificatePath on Windows, you do not need to specify this.
    */
    "certificateAlias": "Brian Mansfield",


    /**
    * @cfg {String} androidAPILevel
    *
    * This is android API level, the version of Android SDK to use, you can read more about it here: http://developer.android.com/guide/a...pi-levels.html.
    * Be sure to install corresponding platform API in android SDK manager (android_sdk/tools/android)
    */
    "androidAPILevel": "8",


    /**
    * @cfg {Array[String]} permissions
    *
    * Array of permissions that is used by an application (Android only)
    * Full list of permissions for Android application can be found here: http://developer.android.com/referen...KIN_PROPERTIES
    */
    "permissions": [
    "INTERNET",
    "ACCESS_NETWORK_STATE",
    "CAMERA",
    "VIBRATE",
    "ACCESS_FINE_LOCATION",
    "ACCESS_COARSE_LOCATION",
    "CALL_PHONE"
    ],


    /**
    * @cfg {Array[String]} orientations
    *
    * This is orientations that this application can run.
    */
    "orientations": [
    "portrait",
    "landscapeLeft",
    "landscapeRight",
    "portraitUpsideDown"
    ]
    }

    Thanks,

    Brian

  2. #2
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,940
    Vote Rating
    64
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    17
    Vote Rating
    3
    Trayak is on a distinguished road

      0  

    Default


    Thanks for the documentation, but unfortunately, the documentation ends at the very place I am having questions. Is there any documentation on explaining how the project settings ought to correlate to iOS provisioning?

  4. #4
    Sencha User
    Join Date
    Nov 2012
    Posts
    17
    Vote Rating
    3
    Trayak is on a distinguished road

      0  

    Default


    To further add to the discussion (or confusion)....

    If I change the platform in my PackageSettings from iOSSimulator to iOS, and build the native app, I get the following error in the terminal window:

    [ERR]
    ../build///SenchaNative.app: object file format unrecognized, invalid, or unsuitable
    The application was successfully packaged
    Failed to execute system command while signing application with error 256
    Failed to package application


    [ERR] stbuild exited with non-zero code : 6

    So, this further adds to the theory that the handshaking between my parameters in my Sencha app is not happening with my provisioning/signing.

    If anyone has successfully gone through the entire process of creating a native app and deploying it to an iOS device, I would really like to hear what may be causing my problem.

    Thanks.

  5. #5
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Bath, UK
    Posts
    52
    Vote Rating
    9
    daniel.gallo will become famous soon enough

      2  

    Default


    I had a very similar error when I tested the packaging a few weeks ago - the solution for me was to execute the following command in Terminal before calling "sencha package build":

    Code:
    export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"
    Not sure if that helps, but it helped in my particular instance.
    Daniel Gallo
    Sales Engineer EMEA
    Sencha UK Ltd

  6. #6
    Sencha User
    Join Date
    Nov 2012
    Posts
    17
    Vote Rating
    3
    Trayak is on a distinguished road

      0  

    Default


    Hello!

    Exporting that variable worked for me. I was able to build an iOS app with no errors and I was able to install it on my iPad. Many thanks.

  7. #7
    Sencha User
    Join Date
    Nov 2012
    Posts
    17
    Vote Rating
    3
    Trayak is on a distinguished road

      1  

    Default


    I was able to build and deploy native apps to my iPad with the above solution until I upgraded to Touch 2.2 and Cmd 3.1. In this case, I got the error that my application failed to install on my iPad. I then backed out the use of Cmd 3.1 and I found that I could build and deploy an application using Touch 2.2 and Cmd 3.0.

    Has something changed in Cmd 3.1? Is exporting the variable CODESIGN_ALLOCATE still valid? Has this variable changed in some way?

    Thanks,

    Brian

  8. #8
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,940
    Vote Rating
    64
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Looking into this Brian
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

Thread Participants: 2