Commit 6f0cb075 authored by xiejb's avatar xiejb

初始化添加代码

parent 0972ee66

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "icon-1024.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:MobilePortal.xcodeproj">
</FileRef>
</Workspace>
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "179EF445231E651D0085BCDB"
BuildableName = "MobilePortal.app"
BlueprintName = "MobilePortal"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "179EF459231E651F0085BCDB"
BuildableName = "MobilePortalTests.xctest"
BlueprintName = "MobilePortalTests"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "179EF464231E651F0085BCDB"
BuildableName = "MobilePortalUITests.xctest"
BlueprintName = "MobilePortalUITests"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "179EF445231E651D0085BCDB"
BuildableName = "MobilePortal.app"
BlueprintName = "MobilePortal"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "179EF445231E651D0085BCDB"
BuildableName = "MobilePortal.app"
BlueprintName = "MobilePortal"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "179EF445231E651D0085BCDB"
BuildableName = "MobilePortal.app"
BlueprintName = "MobilePortal"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?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>MobilePortal.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>ServiceExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>24</integer>
</dict>
</dict>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1733EF9222360D1900D5D1C7"
BuildableName = "MobilePortal.app"
BlueprintName = "MobilePortal"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1733EFA622360D1A00D5D1C7"
BuildableName = "MobilePortalTests.xctest"
BlueprintName = "MobilePortalTests"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1733EFB122360D1A00D5D1C7"
BuildableName = "MobilePortalUITests.xctest"
BlueprintName = "MobilePortalUITests"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1733EF9222360D1900D5D1C7"
BuildableName = "MobilePortal.app"
BlueprintName = "MobilePortal"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1733EF9222360D1900D5D1C7"
BuildableName = "MobilePortal.app"
BlueprintName = "MobilePortal"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1733EF9222360D1900D5D1C7"
BuildableName = "MobilePortal.app"
BlueprintName = "MobilePortal"
ReferencedContainer = "container:MobilePortal.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?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>MobilePortal.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>17</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>179EF445231E651D0085BCDB</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>179EF459231E651F0085BCDB</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>179EF464231E651F0085BCDB</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:MobilePortal.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?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>PreviewsEnabled</key>
<false/>
</dict>
</plist>
<?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>BuildLocationStyle</key>
<string>UseAppPreferences</string>
<key>CustomBuildLocationType</key>
<string>RelativeToDerivedData</string>
<key>DerivedDataLocationStyle</key>
<string>Default</string>
<key>IssueFilterStyle</key>
<string>ShowActiveSchemeOnly</string>
<key>LiveSourceIssuesEnabled</key>
<true/>
<key>ShowSharedSchemesAutomaticallyEnabled</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "MobilePortal/Base/BaseViewController.swift"
timestampString = "600860931.525996"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "230"
endingLineNumber = "230"
landmarkName = "unknown"
landmarkType = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "MobilePortal/HttpNew/MyApplicationList/MyApplicationListHttpCmd+Response.m"
timestampString = "598358500.903219"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "155"
endingLineNumber = "155"
landmarkName = "-setScopeArray:AndScoprHttpList:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "MobilePortal/AppDelegate+http.swift"
timestampString = "601120810.6736881"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "131"
endingLineNumber = "131"
landmarkName = "httpDeviceInformationHttpResultResponse(result:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "MobilePortal/AppDelegate+http.swift"
timestampString = "601120810.696234"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "112"
endingLineNumber = "112"
landmarkName = "getDeviceInformationHttpCmd()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "MobilePortal/VC/Advisory/AdvisoryViewController+http.swift"
timestampString = "600860931.526565"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "115"
endingLineNumber = "115"
landmarkName = "appViewsSstatistics(httpModel:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "MobilePortal/VC/Service/ServiceViewController+initCollectionView.swift"
timestampString = "601109873.403151"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "51"
endingLineNumber = "51"
landmarkName = "openWeb(httpModel:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
//
// AppDelegate+JPUSH.swift
// MobilePortal
//
// Created by xiejiangbo on 2019/6/27.
// Copyright © 2019 yin chen. All rights reserved.
//
import UIKit
extension AppDelegate:JPUSHRegisterDelegate {
func jpushNotificationCenter(_ center: UNUserNotificationCenter!, openSettingsFor notification: UNNotification?) {
}
// 注册推送
func setupJpush(launchOptions: [UIApplicationLaunchOptionsKey: Any]?){
// 通知注册实体类
if #available(iOS 10.0, *){
let entiity = JPUSHRegisterEntity()
entiity.types = Int(UNAuthorizationOptions.alert.rawValue |
UNAuthorizationOptions.badge.rawValue |
UNAuthorizationOptions.sound.rawValue)
JPUSHService.register(forRemoteNotificationConfig: entiity, delegate: self)
} else if #available(iOS 8.0, *) {
let types = UIUserNotificationType.badge.rawValue |
UIUserNotificationType.sound.rawValue |
UIUserNotificationType.alert.rawValue
JPUSHService.register(forRemoteNotificationTypes: types, categories: nil)
}else {
let type = UIRemoteNotificationType.badge.rawValue |
UIRemoteNotificationType.sound.rawValue |
UIRemoteNotificationType.alert.rawValue
JPUSHService.register(forRemoteNotificationTypes: type, categories: nil)
}
// 注册极光推送
//正式 cd8c71ebd290a618efaa72cd
//测试 444b4a4c86a09bd2e27367fe
JPUSHService.setup(withOption: launchOptions, appKey: "444b4a4c86a09bd2e27367fe", channel:"App Store" , apsForProduction: true);
JPUSHService.crashLogON()
//NotificationCenter.default.addObserver(self, selector: #selector(networkDidReceiveMessage(notification:)), name: NSNotification.Name.jpfNetworkDidReceiveMessage, object: nil)
}
// MARK: -JPUSHRegisterDelegate
// iOS 10.x 需要
@available(iOS 10.0, *)
func jpushNotificationCenter(_ center: UNUserNotificationCenter!, willPresent notification: UNNotification!, withCompletionHandler completionHandler: ((Int) -> Void)!) {
let userInfo = notification.request.content.userInfo;
if notification.request.trigger is UNPushNotificationTrigger {
JPUSHService.handleRemoteNotification(userInfo);
}
print("1213",userInfo)
receiveNotification(userInfo: userInfo as [NSObject : AnyObject])
completionHandler(Int(UNNotificationPresentationOptions.alert.rawValue)|Int(UNNotificationPresentationOptions.sound.rawValue))
}
@available(iOS 10.0, *)
func jpushNotificationCenter(_ center: UNUserNotificationCenter!, didReceive response: UNNotificationResponse!, withCompletionHandler completionHandler: (() -> Void)!) {
let userInfo = response.notification.request.content.userInfo;
if response.notification.request.trigger is UNPushNotificationTrigger {
JPUSHService.handleRemoteNotification(userInfo);
}
completionHandler();
receivePush(userInfo as! Dictionary<String, Any>)
// 应用打开的时候收到推送消息
//NotificationCenter.default.post(name: NSNotification.Name(rawValue: NotificationName_ReceivePush), object: NotificationObject_Sueecess, userInfo: userInfo)
}
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
print("444444",userInfo)
receiveNotification(userInfo: userInfo as [NSObject : AnyObject])
JPUSHService.handleRemoteNotification(userInfo);
completionHandler(UIBackgroundFetchResult.newData);
}
// 接收到推送实现的方法
func receivePush(_ userInfo : Dictionary<String,Any>) {
// 角标变0
JPUSHService.setBadge(0)
UIApplication.shared.applicationIconBadgeNumber = 0;
receiveNotification(userInfo: userInfo as [NSObject : AnyObject])
// 剩下的根据需要自定义
//self.tabBarVC?.selectedIndex = 0;
//NotificationCenter.default.post(name: NSNotification.Name(rawValue: NotificationName_ReceivePush), object: NotificationObject_Sueecess, userInfo: userInfo)
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
print("deviceToken==",deviceToken)
JPUSHService.registerDeviceToken(deviceToken)
if AccountInfo.sharedInstance().UserId == nil {
UIApplication.shared.unregisterForRemoteNotifications()
return
}
// JPUSHService.setTags([AccountInfo.sharedInstance().appUUID!], alias: AccountInfo.sharedInstance().UserId) { (code, tags, alias) in
// print("code:",code,tags!,alias ?? String())
// }
JPUSHService.setTags([AccountInfo.sharedInstance().appUUID!], completion: { (iResCode, iTags, seq) in
print(iResCode,iTags!,seq)
} as JPUSHTagsOperationCompletion, seq: 0)
JPUSHService.setAlias(AccountInfo.sharedInstance().UserId, completion: { (iResCode, iTags, seq) in
print(iResCode,iTags!,seq)
}, seq: 1)
}
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
//NotificationCenter.default.post(name: NSNotification.Name(rawValue: "AuthorizedResult"), object: nil, userInfo: nil)
print("收到通知1111:",userInfo)
JPUSHService.handleRemoteNotification(userInfo)
self.receiveNotification(userInfo: userInfo as [NSObject : AnyObject])
}
// func application(_ application: UIApplication, didReceive notification: UILocalNotification) {
// JPUSHService.showLocalNotification(atFront: notification, identifierKey: nil)
// [UNUserNotificationCenterDelegate willPresentNotification:withCompletionHandler:]方法中调用completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert)
// }
func receiveNotification(userInfo: [NSObject : AnyObject]){
let dic:NSDictionary = userInfo as NSDictionary
print("收到通知2222:",dic)
let keyArray:NSArray = dic.allKeys as NSArray
//let alert2:String = dic .object(forKey: "content") as! String
let aps:NSDictionary = dic .object(forKey: "aps") as! NSDictionary
let alert:String = aps .object(forKey: "alert") as! String
if dic .object(forKey: "id") != nil {
AccountInfo.sharedInstance().messageId = dic .object(forKey: "id") as? String
}
var isDel = String()
var isEnable = String()
var deviceStatus = String()
if keyArray.contains("isDel") {
isDel = dic .object(forKey: "isDel") as! String
if isDel == "Y"{
logoutUserInfo(str: alert)
return
}
}
//
if keyArray.contains("isEnable") {
isEnable = dic .object(forKey: "isEnable") as! String
if isEnable == "Y"{
logoutUserInfo(str: alert)
return
}
}
if keyArray.contains("deviceStatus") {
deviceStatus = dic .object(forKey: "deviceStatus") as! String
if deviceStatus == "Y" {
logoutUserInfo(str: alert)
return
}
}
print(alert)
showAlert(title: "您有一条新消息", message: alert, titleCancelBtn: "取消", titleSecondBtn: "查看") {
NotificationCenter.default.post(name: Notification.Name(rawValue: "gotoMessageWeb"), object: "0")
}
//print("-----",alert["body"] ?? NSDictionary())
//let badge = aps["badge"] as! int //推送显示内容
}
//MARK: - 自定义消息回调
func networkDidReceiveMessage(notification:NSNotification){
print("收到通知------:",notification)
let userInfo = notification.userInfo
receiveNotification(userInfo: userInfo! as [NSObject : AnyObject])
// NSLog("content :%@", content)
}
func dropOutAPP() {
let app:AppDelegate = UIApplication.shared.delegate as! AppDelegate
let window:UIWindow = app.window!
UIView.animate(withDuration: 1.0, animations: {
window.alpha = 0
window.frame = CGRect(x:0, y: window.bounds.size.width, width:0 , height:0 )
}) { (finished:Bool) in
exit(0)
}
}
//注销用户
func logoutUserInfo(str:String){
deAllSelecCompanyDepartment()
AccountInfo.sharedInstance().clearAccount()
showOneAlert(title: "提示", message: str, titleSecondBtn: "确定", blockOtherBtn: {[weak self] in
self?.dropOutAPP()
})
}
func judgmentStrNil(str:String?) -> String{
if str == nil {
return ""
}
return str!
}
}
This diff is collapsed.
//
// AppDelegate+PushKit.swift
// MobilePortal
//
// Created by caiyang on 2022/1/5.
// Copyright © 2022 yin chen. All rights reserved.
//
import UIKit
import PushKit
extension AppDelegate:PKPushRegistryDelegate {
func voipRegistration(){
var voipRegistry:PKPushRegistry = PKPushRegistry.init(queue: DispatchQueue.main())
}
}
This diff is collapsed.
//
// AppDelegate+suspensionBtn.swift
// Huangshan
//
// Created by xiejiangbo on 2018/10/12.
// Copyright © 2018 yin chen. All rights reserved.
//
import UIKit
extension AppDelegate {
@objc func setVoiceWindow(){
// BDVoiceWakeUp.share().initwakeupEventManager()
// IFlySpeech.share().initIFlyAIUIAgent()
// IFlySpeech.share().getActionValueBlock {[weak self](value:AnyObject!)->() in
// self!.actionValue(str: value as! String)
// }
SuspensionView.share().getsuspensionBtn().frame = CGRect(x:50, y: SCREEN_HEIGHT()/1.5, width:50*WHIDTH_RATIO() , height:50*WHIDTH_RATIO() )
SuspensionView.share().getsuspensionBtn().addTarget(self, action: #selector(suspensionBtnAction), for: .touchUpInside)
// SuspensionView.share().getsuspensionLabel().frame = CGRect(x:SuspensionView.share().getsuspensionBtn().originX+SuspensionView.share().getsuspensionBtn().width+15, y: 0, width:SCREEN_WHIDTH() , height:20 )
// SuspensionView.share().getsuspensionLabel().centerY = SuspensionView.share().getsuspensionBtn().centerY
//SuspensionView.share().getsuspensionLabel()
windows.addSubview(SuspensionView.share().getsuspensionBtn())
// window?.addSubview(SuspensionView.share().getsuspensionLabel())
let pan:UIPanGestureRecognizer = UIPanGestureRecognizer.init(target: self, action: #selector(locationChange(p:)))
pan.delaysTouchesBegan = true
SuspensionView.share().getsuspensionBtn().addGestureRecognizer(pan)
// VoiceWaveView.share().initView()
// VoiceWaveView.share().getBagView().frame = CGRect(x:0, y: SCREEN_HEIGHT()-HEIGHT_TAB_BAR()-HEIGHT_BOTTOM_MARGIN()-50, width:SCREEN_WHIDTH() , height:50 )
// window?.addSubview(VoiceWaveView.share().getBagView())
}
@objc func suspensionBtnAction(){
// BDVoiceWakeUp.share().startWakeup()
// IFlySpeech.share().startParsing()
// SuspensionView.share().setSuspensionLabel("123456789")
// AudioPlayerPrompt.share().wakeUpPlay {
//
// }
NotificationCenter.default.post(name: Notification.Name(rawValue: "gotoVoiceDialogueVC"), object: "0")
}
@objc func locationChange(p:UIPanGestureRecognizer){
let HEIGHT:CGFloat = SuspensionView.share().getsuspensionBtn().height
let WIDTH:CGFloat = SuspensionView.share().getsuspensionBtn().width
let panPoint:CGPoint = p.location(in: UIApplication.shared.windows[0])
if panPoint.x < WIDTH/2 {
UIView.animate(withDuration: 0.2, animations: {
SuspensionView.share().setBenCent(CGPoint(x: WIDTH/2, y: panPoint.y))
})
}else if panPoint.y < HEIGHT/2{
UIView.animate(withDuration: 0.2, animations: {
SuspensionView.share().setBenCent(CGPoint(x: panPoint.x, y: HEIGHT/2))
})
}else if panPoint.x > SCREEN_WHIDTH()-WIDTH/2{
UIView.animate(withDuration: 0.2, animations: {
SuspensionView.share().setBenCent(CGPoint(x: SCREEN_WHIDTH()-WIDTH/2, y: panPoint.y))
})
}else if panPoint.y > SCREEN_HEIGHT()-HEIGHT/2{
UIView.animate(withDuration: 0.2, animations: {
SuspensionView.share().setBenCent(CGPoint(x: panPoint.x, y: SCREEN_HEIGHT()-HEIGHT/2))
})
}
else{
UIView.animate(withDuration: 0.1, animations: {
SuspensionView.share().setBenCent(CGPoint(x: panPoint.x, y: panPoint.y))
})
}
}
func actionValue(str:String){
if str == "new_flowsheet" {
// BaseTabBarView.share().oneBtnAction(UIButton())
}
//getVoiceHttpPostCmd(value: str)
}
}
This diff is collapsed.
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "iconfont-tixing.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iconfont-tixing@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "资讯当前页标签.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "资讯当前页标签@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "资讯当前页标签@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "icon-1024.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "咨询客服-未点击.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "咨询客服-未点击@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "咨询客服-未点击@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "咨询客服-已点击.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "咨询客服-已点击@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "咨询客服-已点击@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "Q-big.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Q-big@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Q-big@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "联系客服button.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "联系客服button@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "联系客服button@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "返回键.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "返回键@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "返回键@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "背景.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "背景@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "背景@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "机器人头像1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "机器人头像1@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "机器人头像1@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "输入框.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "输入框@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "输入框@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "对话框1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "对话框1@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "对话框1@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "没帮助-未点击.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "没帮助-未点击@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "没帮助-未点击@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "没帮助-已点击.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "没帮助-已点击@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "没帮助-已点击@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "对话框背景.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "对话框背景@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "对话框背景@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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