forked from good-life/PushTalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
111 changed files
with
9,562 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
client-ios/PushTalk.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file added
BIN
+14.8 KB
...eproj/project.xcworkspace/xcuserdata/ryanliang.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
86 changes: 86 additions & 0 deletions
86
client-ios/PushTalk.xcodeproj/xcuserdata/ryanliang.xcuserdatad/xcschemes/PushTalk.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "0450" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "5A8EBADD168989D800797022" | ||
BuildableName = "PushTalk.app" | ||
BlueprintName = "PushTalk" | ||
ReferencedContainer = "container:PushTalk.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
buildConfiguration = "Debug"> | ||
<Testables> | ||
</Testables> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "5A8EBADD168989D800797022" | ||
BuildableName = "PushTalk.app" | ||
BlueprintName = "PushTalk" | ||
ReferencedContainer = "container:PushTalk.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</TestAction> | ||
<LaunchAction | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
buildConfiguration = "Debug" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
allowLocationSimulation = "YES"> | ||
<BuildableProductRunnable> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "5A8EBADD168989D800797022" | ||
BuildableName = "PushTalk.app" | ||
BlueprintName = "PushTalk" | ||
ReferencedContainer = "container:PushTalk.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
buildConfiguration = "Release" | ||
debugDocumentVersioning = "YES"> | ||
<BuildableProductRunnable> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "5A8EBADD168989D800797022" | ||
BuildableName = "PushTalk.app" | ||
BlueprintName = "PushTalk" | ||
ReferencedContainer = "container:PushTalk.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
22 changes: 22 additions & 0 deletions
22
...os/PushTalk.xcodeproj/xcuserdata/ryanliang.xcuserdatad/xcschemes/xcschememanagement.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>SchemeUserState</key> | ||
<dict> | ||
<key>PushTalk.xcscheme</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>0</integer> | ||
</dict> | ||
</dict> | ||
<key>SuppressBuildableAutocreation</key> | ||
<dict> | ||
<key>5A8EBADD168989D800797022</key> | ||
<dict> | ||
<key>primary</key> | ||
<true/> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// AppDelegate.h | ||
// JPushClient | ||
// | ||
// Created by LiDong on 12-10-30. | ||
// Copyright (c) 2012年 LiDong. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface AppDelegate : UIResponder <UIApplicationDelegate> { | ||
UIWindow *_window; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
// | ||
// AppDelegate.m | ||
// JPushClient | ||
// | ||
// Created by LiDong on 12-10-30. | ||
// Copyright (c) 2012年 LiDong. All rights reserved. | ||
// | ||
|
||
#import "AppDelegate.h" | ||
#import "APService.h" | ||
#import "JPushViewController.h" | ||
|
||
|
||
CGRect kScreenBounds; | ||
CGRect kStatusBarFrame; | ||
CGRect kNavigationBounds; | ||
CGFloat kVCWrapperOffsetY; | ||
CGRect kVCWrapperFrame; | ||
CGRect kVCWrapperBounds; | ||
CGRect kPageFrame; | ||
CGRect kPageBounds; | ||
|
||
UIColor *kClearColor; | ||
UIColor *kBlackColor; | ||
UIColor *kWhiteColor; | ||
UIColor *kThemeColor; | ||
UIColor *kNavigationColor; | ||
|
||
|
||
@implementation AppDelegate | ||
|
||
- (void)dealloc { | ||
[_window release]; | ||
|
||
RELEASE_SAFELY(kClearColor); | ||
RELEASE_SAFELY(kBlackColor); | ||
RELEASE_SAFELY(kWhiteColor); | ||
RELEASE_SAFELY(kThemeColor); | ||
RELEASE_SAFELY(kNavigationColor); | ||
|
||
[super dealloc]; | ||
} | ||
|
||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | ||
APLogTrace(); | ||
kScreenBounds = [[UIScreen mainScreen] bounds]; | ||
kStatusBarFrame = [[UIApplication sharedApplication] statusBarFrame]; | ||
kNavigationBounds = CGRectMake(0, 0, kScreenBounds.size.width, 44); | ||
kVCWrapperOffsetY = kStatusBarFrame.origin.y + kStatusBarFrame.size.height; | ||
kVCWrapperFrame = CGRectMake(0, kVCWrapperOffsetY, kScreenWidth, kScreenHeight - kVCWrapperOffsetY); | ||
kVCWrapperBounds = CGRectMake(0, 0, kScreenBounds.size.width, kVCWrapperFrame.size.height); | ||
kPageFrame = CGRectMake(0, kVCWrapperOffsetY + kNavigationBarHeight, kScreenWidth, kVCWrapperFrame.size.height - kNavigationBarHeight); | ||
kPageBounds = CGRectMake(0, 0, kPageFrame.size.width, kPageFrame.size.height); | ||
|
||
kClearColor = [[UIColor clearColor] retain]; | ||
kBlackColor = [[UIColor blackColor] retain]; | ||
kWhiteColor = [[UIColor whiteColor] retain]; | ||
kThemeColor = [[UIColor alloc] initWithRed:244.f/255.f green:240.f/255.f blue:231.f/255.f alpha:1]; | ||
kNavigationColor = [[UIColor alloc] initWithRed:0.75 green:0.45 blue:0.35 alpha:1]; | ||
|
||
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | ||
[_window setBackgroundColor:[UIColor whiteColor]]; | ||
|
||
JPushViewController *viewController = [[JPushViewController alloc] init]; | ||
|
||
UINavigationController *navigationController = [[[UINavigationController alloc] initWithRootViewController:viewController] autorelease]; | ||
|
||
[_window setRootViewController:navigationController]; | ||
[_window makeKeyAndVisible]; | ||
|
||
[viewController release]; | ||
|
||
[APService registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | | ||
UIRemoteNotificationTypeSound | | ||
UIRemoteNotificationTypeAlert)]; | ||
[APService setupWithOption:launchOptions]; | ||
|
||
return YES; | ||
} | ||
|
||
- (void)applicationWillResignActive:(UIApplication *)application { | ||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. | ||
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. | ||
} | ||
|
||
- (void)applicationDidEnterBackground:(UIApplication *)application { | ||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. | ||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. | ||
} | ||
|
||
- (void)applicationWillEnterForeground:(UIApplication *)application { | ||
[application setApplicationIconBadgeNumber:0]; | ||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. | ||
} | ||
|
||
- (void)applicationDidBecomeActive:(UIApplication *)application { | ||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. | ||
} | ||
|
||
- (void)applicationWillTerminate:(UIApplication *)application { | ||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. | ||
} | ||
|
||
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { | ||
[APService registerDeviceToken:deviceToken]; | ||
} | ||
|
||
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *) error { | ||
NSLog(@"did Fail To Register For Remote Notifications With Error: %@", error); | ||
} | ||
|
||
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { | ||
[application setApplicationIconBadgeNumber:0]; | ||
[APService handleRemoteNotification:userInfo]; | ||
} | ||
|
||
@end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>APP_KEY</key> | ||
<string>7d431e42dfa6a6d693ac2d04</string> | ||
<key>CHANNEL</key> | ||
<string>Subscription</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>${PRODUCT_NAME}</string> | ||
<key>CFBundleExecutable</key> | ||
<string>${EXECUTABLE_NAME}</string> | ||
<key>CFBundleIconFile</key> | ||
<string>Icon.png</string> | ||
<key>CFBundleIconFiles</key> | ||
<array> | ||
<string>Icon.png</string> | ||
<string>[email protected]</string> | ||
</array> | ||
<key>CFBundleIcons</key> | ||
<dict> | ||
<key>CFBundlePrimaryIcon</key> | ||
<dict> | ||
<key>CFBundleIconFiles</key> | ||
<array> | ||
<string>Icon.png</string> | ||
<string>[email protected]</string> | ||
</array> | ||
<key>UIPrerenderedIcon</key> | ||
<true/> | ||
</dict> | ||
</dict> | ||
<key>CFBundleIdentifier</key> | ||
<string>cn.jpush.android.subscribepush</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>${PRODUCT_NAME}</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0</string> | ||
<key>LSRequiresIPhoneOS</key> | ||
<true/> | ||
<key>UIPrerenderedIcon</key> | ||
<true/> | ||
<key>UIRequiredDeviceCapabilities</key> | ||
<array> | ||
<string>armv7</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
</array> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// | ||
// Prefix header for all source files of the 'JPushClient' target in the 'JPushClient' project | ||
// | ||
|
||
#import <Availability.h> | ||
|
||
#ifndef __IPHONE_3_0 | ||
#warning "This project uses features only available in iOS SDK 3.0 and later." | ||
#endif | ||
|
||
#ifdef __OBJC__ | ||
#import <UIKit/UIKit.h> | ||
#import <Foundation/Foundation.h> | ||
#import "APConfig.h" | ||
#import "APUtilities.h" | ||
#endif | ||
|
||
|
||
#pragma mark - | ||
|
||
#define kNavigationBarHeight 44 | ||
#define kTabBarHeight 49 | ||
#define kScreenWidth kScreenBounds.size.width | ||
#define kScreenHeight kScreenBounds.size.height | ||
#define kDefaultKeyboardHeight 216 | ||
|
||
extern CGRect kScreenBounds; | ||
extern CGRect kNavigationBounds; | ||
extern CGRect kStatusBarFrame; | ||
extern CGFloat kVCWrapperOffsetY; | ||
extern CGRect kVCWrapperFrame; | ||
extern CGRect kVCWrapperBounds; | ||
extern CGRect kPageFrame; | ||
extern CGRect kPageBounds; | ||
|
||
extern UIColor *kClearColor; | ||
extern UIColor *kBlackColor; | ||
extern UIColor *kWhiteColor; | ||
extern UIColor *kThemeColor; | ||
extern UIColor *kNavigationColor; | ||
|
||
#pragma mark - | ||
|
||
enum { | ||
kEditingStateNone, | ||
kEditingStateKeyboard, | ||
kEditingStateFace | ||
}; | ||
|
||
#pragma mark - | ||
|
||
#define UIViewAutoresizingFlexibleHorizontalMargin (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin) | ||
#define UIViewAutoresizingFlexibleVerticalMargin (UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin) | ||
#define UIViewAutoresizingFlexibleAllMargin (UIViewAutoresizingFlexibleHorizontalMargin | UIViewAutoresizingFlexibleVerticalMargin) | ||
#define UIViewAutoresizingFlexibleSize (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight) | ||
|
||
#pragma mark - |
Oops, something went wrong.