Compare commits

...

14 Commits
1.0.2 ... main

Author SHA1 Message Date
SEAN
c7bc009bef 1.0.18 2025-11-27 11:00:13 +09:00
SEAN
fd9fd3127a 1.0.17 2025-11-27 10:50:17 +09:00
SEAN
39e3755bd4 1.0.16 2025-11-27 10:30:22 +09:00
SEAN
6268b559ae 1.0.15 2025-11-27 10:17:41 +09:00
SEAN
80702c0c3f 1.0.14 2025-11-27 10:02:15 +09:00
SEAN
a0b21401ad 1.0.13 2025-11-27 09:52:12 +09:00
SEAN
c7430c3f58 1.0.11 2025-11-27 09:28:39 +09:00
SEAN
aa6f120dfd 1.0.10 2025-11-27 09:11:29 +09:00
SEAN
e52fa0aa20 1.0.9 2025-11-27 08:23:31 +09:00
SEAN
56582f19d6 1.0.8 2025-11-27 08:14:57 +09:00
SEAN
d2a9d9e463 1.0.7 2025-11-26 18:52:29 +09:00
SEAN
83bbb3b9e9 1.0.6 2025-11-26 18:48:05 +09:00
SEAN
12ba9f3faa 1.0.5 2025-11-26 18:44:41 +09:00
SEAN
5c8bb517cb 1.0.3 2025-11-26 18:42:25 +09:00
5 changed files with 10 additions and 67 deletions

View File

@ -4,12 +4,12 @@ import PackageDescription
let package = Package( let package = Package(
name: "tcmpush", name: "tcmpush",
platforms: [ platforms: [
.iOS(.v14) .iOS(.v16)
], ],
products: [ products: [
.library( .library(
name: "tcmpush", name: "tcmpush",
targets: ["tcmpush"] targets: ["tcmpushWrapper"]
) )
], ],
dependencies: [ dependencies: [
@ -19,18 +19,17 @@ let package = Package(
// 4. ( ) // 4. ( )
.binaryTarget( .binaryTarget(
name: "tcmpush_core", name: "tcmpush_core",
url: "https://git.ipstein.myds.me/api/packages/seonkyu.kim/generic/tcmpush/1.0.0/tcmpush.xcframework.zip", url: "https://git.ipstein.myds.me/api/packages/seonkyu.kim/generic/tcmpush/1.0.8/tcmpush.xcframework.zip",
checksum: "097aa3e33ce234fa7146757a8236361f17090bb669a2463b13d311229de2d43d" checksum: "1b7d3cc1381d213f13f888015fce49f05ca6547846e8b8ab4e74d2cf9d2e426e"
), ),
// 5. ( ) // 5. ( )
.target( .target(
name: "tcmpush", name: "tcmpushWrapper",
dependencies: [ dependencies: [
"tcmpush_core", // . "tcmpush_core",
.product(name: "FirebaseMessaging", package: "firebase-ios-sdk") .product(name: "FirebaseMessaging", package: "firebase-ios-sdk")
] ]
// path: "Sources/tcmpush" ( )
) )
] ]
) )

BIN
Sources/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -1,59 +0,0 @@
//
// tcmpush.swift
// tcmpush
//
// Created by TA9 on 11/26/25.
//
import UIKit
import FirebaseCore
import FirebaseMessaging
public class TCMPush: NSObject {
public static let shared: TCMPush = {
let inistance = TCMPush()
return inistance
}()
private override init() {}
public var isDebugMode: Bool = false
public func printLog<T>(_ object: T,_ function: String = #function, _ line: Int = #line){
if isDebugMode {
Swift.print("""
_____ _____ _____ _____ _____ _____ _____ _____ _____ _____
| NAME = [\(function)] || LINE = [\(line)]
|>>> PRINT = \(object)
""")
}
}
public func configure() {
if FirebaseApp.app() == nil {
FirebaseApp.configure()
printLog("[TCMPush] FirebaseApp configured")
}
}
public func setAPNSToken(_ deviceId: Data){
Messaging.messaging().apnsToken = deviceId
printLog("[TCMPush] set APNS Token: \(deviceId)")
}
public func getFCMToken(completion: @escaping (String?, Error?) -> Void) {
Messaging.messaging().token { [weak self] token, error in
guard let self = self else { return }
if let error = error {
self.printLog("[TCMPush] 토큰 가져오기 실패: \(error.localizedDescription)")
completion(nil, error)
} else if let token = token {
self.printLog("[TCMPush] 토큰 획득 성공: \(token)")
completion(token, nil)
}
}
}
}

View File

@ -0,0 +1,3 @@
import Foundation
@_exported import tcmpush