Commit 73a63bf1 authored by Steven杜宇's avatar Steven杜宇

// JPush

parent 817b7fc5
......@@ -623,6 +623,7 @@
04A7BD162BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentsDetailViewModel.swift; sourceTree = "<group>"; };
04A7BD182BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentsUrlModel.swift; sourceTree = "<group>"; };
04AA19FC2BB40D5C00C1CBBD /* Applegate(JPush).swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Applegate(JPush).swift"; sourceTree = "<group>"; };
04AA19FE2BB5198100C1CBBD /* galaxyDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = galaxyDebug.entitlements; sourceTree = "<group>"; };
04AF58C32B4FC51C0066011A /* YHLocalizable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLocalizable.swift; sourceTree = "<group>"; };
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; };
04C693632B723B56004C1758 /* YHMySettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingCell.swift; sourceTree = "<group>"; };
......@@ -1646,6 +1647,7 @@
A5573ED02B317BFF00D98EC0 /* galaxy */ = {
isa = PBXGroup;
children = (
04AA19FE2BB5198100C1CBBD /* galaxyDebug.entitlements */,
A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */,
04AA19FC2BB40D5C00C1CBBD /* Applegate(JPush).swift */,
A51044172B493675006B60BB /* README.md */,
......@@ -2883,6 +2885,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
......
......@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// JPush服务注册
registerJPushService()
registerJPushService(launchOptions)
//全局导航栏、返回事件/手势
setupNavBar()
......
......@@ -11,7 +11,7 @@ import UIKit
extension AppDelegate: JPUSHRegisterDelegate {
// 注册JPush服务
func registerJPushService() {
func registerJPushService(_ launchOptions: [UIApplication.LaunchOptionsKey: Any]?) {
let entity: JPUSHRegisterEntity = JPUSHRegisterEntity()
entity.types = Int(JPAuthorizationOptions.alert.rawValue |
......@@ -19,6 +19,21 @@ extension AppDelegate: JPUSHRegisterDelegate {
JPAuthorizationOptions.sound.rawValue |
JPAuthorizationOptions.providesAppNotificationSettings.rawValue)
JPUSHService.register(forRemoteNotificationConfig: entity, delegate: self)
// Required
// init Push
// notice: 2.1.5 版本的 SDK 新增的注册方法,改成可上报 IDFA,如果没有使用 IDFA 直接传 nil
//初始化极光推送服务,调用了本 API 后,开启 JPush 推送服务,将会开始收集上报 SDK 业务功能所必要的用户个人信息
// [JPUSHService setupWithOption:launchOptions appKey:appKey
// channel:channel
// apsForProduction:isProduction
// advertisingIdentifier:advertisingId];
let isProduction = false
JPUSHService.setup(withOption:launchOptions,
appKey:"c6a9e10575b85ee90f3e8afe",
channel:"",
apsForProduction: isProduction)
}
//系统获取Token
......
<?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-environment</key>
<string>development</string>
</dict>
</plist>
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