Browse Source

ios: fix uploading dSYMs to Crashlytics

Use Fastlane to get them from Apple after processing, them upload them.

Also make sure WebRTC dSYMs are included when uploading.
j8
Saúl Ibarra Corretgé 4 years ago
parent
commit
0751c6ab48
2 changed files with 11 additions and 7 deletions
  1. 7
    7
      ios/app/app.xcodeproj/project.pbxproj
  2. 4
    0
      ios/fastlane/Fastfile

+ 7
- 7
ios/app/app.xcodeproj/project.pbxproj View File

291
 				13B07F8E1A680F5B00A75B9A /* Resources */,
291
 				13B07F8E1A680F5B00A75B9A /* Resources */,
292
 				0B26BE701EC5BC3C00EEFB41 /* Embed Frameworks */,
292
 				0B26BE701EC5BC3C00EEFB41 /* Embed Frameworks */,
293
 				B35383AD1DDA0083008F406A /* Adjust embedded framework architectures */,
293
 				B35383AD1DDA0083008F406A /* Adjust embedded framework architectures */,
294
+				DE3A859324C701EA009B7D76 /* Copy WebRTC dSYM */,
294
 				0BB7DA181EC9E695007AAE98 /* Adjust ATS */,
295
 				0BB7DA181EC9E695007AAE98 /* Adjust ATS */,
295
 				DEF4813D224925A2002AD03A /* Copy Google Plist file */,
296
 				DEF4813D224925A2002AD03A /* Copy Google Plist file */,
296
-				DEC2069321CBBD6900072F03 /* Setup Crashlytics */,
297
 				DE11877A21EE09640078D059 /* Setup Google reverse URL handler */,
297
 				DE11877A21EE09640078D059 /* Setup Google reverse URL handler */,
298
 				DE4F6D6E22005C0400DE699E /* Setup Dropbox */,
298
 				DE4F6D6E22005C0400DE699E /* Setup Dropbox */,
299
 				0BEA5C491F7B8F73000D0AB4 /* Embed Watch Content */,
299
 				0BEA5C491F7B8F73000D0AB4 /* Embed Watch Content */,
474
 			shellPath = /bin/sh;
474
 			shellPath = /bin/sh;
475
 			shellScript = "INFO_PLIST=\"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH\"\nGOOGLE_PLIST=\"$PROJECT_DIR/GoogleService-Info.plist\"\n\nif [[ -f $GOOGLE_PLIST ]]; then\n    REVERSED_CLIENT_ID=$(/usr/libexec/PlistBuddy -c \"Print :REVERSED_CLIENT_ID:\" $GOOGLE_PLIST)\n    /usr/libexec/PlistBuddy -c \"Set :CFBundleURLTypes:1:CFBundleURLSchemes:0 $REVERSED_CLIENT_ID\" $INFO_PLIST\nfi\n";
475
 			shellScript = "INFO_PLIST=\"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH\"\nGOOGLE_PLIST=\"$PROJECT_DIR/GoogleService-Info.plist\"\n\nif [[ -f $GOOGLE_PLIST ]]; then\n    REVERSED_CLIENT_ID=$(/usr/libexec/PlistBuddy -c \"Print :REVERSED_CLIENT_ID:\" $GOOGLE_PLIST)\n    /usr/libexec/PlistBuddy -c \"Set :CFBundleURLTypes:1:CFBundleURLSchemes:0 $REVERSED_CLIENT_ID\" $INFO_PLIST\nfi\n";
476
 		};
476
 		};
477
-		DE4F6D6E22005C0400DE699E /* Setup Dropbox */ = {
477
+		DE3A859324C701EA009B7D76 /* Copy WebRTC dSYM */ = {
478
 			isa = PBXShellScriptBuildPhase;
478
 			isa = PBXShellScriptBuildPhase;
479
 			buildActionMask = 2147483647;
479
 			buildActionMask = 2147483647;
480
 			files = (
480
 			files = (
483
 			);
483
 			);
484
 			inputPaths = (
484
 			inputPaths = (
485
 			);
485
 			);
486
-			name = "Setup Dropbox";
486
+			name = "Copy WebRTC dSYM";
487
 			outputFileListPaths = (
487
 			outputFileListPaths = (
488
 			);
488
 			);
489
 			outputPaths = (
489
 			outputPaths = (
490
 			);
490
 			);
491
 			runOnlyForDeploymentPostprocessing = 0;
491
 			runOnlyForDeploymentPostprocessing = 0;
492
 			shellPath = /bin/sh;
492
 			shellPath = /bin/sh;
493
-			shellScript = "INFO_PLIST=\"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH\"\nDROPBOX_KEY_FILE=\"$PROJECT_DIR/dropbox.key\"\n\nif [[ -f $DROPBOX_KEY_FILE ]]; then\n    /usr/libexec/PlistBuddy -c \"Delete :LSApplicationQueriesSchemes\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :LSApplicationQueriesSchemes array\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :LSApplicationQueriesSchemes:0 string 'dbapi-2'\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :LSApplicationQueriesSchemes:1 string 'dbapi-8-emm'\" $INFO_PLIST\n\n    DROPBOX_KEY=$(head -n 1 $DROPBOX_KEY_FILE)\n    /usr/libexec/PlistBuddy -c \"Add :CFBundleURLTypes:2:CFBundleURLName string dropbox\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :CFBundleURLTypes:2:CFBundleURLSchemes array\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :CFBundleURLTypes:2:CFBundleURLSchemes:0 string $DROPBOX_KEY\" $INFO_PLIST\nfi\n";
493
+			shellScript = "set -x\n\nif [[ \"${CONFIGURATION}\" != \"Debug\" ]]; then\n    cp -r ../../node_modules/react-native-webrtc/ios/WebRTC.dSYM ${DWARF_DSYM_FOLDER_PATH}/\nfi\n";
494
 		};
494
 		};
495
-		DEC2069321CBBD6900072F03 /* Setup Crashlytics */ = {
495
+		DE4F6D6E22005C0400DE699E /* Setup Dropbox */ = {
496
 			isa = PBXShellScriptBuildPhase;
496
 			isa = PBXShellScriptBuildPhase;
497
 			buildActionMask = 2147483647;
497
 			buildActionMask = 2147483647;
498
 			files = (
498
 			files = (
501
 			);
501
 			);
502
 			inputPaths = (
502
 			inputPaths = (
503
 			);
503
 			);
504
-			name = "Setup Crashlytics";
504
+			name = "Setup Dropbox";
505
 			outputFileListPaths = (
505
 			outputFileListPaths = (
506
 			);
506
 			);
507
 			outputPaths = (
507
 			outputPaths = (
508
 			);
508
 			);
509
 			runOnlyForDeploymentPostprocessing = 0;
509
 			runOnlyForDeploymentPostprocessing = 0;
510
 			shellPath = /bin/sh;
510
 			shellPath = /bin/sh;
511
-			shellScript = "GOOGLE_PLIST=\"$PROJECT_DIR/GoogleService-Info.plist\"\n\nif [[ -f $GOOGLE_PLIST ]]; then\n    if [ \"${CONFIGURATION}\" != \"Debug\" ]; then\n        find \"${DWARF_DSYM_FOLDER_PATH}\" -name \"*.dSYM\" | xargs -I \\{\\} ${PODS_ROOT}/Fabric/upload-symbols -gsp $GOOGLE_PLIST -p ios \\{\\}\n    fi\nfi\n";
511
+			shellScript = "INFO_PLIST=\"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH\"\nDROPBOX_KEY_FILE=\"$PROJECT_DIR/dropbox.key\"\n\nif [[ -f $DROPBOX_KEY_FILE ]]; then\n    /usr/libexec/PlistBuddy -c \"Delete :LSApplicationQueriesSchemes\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :LSApplicationQueriesSchemes array\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :LSApplicationQueriesSchemes:0 string 'dbapi-2'\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :LSApplicationQueriesSchemes:1 string 'dbapi-8-emm'\" $INFO_PLIST\n\n    DROPBOX_KEY=$(head -n 1 $DROPBOX_KEY_FILE)\n    /usr/libexec/PlistBuddy -c \"Add :CFBundleURLTypes:2:CFBundleURLName string dropbox\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :CFBundleURLTypes:2:CFBundleURLSchemes array\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :CFBundleURLTypes:2:CFBundleURLSchemes:0 string $DROPBOX_KEY\" $INFO_PLIST\nfi\n";
512
 		};
512
 		};
513
 		DEF4813D224925A2002AD03A /* Copy Google Plist file */ = {
513
 		DEF4813D224925A2002AD03A /* Copy Google Plist file */ = {
514
 			isa = PBXShellScriptBuildPhase;
514
 			isa = PBXShellScriptBuildPhase;

+ 4
- 0
ios/fastlane/Fastfile View File

80
       uses_non_exempt_encryption: false
80
       uses_non_exempt_encryption: false
81
     )
81
     )
82
 
82
 
83
+    # Upload dSYMs to Crashlytics
84
+    download_dsyms
85
+    upload_symbols_to_crashlytics
86
+
83
     # Cleanup
87
     # Cleanup
84
     clean_build_artifacts
88
     clean_build_artifacts
85
     reset_git_repo(skip_clean: true)
89
     reset_git_repo(skip_clean: true)

Loading…
Cancel
Save