diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4eada261..60c638ac 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -84,5 +84,35 @@ jobs:
echo '${{ secrets.APPLE_REAL_DEBUG_GOOGLE_SERVICE_INFO_PLIST }}' >> Diary/Secret/RealDebug/GoogleService-Info.plist
echo '${{ secrets.APPLE_REAL_RELEASE_GOOGLE_SERVICE_INFO_PLIST }}' >> Diary/Secret/RealRelease/GoogleService-Info.plist
+ - name: Install the Apple certificate and provisioning profile
+ env:
+ BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_DISTRIBUTION_CERTIFICATE }}
+ P12_PASSWORD: ${{ secrets.APPLE_DISTRIBUTION_CERTIFICATE_PASSWORD }}
+ BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.APPLE_DISTRIBUTION_PROFILE }}
+ KEYCHAIN_PASSWORD: ${{ secrets.APPLE_DISTRIBUTION_TEMPORARY_KEYCHAIN_PASSWORD }}
+ run: |
+ # create variables
+ CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
+ PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
+ KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
+
+ # import certificate and provisioning profile from secrets
+ echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
+ echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
+
+ # create temporary keychain
+ security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
+ security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
+ security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
+
+ # import certificate to keychain
+ security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
+ security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
+ security list-keychain -d user -s $KEYCHAIN_PATH
+
+ # apply provisioning profile
+ mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
+ cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
+
- name: Build iOS
- run: xcodebuild -project Diary/Diary.xcodeproj -scheme CI -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.0'
\ No newline at end of file
+ run: xcodebuild -project Diary/Diary.xcodeproj -scheme RealRelease -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.0'
\ No newline at end of file
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/.gitignore b/.gitignore
index 922858cd..4fed5787 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,5 @@
**/xcuserdata
**/dev.xcconfig
-**/real.xcconfig
\ No newline at end of file
+**/real.xcconfig
+**/*.podspec
\ No newline at end of file
diff --git a/Diary/Diary.xcodeproj/project.pbxproj b/Diary/Diary.xcodeproj/project.pbxproj
index 8062eee1..cd88223f 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 */; };
+ 3DF5DACD2CE8FF3000E490F3 /* FirebaseAnalyticsWithoutAdIdSupport in Frameworks */ = {isa = PBXBuildFile; productRef = 3DF5DACC2CE8FF3000E490F3 /* FirebaseAnalyticsWithoutAdIdSupport */; };
+ 3DF5DACF2CE8FF3000E490F3 /* FirebaseCore in Frameworks */ = {isa = PBXBuildFile; productRef = 3DF5DACE2CE8FF3000E490F3 /* FirebaseCore */; };
+ 3DF5DAD12CE8FF3000E490F3 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = 3DF5DAD02CE8FF3000E490F3 /* FirebaseCrashlytics */; };
+ 3DF5DAD32CE8FF3000E490F3 /* FirebaseMessaging in Frameworks */ = {isa = PBXBuildFile; productRef = 3DF5DAD22CE8FF3000E490F3 /* FirebaseMessaging */; };
+ 3DF5DAD52CE8FF3000E490F3 /* FirebasePerformance in Frameworks */ = {isa = PBXBuildFile; productRef = 3DF5DAD42CE8FF3000E490F3 /* FirebasePerformance */; };
/* 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 */,
+ 3DF5DAD32CE8FF3000E490F3 /* FirebaseMessaging in Frameworks */,
+ 3DF5DAD12CE8FF3000E490F3 /* FirebaseCrashlytics in Frameworks */,
+ 3DF5DAD52CE8FF3000E490F3 /* FirebasePerformance in Frameworks */,
+ 3DF5DACF2CE8FF3000E490F3 /* FirebaseCore in Frameworks */,
+ 3DF5DACD2CE8FF3000E490F3 /* FirebaseAnalyticsWithoutAdIdSupport in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -79,7 +83,6 @@
3DDC71F22CCD5903001193A2 /* Sources */,
3DDC71F32CCD5903001193A2 /* Frameworks */,
3DDC71F42CCD5903001193A2 /* Resources */,
- 3DD9A7552CDFC3240023C4EE /* ShellScript */,
);
buildRules = (
);
@@ -90,9 +93,11 @@
);
name = Diary;
packageProductDependencies = (
- 3DD9A74E2CDFBAC60023C4EE /* FirebaseAnalyticsWithoutAdIdSupport */,
- 3DD9A7502CDFBAC60023C4EE /* FirebaseCrashlytics */,
- 3DD9A7522CDFBAC60023C4EE /* FirebasePerformance */,
+ 3DF5DACC2CE8FF3000E490F3 /* FirebaseAnalyticsWithoutAdIdSupport */,
+ 3DF5DACE2CE8FF3000E490F3 /* FirebaseCore */,
+ 3DF5DAD02CE8FF3000E490F3 /* FirebaseCrashlytics */,
+ 3DF5DAD22CE8FF3000E490F3 /* FirebaseMessaging */,
+ 3DF5DAD42CE8FF3000E490F3 /* FirebasePerformance */,
);
productName = Diary;
productReference = 3DDC71F62CCD5903001193A2 /* Diary.app */;
@@ -124,7 +129,7 @@
mainGroup = 3DDC71ED2CCD5903001193A2;
minimizedProjectReferenceProxies = 1;
packageReferences = (
- 3DD9A74D2CDFBAC60023C4EE /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
+ 3DF5DACB2CE8FF3000E490F3 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 3DDC71F72CCD5903001193A2 /* Products */;
@@ -163,29 +168,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";
- };
- 3DD9A7552CDFC3240023C4EE /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}",
- "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}",
- "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist",
- "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist",
- "$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)",
- );
- outputFileListPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\"\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";
};
3DDC72072CCD5943001193A2 /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
@@ -203,7 +186,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\n./gradlew buildCocoapods\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 */
@@ -251,6 +234,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "Apple Development: taejong kang (32WGJ7LQRX)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -286,10 +270,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 +294,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";
@@ -348,6 +338,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "Apple Development: taejong kang (32WGJ7LQRX)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
@@ -376,10 +367,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 +391,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 +435,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "Apple Development: taejong kang (32WGJ7LQRX)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -478,10 +471,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 +495,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";
@@ -540,6 +539,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "Apple Development: taejong kang (32WGJ7LQRX)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
@@ -568,10 +568,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 +592,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,30 +631,40 @@
/* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
- 3DD9A74D2CDFBAC60023C4EE /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
+ 3DF5DACB2CE8FF3000E490F3 /* 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 */ = {
+ 3DF5DACC2CE8FF3000E490F3 /* FirebaseAnalyticsWithoutAdIdSupport */ = {
isa = XCSwiftPackageProductDependency;
- package = 3DD9A74D2CDFBAC60023C4EE /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ package = 3DF5DACB2CE8FF3000E490F3 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseAnalyticsWithoutAdIdSupport;
};
- 3DD9A7502CDFBAC60023C4EE /* FirebaseCrashlytics */ = {
+ 3DF5DACE2CE8FF3000E490F3 /* FirebaseCore */ = {
isa = XCSwiftPackageProductDependency;
- package = 3DD9A74D2CDFBAC60023C4EE /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ package = 3DF5DACB2CE8FF3000E490F3 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ productName = FirebaseCore;
+ };
+ 3DF5DAD02CE8FF3000E490F3 /* FirebaseCrashlytics */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = 3DF5DACB2CE8FF3000E490F3 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseCrashlytics;
};
- 3DD9A7522CDFBAC60023C4EE /* FirebasePerformance */ = {
+ 3DF5DAD22CE8FF3000E490F3 /* FirebaseMessaging */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = 3DF5DACB2CE8FF3000E490F3 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ productName = FirebaseMessaging;
+ };
+ 3DF5DAD42CE8FF3000E490F3 /* FirebasePerformance */ = {
isa = XCSwiftPackageProductDependency;
- package = 3DD9A74D2CDFBAC60023C4EE /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ package = 3DF5DACB2CE8FF3000E490F3 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebasePerformance;
};
/* End XCSwiftPackageProductDependency section */
diff --git a/Diary/Diary.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Diary/Diary.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 91a89a13..396fa237 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"
}
},
{
@@ -69,8 +69,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
- "revision" : "5cfe5f090c982de9c58605d2a82a4fc77b774fbd",
- "version" : "4.1.0"
+ "revision" : "a2ab612cb980066ee56d90d60d8462992c07f24b",
+ "version" : "3.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