phonegap build 3.3.0 + pushwoosh not working - push-notification

I installed according to this guide: http://www.pushwoosh.com/programming-push-notification/android/android-additional-platforms/phonegap-build/
And I defined in pushwoosh the Certificate is needed.
IOS system I get an error
your provisioning profile does not have aps entry. Please make your profile push compatible
And Android app costs but I send notifications are not coming.
Where could be the problem? What am I doing wrong?
Thanks for the help!

You need to recreate your mobileprovisioning profile for the app in Apple Developer Portal.
Your current mobileprovisioning profile does not allow push notifications.
After recreating the profile, open it in any text editor and double check that it has "aps-environment" line.

Related

Ionic push notification for ios using FCM

I am trying to send push notification on my iOS device with the help of FCM and ionic 3. But I'm unable to get on my device, for android it is working fine, but for iOS its not working. I'm getting device token for iOS and I've enabled push notification from xcode also.
Is there any other configuration, which I'm missing between iOS and FCM?
Yes.
Steps for ios FCM Integration:
Add the GoogleService-info.plist file in to the root folder of your app.
Add the plugin to your app following this link : https://ionicframework.com/docs/native/fcm/
Write the necessary code
Run command in terminal/cmd 'ionic cordova prepare'
Open Xcode and allow the code to be indexed.
Click on 'show project navigator' on the extreme left hand side below run button. Check the Resources Folder and click on GoogleService-info.plist. If it is empty, delete it and manually place the file again in that folder by dragging and dropping.
Under Capabilities, ON push notifications and ON background modes> remote notifications
8 Upload p8 file on firebase console.
9 and you're done! Test your notification :)
Note: Don't forget to use actual device to test this feature. iOS Simulator doesn't support notifications.
App Crash Issue: Make sure that platforms/ios/MyApp/Resources/Resources/GoogleService-Info.plist and platforms/ios/MyApp/Resources/GoogleService-Info.plist
are same and complete. An incomplete file on any of the above paths can lead to crashing of the app.

FCM/GCM for electron APP

I have been using FCM/GCM to send notifications to Chrome App, Chrome Extension, Android APP.
But, may I know how can I send notifications to an electron APP from FCM/GCM. I browsed through a lot of websites but did not find anything related to it.
PS: I don't worry about how the notifications are displayed. I just want the notification payload to be received by the electron app.
Thanks in advance.
There's nothing available out of the box with Electron but there is a Node package available here: https://www.npmjs.com/package/electron-push-receiver
There's no boilerplate code available for using this package yet, but there is an open issue in the associated GitHub project requesting a working example: https://github.com/MatthieuLemoine/electron-push-receiver/issues/8

xcode 8 push notification capabilities and entitlements file setting

when using xcode 8 doing the push notification setting, unlike xcode 7, xcode 8 need developer turn on push notifications capabilities switch ( located at TARGETS -> AppName -> Capabilities as following pic ),
then it will generate AppName.entitlements file as following
//AppName.entitlements
<key>aps-environment</key>
<string>development</string>
but for production version App, if we change the string to
//AppName.entitlements
<key>aps-environment</key>
<string>production</string>
then the Capabilities show a warning
and it seems no matter which string value specified in aps-environment, we can still get the push device token at application:didRegisterForRemoteNotificationsWithDeviceToken:
so what is the correct setting of the push notification entitlements?
thank you
I was struggling with that today in Xcode 8 GM. After disabling the setting, deleting my developer portal provisioning profile and regenerating it and enabling the setting again, I was able to eliminate the warning in Xcode. Keep in mind that I didn't fiddle with the entitlements file. I left it at development environment and after archiving I got the correct aps-environment setting (production).
Seems Xcode is stilly very buggy tho even in GM
My problem was my pusher client was out of date and would only push successfully to debug tokens. Other issue which I am still working on a fix for is that I could only export the app via gym with legacy-api enabled, this was not setting the apns-environment to be 'production' and leaving it as 'development' in the 'embedded-mobile.provision' file. I have however been able to successfully deploy the app via the xcode organiser to work with apns(prod) now.
I think the better solution is open the project package and open project.pbxproj
change the CODE_SIGN_ENTITLEMENTS
CODE_SIGN_ENTITLEMENTS = "your-app/production.entitlements";

code signing error while integrating bot for simulator only

I am integrating bot to run on iOS simulator only not any device but still getting code signing error- No matching codesigning identity found: No codesigning identities(i.e. certificate and private key pairs) code signing is required for product type 'Application' in SDK 'iOS 7.0'
I have selected only one simulator under specific devices at the time of creating bot.
Why this is the problem for simulator too.
I have also tried by checking don't code sign option. But integration still failed with error-
CodeSign error:code signing is required for product type 'Application' in SDK 'iOS7'>
How to fix it?
Plz help...
Why not to add development provisioning profile to that OS X Server? Just send the file to that machine and open it with Xcode.
To make sure everything goes OK I'm usually checking that I can run my app on that server just from Xcode.
Don't code sign option is not working now because, as you can see, code signing is required in the iOS7 SDK. Not sure if it's a bug or feature.

Do I need two Provisioning Profiles?

I've got a Provisioning Profile for distribution com.mycomapnyname.myappname
Now I want to test my app in my iPad and I did all steps- Get certificate - Add my device - create an AppId - and finally create a Development Profile called My Applications (to sets all apps), so I've got a Distribution Profile and a development Profile.
The bundle identifier for distribution is com.mycomapnyname.myappname
The bundle identifier for developer is com.mycomapnyname.*
In Library Provisioning Profiles I've got both.
In Ipad Provisioning profile I've got just My Applications Profile
When I try to run it on my iPad I set in Targets - Build Settings:
Code Signing / Debug / Any iOS SDK = iPhone developer matching with My Applications
Code Signing / Distribution / Any iOS SDK = iPhone distribution identity
in Targets / Info:
Bundle identifier: com.mycomapnyname.myappname
Finally when I want to run my project (setting to run it on my iPad) I've got the error:
"A valid provisioning profile for this executable was not found."
It's a king of mess for me, can anyone help me to be able to run in on my device?
I run other app on my device, but following a tutorial and creating a new app, but I can't run my own app in my device for testing.
Thanks in advance ;-)
No you don't unless you like to setup wild cards for each app which is confusing.
Try this it may help. In xcode go to organizer and then select provisioning profile section. Try to refresh that. It will connect to Dev portal and download your current profiles. Then with your device connected try clicking on the name of the device and make sure your device gets detected by xcode. If it says use for developing click on that and it will also refresh the provisioning profile on your device. That should re sync everything. If this dies not work let me know and I'll get on my Mac and see how I can help you more.
Adrian

Resources