[add] 3.0
This commit is contained in:
parent
1027cc8376
commit
5dce041429
@ -823,7 +823,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/ios/libs";
|
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/ios/libs";
|
||||||
MARKETING_VERSION = 2.1;
|
MARKETING_VERSION = 3.0;
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
"-ObjC",
|
"-ObjC",
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -873,7 +873,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/ios/libs";
|
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/ios/libs";
|
||||||
MARKETING_VERSION = 2.1;
|
MARKETING_VERSION = 3.0;
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
"-ObjC",
|
"-ObjC",
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
Binary file not shown.
@ -7,7 +7,7 @@
|
|||||||
<key>JMKA-desktop.xcscheme_^#shared#^_</key>
|
<key>JMKA-desktop.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>3</integer>
|
<integer>1</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>JMKA-mobile.xcscheme_^#shared#^_</key>
|
<key>JMKA-mobile.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
@ -0,0 +1,72 @@
|
|||||||
|
//
|
||||||
|
// Firebase_S.swift
|
||||||
|
// JMKA-mobile
|
||||||
|
//
|
||||||
|
// Created by JianMiau on 2022/8/26.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
import Foundation
|
||||||
|
//import UserNotifications
|
||||||
|
//import Firebase
|
||||||
|
|
||||||
|
//class Firebase_S: NSObject, UNUserNotificationCenterDelegate, MessagingDelegate {
|
||||||
|
// @objc public func onLoad(_ application: UIApplication) {
|
||||||
|
// FirebaseApp.configure()
|
||||||
|
// Messaging.messaging().delegate = self
|
||||||
|
// if #available(iOS 10.0, *) {
|
||||||
|
// // For iOS 10 display notification (sent via APNS)
|
||||||
|
// UNUserNotificationCenter.current().delegate = self
|
||||||
|
//
|
||||||
|
// let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
|
||||||
|
// UNUserNotificationCenter.current().requestAuthorization(
|
||||||
|
// options: authOptions,
|
||||||
|
// completionHandler: { _, _ in }
|
||||||
|
// )
|
||||||
|
// } else {
|
||||||
|
// let settings: UIUserNotificationSettings =
|
||||||
|
// UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
|
||||||
|
// application.registerUserNotificationSettings(settings)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// application.registerForRemoteNotifications()
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @objc public func getFMTCoken() {
|
||||||
|
// Messaging.messaging().token { token, error in
|
||||||
|
// if let error = error {
|
||||||
|
// print("Error fetching FCM registration token: \(error)")
|
||||||
|
// } else if let token = token {
|
||||||
|
// print("FCM registration token: \(token)")
|
||||||
|
// // self.fcmRegTokenMessage.text = "Remote FCM registration token: \(token)"
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//extension Firebase_S: MessagingDelegate {
|
||||||
|
//
|
||||||
|
// func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
|
||||||
|
// print("fcm Token", fcmToken ?? "")
|
||||||
|
// // 將 fcm token 傳送給後台
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//extension Firebase_S: UNUserNotificationCenterDelegate {
|
||||||
|
// // 使用者點選推播時觸發
|
||||||
|
// func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
|
||||||
|
// print(#function)
|
||||||
|
// let content = response.notification.request.content
|
||||||
|
// print(content.userInfo)
|
||||||
|
// completionHandler()
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // 讓 App 在前景也能顯示推播
|
||||||
|
// func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
|
||||||
|
// if #available(iOS 14.0, *) {
|
||||||
|
// completionHandler([.banner])
|
||||||
|
// } else {
|
||||||
|
// // Fallback on earlier versions
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
Loading…
Reference in New Issue
Block a user