-
30 Nov 2012 8:08 AM #1
[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:
"sencha app build native" command create "build/native/MyAppC.app" folder.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" ] }
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:
2) MyAppC.app folder contains(among the others):Code:[INF] Packaging your application as a native app to C:\temp\test\build\native ...
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:
So we can see "aps-environment"="development" in provisioning profile.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>
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:
but... application appears on the ipod anyway!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
I start application...which contains following "launch" code:
and get following error on device console: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); } });
So, it seems, ipod dosen't see any entitlements,though "embedded.mobileprovision" file present in application folder,but it's not enough?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.
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.
-
30 Nov 2012 8:16 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,119
- Vote Rating
- 453
Thanks for the report! I have opened a bug in our bug tracker.
-
30 Nov 2012 9:14 AM #3
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
-
30 Nov 2012 11:54 AM #4
Hi, you're missing "notificationConfiguration":"debug" from your configuration file, that's why push permissions aren't generated.
-
30 Nov 2012 12:59 PM #5
I'll check that variant ASAP and report back result.
But how about other types of entitlements?
Thanks.
-
1 Dec 2012 1:11 AM #6
package.json:
Same errors as before on install,and same error on launch for "Sencha Cmd v3.0.0.250".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" ] }
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.
-
14 Jan 2013 10:18 AM #7
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 }
-
14 Jan 2013 2:10 PM #8
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
-
25 Feb 2013 9:08 PM #9
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.
-
4 Mar 2013 10:43 PM #10
[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:
Phonegap based build work perfectly(macos).Code:No valid 'aps-environment' entitlement string found for application 'MyAppC': (null). Notifications will not be delivered.
Thanks.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-3776
in
Sprint 29.


Reply With Quote