Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1180 in a recent build.
  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    5
    abicabot is on a distinguished road

      2  

    Default Adhoc builds do not work

    Adhoc builds do not work


    I stupidly posted this on the Ext.js 2.x bugs forums, so I'm manually moving it over to here.

    I'm trying to build with adhoc certs so I can send my app around to clients and testers and I keep getting "Invalid IPA: missing embedded provisioning profile. Are you sure this is an ad hoc?".

    The profile is adhoc and I can successfully run the build on my device, but inspecting the .app bundle it doesn't look like the embedded.mobileprovisioning profile exists. I'm able to partially work around this problem by copying my mobile provisioning profile used for signing into .app/embedded.mobileprovisioning. So far I've been able to upload to testflightapp and install on my own machine, though I'm not yet sure if my testers have been able to install. If this fails my next attempt will be to use xcrun (see http://nachbaur.com/blog/building-io...c-distribution) to generate the ipa instead of doing it manually:

    xcrun -sdk iphoneos PackageApplication \
    "path/to/build/MyApp.app" \
    -o "output/path/to/MyApp.ipa" \
    --sign "iPhone Distribution: My Company" \
    --embed "path/to/something.mobileprovision"

    It's also worth mentioning that the "versionString" has no effect, as my app still shows as v1.0 in testflightapp.

    Also I've been completely unable to get a splash screen to work or remove the gloss from the icon. I've tried adding the following into my config.json and into my setup hoping it'd work:


    "phoneStartupScreen": "Default.png",
    "glossOnIcon": false

    I've also placed a Default.png in every directory because somebody mentioned on the forums that the fix was to place it in the root, but this has no effect on sencha from what I've seen. I've even tried to drop it into the .app but obviously that invalidates the signature.

    Any ideas on workarounds for any of these?

  2. #2
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    5
    abicabot is on a distinguished road

      1  

    Default


    Embedding the provisioning profile manually did not work. Testflightapp indeed let me upload the binary, but all of my testers are getting:

    "You have not permitted this device to install this build.
    This device is not included in the build's provisioning profile."

    It did let me install the app on my device via TFP, so maybe it's not my adhoc profile that I should copy over verbatim.

    Here's my config.json for reference:

    {
    "applicationName":"Something",
    "applicationId":"com.apps.something",
    "iconName":"webapp/icon.png",
    "phoneStartupScreen": "webapp/Default.png",
    "glossOnIcon": false,
    "versionString":"0.8",
    "outputPath":"~/development/client_projects/builds",
    "webAppPath":"~/development/client_projects/Something",
    "configuration":"Release",
    "platform":"iOS",
    "deviceType":"Universal",
    "certificateAlias":"iPhone Distribution: My Name",
    "orientations": ["portrait"]
    }

  3. #3
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Thank you for the report.

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #4
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    5
    abicabot is on a distinguished road

      1  

    Default


    I haven't yet produced an adhoc build that runs on more than 1 device, but I did come across some work arounds to remove gloss from the dock icon and adding in a Default.png.

    It turns out you can resign the app once it's produced, so after running the sencha packager, simply drop a Default.png into the root of the produced .app, and then edit .app/Info.plist and add (inside the <dict> tags)

    <key>UIPrerenderedIcon</key>
    <true />

    Once you've done this you simply need to resign your app like so:

    codesign -f -vv -s "iPhone Distribution: You" "YourApp.app"

    This will prompt you to resign your app using keychain, allow it.

    After this step you can run the following command to verify that your app is usable:

    codesign -dvvv YourApp.app

    If this command prints out settings you should be all good. You can now produce an ipa that will have no gloss on the home icon and a splash screen. The splash screen only covers up the black screen on startup, and a white screen still appears for a few seconds, but I'm thinking at this point I'm rendering html so I could probably just place an img tag with the splash in my html to cover that bit up too.

    I'm also thinking I should be able to drop the embedded.mobileprovision I need into the .app and resign it and I could probably get around the adhoc issue this way. I'm still working on generating that file. I thought it was simply my adhoc provisioning profile exported but apparently it's not.

    I'll post an update when I have made more progress.

  5. #5
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    5
    abicabot is on a distinguished road

      1  

    Default


    OK, With the following you should be able to generate an adhoc ipa that is suitable for distribution. Ostensibly this will also work on Testflightapp as well as it let me submit the ipa and then presented me with a list of users/devices to choose from that were in the embedded profile. My testers are all sleeping right now but I'll confirm either way once I know for sure. So far it's looking much more promising though.


    For the purpose of this doc, everything is relative to ~/builds.


    To start, use sencha package to generate your .app file and move this .app bundle to ~/builds.


    1. Open xcode
    2. window -> organizer
    3. click provisioning profiles in the left pane
    4. select your adhoc provisioning profile
    5. click export and save this as embedded.mobileprovision in ~/builds


    Code:
    $ rm -r MyApp.app/_CodeSignature MyApp.app/CodeResources
    $ cp embedded.mobileprovision MyApp.app/
    $ codesign -f -vv -s "iPhone Distribution: Your Name" "MyApp.app"
    You should be prompted a few times to use your keychain, allow this. If it works you'll see something like this print out:

    MyApp.app: replacing existing signature
    MyApp.app: signed bundle with Mach-O universal (armv6 armv7) [com.whatever.myapp]

    If you want, package it as an ipa:

    Code:
    $ mkdir Payload
    $ mv MyApp.app $_
    $ zip -r MyApp.ipa Payload
    Also, one last quick note.. I was able to get rid of the initial white screen by adding my splash screen as an image in the html and then simply hiding it when my Main view loads. I choose to use the painted listener because onReady and launch fire as soon as my first splash screen ends. Here's the relevant code:


    index.html:


    HTML Code:
      <img src="Default.png" id="splash-screen" />
    Your main js view (in my case app/view/Main.js):


    Code:
      Ext.define('MyApp.view.Main', {
        extend: 'Ext.TabPanel',
        requires: [ /* ... */ ],
        config: { /* ... */ },
    
    
        initialize : function() {
          this.on({
            scope: this,
            painted: this.onPaint,
          });
          this.callParent();
        },
    
    
        onPaint: function() {
          Ext.get("splash-screen").hide();
        }
      });


    Now (if you also used the workaround in the above post) both the initial black and white startup screens should be replaced with Default.png which will stay on screen until your main components render. Gave my app a much more manageable feel (even though I have 15 second initial startups lol..)

  6. #6
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    5
    abicabot is on a distinguished road

      0  

    Default


    I woke up this morning and checked testflightapp and indeed it shows that 2 of my testers were able to successfully install, so the above info worked for me.

  7. #7
    Sencha - Sencha Touch Dev Team voloshyn's Avatar
    Join Date
    Jan 2012
    Posts
    118
    Vote Rating
    1
    voloshyn is on a distinguished road

      0  

    Default


    we've added new key to configuration "provisionProfile":"path_to.mobileprovision" with it it should work fine

Thread Participants: 2