Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

ios/Pandora.xcodeproj/project.xcworkspace/contents.xcworkspacedata

ios/Pandora.xcodeproj/project.xcworkspace/xcshareddata/Pandora.xccheckout

ios/Pandora.xcodeproj/project.xcworkspace/xcshareddata/PandoraDev.xccheckout

ios/Pandora.xcodeproj/project.xcworkspace/xcuserdata/x.xcuserdatad/UserInterfaceState.xcuserstate

ios/Pandora.xcodeproj/project.xcworkspace/xcuserdata/x.xcuserdatad/WorkspaceSettings.xcsettings

ios/Pandora.xcodeproj/xcuserdata/x.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

ios/Pandora.xcodeproj/xcuserdata/x.xcuserdatad/xcschemes/PandoraDev.xcscheme

ios/Pandora.xcodeproj/xcuserdata/x.xcuserdatad/xcschemes/xcschememanagement.plist
814 changes: 814 additions & 0 deletions ios/Pandora.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions ios/Pandora/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// AppDelegate.h
// Pandora
//
// Created by Mac Pro_C on 12-12-26.
// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@class PDRCore;

#ifdef PDR_PLUS_MAP
#import "BMKMapManager.h"
#import "BMKGeneralDelegate.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate, BMKGeneralDelegate>{
BMKMapManager *_mapManager;
#else
@interface AppDelegate : UIResponder <UIApplicationDelegate>{
#endif
}
@property (strong, nonatomic) UIWindow *window;
@end
161 changes: 161 additions & 0 deletions ios/Pandora/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
//
// AppDelegate.m
// Pandora
//
// Created by Mac Pro_C on 12-12-26.
// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "AppDelegate.h"
#import "PDRCore.h"
#import "PDRCommonString.h"

@implementation AppDelegate

@synthesize window = _window;

#pragma mark -
#pragma mark app lifecycle

#ifdef PDR_PLUS_MAP
/**
*返回网络错误
*@param iError 错误号
*/
- (void)onGetNetworkState:(int)iError{

}

/**
*返回授权验证错误
*@param iError 错误号 : BMKErrorPermissionCheckFailure 验证失败
*/
- (void)onGetPermissionState:(int)iError {
if ( E_PERMISSION_OK != iError ) {
NSLog(@"baidu maponGetPermissionState--[%d]", iError);
}
}
#endif

/*
* @Summary:程序启动时收到push消息
*/
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[PDRCore Instance].launchOptions = launchOptions;
[[PDRCore Instance] load];
NSDictionary *infoPlist = nil;
#ifdef PDR_PLUS_MAP
// 启动百度地图
NSString *baiduAppKey = @"mRFUA0lOYyCGXOcFkZ4cP44K";
if ( !infoPlist ) {
infoPlist = [[NSBundle mainBundle] infoDictionary];
}
NSDictionary *baiduInfo = [infoPlist objectForKey:@"baidu"];
if ( [baiduInfo isKindOfClass:[NSDictionary class]] ) {
NSString *tempAK = [baiduInfo objectForKey:@"appkey"];
if ( [baiduAppKey isKindOfClass:[NSString class]] ) {
baiduAppKey = tempAK;
}
}
_mapManager = [[BMKMapManager alloc]init];
[_mapManager start:baiduAppKey generalDelegate:self];
#endif
return YES;
}

- (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)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
{
[[PDRCore Instance] handleSysEvent:PDRCoreSysEventEnterBackground withObject:nil];
// 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
{
[[PDRCore Instance] handleSysEvent:PDRCoreSysEventEnterForeGround withObject:nil];
// 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)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
[[PDRCore Instance] unLoad];
}

#pragma mark -
#pragma mark URL

- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
[self application:application handleOpenURL:url];
return YES;
}

/*
* @Summary:程序被第三方调用,传入参数启动
*
*/
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
[[PDRCore Instance] handleSysEvent:PDRCoreSysEventOpenURL withObject:url];
return YES;
}


#pragma mark -
#pragma mark APNS
/*
* @Summary:远程push注册成功收到DeviceToken回调
*
*/
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[[PDRCore Instance] handleSysEvent:PDRCoreSysEventRevDeviceToken withObject:deviceToken];
}

/*
* @Summary: 远程push注册失败
*/
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
[[PDRCore Instance] handleSysEvent:PDRCoreSysEventRegRemoteNotificationsError withObject:error];
}

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
[[PDRCore Instance] handleSysEvent:PDRCoreSysEventRevRemoteNotification withObject:userInfo];
}

/*
* @Summary:程序收到本地消息
*/
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
[[PDRCore Instance] handleSysEvent:PDRCoreSysEventRevLocalNotification withObject:notification];
}

- (void)dealloc
{
#ifdef PDR_PLUS_MAP
[_mapManager stop];
[_mapManager release];
_mapManager = nil;
#endif
[super dealloc];
}

@end
186 changes: 186 additions & 0 deletions ios/Pandora/Pandora-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
<?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>zh_CN</string>
<key>CFBundleDisplayName</key>
<string>HBuilder</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>80</string>
<string>58</string>
<string>29</string>
<string>120</string>
<string>114</string>
<string>57</string>
<string>87</string>
<string>180</string>
</array>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>50</string>
<string>100</string>
<string>40</string>
<string>80</string>
<string>29</string>
<string>58</string>
<string>144</string>
<string>152</string>
<string>76</string>
<string>72</string>
</array>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>io.dcloud.T</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>0.12.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>io.dcloud.HBuilder</string>
<key>CFBundleURLSchemes</key>
<array>
<string>hbuilder</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>125</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>StatusBarBackground</key>
<string>#FFFFFF</string>
<key>UILaunchImages</key>
<array>
<dict>
<key>UILaunchImageSize</key>
<string>{414, 736}</string>
<key>UILaunchImageName</key>
<string>Default-Landscape-736h</string>
<key>UILaunchImageMinimumOSVersion</key>
<string>8.0</string>
<key>UILaunchImageOrientation</key>
<string>Landscape</string>
</dict>
<dict>
<key>UILaunchImageSize</key>
<string>{414, 736}</string>
<key>UILaunchImageName</key>
<string>Default-736h</string>
<key>UILaunchImageMinimumOSVersion</key>
<string>8.0</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
</dict>
<dict>
<key>UILaunchImageSize</key>
<string>{375, 667}</string>
<key>UILaunchImageName</key>
<string>Default-667h</string>
<key>UILaunchImageMinimumOSVersion</key>
<string>8.0</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
</dict>
<dict>
<key>UILaunchImageSize</key>
<string>{320, 480}</string>
<key>UILaunchImageName</key>
<string>Default</string>
<key>UILaunchImageMinimumOSVersion</key>
<string>7.0</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
</dict>
<dict>
<key>UILaunchImageSize</key>
<string>{320, 568}</string>
<key>UILaunchImageName</key>
<string>Default-568h</string>
<key>UILaunchImageMinimumOSVersion</key>
<string>7.0</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
</dict>
</array>
<key>UILaunchImages~ipad</key>
<array>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>7.0</string>
<key>UILaunchImageName</key>
<string>Default-Landscape7</string>
<key>UILaunchImageOrientation</key>
<string>Landscape</string>
<key>UILaunchImageSize</key>
<string>{768, 1024}</string>
</dict>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>7.0</string>
<key>UILaunchImageName</key>
<string>Default-Portrait7</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{768, 1024}</string>
</dict>
</array>
<key>UIMainStoryboardFile</key>
<string>MainStoryboard_iPhone</string>
<key>UIMainStoryboardFile~ipad</key>
<string>MainStoryboard_iPad</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
<string>gamekit</string>
</array>
<key>UIStatusBarHidden</key>
<false/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleDefault</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
</dict>
</plist>
Loading