Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
444 views
in Technique[技术] by (71.8m points)

objective c - Send push notification from ios app

I need to create a ios app who send notification. (similar to Pushmebaby (https://github.com/stefanhafeneger/PushMeBaby)). (also note that this mac app was 2 years old ans crash for me)

I've seen some exemple of php web site to do this, buy nothing to be able to do this directly from ios.

Any good exemple for me?

Thanks, and have a nice day!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Are you needing to send notifications to the iOS device that is currently running your app? If so, you should look into local notifications.

If you're actually wanting to send push notifications to other iOS devices from your iOS device, you basically have two options

Option 1 (Easiest)

Use a service like Parse or Urban Airship to send the notifications for you. You can then fire off a request to their API to initiate the push notification to your user's devices.

Option 2 (Most Involved)

Set up your infrastructure per Apple's guidelines so that you can send push notifications to Apple's servers. Then, you'll need to build an API so that your iOS device can communicate with your push notification server to initiate the push notification request to Apple's servers.

True push notification support is not easy so I would suggest option 1 if it works out for you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.8k users

...