Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3776 in a recent build.
  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    228
    Vote Rating
    4
    XASD is on a distinguished road

      0  

    Default [2.1] push notifications not working

    [2.1] push notifications not working


    Platform/tools(windows only!):
    Windows 7
    Sencha Cmd v3.0.0.250
    "iPhone Configuration Utility" 3.6.1.296

    Device:
    iPod,software version 6.0.1

    I've successfully generated both Development certificate and exported through openssl to p12,created provisioning profile for my device.

    package.json:
    Code:
    {
        "applicationName": "MyAppC",
        "applicationId": "com.MyAppC",
        "bundleSeedId": "B8AZK44K41",
        "versionString": "1.0",
        "versionCode": "1",
        "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"
        },
        "inputPath": "./",
        "outputPath": "../build/",
        "configuration": "Debug",
        "platform": "iOS",
        "deviceType": "Universal",
        "certificatePath": "/temp/ios_development.p12",
        "certificatePassword": "",
        "provisionProfile": "/temp/test1.mobileprovision",
        "orientations": [
            "portrait",
            "landscapeLeft",
            "landscapeRight",
            "portraitUpsideDown"
        ]
    }
    "sencha app build native" command create "build/native/MyAppC.app" folder.
    Now... strange things happens.
    1) console output from from "sencha" command contains no errors-all green,but it does not contains "signing" word anywhere. No signature? Only following line at the end:
    Code:
    [INF]           Packaging your application as a native app to C:\temp\test\build\native ...
    2) MyAppC.app folder contains(among the others):
    stbuild_template,embedded.mobileprovision,Info.plist
    and folders:
    _CodeSignature
    webapp

    are we building webapp or native? Strange.
    There's no mention of any entitlements-specific to ios permission settings,maybe something like "permissions" for android.
    Maybe "sencha" take setting it need to properly "codesign" application from provisioning profile?
    Profile contains something like:
    Code:
    	<key>Entitlements</key>
    	<dict>
    		<key>application-identifier</key>
    		<string>B8AZK44K41.com.MyAppC</string>
    		<key>aps-environment</key>
    		<string>development</string>
    		<key>get-task-allow</key>
    		<true/>
    		<key>keychain-access-groups</key>
    		<array>
    			<string>B8AZK44K41.*</string>
    		</array>
    	</dict>
    So we can see "aps-environment"="development" in provisioning profile.
    By the way, "codesign" is macos command for "manual" signing,so we don't have windows alternative.

    Is some kind of entitlements.entitlements or entitlements.plist file required for ios on windows development?

    3) When I try to deploy MyAppC.app folder to my device using "iPhone Configuration Utility",
    I see following error messages from ipod console:
    Code:
    Nov 30 20:39:39 Rada-rada installd[31] <Error>: 0x2ff2d000 handle_install: Install of "/var/mobile/Media/PublicStaging/MyAppC.app" requested by mobile_installation_proxy
    Nov 30 20:39:39 Rada-rada installd[31] <Error>: 0x2ff2d000 MobileInstallationInstall_Server: Installing app com.MyAppC
    Nov 30 20:39:39 Rada-rada installd[31] <Error>: Nov 30 20:39:39  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
    Nov 30 20:39:40 Rada-rada installd[31] <Error>: 0x2ff2d000 MobileInstallationInstall_Server: Staging: 0.42s; Waiting: 0.00s; Installation: 0.75s; LS Sync: 0.00s; Overall
    but... application appears on the ipod anyway!
    I start application...which contains following "launch" code:
    Code:
    Ext.device.Push.register({
        type: Ext.device.Push.ALERT|Ext.device.Push.BADGE|Ext.device.Push.SOUND,
        failure: function(error) {
            console.log('# Push notification registration unsuccessful:');
            console.log('     error: ' + error);
        }
    });
    and get following error on device console:

    Code:
    Nov 30 20:44:25 Rada-rada kernel[0] <Debug>: launchd[1243] Builtin profile: container (sandbox)
    Nov 30 20:44:25 Rada-rada kernel[0] <Debug>: launchd[1243] Container: /private/var/mobile/Applications/929CE243-AE86-484C-915E-2879D1E01975 (sandbox)
    Nov 30 20:44:27 Rada-rada SpringBoard[67] <Warning>: No valid 'aps-environment' entitlement string found for application 'MyAppC': (null). Notifications will not be delivered.
    So, it seems, ipod dosen't see any entitlements,though "embedded.mobileprovision" file present in application folder,but it's not enough?
    Maybe all these errors at install time somehow related to "entitlements"?
    I don't see any mention of entitlements in install console log, that's strange isn't it?
    If application contains "aps-environment" entitlement,console must mention it on install,but beside of error lines I can't see anything meaningful in console log.

    How I can understand,"phonegap" is not working with [2.1],so it's real problem.

    Will be very grateful for any suggestions.
    Thanks.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,004
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    228
    Vote Rating
    4
    XASD is on a distinguished road

      0  

    Default


    Thanks,Mitchell.
    But it would be interesting to know error roots.
    Something wrong with my application? Maybe,I should use something like "deviceready" event before calling .register()-bad timing?
    Something wrong with windows or/and sencha cmd?
    Macos version of "sencha cmd" work as expected?
    Something wrong with 6.0.1 version of ios-way it handle Developer certificate signed apps with push functionality?
    Something wrong with "iPhone Configuration Utility" -way it install application on device?Though iTunes-same result.
    Maybe that's iPod problem but iPhone or iPad working well? I can't verify that.

    Regards

  4. #4
    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


    Hi, you're missing "notificationConfiguration":"debug" from your configuration file, that's why push permissions aren't generated.

  5. #5
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    228
    Vote Rating
    4
    XASD is on a distinguished road

      0  

    Default


    I'll check that variant ASAP and report back result.
    But how about other types of entitlements?

    Thanks.

  6. #6
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    228
    Vote Rating
    4
    XASD is on a distinguished road

      0  

    Default


    package.json:
    Code:
    {
        "applicationName": "MyAppC",
        "applicationId": "com.MyAppC",
        "bundleSeedId": "B8AZK44K41",
        "versionString": "1.0",
        "versionCode": "1",
        "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"
        },
        "inputPath": "./",
        "outputPath": "../build/",
        "configuration": "Debug",
        "platform": "iOS",
        "deviceType": "Universal",
        "certificatePath": "/temp/ios_development.p12",
        "certificatePassword": "",
        "provisionProfile": "/temp/test1.mobileprovision",
        "notificationConfiguration":"debug", //string doesn't change anything
        "orientations": [
            "portrait",
            "landscapeLeft",
            "landscapeRight",
            "portraitUpsideDown"
        ]
    }
    Same errors as before on install,and same error on launch for "Sencha Cmd v3.0.0.250".
    Nothing is changed,no "entitlements.*" file in the "build/native/MyAppC.app" folder,but errors also absent in build log after "sencha app build native".
    By the way,where I can find docs for all package.json options? I see that "stbuild.exe" contains that string,but it's not mentioned anywhere else.

    Thanks.

  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


    make sure you enabled push notifications in your application ID in Apple developer portal, I also believe that you need to have all 3 callbacks for register function:
    Code:
    success: function(token) {
            // success callback
        },
        failure: function(error) {
            // failure callback
        },
        received: function(notification) {
            // received push notification callback
        }

  8. #8
    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 tested that functionality again and it works, so the problem must be in apple developer center id/provisioning setup.
    Double check everything, if still not working email me at alex@sencha.com we will go step by step and figure it out

  9. #9
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    228
    Vote Rating
    4
    XASD is on a distinguished road

      0  

    Default


    Please,read these posts,maybe it's related somehow.
    http://www.iphonedeveloperdiary.com/...ication-issue/

    http://iphonedevsdk.com/forum/iphone...k-3-1-2-a.html

    sencha build has following files in 'webapp' dir of 'native' build.
    icon.png
    icon-spot~ipad.png
    icon@2x.png
    Icon~ipad.png
    Icon~ipad@2x.png
    iTunesArtwork.png

    but phonegap build does not have any images in the root 'www' folder.

    Thanks.

  10. #10
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    228
    Vote Rating
    4
    XASD is on a distinguished road

      0  

    Default [2.2 beta1] iOS push notifications(still) not working

    [2.2 beta1] iOS push notifications(still) not working


    Please, look at http://www.sencha.com/forum/showthre...ns-not-working for reference.
    "native" build still not working on windows 7, ipod console show:
    Code:
    No valid 'aps-environment' entitlement string found for application 'MyAppC': (null). Notifications will not be delivered.
    Phonegap based build work perfectly(macos).

    Thanks.