Open bnussey opened 7 years ago
@bnussey Indeed, this may be of help to developers. I cannot test right now but I think that if the App Id in your Apple developer account is featuring this capability and you have the respective provisioning profile locally, you can build and deploy the app with this added capability.
On the other hand, if your rely on Xcode to make the build, run or deploy operation, you may need to enable the capability in there. So independent on the worfklow you need to add this capability.
Not sure if the process can be automated, but sounds worth checking.
Got ya @AntonDobrev so if I update my provisioning profile after enabling notifications then I shouldn't have to do this? I believe my provisioning profile was put in place before doing the notification work, so that could explain it. My research didnt find a way to automate it.. but will have another look and report back if thats the case.
Same on my machine. I can turn on PushNotifications on iOS in Xcode's Capabilities tab and it works. It is not turned on if I prepare the Xcode project with tns prepare ios
.
I had to use the nativescript-custom-entitlements plugin to add the entitlement.
Having the same issue. Thanks simonox, for the tip, the custom entitlements plugin solution works like a charm.
this may help someone
setTimeout(function() {
pushPlugin.register(iosSettings, function (data) {
console.log("Device registered. Access token" + data);
// Register the interactive settings
if(iosSettings.interactiveSettings) {
pushPlugin.registerUserNotificationSettings(function() {
alert('Successfully registered for interactive push.');
}, function(err) {
alert('Error registering for interactive push: ' + JSON.stringify(err));
});
}
}, function() { });
},20000)
Hello,
I've added everything to info.plist but to get notifications to work on iOS I still need to open xcode project and manually enable Push Notifications capability.. any ideas as to why I need to do this everytime? Thanks