Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit e5624e1

Browse files
Upgrade Fabric/Crashlytics to new FirebaseCrashlytics #1699
1 parent f132dce commit e5624e1

File tree

18 files changed

+217
-181
lines changed

18 files changed

+217
-181
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
post_install do |installer|
2+
installer.pods_project.targets.each do |target|
3+
target.build_configurations.each do |config|
4+
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
5+
end
6+
end
7+
end

demo-ng/app/App_Resources/iOS/build.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
55
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
66
CODE_SIGN_ENTITLEMENTS = demong/demong.entitlements
77

8-
IPHONEOS_DEPLOYMENT_TARGET = 10.0
8+
IPHONEOS_DEPLOYMENT_TARGET = 12.0
99

1010
// Don't check this in because of CI
1111
// DEVELOPMENT_TEAM = 8Q5F6M3TNS

demo-ng/firebase.nativescript.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
"ml_kit_face_detection": true,
2424
"ml_kit_image_labeling": true,
2525
"ml_kit_object_detection": true,
26-
"ml_kit_automl": true,
27-
"ml_kit_custom_model": true,
28-
"ml_kit_natural_language_identification": true,
29-
"ml_kit_natural_language_translation": true,
30-
"ml_kit_natural_language_smartreply": true
26+
"ml_kit_automl": false,
27+
"ml_kit_custom_model": false,
28+
"ml_kit_natural_language_identification": false,
29+
"ml_kit_natural_language_translation": false,
30+
"ml_kit_natural_language_smartreply": false
3131
}

demo-ng/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"nativescript": {
77
"id": "org.nativescript.firebasedemo.firestore",
88
"tns-android": {
9-
"version": "6.3.1"
9+
"version": "6.5.3"
1010
},
1111
"tns-ios": {
12-
"version": "6.3.0"
12+
"version": "6.5.3"
1313
}
1414
},
1515
"dependencies": {
@@ -25,11 +25,11 @@
2525
"nativescript-angular": "~8.0.3",
2626
"nativescript-camera": "~4.5.0",
2727
"nativescript-imagepicker": "~6.3.0",
28-
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.5.2.tgz",
28+
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.6.0.tgz",
2929
"nativescript-theme-core": "~1.0.6",
3030
"reflect-metadata": "~0.1.13",
3131
"rxjs": "~6.5.2",
32-
"tns-core-modules": "~6.3.2",
32+
"tns-core-modules": "~6.5.3",
3333
"zone.js": "~0.10.0"
3434
},
3535
"devDependencies": {

demo/app/main-page.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221

222222
<Label row="46" colSpan="2" text="Firebase Crash Reporing / Crashlytics" class="subtitle"/>
223223

224-
<Button row="47" col="0" colSpan="2" text="force crash :)" tap="{{ doCrash }}" class="button button-crash"/>
224+
<Button row="47" col="0" colSpan="2" text="force crash (Android only)" tap="{{ doCrash }}" class="button button-crash"/>
225225
<Button row="48" col="0" text="log message crashlytics" tap="{{ doLogMessageCrashlytics }}" class="button button-crash"/>
226226
<Button row="48" col="1" text="set string crashlytics" tap="{{ doSetCrashlyticString }}" class="button button-crash"/>
227227
<Button row="49" col="0" text="set bool crashlytics" tap="{{ doSetCrashlyticBool }}" class="button button-crash"/>

demo/app_resources/iOS/Podfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
post_install do |installer|
2+
installer.pods_project.targets.each do |target|
3+
target.build_configurations.each do |config|
4+
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
5+
end
6+
end
7+
end

demo/app_resources/iOS/build.xcconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
55
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
66
CODE_SIGN_ENTITLEMENTS = demo/demo.entitlements
77

8+
IPHONEOS_DEPLOYMENT_TARGET = 10.0
9+
810
// DEVELOPMENT_TEAM = "Don't set this here, but store in the platforms folder when prompted (to support CI and cross-team development)"
911

1012
// DEVELOPMENT_TEAM = 8Q5F6M3TNS

demo/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
"nativescript": {
33
"id": "org.nativescript.firebasedemo",
44
"tns-ios": {
5-
"version": "6.3.0"
5+
"version": "6.5.3"
66
},
77
"tns-android": {
8-
"version": "6.3.1"
8+
"version": "6.5.3"
99
}
1010
},
1111
"dependencies": {
1212
"firebase-functions": "^2.0.5",
13-
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.5.2.tgz",
13+
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.6.0.tgz",
1414
"nativescript-theme-core": "^1.0.4",
1515
"nativescript-unit-test-runner": "0.7.0",
16-
"tns-core-modules": "~6.3.2"
16+
"tns-core-modules": "~6.5.3"
1717
},
1818
"devDependencies": {
1919
"@types/jasmine": "~2.8.0",
@@ -29,7 +29,7 @@
2929
"lazy": "1.0.11",
3030
"nativescript-css-loader": "~0.26.0",
3131
"nativescript-dev-webpack": "1.0.1",
32-
"tns-platform-declarations": "~6.3.2",
32+
"tns-platform-declarations": "~6.5.3",
3333
"tslint": "~5.4.3",
3434
"typescript": "3.4.5"
3535
},

publish/scripts/installer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,10 @@ function writePodFile(result) {
347347
// The MLVision pod requires a minimum of iOS 9, otherwise the build will fail
348348
(isPresent(result.ml_kit) ? `` : `#`) + `platform :ios, '9.0'
349349
350-
` + (!isSelected(result.external_push_client_only) ? `` : `#`) + `pod 'Firebase/Core', '~>6.16.0'
350+
` + (!isSelected(result.external_push_client_only) ? `` : `#`) + `pod 'Firebase/Core', '~>6.34.0'
351351
352352
# Analytics
353-
` + (isSelected(result.analytics) || (!isSelected(result.external_push_client_only) && !isPresent(result.analytics)) ? `` : `#`) + `pod 'Firebase/Analytics'
353+
` + (isSelected(result.analytics) || isSelected(result.crashlytics) || (!isSelected(result.external_push_client_only) && !isPresent(result.analytics)) ? `` : `#`) + `pod 'Firebase/Analytics'
354354
355355
# Authentication
356356
` + (isSelected(result.authentication) || (!isSelected(result.external_push_client_only) && !isPresent(result.external_push_client_only)) ? `` : `#`) + `pod 'Firebase/Auth'
@@ -418,7 +418,7 @@ end`) + `
418418
` + (isSelected(result.facebook_auth) ? `` : `#`) + `pod 'FBSDKLoginKit'
419419
420420
# Google Authentication
421-
` + (isSelected(result.google_auth) ? `` : `#`) + `pod 'GoogleSignIn', '~> 5.0'`);
421+
` + (isSelected(result.google_auth) ? `` : `#`) + `pod 'GoogleSignIn', '~> 5.0.2'`);
422422
console.log('Successfully created iOS (Pod) file.');
423423
} catch (e) {
424424
console.log('Failed to create iOS (Pod) file.');

src/crashlytics/crashlytics.android.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { ENABLE_CRASHLYTICS_HINT } from "./crashlytics-common";
2-
import * as appModule from 'tns-core-modules/application';
32

4-
declare const com: any;
3+
declare const com, java: any;
54

65
export function sendCrashLog(exception: any /* java.lang.Exception */): void {
76
if (isCrashlyticsAvailable()) {

0 commit comments

Comments
 (0)