Skip to content

Commit

Permalink
update pushSDK
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanqiang committed Jan 10, 2013
1 parent dd1881e commit 2cf3531
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 22 deletions.
4 changes: 2 additions & 2 deletions client-ios/PushTalk.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"-ObjC",
Expand All @@ -435,7 +435,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
OTHER_LDFLAGS = (
"-ObjC",
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,4 @@
<Bucket
type = "1"
version = "1.0">
<FileBreakpoints>
<FileBreakpoint
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "PushTalk/UI/JPushViewController.m"
timestampString = "378116122.105812"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "48"
endingLineNumber = "48"
landmarkName = "-loadWebView"
landmarkType = "5">
</FileBreakpoint>
</FileBreakpoints>
</Bucket>
10 changes: 7 additions & 3 deletions client-ios/UI/JPushViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ - (void)networkDidLogin:(NSNotification *)notification {
- (void)networkDidReceiveMessage:(NSNotification *)notification {
APLog(@"%s", __PRETTY_FUNCTION__);

NSDictionary *message = [[notification userInfo] valueForKey:@"message"];
NSDictionary *message = [notification userInfo];
NSMutableDictionary *receiveDic = [[NSMutableDictionary alloc] initWithCapacity:4];
NSString *title = [message valueForKey:@"title"];
NSString *content = [message valueForKey:@"content"];
Expand All @@ -183,13 +183,15 @@ - (void)networkDidReceiveMessage:(NSNotification *)notification {
[receiveDic setValue:extrasDic forKey:@"extras"];

NSString *msg = [receiveDic JSONRepresentation];

[_webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"receivedMessage('%@');",msg]];
[receiveDic release];
}


- (void)resetAliasAndTags {
NSLog(@"resetAliasAndTags");
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

NSString *URLString = [NSString stringWithFormat:@"%@%@", HTTP_URL_PREFIX, @"api/user"];
URLString = [URLString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

Expand All @@ -215,9 +217,11 @@ - (void)resetAliasAndTags {
NSDictionary *dic = [receiveString JSONValue];
NSString *username = [dic objectForKey:@"username"];
NSArray *channels = [dic objectForKey:@"channels"];

[APService setTags:[NSSet setWithArray:channels] alias:username];
}

[pool drain];
}

@end
Empty file modified client-ios/lib/APClient.h
100644 → 100755
Empty file.
Empty file modified client-ios/lib/APConfig.h
100644 → 100755
Empty file.
Empty file modified client-ios/lib/APDispatch.h
100644 → 100755
Empty file.
Empty file modified client-ios/lib/APMessage.h
100644 → 100755
Empty file.
Empty file modified client-ios/lib/APProtocol.h
100644 → 100755
Empty file.
Empty file modified client-ios/lib/APReceipt.h
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions client-ios/lib/APService.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#import <Foundation/Foundation.h>


// 以下几个通知类型,只是为方便开发者测试,可以直接忽略不用
extern NSString * const kAPNetworkDidSetupNotification; // 建立连接
extern NSString * const kAPNetworkDidCloseNotification; // 关闭连接
extern NSString * const kAPNetworkDidRegisterNotification; // 注册成功
Expand All @@ -26,7 +25,7 @@ extern NSString * const kAPNetworkDidReceiveMessageNotification; // 收到消息
+ (void)handleRemoteNotification:(NSDictionary *)remoteInfo; // 处理收到的APNS消息,向服务器上报收到APNS消息

// 下面的接口是可选的
+ (void)setTags:(NSSet *)tags alias:(NSString *)alias; // 设置标签和别名(若参数为nil,则忽略;若是空对象,则清空)
+ (void)setTags:(NSSet *)tags alias:(NSString *)alias; // 设置标签和别名(若参数为nil,则忽略;若是空对象,则清空;详情请参考文档:http://docs.jpush.cn/pages/viewpage.action?pageId=557241
+ (NSString *)openUDID; // UDID

@end
Empty file modified client-ios/lib/APUtilities.h
100644 → 100755
Empty file.
Empty file modified client-ios/lib/NSString+Digest.h
100644 → 100755
Empty file.
Binary file modified client-ios/lib/libPushSDK-Simulator.a
Binary file not shown.
Binary file modified client-ios/lib/libPushSDK.a
Binary file not shown.

0 comments on commit 2cf3531

Please sign in to comment.