Skip to content

Commit 9f653e4

Browse files
committed
Build 533.
TestFlight submission working again!
1 parent 0249e38 commit 9f653e4

File tree

7 files changed

+38
-17
lines changed

7 files changed

+38
-17
lines changed

Swift Push 4.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@
280280
buildSettings = {
281281
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
282282
CODE_SIGN_IDENTITY = "iPhone Developer";
283+
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
284+
ENABLE_BITCODE = NO;
283285
INFOPLIST_FILE = "Swift Push 4/Info.plist";
284286
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
285287
PRODUCT_BUNDLE_IDENTIFIER = eu.trease.www.swift.push;
@@ -292,6 +294,8 @@
292294
buildSettings = {
293295
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
294296
CODE_SIGN_IDENTITY = "iPhone Developer";
297+
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
298+
ENABLE_BITCODE = NO;
295299
INFOPLIST_FILE = "Swift Push 4/Info.plist";
296300
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
297301
PRODUCT_BUNDLE_IDENTIFIER = eu.trease.www.swift.push;

Swift Push 4/AppDelegate.swift

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
7575
let x = response as? NSHTTPURLResponse
7676
print ("status code \(x?.statusCode)")
7777
}
78-
task!.resume()
78+
task.resume()
7979
}
8080

8181
func application(application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error:NSError) {
@@ -111,20 +111,28 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
111111
print ("timestamp: \(timeStamp)")
112112
}
113113

114-
notifications.insert(item, atIndex: 0)
115-
if (notifications.count > maxNotifications) {
116-
notifications.removeLast()
114+
// Is is the message ID already in use
115+
var duplicate = false
116+
for var index = 0 ; index < notifications.count; index++ {
117+
if notifications[index].messageID == item.messageID && notifications[index].alert == item.alert {
118+
duplicate = true
119+
}
117120
}
118-
let center = NSNotificationCenter.defaultCenter()
119-
center.postNotificationName("dataChanged", object: self)
120121

122+
if duplicate == false {
123+
notifications.insert(item, atIndex: 0)
124+
if (notifications.count > maxNotifications) {
125+
notifications.removeLast()
126+
}
127+
let center = NSNotificationCenter.defaultCenter()
128+
center.postNotificationName("dataChanged", object: self)
129+
}
121130

122131

123132
let formatter = NSNumberFormatter()
124133
formatter.numberStyle = .PercentStyle
125134

126135
let batteryLevel = formatter.stringFromNumber(UIDevice.currentDevice().batteryLevel)
127-
128136
var chargeStatus = ""
129137

130138
switch UIDevice.currentDevice().batteryState {
@@ -152,12 +160,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
152160
let x = response as? NSHTTPURLResponse
153161
print ("status code \(x?.statusCode)")
154162
}
155-
task!.resume()
156-
157-
158-
159-
160-
163+
task.resume()
164+
161165
// finished
162166
completionHandler(UIBackgroundFetchResult.NewData)
163167
}

Swift Push 4/Base.lproj/Main.storyboard

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8121.17" systemVersion="15A178w" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="nIE-zw-TiR">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8152.3" systemVersion="15A216g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="nIE-zw-TiR">
33
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8101.14"/>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8124.4"/>
55
</dependencies>
66
<scenes>
77
<!--Navigation Controller-->
@@ -68,8 +68,19 @@
6868
</connections>
6969
</tableView>
7070
<navigationItem key="navigationItem" title="Swift Push" id="Zdf-7t-Un8"/>
71+
<connections>
72+
<outlet property="searchDisplayController" destination="c5m-kZ-LXa" id="2Ot-2Q-pjS"/>
73+
</connections>
7174
</tableViewController>
7275
<placeholder placeholderIdentifier="IBFirstResponder" id="Rux-fX-hf1" sceneMemberID="firstResponder"/>
76+
<searchDisplayController id="c5m-kZ-LXa">
77+
<connections>
78+
<outlet property="delegate" destination="7bK-jq-Zjz" id="1pl-k1-n7y"/>
79+
<outlet property="searchContentsController" destination="7bK-jq-Zjz" id="2Gg-ET-Vox"/>
80+
<outlet property="searchResultsDataSource" destination="7bK-jq-Zjz" id="SvI-8l-H3y"/>
81+
<outlet property="searchResultsDelegate" destination="7bK-jq-Zjz" id="gUd-Rh-HoR"/>
82+
</connections>
83+
</searchDisplayController>
7384
</objects>
7485
<point key="canvasLocation" x="181" y="-404"/>
7586
</scene>

Swift Push 4/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>521</string>
22+
<string>534</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
2525
<key>UIBackgroundModes</key>

Swift Push 4/MasterViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class MasterViewController: UITableViewController {
3131

3232
}
3333

34+
35+
3436

3537
// MARK: - Table View
3638

Swift Push 4/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>521</string>
9+
<string>534</string>
1010
<key>Key</key>
1111
<string>CurrentBuildNumber</string>
1212
<key>Title</key>

0 commit comments

Comments
 (0)