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

Commit

Permalink
Basic integration of Crashlytics for iOS... #549 (hardening the metad…
Browse files Browse the repository at this point in the history
…ata-copy-hack)
  • Loading branch information
EddyVerbruggen committed Apr 25, 2018
1 parent 69b5d15 commit 36b17ba
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 2 additions & 0 deletions demo/app/main-view-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,8 @@ export class HelloWorldModel extends Observable {
}

public doGetRemoteConfig(): void {
// TODO downgrade to 3.4 and see if we get logging and alerts.. do this before publishing (the otherwise finished) 5.3.0 version
// .. hmm doesn't look like it... and neither is disabling crash reporting
console.log(">>> doGetRemoteConfig");
firebase.getRemoteConfig({
developerMode: true,
Expand Down
7 changes: 5 additions & 2 deletions publish/scripts/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,12 @@ task copyMetadata {
doLast {
copy {
from "$projectDir/src/main/assets/metadata"
def toDir = new File("$projectDir/build/intermediates/assets").listFiles()[0].name
if (toDir != 'debug' && toDir != 'release') {
def toDir = project.hasProperty("release") ? "release" : "debug";
if (new File("$projectDir/build/intermediates/assets").listFiles() != null) {
toDir = new File("$projectDir/build/intermediates/assets").listFiles()[0].name
if (toDir != 'debug' && toDir != 'release') {
toDir += "/release"
}
}
into "$projectDir/build/intermediates/assets/" + toDir + "/metadata"
}
Expand Down
9 changes: 5 additions & 4 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
"config": "node scripts/postinstall.js config",
"tsc": "tsc -skipLibCheck",
"plugin.tscwatch": "npm run tsc -- -w",
"package": "cd ../publish && rm -rf ./package && ./pack.sh",
"demo.ios": "npm run preparedemo && cd ../demo && tns platform remove ios && tns run ios",
"demo-ng.ios": "npm run preparedemo-ng && cd ../demo-ng && tns platform remove ios && tns run ios",
"demo.android": "npm run preparedemo && cd ../demo && tns platform remove android && tns run android",
"package": "cd ../publish && rimraf ./package && ./pack.sh",
"demo.ios": "npm run preparedemo && cd ../demo && rimraf platforms/ios && tns run ios",
"demo-ng.ios": "npm run preparedemo-ng && cd ../demo-ng && rimraf platforms/ios && tns run ios",
"demo.android": "npm run preparedemo && cd ../demo && rimraf platforms/android && tns run android",
"demo-ng.android": "npm run preparedemo-ng && cd ../demo-ng && tns run android",
"test": "npm run tslint && npm run tslint.demo && cd ../demo && tns build ios && tns build android",
"test.ios": "cd ../demo && tns test ios --emulator",
Expand Down Expand Up @@ -105,6 +105,7 @@
"xcode": "~0.9.0"
},
"devDependencies": {
"rimraf": "^2.6.2",
"tns-core-modules": "~4.0.0",
"tns-platform-declarations": "~4.0.0",
"tslint": "^5.1.0",
Expand Down
7 changes: 5 additions & 2 deletions src/scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -3423,9 +3423,12 @@ task copyMetadata {
doLast {
copy {
from "$projectDir/src/main/assets/metadata"
def toDir = new File("$projectDir/build/intermediates/assets").listFiles()[0].name
if (toDir != 'debug' && toDir != 'release') {
def toDir = project.hasProperty("release") ? "release" : "debug";
if (new File("$projectDir/build/intermediates/assets").listFiles() != null) {
toDir = new File("$projectDir/build/intermediates/assets").listFiles()[0].name
if (toDir != 'debug' && toDir != 'release') {
toDir += "/release"
}
}
into "$projectDir/build/intermediates/assets/" + toDir + "/metadata"
}
Expand Down

0 comments on commit 36b17ba

Please sign in to comment.