Skip to content

Commit 30f9c25

Browse files
committed
Added storekit ticker to web service push to allow identification of devices running via TestFlight, AppStore or direct from Xcode.
1 parent 6e87350 commit 30f9c25

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

Swift Push 3/AppDelegate.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
6363
println("device token is " + deviceToken.description)
6464
NSUserDefaults.standardUserDefaults().setObject(deviceToken.description as String, forKey:"deviceToken")
6565
NSUserDefaults.standardUserDefaults().synchronize()
66-
66+
67+
var receipt = NSBundle.mainBundle().appStoreReceiptURL?.lastPathComponent
68+
6769
// register device token with push service
6870
var request = NSMutableURLRequest(URL: NSURL(string: "https://www.trease.eu/ibeacon/swiftpush/")!)
6971
var session = NSURLSession.sharedSession()
7072
request.HTTPMethod = "POST"
71-
var bodyData = "token=" + deviceToken.description + "&device=" + UIDevice.currentDevice().name
73+
var bodyData = "token=" + deviceToken.description
74+
+ "&device=" + UIDevice.currentDevice().name
75+
+ "&mode=" + receipt!
7276
request.HTTPBody = bodyData.dataUsingEncoding(NSUTF8StringEncoding)
7377
var connection = NSURLConnection(request: request, delegate: self, startImmediately: false)
7478
connection?.start()

Swift Push 3/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>185</string>
22+
<string>187</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
2525
<key>UIBackgroundModes</key>

Swift Push 3/Settings.bundle/Root.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<array>
77
<dict>
88
<key>DefaultValue</key>
9-
<string>185</string>
9+
<string>187</string>
1010
<key>Key</key>
1111
<string>CurrentBuildNumber</string>
1212
<key>Title</key>

0 commit comments

Comments
 (0)