Skip to content

Commit

Permalink
upload the ios porject file
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanqiang committed Dec 25, 2012
1 parent 853a3d9 commit a3f53b2
Show file tree
Hide file tree
Showing 111 changed files with 9,562 additions and 0 deletions.
485 changes: 485 additions & 0 deletions client-ios/PushTalk.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
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>
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>
15 changes: 15 additions & 0 deletions client-ios/PushTalk/AppDelegate.h
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
117 changes: 117 additions & 0 deletions client-ios/PushTalk/AppDelegate.m
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
Binary file added client-ios/PushTalk/Images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-ios/PushTalk/Images/Default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-ios/PushTalk/Images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-ios/PushTalk/Images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions client-ios/PushTalk/PushConfig.plist
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>
58 changes: 58 additions & 0 deletions client-ios/PushTalk/PushTalk-Info.plist
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>
57 changes: 57 additions & 0 deletions client-ios/PushTalk/PushTalk-Prefix.pch
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 -
Loading

0 comments on commit a3f53b2

Please sign in to comment.