开发者

Sending and getting positions of device from a server

开发者 https://www.devze.com 2023-02-24 12:01 出处:网络
I am pretty new to Objective-C and want to write an iPhone app. The iPhone app should send the device-ID to a server when it is started the first time,

I am pretty new to Objective-C and want to write an iPhone app.

The iPhone app should send the device-ID to a server when it is started the first time,

and even if the app is in the background, the device should send its position in a given time interval and the current position is stored with the ID. If the iPhone is near a given other posi开发者_JAVA百科tion, the server should send a message to the device such an alert view appears on the screen.

I don't expect a manual to program this, but I would be happy if you can give me some key words to look up and classes I definitely need to use.


Well, sounds like your gonna need the CoreLocation framework

http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CoreLocation_Framework/_index.html

That'll handle the positioning of the device.

The UDID (device id) is fairly straight forward, a quick google will get you that code.

You'll also need to look into multitasking, specifically the link below, to execute code when the app is in the background.

http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/BackgroundExecution/BackgroundExecution.html

0

精彩评论

暂无评论...
验证码 换一张
取 消