Skip to content

Commit a4e4e2d

Browse files
committed
urgent fix of the group modification.
1 parent 255b214 commit a4e4e2d

9 files changed

Lines changed: 355 additions & 65 deletions

File tree

VoiceIn.xcodeproj/project.pbxproj

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
2468F3A20219542A5DB330B5 /* Pods_voiceIn.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17180578C7634CC753D00194 /* Pods_voiceIn.framework */; };
1011
3E0414DC1CA7C94E004CE69B /* UserInformationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E0414DB1CA7C94E004CE69B /* UserInformationViewController.swift */; };
1112
3E0BD5351D04B2FE006AEFB5 /* NotificationBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E0BD5331D04B2FE006AEFB5 /* NotificationBanner.swift */; };
1213
3E0BD5361D04B2FE006AEFB5 /* NotificationBanner.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3E0BD5341D04B2FE006AEFB5 /* NotificationBanner.xib */; };
@@ -57,10 +58,12 @@
5758
3EF6329A1C75A9F300BBAB39 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EF632991C75A9F300BBAB39 /* AppDelegate.swift */; };
5859
3EF632A21C75A9F300BBAB39 /* voiceIn.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 3EF632A01C75A9F300BBAB39 /* voiceIn.xcdatamodeld */; };
5960
3EF632A71C75A9F300BBAB39 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3EF632A51C75A9F300BBAB39 /* LaunchScreen.storyboard */; };
60-
EAD86DBFF23C6F8253D4F217 /* Pods_voiceIn.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C37C519221C879C67F35059B /* Pods_voiceIn.framework */; };
61+
3EF89ECE1D0928CD0049DF45 /* ENMBadgedBarButtonItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EF89ECD1D0928CD0049DF45 /* ENMBadgedBarButtonItem.swift */; };
6162
/* End PBXBuildFile section */
6263

6364
/* Begin PBXFileReference section */
65+
17180578C7634CC753D00194 /* Pods_voiceIn.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_voiceIn.framework; sourceTree = BUILT_PRODUCTS_DIR; };
66+
221D37847EB2E6C4885BC627 /* Pods-voiceIn.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-voiceIn.debug.xcconfig"; path = "Pods/Target Support Files/Pods-voiceIn/Pods-voiceIn.debug.xcconfig"; sourceTree = "<group>"; };
6467
3E0414DB1CA7C94E004CE69B /* UserInformationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserInformationViewController.swift; sourceTree = "<group>"; };
6568
3E0BD5331D04B2FE006AEFB5 /* NotificationBanner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationBanner.swift; sourceTree = "<group>"; };
6669
3E0BD5341D04B2FE006AEFB5 /* NotificationBanner.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NotificationBanner.xib; sourceTree = "<group>"; };
@@ -114,35 +117,43 @@
114117
3EF632A11C75A9F300BBAB39 /* voiceIn.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = voiceIn.xcdatamodel; sourceTree = "<group>"; };
115118
3EF632A61C75A9F300BBAB39 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
116119
3EF632A81C75A9F300BBAB39 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
117-
9C51EFE460B6A808B44697CE /* Pods-voiceIn.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-voiceIn.debug.xcconfig"; path = "Pods/Target Support Files/Pods-voiceIn/Pods-voiceIn.debug.xcconfig"; sourceTree = "<group>"; };
118-
ACE3FB3F075A84D1E9DCF2C1 /* Pods-voiceIn.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-voiceIn.release.xcconfig"; path = "Pods/Target Support Files/Pods-voiceIn/Pods-voiceIn.release.xcconfig"; sourceTree = "<group>"; };
119-
C37C519221C879C67F35059B /* Pods_voiceIn.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_voiceIn.framework; sourceTree = BUILT_PRODUCTS_DIR; };
120+
3EF89ECD1D0928CD0049DF45 /* ENMBadgedBarButtonItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ENMBadgedBarButtonItem.swift; path = voiceIn/ThirdPartyHelpers/ENMBadgedBarButtonItem/ENMBadgedBarButtonItem.swift; sourceTree = SOURCE_ROOT; };
121+
B92B187EA76927709FF0DBCE /* Pods-voiceIn.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-voiceIn.release.xcconfig"; path = "Pods/Target Support Files/Pods-voiceIn/Pods-voiceIn.release.xcconfig"; sourceTree = "<group>"; };
120122
/* End PBXFileReference section */
121123

122124
/* Begin PBXFrameworksBuildPhase section */
123125
3EF632931C75A9F300BBAB39 /* Frameworks */ = {
124126
isa = PBXFrameworksBuildPhase;
125127
buildActionMask = 2147483647;
126128
files = (
127-
EAD86DBFF23C6F8253D4F217 /* Pods_voiceIn.framework in Frameworks */,
129+
2468F3A20219542A5DB330B5 /* Pods_voiceIn.framework in Frameworks */,
128130
);
129131
runOnlyForDeploymentPostprocessing = 0;
130132
};
131133
/* End PBXFrameworksBuildPhase section */
132134

133135
/* Begin PBXGroup section */
134-
0FA8C80D807C2229142087E4 /* Pods */ = {
136+
05AD98BD406AFF36C900EA7C /* Frameworks */ = {
135137
isa = PBXGroup;
136138
children = (
137-
9C51EFE460B6A808B44697CE /* Pods-voiceIn.debug.xcconfig */,
138-
ACE3FB3F075A84D1E9DCF2C1 /* Pods-voiceIn.release.xcconfig */,
139+
17180578C7634CC753D00194 /* Pods_voiceIn.framework */,
140+
);
141+
name = Frameworks;
142+
sourceTree = "<group>";
143+
};
144+
2BAF46835FA52E7792451822 /* Pods */ = {
145+
isa = PBXGroup;
146+
children = (
147+
221D37847EB2E6C4885BC627 /* Pods-voiceIn.debug.xcconfig */,
148+
B92B187EA76927709FF0DBCE /* Pods-voiceIn.release.xcconfig */,
139149
);
140150
name = Pods;
141151
sourceTree = "<group>";
142152
};
143153
3E0BD5311D04B2FE006AEFB5 /* ThirdPartyHelpers */ = {
144154
isa = PBXGroup;
145155
children = (
156+
3EF89ECC1D0928AE0049DF45 /* ENMBadgedBarButtonItem */,
146157
3E0BD5321D04B2FE006AEFB5 /* CWNotificationBanner */,
147158
);
148159
path = ThirdPartyHelpers;
@@ -317,8 +328,8 @@
317328
children = (
318329
3EF632981C75A9F300BBAB39 /* voiceIn */,
319330
3EF632971C75A9F300BBAB39 /* Products */,
320-
0FA8C80D807C2229142087E4 /* Pods */,
321-
473802FD94F1B3889FF7E351 /* Frameworks */,
331+
2BAF46835FA52E7792451822 /* Pods */,
332+
05AD98BD406AFF36C900EA7C /* Frameworks */,
322333
);
323334
sourceTree = "<group>";
324335
};
@@ -353,12 +364,13 @@
353364
path = voiceIn;
354365
sourceTree = "<group>";
355366
};
356-
473802FD94F1B3889FF7E351 /* Frameworks */ = {
367+
3EF89ECC1D0928AE0049DF45 /* ENMBadgedBarButtonItem */ = {
357368
isa = PBXGroup;
358369
children = (
359-
C37C519221C879C67F35059B /* Pods_voiceIn.framework */,
370+
3EF89ECD1D0928CD0049DF45 /* ENMBadgedBarButtonItem.swift */,
360371
);
361-
name = Frameworks;
372+
name = ENMBadgedBarButtonItem;
373+
path = CWNotificationBanner/ENMBadgedBarButtonItem;
362374
sourceTree = "<group>";
363375
};
364376
/* End PBXGroup section */
@@ -368,14 +380,14 @@
368380
isa = PBXNativeTarget;
369381
buildConfigurationList = 3EF632AB1C75A9F300BBAB39 /* Build configuration list for PBXNativeTarget "voiceIn" */;
370382
buildPhases = (
371-
9369F673959675090DB98948 /* 📦 Check Pods Manifest.lock */,
383+
40CA9D60B583A898B8D3D84A /* [CP] Check Pods Manifest.lock */,
372384
3EF632921C75A9F300BBAB39 /* Sources */,
373385
3EF632931C75A9F300BBAB39 /* Frameworks */,
374386
3EF632941C75A9F300BBAB39 /* Resources */,
375387
3E6BBE791CF558A8006D3CE9 /* ShellScript */,
376-
09FC7F628EB720F83C3ABD57 /* 📦 Embed Pods Frameworks */,
377-
41AEC25AD5DF994D641CC162 /* 📦 Copy Pods Resources */,
378-
81D10D9116D69CE8AC8638A4 /* Embed Pods Frameworks */,
388+
AF1DAA68D65EE8298361EE3C /* [CP] Embed Pods Frameworks */,
389+
0C9FF470F69434801D0DB0BF /* [CP] Copy Pods Resources */,
390+
65E81F70981918ECC00CE34C /* Embed Pods Frameworks */,
379391
);
380392
buildRules = (
381393
);
@@ -445,19 +457,19 @@
445457
/* End PBXResourcesBuildPhase section */
446458

447459
/* Begin PBXShellScriptBuildPhase section */
448-
09FC7F628EB720F83C3ABD57 /* 📦 Embed Pods Frameworks */ = {
460+
0C9FF470F69434801D0DB0BF /* [CP] Copy Pods Resources */ = {
449461
isa = PBXShellScriptBuildPhase;
450462
buildActionMask = 2147483647;
451463
files = (
452464
);
453465
inputPaths = (
454466
);
455-
name = "📦 Embed Pods Frameworks";
467+
name = "[CP] Copy Pods Resources";
456468
outputPaths = (
457469
);
458470
runOnlyForDeploymentPostprocessing = 0;
459471
shellPath = /bin/sh;
460-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-voiceIn/Pods-voiceIn-frameworks.sh\"\n";
472+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-voiceIn/Pods-voiceIn-resources.sh\"\n";
461473
showEnvVarsInLog = 0;
462474
};
463475
3E6BBE791CF558A8006D3CE9 /* ShellScript */ = {
@@ -473,22 +485,22 @@
473485
shellPath = /bin/sh;
474486
shellScript = "\"${PODS_ROOT}/Fabric/run\" dbfd20da22aa03dc0a58087776c7f7ddb33a9a82 96999449c59a263ebee86c867b368a74d4c6ec0aa56437d31ff24272c35bc9dc";
475487
};
476-
41AEC25AD5DF994D641CC162 /* 📦 Copy Pods Resources */ = {
488+
40CA9D60B583A898B8D3D84A /* [CP] Check Pods Manifest.lock */ = {
477489
isa = PBXShellScriptBuildPhase;
478490
buildActionMask = 2147483647;
479491
files = (
480492
);
481493
inputPaths = (
482494
);
483-
name = "📦 Copy Pods Resources";
495+
name = "[CP] Check Pods Manifest.lock";
484496
outputPaths = (
485497
);
486498
runOnlyForDeploymentPostprocessing = 0;
487499
shellPath = /bin/sh;
488-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-voiceIn/Pods-voiceIn-resources.sh\"\n";
500+
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
489501
showEnvVarsInLog = 0;
490502
};
491-
81D10D9116D69CE8AC8638A4 /* Embed Pods Frameworks */ = {
503+
65E81F70981918ECC00CE34C /* Embed Pods Frameworks */ = {
492504
isa = PBXShellScriptBuildPhase;
493505
buildActionMask = 2147483647;
494506
files = (
@@ -503,19 +515,19 @@
503515
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-voiceIn/Pods-voiceIn-frameworks.sh\"\n";
504516
showEnvVarsInLog = 0;
505517
};
506-
9369F673959675090DB98948 /* 📦 Check Pods Manifest.lock */ = {
518+
AF1DAA68D65EE8298361EE3C /* [CP] Embed Pods Frameworks */ = {
507519
isa = PBXShellScriptBuildPhase;
508520
buildActionMask = 2147483647;
509521
files = (
510522
);
511523
inputPaths = (
512524
);
513-
name = "📦 Check Pods Manifest.lock";
525+
name = "[CP] Embed Pods Frameworks";
514526
outputPaths = (
515527
);
516528
runOnlyForDeploymentPostprocessing = 0;
517529
shellPath = /bin/sh;
518-
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
530+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-voiceIn/Pods-voiceIn-frameworks.sh\"\n";
519531
showEnvVarsInLog = 0;
520532
};
521533
/* End PBXShellScriptBuildPhase section */
@@ -554,6 +566,7 @@
554566
3EAA592C1CB7A8100079A51D /* GroupMutipleSelectCell.swift in Sources */,
555567
3E98C0BD1C8C3E01001BB458 /* ContactTableCell.swift in Sources */,
556568
3EB2A6E11CBD3E9300C2D406 /* WalkThroughViewController.swift in Sources */,
569+
3EF89ECE1D0928CD0049DF45 /* ENMBadgedBarButtonItem.swift in Sources */,
557570
3EF6329A1C75A9F300BBAB39 /* AppDelegate.swift in Sources */,
558571
3E98C0D61C8C3E12001BB458 /* QRCodeReaderViewController.swift in Sources */,
559572
3EDDFB2E1CEA021D0093FB9A /* NSDate+VoiceIn.swift in Sources */,
@@ -685,7 +698,7 @@
685698
};
686699
3EF632AC1C75A9F300BBAB39 /* Debug */ = {
687700
isa = XCBuildConfiguration;
688-
baseConfigurationReference = 9C51EFE460B6A808B44697CE /* Pods-voiceIn.debug.xcconfig */;
701+
baseConfigurationReference = 221D37847EB2E6C4885BC627 /* Pods-voiceIn.debug.xcconfig */;
689702
buildSettings = {
690703
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
691704
CODE_SIGN_IDENTITY = "iPhone Distribution: YI JU LIAO (Y73V382M7G)";
@@ -703,7 +716,7 @@
703716
};
704717
3EF632AD1C75A9F300BBAB39 /* Release */ = {
705718
isa = XCBuildConfiguration;
706-
baseConfigurationReference = ACE3FB3F075A84D1E9DCF2C1 /* Pods-voiceIn.release.xcconfig */;
719+
baseConfigurationReference = B92B187EA76927709FF0DBCE /* Pods-voiceIn.release.xcconfig */;
707720
buildSettings = {
708721
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
709722
CODE_SIGN_IDENTITY = "iPhone Distribution: YI JU LIAO (Y73V382M7G)";

voiceIn/AppDelegate.swift

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,46 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
6666

6767
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) {
6868
print(userInfo)
69+
}
70+
71+
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {
72+
73+
var notiMessage: String = ""
74+
6975
if application.applicationState == UIApplicationState.Active {
7076
if let aps = userInfo["aps"] as? NSDictionary {
7177
if let alert = aps["alert"] as? NSDictionary {
72-
if let message = alert["message"] as? NSString {
73-
let message = Message(text: message as String, displayDuration: 6)
74-
NotificationBanner.showMessage(message)
78+
if let message = alert["message"] as? String {
79+
let theMessage = Message(text: message as String, displayDuration: 6)
80+
NotificationBanner.showMessage(theMessage)
81+
notiMessage = message
7582
}
76-
} else if let alert = aps["alert"] as? NSString {
83+
} else if let alert = aps["alert"] as? String {
7784
let message = Message(text: alert as String, displayDuration: 6)
7885
NotificationBanner.showMessage(message)
86+
87+
notiMessage = alert
88+
}
89+
}
90+
} else {
91+
if let aps = userInfo["aps"] as? NSDictionary {
92+
if let alert = aps["alert"] as? NSDictionary {
93+
if let message = alert["message"] as? String {
94+
notiMessage = message
95+
}
96+
} else if let alert = aps["alert"] as? String {
97+
notiMessage = alert
7998
}
8099
}
81-
82100
}
101+
102+
if notiMessage.containsString("請放心接聽") == true {
103+
UserPref().setUserPref("historyCount", value: "1").syncAll()
104+
} else {
105+
UserPref().setUserPref("notificationCount", value: "1").syncAll()
106+
}
107+
108+
completionHandler(UIBackgroundFetchResult.NoData)
83109
}
84110

85111
func applicationWillResignActive(application: UIApplication) {

voiceIn/Base.lproj/Main.storyboard

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,6 @@
135135
</connections>
136136
</tableView>
137137
<navigationItem key="navigationItem" title="聯絡簿" id="rCk-AD-PY7">
138-
<barButtonItem key="leftBarButtonItem" image="ic_inbox" id="6tr-c3-iHP">
139-
<connections>
140-
<segue destination="xSZ-hx-inN" kind="presentation" id="NPm-Vs-eVi"/>
141-
</connections>
142-
</barButtonItem>
143138
<rightBarButtonItems>
144139
<barButtonItem image="ic_person_add" id="TwL-dh-vTm">
145140
<connections>
@@ -164,6 +159,9 @@
164159
</fragment>
165160
</attributedString>
166161
</refreshControl>
162+
<connections>
163+
<segue destination="xSZ-hx-inN" kind="presentation" identifier="showNotificationSegue" id="AQ2-H0-rZV"/>
164+
</connections>
167165
</tableViewController>
168166
<placeholder placeholderIdentifier="IBFirstResponder" id="kVC-1w-bTU" userLabel="First Responder" sceneMemberID="firstResponder"/>
169167
</objects>
@@ -1790,7 +1788,6 @@
17901788
<image name="ic_face_white" width="24" height="24"/>
17911789
<image name="ic_favorite_white" width="24" height="24"/>
17921790
<image name="ic_history_white" width="24" height="24"/>
1793-
<image name="ic_inbox" width="24" height="24"/>
17941791
<image name="ic_people_white" width="24" height="24"/>
17951792
<image name="ic_person_add" width="24" height="24"/>
17961793
<image name="ic_phone_black" width="24" height="24"/>

0 commit comments

Comments
 (0)