Skip to content

Commit ae9a23f

Browse files
committed
推送的bug
1 parent 27f4e3a commit ae9a23f

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

Coding_iOS/AppDelegate.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ - (void)completionStartAnimationWithOptions:(NSDictionary *)launchOptions{
8383
if ([Login isLogin]) {
8484
NSDictionary *remoteNotification = [launchOptions valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
8585
if (remoteNotification) {
86-
NSDictionary *apsInfo = [remoteNotification objectForKey:@"aps"];
87-
[BaseViewController handleNotificationInfo:apsInfo];
86+
[BaseViewController handleNotificationInfo:remoteNotification];
8887
}
8988
}
9089

@@ -164,7 +163,7 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N
164163
//If the application state was inactive, this means the user pressed an action button
165164
// from a notification.
166165
[XGPush handleReceiveNotification:userInfo];
167-
166+
168167
[BaseViewController handleNotificationInfo:userInfo];
169168
}else if ([application applicationState] == UIApplicationStateActive){
170169
// kTipAlert(@"UIApplicationStateActive");

Coding_iOS/Coding_iOS-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>
24-
<string>2.0.1.2015011517</string>
24+
<string>2.0.1.2015011612</string>
2525
<key>LSRequiresIPhoneOS</key>
2626
<true/>
2727
<key>UIFileSharingEnabled</key>

Coding_iOS/Controllers/RootControllers/BaseViewController.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ + (UIViewController *)analyseVCFromLinkStr:(NSString *)linkStr{
132132
}
133133
}
134134
+ (void)presentLinkStr:(NSString *)linkStr{
135+
if (!linkStr || linkStr.length == 0) {
136+
return;
137+
}
135138
UIViewController *vc = [self analyseVCFromLinkStr:linkStr];
136139
if (vc) {
137140
[self presentViewController:vc];

Coding_iOS/Controllers/WebViewController.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ + (instancetype)webVCWithUrlStr:(NSString *)curUrlStr{
6868

6969
#pragma M UI
7070
- (void)configLeftBarButtonItems{
71+
//推送过来的
72+
if (self.navigationItem.leftBarButtonItems.count == 1 && [self.navigationItem.leftBarButtonItem.title isEqualToString:@"关闭"]) {
73+
return;
74+
}
75+
76+
//正常push进来的
7177
NSInteger preCount = self.navigationItem.leftBarButtonItems.count;
7278
NSInteger curCount = self.myWebView.canGoBack? 3 : 2;
7379
if (preCount != curCount) {

0 commit comments

Comments
 (0)