Push Notifications Tutorial: Getting Started

Hi,
I cannot run the starter project on my device, I get this message:
“dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /var/containers/Bundle/Application/7A0D9F6D-66A2-4BDF-87B7-6FC4547BB80D/WenderCast.app/WenderCast
Reason: no suitable image found.”
What I am doing wrong?

Push notifications is really a necessary task for users and your tutorial helps for how to integrate push notifications within the mobile applications in a smart way


This might be a small Xcode bug as noted here: ios - Reason: no suitable image found - Stack Overflow

According to the answers try cleaning the project and deleting Derived Data as well. If that doesn’t work check your certificates & profiles. Thanks!

Are you going to redo the part of the tutorial for creating the ck.pem and related files at all? We had to redo all of ours and now this tutorial doesn’t have those steps :frowning:

Not sure what you mean! What do you need that the “Creating an SSL Certificate and PEM file” section isn’t covering?

Oh perhaps, that is a new way of doing it. I remember there being more steps to it. Thanks.

Can you provide objective-c code? I’m would like to learn objective-c since you update the code with swift 2.2

Hi Jack. Just wondering, how would we get started beefing up that PHP script for a production environment? If all we want to do is send a push notification to some device token that we just retrieved from the database, how do we do that? Is there a lot more work that needs to be done to this script for just that simple task? I already have a server with PHP and the device tokens are already saved in a database. Can you point us to a few resources that would teach us how to do that? Thanks.

I just want to write thanks a lot! With your tutorial I spend much less time on the whole process to get my first push notification in my app!
Thanks once again!

Thanks
superb this tutorial
i have get below out put on the terminal but not get any notification in the device
Connected to APNS
Message successfully delivered

how to do solve this problem .???
please help me


Connected to APNS
Message successfully delivered

i have get this type of message on terminal but not get notification on device
where is missing ?
how to do solve it ??

This is bcoz, possibility might be that the private key and CSR file are wrong. Remember that each App ID has a unique CSR and private key combination.

This simply means the device token used for sending notification is with some different private key and CSR combination, also for developer profile, apns uses sandbox server and for production = true, apns sends notification through apns server. so check on that one as well.

I have a query here, what if the user was getting notification successfully until now and suddenly he has turned off device level notification for the app or if he has switched off his device, in that case how will the sender know that the notification is delivered successfully or not.

In this scenario the apns notification call returns , transmission = succes, delivered = success.

Thank you very much


I have solve it

Hi Jack,
Thank you very much for your tutorial.
I used some of your ideas to build push notification on my app. After spending so much time on setting up the certificate correctly, I could be able to push notification on my iPhone through APN tester inDev environment.
However, when I tried to build the app in enterprise environment with the production APN certificate, my iPhone didn’t receive any push sent by the APN tester using the same device token but production certificate.

Would you please help me to resolve the issue?

Sincerely,
Joseph

Hi Jack!
I don’t understand the part saying Under Run → Info, select Wait for executable to be launched. Could you please explain why we need this? In which other scenarious should we use this debugging technique?

What did you do to solve your problem? I am having a the same issue and am hoping what ever you did will help me.

I can`t obtain device token anymore.

Awesome tutorial
I have a question i will receive silent push notification from my server side once i get push I should make API call i want to make post request can I do this if yes please help

Thanks

It is because of your corporate firewall, somehow the php request is blocked or changed, the solution is mobile hotspot and send the php message through this