diff --git a/.github/workflows/firebase_app_distribution.yml b/.github/workflows/firebase_app_distribution.yml
index ce7d4bf3..44fa16b7 100644
--- a/.github/workflows/firebase_app_distribution.yml
+++ b/.github/workflows/firebase_app_distribution.yml
@@ -122,7 +122,7 @@ jobs:
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Archive xcarchive
- run: xcodebuild -project Diary/Diary.xcodeproj -scheme CI archive -archivePath Diary/build/Diary.xcarchive -allowProvisioningUpdates
+ run: xcodebuild -project Diary/Diary.xcodeproj -scheme RealRelease archive -archivePath Diary/build/Diary.xcarchive -allowProvisioningUpdates
- name: Export ipa
run: xcodebuild -exportArchive -archivePath Diary/build/Diary.xcarchive -exportPath Diary/build -exportOptionsPlist Diary/ExportOptions.plist -allowProvisioningUpdates
@@ -131,7 +131,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Diary.ipa
- path: Diary/build/Apps/Diary.ipa
+ path: Diary/build/Diary.ipa
iOS-Distribution:
needs: [iOS-Build]
diff --git a/Diary/Diary.xcodeproj/project.pbxproj b/Diary/Diary.xcodeproj/project.pbxproj
index 8062eee1..566504b5 100644
--- a/Diary/Diary.xcodeproj/project.pbxproj
+++ b/Diary/Diary.xcodeproj/project.pbxproj
@@ -7,9 +7,11 @@
objects = {
/* Begin PBXBuildFile section */
- 3DD9A74F2CDFBAC60023C4EE /* FirebaseAnalyticsWithoutAdIdSupport in Frameworks */ = {isa = PBXBuildFile; productRef = 3DD9A74E2CDFBAC60023C4EE /* FirebaseAnalyticsWithoutAdIdSupport */; };
- 3DD9A7512CDFBAC60023C4EE /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = 3DD9A7502CDFBAC60023C4EE /* FirebaseCrashlytics */; };
- 3DD9A7532CDFBAC60023C4EE /* FirebasePerformance in Frameworks */ = {isa = PBXBuildFile; productRef = 3DD9A7522CDFBAC60023C4EE /* FirebasePerformance */; };
+ 3DF0CB1B2CE4D18600B88439 /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = 3DF0CB1A2CE4D18600B88439 /* FirebaseAnalytics */; };
+ 3DF0CB1D2CE4D18600B88439 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = 3DF0CB1C2CE4D18600B88439 /* FirebaseCrashlytics */; };
+ 3DF0CB1F2CE4D18600B88439 /* FirebaseMessaging in Frameworks */ = {isa = PBXBuildFile; productRef = 3DF0CB1E2CE4D18600B88439 /* FirebaseMessaging */; };
+ 3DF0CB212CE4D18600B88439 /* FirebasePerformance in Frameworks */ = {isa = PBXBuildFile; productRef = 3DF0CB202CE4D18600B88439 /* FirebasePerformance */; };
+ 3DF0CB232CE4D18600B88439 /* FirebaseRemoteConfig in Frameworks */ = {isa = PBXBuildFile; productRef = 3DF0CB222CE4D18600B88439 /* FirebaseRemoteConfig */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -42,9 +44,11 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 3DD9A74F2CDFBAC60023C4EE /* FirebaseAnalyticsWithoutAdIdSupport in Frameworks */,
- 3DD9A7512CDFBAC60023C4EE /* FirebaseCrashlytics in Frameworks */,
- 3DD9A7532CDFBAC60023C4EE /* FirebasePerformance in Frameworks */,
+ 3DF0CB1F2CE4D18600B88439 /* FirebaseMessaging in Frameworks */,
+ 3DF0CB1B2CE4D18600B88439 /* FirebaseAnalytics in Frameworks */,
+ 3DF0CB212CE4D18600B88439 /* FirebasePerformance in Frameworks */,
+ 3DF0CB1D2CE4D18600B88439 /* FirebaseCrashlytics in Frameworks */,
+ 3DF0CB232CE4D18600B88439 /* FirebaseRemoteConfig in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -90,9 +94,11 @@
);
name = Diary;
packageProductDependencies = (
- 3DD9A74E2CDFBAC60023C4EE /* FirebaseAnalyticsWithoutAdIdSupport */,
- 3DD9A7502CDFBAC60023C4EE /* FirebaseCrashlytics */,
- 3DD9A7522CDFBAC60023C4EE /* FirebasePerformance */,
+ 3DF0CB1A2CE4D18600B88439 /* FirebaseAnalytics */,
+ 3DF0CB1C2CE4D18600B88439 /* FirebaseCrashlytics */,
+ 3DF0CB1E2CE4D18600B88439 /* FirebaseMessaging */,
+ 3DF0CB202CE4D18600B88439 /* FirebasePerformance */,
+ 3DF0CB222CE4D18600B88439 /* FirebaseRemoteConfig */,
);
productName = Diary;
productReference = 3DDC71F62CCD5903001193A2 /* Diary.app */;
@@ -124,7 +130,7 @@
mainGroup = 3DDC71ED2CCD5903001193A2;
minimizedProjectReferenceProxies = 1;
packageReferences = (
- 3DD9A74D2CDFBAC60023C4EE /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
+ 3DF0CB192CE4D18600B88439 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 3DDC71F72CCD5903001193A2 /* Products */;
@@ -163,7 +169,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "cd \"$SRCROOT/..\"\n\n\ncase \"${CONFIGURATION}\" in\n \"DevDebug\" )\ncp -r \"$SRCROOT/Secret/DevDebug/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\" ;;\n \"DevRelease\" )\ncp -r \"$SRCROOT/Secret/DevRelease/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\" ;;\n \"RealDebug\" )\ncp -r \"$SRCROOT/Secret/RealDebug/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\" ;;\n \"RealRelease\" )\ncp -r \"$SRCROOT/Secret/RealRelease/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\" ;;\n*)\n;;\nesac\n";
+ shellScript = "cd \"$SRCROOT/..\"\n\ncase \"${CONFIGURATION}\" in\n \"DevDebug\" )\ncp -r \"$SRCROOT/Secret/DevDebug/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\" ;;\n \"DevRelease\" )\ncp -r \"$SRCROOT/Secret/DevRelease/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\" ;;\n \"RealDebug\" )\ncp -r \"$SRCROOT/Secret/RealDebug/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\" ;;\n \"RealRelease\" )\ncp -r \"$SRCROOT/Secret/RealRelease/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\" ;;\n*)\n;;\nesac\n";
};
3DD9A7552CDFC3240023C4EE /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@@ -203,7 +209,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "cd \"$SRCROOT/..\"\n\n\ncase \"${CONFIGURATION}\" in\n \"DevDebug\" )\n./gradlew :app:platform:ios:embedAndSignAppleFrameworkForXcode -Pbuildkonfig.flavor=dev ;;\n \"DevRelease\" )\n./gradlew :app:platform:ios:embedAndSignAppleFrameworkForXcode -Pbuildkonfig.flavor=dev ;;\n \"RealDebug\" )\n./gradlew :app:platform:ios:embedAndSignAppleFrameworkForXcode -Pbuildkonfig.flavor=real ;;\n \"RealRelease\" )\n./gradlew :app:platform:ios:embedAndSignAppleFrameworkForXcode -Pbuildkonfig.flavor=real ;;\n*)\n;;\nesac\n";
+ shellScript = "cd \"$SRCROOT/..\"\n\ncase \"${CONFIGURATION}\" in\n \"DevDebug\" )\n./gradlew :app:platform:ios:embedAndSignAppleFrameworkForXcode -Pbuildkonfig.flavor=dev ;;\n \"DevRelease\" )\n./gradlew :app:platform:ios:embedAndSignAppleFrameworkForXcode -Pbuildkonfig.flavor=dev ;;\n \"RealDebug\" )\n./gradlew :app:platform:ios:embedAndSignAppleFrameworkForXcode -Pbuildkonfig.flavor=real ;;\n \"RealRelease\" )\n./gradlew :app:platform:ios:embedAndSignAppleFrameworkForXcode -Pbuildkonfig.flavor=real ;;\n*)\n;;\nesac\n";
};
/* End PBXShellScriptBuildPhase section */
@@ -286,10 +292,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
+ CODE_SIGN_ENTITLEMENTS = Diary/Diary.entitlements;
+ CODE_SIGN_IDENTITY = "Apple Development";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ CODE_SIGN_STYLE = Manual;
+ CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "\"Diary/Preview Content\"";
- DEVELOPMENT_TEAM = 4TV6L66XZ8;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 4TV6L66XZ8;
ENABLE_PREVIEWS = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
@@ -306,9 +316,11 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.0;
+ MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = io.github.taetae98coding.diary.debug;
PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = DiaryRealDebug;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -376,10 +388,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+ CODE_SIGN_ENTITLEMENTS = Diary/Diary.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 1;
+ CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "\"Diary/Preview Content\"";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 4TV6L66XZ8;
@@ -399,11 +412,11 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.0;
+ MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = io.github.taetae98coding.diary;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
- "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = adhoc;
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = DiaryRealRelease;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -443,6 +456,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "Apple Development";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -478,10 +492,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
+ CODE_SIGN_ENTITLEMENTS = Diary/Diary.entitlements;
+ CODE_SIGN_IDENTITY = "Apple Development";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ CODE_SIGN_STYLE = Manual;
+ CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "\"Diary/Preview Content\"";
- DEVELOPMENT_TEAM = 4TV6L66XZ8;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 4TV6L66XZ8;
ENABLE_PREVIEWS = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
@@ -498,9 +516,11 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.0;
+ MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = io.github.taetae98coding.diary.dev.debug;
PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = DiaryDevDebug;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -568,10 +588,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
+ CODE_SIGN_ENTITLEMENTS = Diary/Diary.entitlements;
+ CODE_SIGN_IDENTITY = "Apple Development";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ CODE_SIGN_STYLE = Manual;
+ CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "\"Diary/Preview Content\"";
- DEVELOPMENT_TEAM = 4TV6L66XZ8;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 4TV6L66XZ8;
ENABLE_PREVIEWS = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
@@ -588,9 +612,11 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.0;
+ MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = io.github.taetae98coding.diary.dev;
PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = DiaryDevRelease;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -625,32 +651,42 @@
/* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
- 3DD9A74D2CDFBAC60023C4EE /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
+ 3DF0CB192CE4D18600B88439 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
requirement = {
kind = exactVersion;
- version = 11.4.0;
+ version = 11.5.0;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
- 3DD9A74E2CDFBAC60023C4EE /* FirebaseAnalyticsWithoutAdIdSupport */ = {
+ 3DF0CB1A2CE4D18600B88439 /* FirebaseAnalytics */ = {
isa = XCSwiftPackageProductDependency;
- package = 3DD9A74D2CDFBAC60023C4EE /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
- productName = FirebaseAnalyticsWithoutAdIdSupport;
+ package = 3DF0CB192CE4D18600B88439 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ productName = FirebaseAnalytics;
};
- 3DD9A7502CDFBAC60023C4EE /* FirebaseCrashlytics */ = {
+ 3DF0CB1C2CE4D18600B88439 /* FirebaseCrashlytics */ = {
isa = XCSwiftPackageProductDependency;
- package = 3DD9A74D2CDFBAC60023C4EE /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ package = 3DF0CB192CE4D18600B88439 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseCrashlytics;
};
- 3DD9A7522CDFBAC60023C4EE /* FirebasePerformance */ = {
+ 3DF0CB1E2CE4D18600B88439 /* FirebaseMessaging */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = 3DF0CB192CE4D18600B88439 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ productName = FirebaseMessaging;
+ };
+ 3DF0CB202CE4D18600B88439 /* FirebasePerformance */ = {
isa = XCSwiftPackageProductDependency;
- package = 3DD9A74D2CDFBAC60023C4EE /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ package = 3DF0CB192CE4D18600B88439 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebasePerformance;
};
+ 3DF0CB222CE4D18600B88439 /* FirebaseRemoteConfig */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = 3DF0CB192CE4D18600B88439 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ productName = FirebaseRemoteConfig;
+ };
/* End XCSwiftPackageProductDependency section */
};
rootObject = 3DDC71EE2CCD5903001193A2 /* Project object */;
diff --git a/Diary/Diary.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Diary/Diary.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 91a89a13..78194563 100644
--- a/Diary/Diary.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/Diary/Diary.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -24,8 +24,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk",
"state" : {
- "revision" : "8328630971a8fdd8072b36bb22bef732eb15e1f0",
- "version" : "11.4.0"
+ "revision" : "dbdfdc44bee8b8e4eaa5ec27eb12b9338f3f2bc1",
+ "version" : "11.5.0"
}
},
{
diff --git a/Diary/Diary.xcodeproj/xcshareddata/xcschemes/CI.xcscheme b/Diary/Diary.xcodeproj/xcshareddata/xcschemes/DevRelease.xcscheme
similarity index 92%
rename from Diary/Diary.xcodeproj/xcshareddata/xcschemes/CI.xcscheme
rename to Diary/Diary.xcodeproj/xcshareddata/xcschemes/DevRelease.xcscheme
index 4fbddea6..acc102d5 100644
--- a/Diary/Diary.xcodeproj/xcshareddata/xcschemes/CI.xcscheme
+++ b/Diary/Diary.xcodeproj/xcshareddata/xcschemes/DevRelease.xcscheme
@@ -24,14 +24,14 @@
+ buildConfiguration = "DevRelease">
diff --git a/Diary/Diary/AppDelegate.swift b/Diary/Diary/AppDelegate.swift
index a4e1a554..dc07bb18 100644
--- a/Diary/Diary/AppDelegate.swift
+++ b/Diary/Diary/AppDelegate.swift
@@ -1,12 +1,45 @@
import SwiftUI
-import FirebaseCore
-
+import Firebase
+import UserNotifications
class AppDelegate: NSObject, UIApplicationDelegate {
- func application(_ application: UIApplication,
- didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
- FirebaseApp.configure()
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
+ FirebaseApp.configure()
+
+ initRemoteNotifications(application: application)
+ initFirebaseMessaging()
+
+ return true
+ }
+
+ func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
+ Messaging.messaging().apnsToken = deviceToken
+ }
+
+
+ func initRemoteNotifications(application: UIApplication) {
+ UNUserNotificationCenter.current().delegate = self
+
+ let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
+ UNUserNotificationCenter.current().requestAuthorization(
+ options: authOptions,
+ completionHandler: { _, _ in }
+ )
+
+ application.registerForRemoteNotifications()
+ }
+
+ func initFirebaseMessaging() {
+ Messaging.messaging().delegate = self
+ }
+}
+
+extension AppDelegate: UNUserNotificationCenterDelegate {
+
+}
- return true
- }
+extension AppDelegate: MessagingDelegate {
+ func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
+ print("Firebase registration token: \(String(describing: fcmToken))")
+ }
}
diff --git a/Diary/Diary/Diary.entitlements b/Diary/Diary/Diary.entitlements
new file mode 100644
index 00000000..903def2a
--- /dev/null
+++ b/Diary/Diary/Diary.entitlements
@@ -0,0 +1,8 @@
+
+
+
+
+ aps-environment
+ development
+
+
diff --git a/Diary/Diary/Info.plist b/Diary/Diary/Info.plist
index ba6b757e..6d3967f7 100644
--- a/Diary/Diary/Info.plist
+++ b/Diary/Diary/Info.plist
@@ -9,5 +9,10 @@
NSAllowsArbitraryLoads
+ UIBackgroundModes
+
+ fetch
+ remote-notification
+
diff --git a/Diary/ExportOptions.plist b/Diary/ExportOptions.plist
index 7739f167..2d11afcd 100644
--- a/Diary/ExportOptions.plist
+++ b/Diary/ExportOptions.plist
@@ -6,20 +6,13 @@
export
method
release-testing
- provisioningProfiles
-
- io.github.taetae98coding.diary
- adhoc
-
- signingCertificate
- Apple Distribution
signingStyle
- manual
+ automatic
stripSwiftSymbols
teamID
4TV6L66XZ8
thinning
- <thin-for-all-variants>
+ <none>
diff --git a/app/core/coroutines/src/commonMain/kotlin/io/github/taetae98coding/diary/core/coroutines/CoroutinesModule.kt b/app/core/coroutines/src/commonMain/kotlin/io/github/taetae98coding/diary/core/coroutines/CoroutinesModule.kt
index f34ab89e..747086b1 100644
--- a/app/core/coroutines/src/commonMain/kotlin/io/github/taetae98coding/diary/core/coroutines/CoroutinesModule.kt
+++ b/app/core/coroutines/src/commonMain/kotlin/io/github/taetae98coding/diary/core/coroutines/CoroutinesModule.kt
@@ -1,6 +1,8 @@
package io.github.taetae98coding.diary.core.coroutines
import androidx.lifecycle.LifecycleOwner
+import androidx.lifecycle.lifecycleScope
+import kotlinx.coroutines.CoroutineScope
import org.koin.core.annotation.ComponentScan
import org.koin.core.annotation.Module
import org.koin.core.annotation.Singleton
@@ -12,4 +14,9 @@ public class CoroutinesModule {
internal fun providesAppLifecycleOwner(): LifecycleOwner {
return getAppLifecycleOwner()
}
+
+ @Singleton
+ internal fun providesAppCoroutineScope(lifecycleOwner: LifecycleOwner): CoroutineScope {
+ return lifecycleOwner.lifecycleScope
+ }
}
diff --git a/app/core/diary-database-memory/src/commonMain/kotlin/io/github/taetae98coding/diary/core/diary/database/memory/MemoBackupMemoryDao.kt b/app/core/diary-database-memory/src/commonMain/kotlin/io/github/taetae98coding/diary/core/diary/database/memory/MemoBackupMemoryDao.kt
index 2ec338c9..b9757a62 100644
--- a/app/core/diary-database-memory/src/commonMain/kotlin/io/github/taetae98coding/diary/core/diary/database/memory/MemoBackupMemoryDao.kt
+++ b/app/core/diary-database-memory/src/commonMain/kotlin/io/github/taetae98coding/diary/core/diary/database/memory/MemoBackupMemoryDao.kt
@@ -5,9 +5,7 @@ import io.github.taetae98coding.diary.core.model.memo.MemoDto
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
-import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.mapLatest
-import kotlinx.coroutines.flow.update
import org.koin.core.annotation.Singleton
@OptIn(ExperimentalCoroutinesApi::class)
@@ -16,7 +14,6 @@ internal class MemoBackupMemoryDao(
private val memoMemoryDao: MemoMemoryDao,
) : MemoBackupDao {
private val flow = MutableStateFlow