-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
27 lines (20 loc) · 1.28 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
I'm using this Beacon class to keep track of people who beta-test my iPhone and iPad applications.
The Beacon class simply calls a URL, sending some device and application information to the server. The following information is collected:
createDate date of the request
ip ip address of the device
deviceJailbroken whether the device is jailbroken
deviceIdentifier unique id of of the device (UDID)
deviceModel model of the device ('iPod touch')
deviceSystemVersion operating system version (3.1.3)
applicationVersion application version taken from the Info.plist
applicationIdentifier pplication identifier taken from the Info.plist
hardwareMachine hardware machine (N72AP)
hardwareModel hardware model code (iPod2,1)
The server side is a minimal PHP script that simply stores these values in a MySQL database. Both the PHP script and the MySQL script are included.
Example usage:
Beacon* beacon = [[[Beacon alloc] initWithURL:
[NSURL URLWithString: @"http://some.server.com/beacon.php"]] autorelease];
if (beacon != nil) {
[beacon signal];
}
(The Beacon is retained by the NSURLConnection, so it is ok to keep it autoreleased, it will be dealloc'ed automatically when the connection is done.)