From 9e92a33fc48224f39ad4637162444cc543e779f0 Mon Sep 17 00:00:00 2001 From: lucas lee Date: Tue, 12 Jul 2022 14:05:46 +0900 Subject: [PATCH] integrate firebase services --- Cartfile.resolved | 2 +- PlayCover.xcodeproj/project.pbxproj | 115 +++++++++++++++++- .../xcshareddata/swiftpm/Package.resolved | 108 ++++++++++++++++ PlayCover/GoogleService-Info.plist | 34 ++++++ PlayCover/PlayCover.entitlements | 9 +- PlayCover/PlayCoverRelease.entitlements | 9 +- PlayCover/View/MainView.swift | 7 ++ PlayCover/View/PlayCoverApp.swift | 11 +- 8 files changed, 271 insertions(+), 24 deletions(-) create mode 100644 PlayCover/GoogleService-Info.plist diff --git a/Cartfile.resolved b/Cartfile.resolved index 2d8f1db90..9359ad9b4 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1 +1 @@ -github "PlayCover/PlayTools" "v1.1.1" +github "PlayCover/PlayTools" "v1.1.2" diff --git a/PlayCover.xcodeproj/project.pbxproj b/PlayCover.xcodeproj/project.pbxproj index 7b5f4ed7d..755033f14 100644 --- a/PlayCover.xcodeproj/project.pbxproj +++ b/PlayCover.xcodeproj/project.pbxproj @@ -57,6 +57,18 @@ 92EE06DC274EB19A002C907B /* StoreAppView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92EE06DB274EB19A002C907B /* StoreAppView.swift */; }; 92EE06DE274EC09F002C907B /* Entitlements.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92EE06DD274EC09F002C907B /* Entitlements.swift */; }; 92F8500A27675124005CE6BE /* AppIntegrity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92F8500927675124005CE6BE /* AppIntegrity.swift */; }; + AA151108287D153200EC71A9 /* FirebaseInstallations in Frameworks */ = {isa = PBXBuildFile; productRef = AA151107287D153200EC71A9 /* FirebaseInstallations */; }; + AA15110A287D153200EC71A9 /* FirebasePerformance in Frameworks */ = {isa = PBXBuildFile; productRef = AA151109287D153200EC71A9 /* FirebasePerformance */; }; + AA151111287D194300EC71A9 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA151110287D194300EC71A9 /* GoogleService-Info.plist */; }; + AA151119287D2AD300EC71A9 /* FirebaseAnalyticsSwift in Frameworks */ = {isa = PBXBuildFile; productRef = AA151118287D2AD300EC71A9 /* FirebaseAnalyticsSwift */; }; + AA15111B287D2AD300EC71A9 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; + AA15111D287D2AD300EC71A9 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; + AA151121287D2AD300EC71A9 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; + AA151123287D2AD300EC71A9 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; + AA151124287D2BEB00EC71A9 /* FirebaseAnalyticsWithoutAdIdSupport in Frameworks */ = {isa = PBXBuildFile; productRef = AA151103287D153200EC71A9 /* FirebaseAnalyticsWithoutAdIdSupport */; }; + AA151125287D2BEB00EC71A9 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = AA151105287D153200EC71A9 /* FirebaseCrashlytics */; }; + AA151126287D2BEB00EC71A9 /* FirebaseRemoteConfig in Frameworks */ = {isa = PBXBuildFile; productRef = AA15110B287D153200EC71A9 /* FirebaseRemoteConfig */; }; + AA151127287D2BEB00EC71A9 /* FirebaseRemoteConfigSwift in Frameworks */ = {isa = PBXBuildFile; productRef = AA15110D287D153200EC71A9 /* FirebaseRemoteConfigSwift */; }; AA719648287A0E2500623C15 /* com.YostarJP.BlueArchive.yaml in Resources */ = {isa = PBXBuildFile; fileRef = AA719646287A0E2500623C15 /* com.YostarJP.BlueArchive.yaml */; }; AA719649287A0E2500623C15 /* default.yaml in Resources */ = {isa = PBXBuildFile; fileRef = AA719647287A0E2500623C15 /* default.yaml */; }; AA71964B287A0EA800623C15 /* PlayRules.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA71964A287A0EA800623C15 /* PlayRules.swift */; }; @@ -139,6 +151,7 @@ 92EE06DB274EB19A002C907B /* StoreAppView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAppView.swift; sourceTree = ""; }; 92EE06DD274EC09F002C907B /* Entitlements.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Entitlements.swift; sourceTree = ""; }; 92F8500927675124005CE6BE /* AppIntegrity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppIntegrity.swift; sourceTree = ""; }; + AA151110287D194300EC71A9 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; AA18F6C6287BA6E90092E378 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = ""; }; AA719646287A0E2500623C15 /* com.YostarJP.BlueArchive.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; path = com.YostarJP.BlueArchive.yaml; sourceTree = ""; }; AA719647287A0E2500623C15 /* default.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; path = default.yaml; sourceTree = ""; }; @@ -157,8 +170,19 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + AA15111B287D2AD300EC71A9 /* (null) in Frameworks */, + AA151119287D2AD300EC71A9 /* FirebaseAnalyticsSwift in Frameworks */, + AA15110A287D153200EC71A9 /* FirebasePerformance in Frameworks */, + AA151127287D2BEB00EC71A9 /* FirebaseRemoteConfigSwift in Frameworks */, + AA15111D287D2AD300EC71A9 /* (null) in Frameworks */, + AA151124287D2BEB00EC71A9 /* FirebaseAnalyticsWithoutAdIdSupport in Frameworks */, 92324086283FBA34006C46DE /* SimplyCoreAudio in Frameworks */, AA818CB5287ABEC3000BEE9D /* Yams in Frameworks */, + AA151121287D2AD300EC71A9 /* (null) in Frameworks */, + AA151123287D2AD300EC71A9 /* (null) in Frameworks */, + AA151125287D2BEB00EC71A9 /* FirebaseCrashlytics in Frameworks */, + AA151126287D2BEB00EC71A9 /* FirebaseRemoteConfig in Frameworks */, + AA151108287D153200EC71A9 /* FirebaseInstallations in Frameworks */, AA818CB2287ABE9B000BEE9D /* AlertToast in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -305,6 +329,7 @@ 8783D00026B8C52E00171041 /* Preview Content */, 532644E026E79E56002EA34D /* Localizable.strings */, 928C01D7272DF1A2007EB2DF /* PlayCover-Bridging-Header.h */, + AA151110287D194300EC71A9 /* GoogleService-Info.plist */, AA818CBD287AC237000BEE9D /* input.xcfilelist */, AA818CBF287AC274000BEE9D /* output.xcfilelist */, ); @@ -378,6 +403,7 @@ 8783CFF426B8C52D00171041 /* Frameworks */, 8783CFF526B8C52D00171041 /* Resources */, AA818CBC287AC1C6000BEE9D /* Copy Carthage frameworks */, + AA15110F287D15A400EC71A9 /* Upload dSYM to Crashlytics */, ); buildRules = ( ); @@ -388,6 +414,13 @@ 92324085283FBA34006C46DE /* SimplyCoreAudio */, AA818CB1287ABE9B000BEE9D /* AlertToast */, AA818CB4287ABEC3000BEE9D /* Yams */, + AA151103287D153200EC71A9 /* FirebaseAnalyticsWithoutAdIdSupport */, + AA151105287D153200EC71A9 /* FirebaseCrashlytics */, + AA151107287D153200EC71A9 /* FirebaseInstallations */, + AA151109287D153200EC71A9 /* FirebasePerformance */, + AA15110B287D153200EC71A9 /* FirebaseRemoteConfig */, + AA15110D287D153200EC71A9 /* FirebaseRemoteConfigSwift */, + AA151118287D2AD300EC71A9 /* FirebaseAnalyticsSwift */, ); productName = PlayCover; productReference = 8783CFF726B8C52D00171041 /* PlayCover.app */; @@ -431,6 +464,7 @@ 92324084283FBA34006C46DE /* XCRemoteSwiftPackageReference "SimplyCoreAudio" */, AA818CB0287ABE9B000BEE9D /* XCRemoteSwiftPackageReference "AlertToast" */, AA818CB3287ABEC3000BEE9D /* XCRemoteSwiftPackageReference "Yams" */, + AA151102287D153200EC71A9 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, ); productRefGroup = 8783CFF826B8C52D00171041 /* Products */; projectDirPath = ""; @@ -452,27 +486,49 @@ AA719648287A0E2500623C15 /* com.YostarJP.BlueArchive.yaml in Resources */, 8783CFFF26B8C52E00171041 /* Assets.xcassets in Resources */, AA71964D287A35F400623C15 /* com.nexon.bluearchive.yaml in Resources */, + AA151111287D194300EC71A9 /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + AA15110F287D15A400EC71A9 /* Upload dSYM to Crashlytics */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}", + "$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", + "$(SRCROOT)/Carthage/Build/PlayTools.xcframework/ios-arm64/dSYMs/PlayTools.framework.dSYM/Contents/Resources/DWARF/PlayTools", + ); + name = "Upload dSYM to Crashlytics"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\n"; + }; AA818CBC287AC1C6000BEE9D /* Copy Carthage frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "$(SRCROOT)/$(SWIFT_MODULE_NAME)/input.xcfilelist", ); inputPaths = ( + "$(SRCROOT)/Carthage/Build/PlayTools.xcframework/ios-arm64/PlayTools.framework", ); name = "Copy Carthage frameworks"; outputFileListPaths = ( - "$(SRCROOT)/$(SWIFT_MODULE_NAME)/output.xcfilelist", ); outputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/PlayTools.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/zsh; @@ -494,7 +550,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "echo \"Bootstraping carthage\"\n\nif [ -x /usr/local/bin/carthage ]; then\n carthage=/usr/local/bin/carthage\nelif [ -x /opt/homebrew/bin/carthage ]; then\n carthage=/opt/homebrew/bin/carthage\nelse\n echo \"Cannot find carthage\"\n exit 1\nfi\n\n$carthage bootstrap --use-xcframeworks\n\nif [ -f cartfile.resolved ]; then\n cartfile_changed=$(git diff --stat $(git_previous_successful_commit) $(git_commit) | grep '\\|' | awk '{print $$1}' | grep cartfile.resolved)\n if test \"$(cartfile_changed)\"; then\n echo \"## step: updating carthage\"\n $carthage bootstrap --use-xcframeworks\n else\n echo \"## carthage is up to date\"\n fi\nelse\n echo \"## step: installing carthage dependencies\"\n $carthage bootstrap --use-xcframeworks\nfi\n"; + shellScript = "echo \"Bootstraping carthage\"\n\nif [ -x /usr/local/bin/carthage ]; then\n carthage=/usr/local/bin/carthage\nelif [ -x /opt/homebrew/bin/carthage ]; then\n carthage=/opt/homebrew/bin/carthage\nelse\n echo \"Cannot find carthage\"\n exit 1\nfi\n\n$carthage bootstrap --use-xcframeworks\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -614,7 +670,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -708,8 +764,9 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = "PlayCover/Preview\\ Content"; DEVELOPMENT_TEAM = 792V9HMJW3; ENABLE_HARDENED_RUNTIME = YES; @@ -726,6 +783,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.0.6; + OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = io.playcover.PlayCover; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "./PlayCover/PlayCover-Bridging-Header.h"; @@ -744,8 +802,9 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = "PlayCover/Preview\\ Content"; DEVELOPMENT_TEAM = 792V9HMJW3; ENABLE_HARDENED_RUNTIME = YES; @@ -763,6 +822,7 @@ MACOSX_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.0.6; ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = io.playcover.PlayCover; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "./PlayCover/PlayCover-Bridging-Header.h"; @@ -803,6 +863,14 @@ kind = branch; }; }; + AA151102287D153200EC71A9 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/firebase/firebase-ios-sdk"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 9.0.0; + }; + }; AA818CB0287ABE9B000BEE9D /* XCRemoteSwiftPackageReference "AlertToast" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/elai950/AlertToast.git"; @@ -828,6 +896,41 @@ package = 92324084283FBA34006C46DE /* XCRemoteSwiftPackageReference "SimplyCoreAudio" */; productName = SimplyCoreAudio; }; + AA151103287D153200EC71A9 /* FirebaseAnalyticsWithoutAdIdSupport */ = { + isa = XCSwiftPackageProductDependency; + package = AA151102287D153200EC71A9 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAnalyticsWithoutAdIdSupport; + }; + AA151105287D153200EC71A9 /* FirebaseCrashlytics */ = { + isa = XCSwiftPackageProductDependency; + package = AA151102287D153200EC71A9 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseCrashlytics; + }; + AA151107287D153200EC71A9 /* FirebaseInstallations */ = { + isa = XCSwiftPackageProductDependency; + package = AA151102287D153200EC71A9 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseInstallations; + }; + AA151109287D153200EC71A9 /* FirebasePerformance */ = { + isa = XCSwiftPackageProductDependency; + package = AA151102287D153200EC71A9 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebasePerformance; + }; + AA15110B287D153200EC71A9 /* FirebaseRemoteConfig */ = { + isa = XCSwiftPackageProductDependency; + package = AA151102287D153200EC71A9 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseRemoteConfig; + }; + AA15110D287D153200EC71A9 /* FirebaseRemoteConfigSwift */ = { + isa = XCSwiftPackageProductDependency; + package = AA151102287D153200EC71A9 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseRemoteConfigSwift; + }; + AA151118287D2AD300EC71A9 /* FirebaseAnalyticsSwift */ = { + isa = XCSwiftPackageProductDependency; + package = AA151102287D153200EC71A9 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAnalyticsSwift; + }; AA818CB1287ABE9B000BEE9D /* AlertToast */ = { isa = XCSwiftPackageProductDependency; package = AA818CB0287ABE9B000BEE9D /* XCRemoteSwiftPackageReference "AlertToast" */; diff --git a/PlayCover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/PlayCover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 816b7d102..fe17aae42 100644 --- a/PlayCover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/PlayCover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,14 @@ { "pins" : [ + { + "identity" : "abseil-cpp-swiftpm", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/abseil-cpp-SwiftPM.git", + "state" : { + "revision" : "d302de612e3d57c6f4afaf087da18fba8eac72a7", + "version" : "0.20220203.1" + } + }, { "identity" : "alerttoast", "kind" : "remoteSourceControl", @@ -9,6 +18,96 @@ "version" : "1.3.7" } }, + { + "identity" : "boringssl-swiftpm", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/boringssl-SwiftPM.git", + "state" : { + "revision" : "79db6516894a932d0ddaff3b05b9da1e4f6c4069", + "version" : "0.9.0" + } + }, + { + "identity" : "firebase-ios-sdk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/firebase-ios-sdk", + "state" : { + "revision" : "e8828e8efc813817b3c2cbfde8e965f7a7a26641", + "version" : "9.2.0" + } + }, + { + "identity" : "googleappmeasurement", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleAppMeasurement.git", + "state" : { + "revision" : "192cce3e0486aecfdb61102a9c694c78dc89dc48", + "version" : "9.1.0" + } + }, + { + "identity" : "googledatatransport", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleDataTransport.git", + "state" : { + "revision" : "b905c49326b72211531ed9d7baa02d724828a8dc", + "version" : "9.1.4" + } + }, + { + "identity" : "googleutilities", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleUtilities.git", + "state" : { + "revision" : "f4abe56ce62a779e64b525eb133c8fc2a84bbc1f", + "version" : "7.7.1" + } + }, + { + "identity" : "grpc-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/grpc/grpc-ios.git", + "state" : { + "revision" : "2af4f6e9c2b18beae228f50b1198c641be859d2b", + "version" : "1.44.2-grpc" + } + }, + { + "identity" : "gtm-session-fetcher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/gtm-session-fetcher.git", + "state" : { + "revision" : "19605024d59eaefdb1f6a2cb11ebe75df4421126", + "version" : "2.0.0" + } + }, + { + "identity" : "leveldb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/leveldb.git", + "state" : { + "revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b", + "version" : "1.22.2" + } + }, + { + "identity" : "nanopb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/nanopb.git", + "state" : { + "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692", + "version" : "2.30909.0" + } + }, + { + "identity" : "promises", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/promises.git", + "state" : { + "revision" : "3e4e743631e86c8c70dbc6efdc7beaa6e90fd3bb", + "version" : "2.1.1" + } + }, { "identity" : "simplycoreaudio", "kind" : "remoteSourceControl", @@ -27,6 +126,15 @@ "version" : "0.0.3" } }, + { + "identity" : "swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-protobuf.git", + "state" : { + "revision" : "e1499bc69b9040b29184f7f2996f7bab467c1639", + "version" : "1.19.0" + } + }, { "identity" : "yams", "kind" : "remoteSourceControl", diff --git a/PlayCover/GoogleService-Info.plist b/PlayCover/GoogleService-Info.plist new file mode 100644 index 000000000..b0591a497 --- /dev/null +++ b/PlayCover/GoogleService-Info.plist @@ -0,0 +1,34 @@ + + + + + CLIENT_ID + 988731829894-ad83naerigeaigine67oeuqkp2j6c5q7.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.988731829894-ad83naerigeaigine67oeuqkp2j6c5q7 + API_KEY + AIzaSyCwGkp54T468-WBwLcMYuXVHJg_2TD0oAQ + GCM_SENDER_ID + 988731829894 + PLIST_VERSION + 1 + BUNDLE_ID + io.playcover.PlayCover + PROJECT_ID + playcover-io + STORAGE_BUCKET + playcover-io.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:988731829894:ios:51dff54fea181830266b07 + + \ No newline at end of file diff --git a/PlayCover/PlayCover.entitlements b/PlayCover/PlayCover.entitlements index 0d5438300..0c67376eb 100644 --- a/PlayCover/PlayCover.entitlements +++ b/PlayCover/PlayCover.entitlements @@ -1,12 +1,5 @@ - - com.apple.security.app-sandbox - - com.apple.security.files.downloads.read-write - - com.apple.security.files.user-selected.read-write - - + diff --git a/PlayCover/PlayCoverRelease.entitlements b/PlayCover/PlayCoverRelease.entitlements index 0d5438300..0c67376eb 100644 --- a/PlayCover/PlayCoverRelease.entitlements +++ b/PlayCover/PlayCoverRelease.entitlements @@ -1,12 +1,5 @@ - - com.apple.security.app-sandbox - - com.apple.security.files.downloads.read-write - - com.apple.security.files.user-selected.read-write - - + diff --git a/PlayCover/View/MainView.swift b/PlayCover/View/MainView.swift index 3d49f0ed0..60f7b9f10 100644 --- a/PlayCover/View/MainView.swift +++ b/PlayCover/View/MainView.swift @@ -172,6 +172,13 @@ struct MainView: View { .buttonStyle(.borderedProminent).accentColor(.accentColor).controlSize(.large) }.frame(maxWidth: .infinity) } + #if DEBUG + Divider() + HStack(spacing: 12) { + Button("Crash") { fatalError("Crash was triggered") } + .buttonStyle(.borderedProminent).accentColor(.accentColor).controlSize(.large) + }.frame(maxWidth: .infinity) + #endif }.padding() } .background(.regularMaterial) diff --git a/PlayCover/View/PlayCoverApp.swift b/PlayCover/View/PlayCoverApp.swift index 9b57719b9..3fe15db02 100644 --- a/PlayCover/View/PlayCoverApp.swift +++ b/PlayCover/View/PlayCoverApp.swift @@ -4,6 +4,11 @@ // import SwiftUI +import FirebaseCore +import FirebaseCrashlytics +import FirebaseAnalytics +import FirebaseAnalyticsSwift +import FirebaseInstallations class AppDelegate: NSObject, NSApplicationDelegate { @@ -27,6 +32,11 @@ class AppDelegate: NSObject, NSApplicationDelegate { } func applicationDidFinishLaunching(_ notification: Notification) { + UserDefaults.standard.register( + defaults: ["NSApplicationCrashOnExceptions" : true] + ) + FirebaseApp.configure() + print("instance id: \(Analytics.appInstanceID() ?? "")") LaunchServicesWrapper.setMyselfAsDefaultApplicationForFileExtension("ipa") } @@ -34,7 +44,6 @@ class AppDelegate: NSObject, NSApplicationDelegate { @main struct PlayCoverApp: App { - @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate var body: some Scene {