Open tomylee001001 opened 6 years ago
You have to set a valid provisionning profile corresponding to your app's bundle identifier, having previously enabled the push notifications for the app in the apple developper account.
hi @TheOnlyMatt if you refering to this; i already included "Push Notifications" to the provisinal profiles of both development and distrubition of my app. if its not can you tell me is there another place i need to set "Push Notifications". thanks.
Ok good, I didn't noticed, but you have a little button "fix issue" on your screenshot. It will add <key>aps-environment</key><string>development</string>
to platforms/ios/YourAppName/YourAppName.entitlements file. After that, copy that file to your app/App_Resources/iOS folder.
Tell me if it solves your problem
@TheOnlyMatt i tried that without success but by doing this i think i find the problem. before "tns run ios" the AppName.entitlements file had tags like this;
but after the "tns run ios" AppName.entitlements file became like this;
If you still experience this issue please try updating to the latest version of the plugin. It includes code that will automatically update the .entitlements
file in the iOS project and should fix the error while registering the device.
hi @lini Thanks for update. i updated the plug-in but i still cannot register on IOS. Also there is something i notice; in the example usage of IOS there is no "senderID" parameter inside "iosSettings" but if i do not add that parameter i cannot build my app. i am getting Typescript compiler error. is this normal or something wrong with my settings.
Hi, I am getting the same issue.
Hi @tomylee001001, iosSettings should be assignable as a IosRegistrationOptions, thats why there is an error in TypeScript when you try to compile, the simplest example could something like this:
{
badge: true,
sound: true,
alert: true,
clearBadge: true,
interactiveSettings: {
actions: [],
categories: []
},
notificationCallbackIOS: (message: any) => {
this._feedback.success({message: message});
}
}
Same as you, I am trying to make Push Notifications work but it is not registering the device.
Any updates guys?
I am having the same issue except my push notifications session in xcode has no issues... but when I ran the app it doesn't show me the alert saying my device is registered.
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
i am try to send push notification to my project.in android it works but i cannot register in the ios. i am trying from Mac OSX 10.13.3 and xcode 9.2. i did everything from the documentation but when i try to register push notificaion it fails without any error message. also after i build my app with "tns build ios" and open .xcodeproj file in the platform/ios, i enable the push notification in the Capabilities. but after i run my app either in my iphone or simulator with "tns run ios" then re-open .xcodeproj file and capabilities i see an error like the attachmenti send.
Is there any code involved?
const iosSettings = { senderID: "[sender id]", badge: true, sound: true, alert: true, interactiveSettings: { actions: [{ identifier: 'READ_IDENTIFIER', title: 'Read', activationMode: "foreground", destructive: false, authenticationRequired: true }, { identifier: 'CANCEL_IDENTIFIER', title: 'Cancel', activationMode: "foreground", destructive: true, authenticationRequired: true }], categories: [{ identifier: 'READ_CATEGORY', actionsForDefaultContext: ['READ_IDENTIFIER', 'CANCEL_IDENTIFIER'], actionsForMinimalContext: ['READ_IDENTIFIER', 'CANCEL_IDENTIFIER'] }] }, notificationCallbackIOS: (message: any) => { alert(JSON.stringify(message)); } };