Open Luis16287 opened 8 years ago
Hi @Luis16287, That is most probably a problem with your provisioning profile, you have to solve it in developer.apple.com, you go to account -> click on Certificates, Identifiers & Profiles -> click on identifiers - app ids -> select your app -> click on edit -> select push notifications.
Maybe you already did this, sometimes provisioning profiles get weird and you may have to remove the ones you have in your pc and get new ones.
In server --> main.js for apn config if use key,cert in the console i have (STDERR) ERROR: Push server could not find certData (STDERR) ERROR: Push server could not find keyData, changing to certData and keyData i have no errors:
I20160825-17:14:19.145(-3)? Push.Configure { gcm: { apiKey: 'AIzaS...' },
I20160825-17:14:19.145(-3)? apn:
I20160825-17:14:19.146(-3)? { sound: true,
I20160825-17:14:19.146(-3)? passphrase: 'Password2016',
I20160825-17:14:19.146(-3)? keyData: 'Bag Attributes\n friendlyName: myPushNotificationTest Key\n localKeyID: 9E 33 DF 83 16 8A E8 C1 63 08 12 7C 6E E7 A7 9C 95 A0 80 28 \nKey Attributes:
I'm new with push notifications and meteor , I'm working a few days ago and I could only run on android notifications :(
Thanks @indesignlatam, provisioning profiles are a bit confusing for me still , I'll try again to see if I have luck this time
@Luis16287 Enable push notification in Xcode capabilities section.
It is important that an app is running in production mode only if
If you deploy it using Xcode's play button, iOS will always treat it as in "development" mode. This will result in errorcode 8, if the server is running on a localhost or push is not configured for development mode.
I actually managed to use production certificates once - would not recommend it...
meteor run ios-device --mobile-server http://192.168.100.102:3000 --production
XCode console output: 2016-08-25 16:10:35.116 pushNotificationsTest[1656:437532] Apache Cordova native platform version 4.1.0 is starting. 2016-08-25 16:10:35.119 pushNotificationsTest[1656:437532] Multi-tasking -> Device: YES, App: YES 2016-08-25 16:10:35.132 pushNotificationsTest[1656:437532]
Started backup to iCloud! Please be careful. Your application might be rejected by Apple if you store too much data. For more information please read "iOS Data Storage Guidelines" at: https://developer.apple.com/icloud/documentation/data-storage/ To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file
2016-08-25 16:10:35.305 pushNotificationsTest[1656:437532] Using WKWebView 2016-08-25 16:10:35.306 pushNotificationsTest[1656:437532] [CDVTimer][handleopenurl] 0.176966ms 2016-08-25 16:10:35.310 pushNotificationsTest[1656:437532] [CDVTimer][intentandnavigationfilter] 3.618956ms 2016-08-25 16:10:35.310 pushNotificationsTest[1656:437532] [CDVTimer][gesturehandler] 0.158012ms 2016-08-25 16:10:35.389 pushNotificationsTest[1656:437532] Serving asset bundle version: d9b00d3fe0babf9a274b0f3d791ef6c2ac782ca5 [INFO] GCDWebServer started on port 12512 and reachable at http://localhost:12512/ 2016-08-25 16:10:35.392 pushNotificationsTest[1656:437532] [CDVTimer][webapplocalserver] 81.638038ms 2016-08-25 16:10:35.402 pushNotificationsTest[1656:437532] [CDVTimer][statusbar] 9.907007ms 2016-08-25 16:10:35.411 pushNotificationsTest[1656:437532] [CDVTimer][splashscreen] 8.849025ms 2016-08-25 16:10:35.412 pushNotificationsTest[1656:437532] [CDVTimer][TotalPluginStartup] 105.735958ms 2016-08-25 16:10:35.418 pushNotificationsTest[1656:437532] createNotificationChecker 2016-08-25 16:10:35.418 pushNotificationsTest[1656:437532] not coldstart 2016-08-25 16:10:35.420 pushNotificationsTest[1656:437532] active 2016-08-25 16:10:35.420 pushNotificationsTest[1656:437532] PushPlugin skip clear badge 2016-08-25 16:10:36.194 pushNotificationsTest[1656:437593] Push Plugin register called 2016-08-25 16:10:36.194 pushNotificationsTest[1656:437593] PushPlugin.register: setting badge to false 2016-08-25 16:10:36.194 pushNotificationsTest[1656:437593] PushPlugin.register: clear badge is set to 0 2016-08-25 16:10:36.194 pushNotificationsTest[1656:437593] PushPlugin.register: better button setup 2016-08-25 16:10:36.195 pushNotificationsTest[1656:437593] GCM Sender ID (null) 2016-08-25 16:10:36.195 pushNotificationsTest[1656:437593] Using APNS Notification 2016-08-25 16:10:36.236 pushNotificationsTest[1656:437532] Push Plugin register success: <289c6277 eb9b2904 cbe43a22 8b58ccbd 36bcabdd 45a22e98 a32e8f45 f437ae63>
This is my project structure:
mobile-config.js
client --> main.html:
client --> main.js
lib --> notifications.js
NotificationHistory = new Mongo.Collection("notification_history");
server --> main.js
METEOR@1.3.4.4 raix:push@3.0.3-rc.5 meteor add cordova:cordova-plugin-device@1.1.2 (need to install in that way or meteor show error) meteor add cordova:phonegap-plugin-push@1.6.4 (need to install in that way or meteor show error)
This is working for android, with meteor shell --> Push.send({from: 'push',title: 'Congratulations',text: 'My message!',query: {}}); i receive the push notification on android. For ios the device is registered but i get "Got error code 8 for token 289c6277eb..." when i try Push.send from meteor shell.
When i deploy my app to itunes connect the mail i receive say:
**_Dear developer,
We have discovered one or more issues with your recent delivery for "myPushNotificationTest". Your delivery was successful, but you may wish to correct the following issues in your next delivery:
Missing Push Notification Entitlement - Your app includes an API for Apple's Push Notification service, but the aps-environment entitlement is missing from the app's signature. To resolve this, make sure your App ID is enabled for push notification in the Provisioning Portal. Then, sign your app with a distribution provisioning profile that includes the aps-environment entitlement. This will create the correct signature, and you can resubmit your app. See "Provisioning and Development" in the Local and Push Notification Programming Guide for more information. If your app does not use the Apple Push Notification service, no action is required. You may remove the API from future submissions to stop this warning. If you use a third-party framework, you may need to contact the developer for information on removing the API.
After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.
Regards,
The App Store team_**