I have to set up push cloud notification server. I decided to use: http://pypi.python.org/pypi/pyapns/
The question that i have is how to test the server if i don't have an app which will be connected to the server? Is there any sample apps or services that would display the push notification? I just want to send payload using some sort of script and see if sending is successful or not. How people debug such things? Aren't there any kind of virtual env for such tasks?
I do have certificates and ID's of the app, but not the app it self, since the other people are making it. I do not use MAC, or have iOS device. I did read docs from apple.
So eventually i got the right .pem certificate and token of phone with the app-under-dev, phone had to registered as testing one for that app. I just pushed messages and waited for answer unit i got it. Apple do not provide any "easy to use" testing grounds, logs or messages for debugging. Best you can do is to separate pushing service and getting token as much as possible and when you got your hands on app do the raw testing.
Related
The common way to push notification is get the token from client side, and then pass this token to the server side, finally server use this token to send any notification user want. But for test purpose, there is no actually client device, how to get the mock token from server side?
#mohax's answer is correct. I'd like to add a little more:
You cannot get push token without client device request for token. But you can use HMS Toolkit or Cloud Debugging to test your app.
For Huawei emulator on Android Studio, you can install HMS Toolkit. As a lightweight IDE tool plugin, HMS Toolkit implements app creation, coding, conversion, debugging, test, and release. HMS Toolkit provides Cloud Debugging for you to perform 24/7 uninterrupted testing on your app running on remote real devices. With this function, you can learn about the running status of apps on Huawei devices anytime and anywhere even if no device is available, device types are not completed, or an error cannot be reproduced.
Cloud Debugging can be used on a single device for 2 hours each time. Before the validity period expires, you can release the device and apply for the device again.
For more detail about the guidance of how to use HMS Toolkit and cloud debugging,You can also refer this link.
Currently, I have a server that sends notifications to my Mac App. However, before I release the app I would like to be able to send push notifications to my app using the production key instead of the development (sandbox) key and use the production server. This way I can make sure everything will work fine on the App Store. I know iPhone has adhoc that allows this, but mac doesn't seem to have this option. There is a development profile, but it only works in a development (sandbox) environment. Any way to test mac app push notification in production mode?
Yes, there are ways to test APN with the Apple Push Notification service SSL (Production) certificate, although your app will then be using the production environment instead, and the entitlement will need to be changed:
com.apple.developer.aps-environment from developer to production.
Many push notification servers do not handle error responses or
dropped connections robustly. An easy way to check this is to
intentionally send a notification to a sandbox environment device
token, assuming your server is communicating with the production push
environment. Doing that should return an invalid token response and
drop the connection. To learn more about checking error responses from
the push service, please see Push Notification Throughput and Error Checking
Having two environments allows wiggle room for mishaps while you are building your app. If confident with the way in which the server sends and the app receives APN's in the sandbox then create the production certificate and send yourself a notification to ensure it's working.
Note: There is a separate persistent connection to the push service
for each environment. The operating system establishes a persistent
connection to the sandbox environment for development builds, while ad
hoc and distribution builds connect to the production environment.
I find plenty of information on deploying Twilio to a new Heroku app, thereby creating it. I'm a little stuck on the process of deploying it to an app that I already have. My app has a lot of data in the database there and I don't want to have to recreate it all. Additionally I would like my app to serve PHP pages as well. Do I need 3 Heroku apps now then? Doesn't make sense!
Twilio developer evangelist here.
You don't need to build a new application to use Twilio on Heroku. If you already have your existing application all you need to do is add the relevant endpoints for receiving SMS messages and voice calls from Twilio and deploy to your existing Heroku deployment. It is recommended that you load your Twilio Account SID and Auth Token into the Heroku config so that you can use them there too.
Is there anything specific you need to know about this? What is the application you have already built?
WhatsApp just announced a new web application see here.
For some reason, the interface requires the phone to be connected all the time. Is it for performance reasons (not to create additional load on their current servers)? Is there any other constraint that cause that?
The official explanation:
Your session on WhatsApp Web is an extension of WhatsApp on your
phone. WhatsApp Web connects to your phone to sync messages, thus you
can see all messages on both devices. Thus, the first requirement to
being able to use WhatsApp Web is an active WhatsApp account on your
smartphone.
Source: https://www.whatsapp.com/faq/en/web/28080002
As you may know your Whatsapp history is only being stored in a database on the phone itself. To see that history in your web browser, it needs to get it from the phone. Whatsapp could have redesigned it, so that everything is stored in the cloud (as many competing messaging apps do). But that seems to be against their philosophy. They keep it tighly coupled to a (one) phone. As you may know you cannot install Whatsapp on multiple phones using the same account. The web interface is just a remote for Whatsapp running on your phone.
And even though I don't know for sure, I think it's more secure too. It wouldn't surprise me if the data that's sent between the web app and the phone is encrypted in a way that even Whatsapp themselves cannot decrypt. Maybe the QR code is generated client-side (in the browser) and by scanning it using the app there is no need to exchange the keys through Whatsapp's servers. That way they don't ever get the encryption keys and will not be able to inspect the data that gets routed through their servers.
Note: Of course Whatsapp could at any time change their implementation of both the app or the web app and enable eavesdropping.
I am using the APNS for my app in development mode. I integrated with the Urban Airship as per the getting started document they provided on their portal:
Created the certificate in Apple provisioning portal. Imported the .p12 file to Urban Airship app(in dev mode with debug enabled)
Now when I open the application, it shows me the alert and asks me for the permission to enable notification. Once that is done and I try to test push a message from the Urban Airship portal to my device using the device token generated, I get the common error:
Apple Push service rejected device token "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
I searched on google and found this to be a very common problem; however with no solution. Most answers mention that the prod and dev environment conflict is the cause, however that is not the case in my case as I did not create the prod app in Urban Airship nor in the APNS dev certificate. The settings in my AirshipConfig.plist are:
APP_STORE_OR_AD_HOC_BUILD : NO
Development_App_Key: XXXXXXXXXXX
Development_App_secret: XXXXXXXXXX
(not master secret, just the dev app secret.)
Nowhere did I find the response from any user who asked the question and later got it resolved. So, I am not sure how people resolved it when they got stuck. All suggests to recheck the environment conflicts, which is not there in my case.
If anyone has any idea, please suggest the possible solutions as this is a blocker for our release. Pls also respond if this is a generic error which almost everyone gets with Urban Airship, and if Free UA account is not a feasible service for testing.
I've been fighting with these issues the last few days. The thing that fixed it for me was creating a non-wildcard identifier that was using a development provisioning profile.
Until I did this I was only able to have APP_STORE_OR_AD_HOC_BUILD : YES
Things worth checking:
Provisioning profile is set to development
Application bundle ID matches the Urban Airship bundle Id.
You can check the Urban Airship bundle Id that is used by going to:
Settings
API Keys
(See the right hand side and there should be a box that contains the iOS Bundle ID.)
Finally make sure your keys in the plist all match.
Also as you probably know, you cannot test push notifications with the simulator. I Hope this helps.