mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 18:38:27 +03:00
[EC-628] Added Crashlytics to the watchOS project (#2267)
* EC-628 Added Crashlytics to the watchOS project, missing GoogleService-Info.plist for now * addition of GoogleServices-info.plist.gpg * Re-add GoogleService-info.plist.gpg * EC-628 Updated build.yml to decrypt and copy the GoogleService-Info.plist for Crashlytics and also added step to upload Watch dSYMs to Crashlytics * EC-628 Fix run command upload watch dsym build.yml * EC-628 Updated Apple iOS macos version to 12 in order to resolve Watch XCode dependencies correctly with SPM * EC-628 Added some logs to see where I'm located cause it's issuing a wrong path. Also deactivated droid builds so that it's faster to test and doesn't consume resources on that till the build is OK * EC-628 fixed variable reference build.yml * EC-628 Removed ls of watch dsym export path before creating the folder that was causing the build to fail * EC-628 Removed XCode build phase step to auto-upload dsym to firebase and added some logs to find the upload-symbols tool from SPM. Also fix making the dir for the watchOS dSYMs export path * EC-628 Changed approach to upload watch dSYMs to Firebase by finding the upload-symbols script dynamically with find and then executing it * EC-628 Added missing ; to command to upload watch dSYMs * EC-628 Fix buld.yml Watch dSYMs copy to export path * EC-628 Cleaned build.yml for the watch dSYMs upload to Firebase and bring back droid builds Co-authored-by: sneakernuts <671942+sneakernuts@users.noreply.github.com>
This commit is contained in:
parent
414cb9bd7e
commit
660ba3d722
7 changed files with 226 additions and 6 deletions
BIN
.github/secrets/GoogleService-Info.plist.gpg
vendored
Normal file
BIN
.github/secrets/GoogleService-Info.plist.gpg
vendored
Normal file
Binary file not shown.
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
|
@ -440,7 +440,7 @@ jobs:
|
|||
|
||||
ios:
|
||||
name: Apple iOS
|
||||
runs-on: macos-11
|
||||
runs-on: macos-12
|
||||
needs: setup
|
||||
steps:
|
||||
- name: Setup NuGet
|
||||
|
@ -503,6 +503,8 @@ jobs:
|
|||
gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
|
||||
--output $HOME/secrets/dist_watch_app_extension.mobileprovision \
|
||||
./.github/secrets/dist_watch_app_extension.mobileprovision.gpg
|
||||
gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
|
||||
--output ./src/watchOS/bitwarden/GoogleService-Info.plist ./.github/secrets/GoogleService-Info.plist.gpg
|
||||
shell: bash
|
||||
|
||||
- name: Increment version
|
||||
|
@ -590,9 +592,6 @@ jobs:
|
|||
echo "########################################"
|
||||
echo "##### Done"
|
||||
echo "########################################"
|
||||
cd src/watchOS
|
||||
ls -R
|
||||
cd ../..
|
||||
shell: bash
|
||||
|
||||
- name: Restore packages
|
||||
|
@ -630,7 +629,12 @@ jobs:
|
|||
ARCHIVE_DSYMS_PATH="$HOME/Library/Developer/Xcode/Archives/*/*.xcarchive/dSYMs"
|
||||
EXPORT_PATH="./bitwarden-export"
|
||||
|
||||
cp -r $ARCHIVE_DSYMS_PATH $EXPORT_PATH
|
||||
WATCH_ARCHIVE_DSYMS_PATH="./src/watchOS/bitwarden.xcarchive/dSYMs/"
|
||||
WATCH_DSYMS_EXPORT_PATH="$EXPORT_PATH/Watch_dSYMs"
|
||||
|
||||
cp -r -v $ARCHIVE_DSYMS_PATH $EXPORT_PATH
|
||||
mkdir $WATCH_DSYMS_EXPORT_PATH
|
||||
cp -r -v $WATCH_ARCHIVE_DSYMS_PATH $WATCH_DSYMS_EXPORT_PATH
|
||||
shell: bash
|
||||
|
||||
- name: Upload App Store .ipa & dSYMs artifacts
|
||||
|
@ -663,6 +667,22 @@ jobs:
|
|||
run: appcenter crashes upload-symbols -a bitwarden/bitwarden -s "./bitwarden-export/dSYMs" --token $APPCENTER_IOS_TOKEN
|
||||
shell: bash
|
||||
|
||||
- name: Upload Watch dSYMs to Firebase Crashlytics
|
||||
if: |
|
||||
(github.ref == 'refs/heads/master'
|
||||
&& needs.setup.outputs.rc_branch_exists == 0
|
||||
&& needs.setup.outputs.hotfix_branch_exists == 0)
|
||||
|| (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0)
|
||||
|| github.ref == 'refs/heads/hotfix-rc'
|
||||
run: |
|
||||
|
||||
echo "########################################"
|
||||
echo "##### Uploading Watch dSYMs to Firebase"
|
||||
echo "########################################"
|
||||
|
||||
find "$HOME/Library/Developer/XCode/DerivedData" -name "upload-symbols" -exec chmod +x {} \; -exec {} -gsp "./src/watchOS/bitwarden/GoogleService-Info.plist" -p ios "./bitwarden-export/Watch_dSYMs" \;
|
||||
shell: bash
|
||||
|
||||
- name: Deploy to App Store
|
||||
if: |
|
||||
(github.ref == 'refs/heads/master'
|
||||
|
|
34
src/watchOS/bitwarden/GoogleService-Info.plist
Normal file
34
src/watchOS/bitwarden/GoogleService-Info.plist
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CLIENT_ID</key>
|
||||
<string>___________</string>
|
||||
<key>REVERSED_CLIENT_ID</key>
|
||||
<string>___________</string>
|
||||
<key>API_KEY</key>
|
||||
<string>___________</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>___________</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>com.8bit.bitwarden.watchkitapp.watchkitextension</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>___________</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>___________</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false/>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false/>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true/>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true/>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true/>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>___________</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,11 @@
|
|||
import WatchKit
|
||||
import FirebaseCore
|
||||
|
||||
class ExtensionDelegate: NSObject, WKExtensionDelegate {
|
||||
|
||||
func applicationDidFinishLaunching() {
|
||||
#if !DEBUG
|
||||
FirebaseApp.configure()
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -2,6 +2,8 @@ import SwiftUI
|
|||
|
||||
@main
|
||||
struct bitwardenApp: App {
|
||||
@WKExtensionDelegateAdaptor(ExtensionDelegate.self) var delegate
|
||||
|
||||
@SceneBuilder var body: some Scene {
|
||||
WindowGroup {
|
||||
NavigationView {
|
||||
|
|
|
@ -35,6 +35,11 @@
|
|||
1B59EC632901B1C100A8718D /* LoggerHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B59EC622901B1C100A8718D /* LoggerHelper.swift */; };
|
||||
1B5AFF0329196C81004478F9 /* ColorUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B5AFF0229196C81004478F9 /* ColorUtils.swift */; };
|
||||
1B5AFF0729197822004478F9 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1B5AFF0929197822004478F9 /* Localizable.strings */; };
|
||||
1B5BE451295A08A900E0C323 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = 1B5BE450295A08A900E0C323 /* FirebaseCrashlytics */; };
|
||||
1B5BE453295A08C600E0C323 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B5BE452295A08C600E0C323 /* ExtensionDelegate.swift */; };
|
||||
1B5BE45E295B472C00E0C323 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1B5BE45D295B472C00E0C323 /* GoogleService-Info.plist */; };
|
||||
1B5BE45F295B472C00E0C323 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1B5BE45D295B472C00E0C323 /* GoogleService-Info.plist */; };
|
||||
1B5BE460295B472C00E0C323 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1B5BE45D295B472C00E0C323 /* GoogleService-Info.plist */; };
|
||||
1B5F5E38293F9CF8009B5FCC /* TrackableWithHeaderListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B5F5E37293F9CF8009B5FCC /* TrackableWithHeaderListView.swift */; };
|
||||
1B5F5E3A293F9D6F009B5FCC /* ViewExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B5F5E39293F9D6F009B5FCC /* ViewExtensions.swift */; };
|
||||
1B5F5E3E293FBB17009B5FCC /* CipherItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B5F5E3D293FBB17009B5FCC /* CipherItemView.swift */; };
|
||||
|
@ -144,6 +149,8 @@
|
|||
1B59EC622901B1C100A8718D /* LoggerHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggerHelper.swift; sourceTree = "<group>"; };
|
||||
1B5AFF0229196C81004478F9 /* ColorUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorUtils.swift; sourceTree = "<group>"; };
|
||||
1B5AFF0829197822004478F9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
1B5BE452295A08C600E0C323 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = "<group>"; };
|
||||
1B5BE45D295B472C00E0C323 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||
1B5F5E37293F9CF8009B5FCC /* TrackableWithHeaderListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrackableWithHeaderListView.swift; sourceTree = "<group>"; };
|
||||
1B5F5E39293F9D6F009B5FCC /* ViewExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewExtensions.swift; sourceTree = "<group>"; };
|
||||
1B5F5E3D293FBB17009B5FCC /* CipherItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CipherItemView.swift; sourceTree = "<group>"; };
|
||||
|
@ -190,6 +197,7 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1B5BE451295A08A900E0C323 /* FirebaseCrashlytics in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -230,6 +238,7 @@
|
|||
1B15612628B7F3D400610B9B = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B5BE45D295B472C00E0C323 /* GoogleService-Info.plist */,
|
||||
1B15613128B7F3D400610B9B /* bitwarden */,
|
||||
1B15614128B7F3D700610B9B /* bitwarden WatchKit App */,
|
||||
1B15614C28B7F3D800610B9B /* bitwarden WatchKit Extension */,
|
||||
|
@ -298,6 +307,7 @@
|
|||
1B15615D28B7F3D900610B9B /* PushNotificationPayload.apns */,
|
||||
1B15615928B7F3D900610B9B /* Preview Content */,
|
||||
1B15616D28B81A4300610B9B /* WatchConnectivityManager.swift */,
|
||||
1B5BE452295A08C600E0C323 /* ExtensionDelegate.swift */,
|
||||
);
|
||||
path = "bitwarden WatchKit Extension";
|
||||
sourceTree = "<group>";
|
||||
|
@ -470,6 +480,9 @@
|
|||
dependencies = (
|
||||
);
|
||||
name = "bitwarden WatchKit Extension";
|
||||
packageProductDependencies = (
|
||||
1B5BE450295A08A900E0C323 /* FirebaseCrashlytics */,
|
||||
);
|
||||
productName = "bitwarden WatchKit Extension";
|
||||
productReference = 1B15614828B7F3D800610B9B /* bitwarden WatchKit Extension.appex */;
|
||||
productType = "com.apple.product-type.watchkit2-extension";
|
||||
|
@ -504,6 +517,9 @@
|
|||
Base,
|
||||
);
|
||||
mainGroup = 1B15612628B7F3D400610B9B;
|
||||
packageReferences = (
|
||||
1B5BE44F295A08A900E0C323 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
|
||||
);
|
||||
productRefGroup = 1B15613028B7F3D400610B9B /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
|
@ -522,6 +538,7 @@
|
|||
files = (
|
||||
1B15613A28B7F3D700610B9B /* Preview Assets.xcassets in Resources */,
|
||||
1B15613728B7F3D700610B9B /* Assets.xcassets in Resources */,
|
||||
1B5BE45E295B472C00E0C323 /* GoogleService-Info.plist in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -530,6 +547,7 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1B15614328B7F3D800610B9B /* Assets.xcassets in Resources */,
|
||||
1B5BE45F295B472C00E0C323 /* GoogleService-Info.plist in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -538,6 +556,7 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1B15615B28B7F3D900610B9B /* Preview Assets.xcassets in Resources */,
|
||||
1B5BE460295B472C00E0C323 /* GoogleService-Info.plist in Resources */,
|
||||
1B5AFF0729197822004478F9 /* Localizable.strings in Resources */,
|
||||
1B15615828B7F3D900610B9B /* Assets.xcassets in Resources */,
|
||||
);
|
||||
|
@ -600,6 +619,7 @@
|
|||
1B15616E28B81A4300610B9B /* WatchConnectivityManager.swift in Sources */,
|
||||
1B5AFF0329196C81004478F9 /* ColorUtils.swift in Sources */,
|
||||
1B59EC612900C48E00A8718D /* KeychainHelper.swift in Sources */,
|
||||
1B5BE453295A08C600E0C323 /* ExtensionDelegate.swift in Sources */,
|
||||
1B59EC5729007DEE00A8718D /* BitwardenDB.xcdatamodeld in Sources */,
|
||||
1B8BF90D2919BED9006F069E /* Base32.swift in Sources */,
|
||||
1B8453EC290C672E00F921E1 /* CipherEntity+CoreDataClass.swift in Sources */,
|
||||
|
@ -827,6 +847,7 @@
|
|||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = LTZ2PFU5D6;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
IBSC_MODULE = bitwarden_WatchKit_Extension;
|
||||
|
@ -984,6 +1005,25 @@
|
|||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCRemoteSwiftPackageReference section */
|
||||
1B5BE44F295A08A900E0C323 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 9.6.0;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
1B5BE450295A08A900E0C323 /* FirebaseCrashlytics */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1B5BE44F295A08A900E0C323 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
|
||||
productName = FirebaseCrashlytics;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
|
||||
/* Begin XCVersionGroup section */
|
||||
1B59EC5529007DEE00A8718D /* BitwardenDB.xcdatamodeld */ = {
|
||||
isa = XCVersionGroup;
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
{
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "abseil-cpp-swiftpm",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/firebase/abseil-cpp-SwiftPM.git",
|
||||
"state" : {
|
||||
"revision" : "583de9bd60f66b40e78d08599cc92036c2e7e4e1",
|
||||
"version" : "0.20220203.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "boringssl-swiftpm",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/firebase/boringssl-SwiftPM.git",
|
||||
"state" : {
|
||||
"revision" : "dd3eda2b05a3f459fc3073695ad1b28659066eab",
|
||||
"version" : "0.9.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "firebase-ios-sdk",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/firebase/firebase-ios-sdk",
|
||||
"state" : {
|
||||
"revision" : "7e80c25b51c2ffa238879b07fbfc5baa54bb3050",
|
||||
"version" : "9.6.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "googleappmeasurement",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/google/GoogleAppMeasurement.git",
|
||||
"state" : {
|
||||
"revision" : "c1cfde8067668027b23a42c29d11c246152fe046",
|
||||
"version" : "9.6.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "googledatatransport",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/google/GoogleDataTransport.git",
|
||||
"state" : {
|
||||
"revision" : "5056b15c5acbb90cd214fe4d6138bdf5a740e5a8",
|
||||
"version" : "9.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "googleutilities",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/google/GoogleUtilities.git",
|
||||
"state" : {
|
||||
"revision" : "6db6edb48bdd9943426562c7f042a5492de5ba3d",
|
||||
"version" : "7.10.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "grpc-ios",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/grpc/grpc-ios.git",
|
||||
"state" : {
|
||||
"revision" : "8440b914756e0d26d4f4d054a1c1581daedfc5b6",
|
||||
"version" : "1.44.3-grpc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "gtm-session-fetcher",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/google/gtm-session-fetcher.git",
|
||||
"state" : {
|
||||
"revision" : "5ccda3981422a84186387dbb763ba739178b529c",
|
||||
"version" : "2.3.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" : "swift-protobuf",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/apple/swift-protobuf.git",
|
||||
"state" : {
|
||||
"revision" : "ab3a58b7209a17d781c0d1dbb3e1ff3da306bae8",
|
||||
"version" : "1.20.3"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 2
|
||||
}
|
Loading…
Reference in a new issue