Commit 22d1c9c5 authored by freecui's avatar freecui

极光配置

parent cbc3d2f0
......@@ -10,4 +10,5 @@ pod 'Base64nl', '~> 1.2'
pod 'Reveal-iOS-SDK', '~> 1.5.1'
pod 'BaiduMapAPI', '~> 2.7.0'
pod 'MJRefresh', '~> 2.2.0'
pod 'IQKeyboardManager', '~> 3.2.3'
\ No newline at end of file
pod 'IQKeyboardManager', '~> 3.2.3'
pod 'JPushSDK', '~> 1.8.2'
\ No newline at end of file
......@@ -67,6 +67,7 @@
358432F71B998ED2007E73ED /* GXFProductUnit.m in Sources */ = {isa = PBXBuildFile; fileRef = 358432F61B998ED2007E73ED /* GXFProductUnit.m */; };
35A1C3551B8EFBBF004AC9F7 /* PermissionJson in Resources */ = {isa = PBXBuildFile; fileRef = 35A1C3541B8EFBBF004AC9F7 /* PermissionJson */; };
35A1C3581B8F09D2004AC9F7 /* GXFFunctionDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A1C3571B8F09D2004AC9F7 /* GXFFunctionDB.m */; };
35ADF29D1BDE62BA00E2A7E4 /* PushConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = 35ADF29C1BDE62BA00E2A7E4 /* PushConfig.plist */; };
35B448DF1B9B0A73001209E2 /* ProductBillCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 35B448DE1B9B0A73001209E2 /* ProductBillCell.m */; };
35B9B40E1B8FFB59009851CC /* GXFFunctionDBHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 35B9B40D1B8FFB59009851CC /* GXFFunctionDBHelper.m */; };
35C3C0AC1AE956040035AC8A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35C3C0AB1AE956040035AC8A /* Security.framework */; };
......@@ -558,6 +559,7 @@
35A1C3541B8EFBBF004AC9F7 /* PermissionJson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PermissionJson; sourceTree = "<group>"; };
35A1C3561B8F09D2004AC9F7 /* GXFFunctionDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFFunctionDB.h; sourceTree = "<group>"; };
35A1C3571B8F09D2004AC9F7 /* GXFFunctionDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFFunctionDB.m; sourceTree = "<group>"; };
35ADF29C1BDE62BA00E2A7E4 /* PushConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = PushConfig.plist; sourceTree = "<group>"; };
35B448DD1B9B0A73001209E2 /* ProductBillCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductBillCell.h; sourceTree = "<group>"; };
35B448DE1B9B0A73001209E2 /* ProductBillCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductBillCell.m; sourceTree = "<group>"; };
35B9B40C1B8FFB59009851CC /* GXFFunctionDBHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFFunctionDBHelper.h; sourceTree = "<group>"; };
......@@ -2372,6 +2374,7 @@
C1F696081AB870B400F9F5DD /* main.m */,
C15918571AC068110013B391 /* XFFruit-Prefix.pch */,
C1E0930D1AC8FC94003B7126 /* Localizable.strings */,
35ADF29C1BDE62BA00E2A7E4 /* PushConfig.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
......@@ -2551,6 +2554,11 @@
C1F696021AB870B400F9F5DD = {
CreatedOnToolsVersion = 6.2;
DevelopmentTeam = W54V2VB863;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 1;
};
};
};
C1F6961B1AB870B400F9F5DD = {
CreatedOnToolsVersion = 6.2;
......@@ -2594,6 +2602,7 @@
C123A9191B25CBAD003C0C36 /* selected_star@2x.png in Resources */,
7217E9EF1B72364300FE5C1D /* maskEnable.png in Resources */,
7217E9F61B724A7600FE5C1D /* mask.png in Resources */,
35ADF29D1BDE62BA00E2A7E4 /* PushConfig.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -3197,8 +3206,9 @@
baseConfigurationReference = 1B0B22845F5CD40B5CF655F2 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Developer: Fanfan Cui (7S27LB84E2)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Fanfan Cui (7S27LB84E2)";
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch";
INFOPLIST_FILE = XFFruit/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
......@@ -3206,9 +3216,10 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
"$(PROJECT_DIR)/XFFruit/Vendors/JiGuang/lib",
);
PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "5f40eb8c-7628-4615-bffc-1e4d56ebb56f";
PROVISIONING_PROFILE = "1b29260f-2cce-4fae-ad9b-bdd1e1652dcf";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
name = Debug;
......@@ -3218,8 +3229,9 @@
baseConfigurationReference = 7DDFB1D460448C3B45118195 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd (2G3393EZPN)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch";
INFOPLIST_FILE = XFFruit/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
......@@ -3227,9 +3239,10 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
"$(PROJECT_DIR)/XFFruit/Vendors/JiGuang/lib",
);
PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "5f40eb8c-7628-4615-bffc-1e4d56ebb56f";
PROVISIONING_PROFILE = "1b29260f-2cce-4fae-ad9b-bdd1e1652dcf";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
name = Release;
......
......@@ -10,7 +10,7 @@
#import "ICRAppViewControllerManager.h"
#import "ICRURLProtocol.h"
#import "BMKMapManager.h"
#import "APService.h"
@interface ICRAppDelegate ()
@property (strong, nonatomic) BMKMapManager *mapManager;
......@@ -28,6 +28,35 @@
[NSURLProtocol registerClass:[ICRURLProtocol class]];
NSString * path = [NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES) lastObject];
CLog(@"%@",path);
// Required
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_7_1
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
//categories
[APService
registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge |
UIUserNotificationTypeSound |
UIUserNotificationTypeAlert)
categories:nil];
} else {
//categories nil
[APService
registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)
#else
//categories nil
categories:nil];
[APService
registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)
#endif
// Required
categories:nil];
}
[APService setupWithOption:launchOptions];
[self setupBMKMapMgr];
_m_appViewControllerMgr = [ICRAppViewControllerManager getAppViewControllerManager];
......@@ -104,6 +133,25 @@ clickedButtonAtIndex:(NSInteger)buttonIndex {
- (void)applicationWillEnterForeground:(UIApplication *)application {
// 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.
[application setApplicationIconBadgeNumber:0];
[application cancelAllLocalNotifications];
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
CLog (@"%@", [NSString stringWithFormat:@"Device Token: %@", deviceToken]);
[APService registerDeviceToken:deviceToken];
}
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo {
// Required
[APService handleRemoteNotification:userInfo];
}
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void(^)(UIBackgroundFetchResult))completionHandler {
// IOS 7 Support Required
[APService handleRemoteNotification:userInfo];
completionHandler(UIBackgroundFetchResultNewData);
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
......
......@@ -311,7 +311,7 @@
continue;
}
}
}
return muArr;
......
......@@ -20,8 +20,17 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
......
<?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>APS_FOR_PRODUCTION</key>
<string>1</string>
<key>APP_KEY</key>
<string>fff3aa690885884dda20f7fb</string>
<key>CHANNEL</key>
<string></string>
</dict>
</plist>
......@@ -11,6 +11,7 @@
#import "GXFFunctionDB.h"
#import "GXFFunctionDBHelper.h"
#import "APService.h"
#define LOGIN_CONTAINER_LEFT_MARGIN (20)
#define LOGIN_CONTAINER_HEIGHT (450)
......@@ -176,6 +177,12 @@
}
//极光别名
NSSet *setTags = [NSSet setWithArray:@[@""]];
[APService setTags:setTags
alias:@""
callbackSelector:nil object:nil];
};
void(^fail)(id) = ^(id data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment