Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ fastlane/screenshots/**/*.png
fastlane/test_output

Config.swift
**/SharedConfig.swift

# Code Injection
#
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# 👔 terning 터닝 - 대학생 인턴, 공고 관리 캘린더

## 앱스토어 링크 : [앱스토어](https://apps.apple.com/kr/app/terning-%ED%84%B0%EB%8B%9D-%EB%8C%80%ED%95%99%EC%83%9D-%EC%9D%B8%ED%84%B4-%EA%B3%B5%EA%B3%A0-%EA%B4%80%EB%A6%AC-%EC%BA%98%EB%A6%B0%EB%8D%94/id6547866420) v1.6.0
## 앱스토어 링크 : [앱스토어](https://apps.apple.com/kr/app/terning-%ED%84%B0%EB%8B%9D-%EB%8C%80%ED%95%99%EC%83%9D-%EC%9D%B8%ED%84%B4-%EA%B3%B5%EA%B3%A0-%EA%B4%80%EB%A6%AC-%EC%BA%98%EB%A6%B0%EB%8D%94/id6547866420) v1.7.0
<p align="left"><img width="900" src="https://github.com/user-attachments/assets/984e7795-3746-4e7a-ad6c-cb1cb376c481"></p>

**내 계획에 딱 맞는 대학생 인턴의 시작, 터닝**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ final class NotificationService: UNNotificationServiceExtension {
private var contentHandler: ((UNNotificationContent) -> Void)?
private var bestAttemptContent: UNMutableNotificationContent?


override func didReceive(
_ request: UNNotificationRequest,
withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void
Expand Down Expand Up @@ -57,7 +58,7 @@ final class NotificationService: UNNotificationServiceExtension {

do {
try fileManager.moveItem(at: tempURL, to: uniqueURL)
let attachment = try UNNotificationAttachment(identifier: "image", url: uniqueURL, options: nil)
let attachment = try UNNotificationAttachment(identifier: "image", url: uniqueURL, options: [:])
completion(attachment)
} catch {
print("❌ 이미지 첨부 실패: \(error)")
Expand Down
29 changes: 22 additions & 7 deletions Terning-iOS/Terning-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
7121A1572C3EA4C10056DB8B /* LoadingIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7121A1562C3EA4C10056DB8B /* LoadingIndicator.swift */; };
713C5A742CC1578600321E15 /* AmplitudeSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 713C5A732CC1578600321E15 /* AmplitudeSwift */; };
71412D122DBB79A600EA7ED5 /* PushNavigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71412D112DBB79A600EA7ED5 /* PushNavigator.swift */; };
7145B3042E5491F80029E281 /* AmplitudeSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 7145B3032E5491F80029E281 /* AmplitudeSwift */; };
71461EB52C37043A002A6999 /* Pretendard-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = 71461EAC2C370439002A6999 /* Pretendard-Light.otf */; };
71461EB72C37043A002A6999 /* Pretendard-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 71461EAE2C370439002A6999 /* Pretendard-Medium.otf */; };
71461EB92C37043A002A6999 /* Pretendard-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 71461EB02C37043A002A6999 /* Pretendard-SemiBold.otf */; };
Expand Down Expand Up @@ -457,10 +458,17 @@
);
target = 71F64BC42DCA42D2006DE3D6 /* NotificationServiceExtension */;
};
71FD8FFF2E4AD24A00F7058F /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
AmplitudeEventType.swift,
);
target = 71F64BC42DCA42D2006DE3D6 /* NotificationServiceExtension */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
713C5A772CC15B7E00321E15 /* Amplitude */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Amplitude; sourceTree = "<group>"; };
713C5A772CC15B7E00321E15 /* Amplitude */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (71FD8FFF2E4AD24A00F7058F /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Amplitude; sourceTree = "<group>"; };
71CDCF742D33C5350087BF6B /* Home */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (71CDCF782D33C5430087BF6B /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Home; sourceTree = "<group>"; };
71DA88DA2CFDC81D0003078C /* SwiftUI+ */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = "SwiftUI+"; sourceTree = "<group>"; };
71DA89952CFDFA460003078C /* SwiftUI */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (71DA89982CFDFA960003078C /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = SwiftUI; sourceTree = "<group>"; };
Expand Down Expand Up @@ -499,6 +507,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7145B3042E5491F80029E281 /* AmplitudeSwift in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1581,6 +1590,7 @@
);
name = NotificationServiceExtension;
packageProductDependencies = (
7145B3032E5491F80029E281 /* AmplitudeSwift */,
);
productName = NotificationServiceExtension;
productReference = 71F64BC52DCA42D2006DE3D6 /* NotificationServiceExtension.appex */;
Expand Down Expand Up @@ -2024,7 +2034,7 @@
CODE_SIGN_ENTITLEMENTS = "Terning-iOS/Terning-iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2025.0622.0331;
CURRENT_PROJECT_VERSION = 2025.0820.1510;
DEVELOPMENT_TEAM = 8Q4H7X3Q58;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -2041,7 +2051,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.6.0;
MARKETING_VERSION = 1.7.0;
OTHER_LDFLAGS = (
"-Xlinker",
"-interposable",
Expand All @@ -2068,7 +2078,7 @@
CODE_SIGN_ENTITLEMENTS = "Terning-iOS/Terning-iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2025.0622.0331;
CURRENT_PROJECT_VERSION = 2025.0820.1510;
DEVELOPMENT_TEAM = 8Q4H7X3Q58;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -2085,7 +2095,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.6.0;
MARKETING_VERSION = 1.7.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.terning.Terning-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2104,7 +2114,7 @@
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2025.0603.1653;
CURRENT_PROJECT_VERSION = 2025.0820.1510;
DEVELOPMENT_TEAM = 8Q4H7X3Q58;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand Down Expand Up @@ -2132,7 +2142,7 @@
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2025.0603.1653;
CURRENT_PROJECT_VERSION = 2025.0820.1510;
DEVELOPMENT_TEAM = 8Q4H7X3Q58;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand Down Expand Up @@ -2319,6 +2329,11 @@
package = 713C5A722CC1578600321E15 /* XCRemoteSwiftPackageReference "Amplitude-Swift" */;
productName = AmplitudeSwift;
};
7145B3032E5491F80029E281 /* AmplitudeSwift */ = {
isa = XCSwiftPackageProductDependency;
package = 713C5A722CC1578600321E15 /* XCRemoteSwiftPackageReference "Amplitude-Swift" */;
productName = AmplitudeSwift;
};
717D37E92C32FA2F00A857DB /* SnapKit */ = {
isa = XCSwiftPackageProductDependency;
package = 717D37E82C32FA2F00A857DB /* XCRemoteSwiftPackageReference "SnapKit" */;
Expand Down
17 changes: 15 additions & 2 deletions Terning-iOS/Terning-iOS/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

setupFCM(application)

// 푸시 알림 이벤트 추적: 앱 종료 상태에서 푸시 클릭으로 앱 실행
// 앱이 완전히 종료된 상태에서 사용자가 푸시 알림을 탭하여 앱이 실행될 때 호출
// push_notification_opened 이벤트가 Amplitude에 정상적으로 로깅됨
if let notificationUserInfo = launchOptions?[.remoteNotification] as? [String: Any] {
track(eventName: .pushNotificationOpened)
print("🔔 앱 종료 상태에서 푸시 알림 클릭으로 실행됨")
}

return true
}

Expand Down Expand Up @@ -64,7 +72,9 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
Messaging.messaging().apnsToken = deviceToken
}

/// 푸시 클릭시
/// 푸시 알림 이벤트 추적: 백그라운드/포그라운드에서 푸시 클릭
/// 앱이 백그라운드 또는 포그라운드 상태에서 사용자가 푸시 알림을 탭했을 때 호출
/// push_notification_opened 이벤트가 Amplitude에 정상적으로 로깅됨
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async {

track(eventName: .pushNotificationOpened)
Expand All @@ -75,7 +85,9 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
}
}

/// Foreground(앱 켜진 상태)에서도 알림 오는 설정
/// 푸시 알림 이벤트 추적: 앱 실행 중(포그라운드) 푸시 수신
/// 앱이 포그라운드에서 실행 중일 때 푸시 알림을 받으면 호출
/// push_notification_received 이벤트가 Amplitude에 정상적으로 로깅됨
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {

track(eventName: .pushNotificationReceived)
Expand Down Expand Up @@ -133,6 +145,7 @@ extension AppDelegate: MessagingDelegate {
// TODO: If necessary send token to application server.
// Note: This callback is fired at each app startup and whenever a new token is generated.
}

}

extension AppDelegate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public extension Amplitude {
func track(eventType: AmplitudeEventType, eventProperties: [String: Any]? = nil) {
let eventType: String = eventType.rawValue

AmplitudeManager.shared.track(eventType: eventType, eventProperties: eventProperties, options: nil)
AmplitudeManager.shared.track(eventType: eventType, eventProperties: eventProperties)
}
}