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

Commit

Permalink
Don't load AdMob symbols if AdMob was not enabled in the config #290
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyverbruggen committed Feb 19, 2017
1 parent 73ca15b commit be37a27
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 5 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
<img src="docs/images/firebase-logo.png" width="116px" height="32px" alt="Firebase"/>


## 3.10.1 (2017, February 19)

[Full changelog](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/compare/3.10.0...3.10.1)

### SDK versions

If version numbers __changed__, clean your platform folders to avoid build errors.
Also, for Android update your Google Repository in the Android SDK manager (type `android` on the command prompt),
and for iOS do a `pod repo update` to fetch the latest versions from Cocoapods.

- iOS: 3.13.x
- Android: 10.2.x

### Fixes
- [#290](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/290) Don't load AdMob symbols if AdMob was not enabled in the config




## 3.10.0 (2017, February 17)

[Full changelog](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/compare/3.9.3...3.10.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-plugin-firebase",
"version": "3.10.0",
"version": "3.10.1",
"description": "Fire. Base. Firebase!",
"main": "firebase",
"typings": "index.d.ts",
Expand Down
File renamed without changes.
13 changes: 11 additions & 2 deletions scripts/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,26 @@ function promptQuestions() {
});
}
function promptQuestionsResult(result) {
if(usingiOS) {
if (usingiOS) {
writePodFile(result);
exposeAdMobSymbols(isSelected(result.admob));
}
if(usingAndroid) {
if (usingAndroid) {
writeGradleFile(result);
writeGoogleServiceCopyHook();
writeGoogleServiceGradleHook();
}
console.log('Firebase post install completed. To re-run this script, navigate to the root directory of `nativescript-plugin-firebase` in your `node_modules` folder and run: `npm run config`.');
}

function exposeAdMobSymbols(enable) {
if (enable && fs.existsSync(directories.ios + '/build.xcconfig.admob')) {
fs.renameSync(directories.ios + '/build.xcconfig.admob', directories.ios + '/build.xcconfig');
} else if (!enable && fs.existsSync(directories.ios + '/build.xcconfig')) {
fs.renameSync(directories.ios + '/build.xcconfig', directories.ios + '/build.xcconfig.admob');
}
}

function askSaveConfigPrompt() {
prompt.get({
name: 'save_config',
Expand Down
13 changes: 11 additions & 2 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -2962,17 +2962,26 @@ function promptQuestions() {
});
}
function promptQuestionsResult(result) {
if(usingiOS) {
if (usingiOS) {
writePodFile(result);
exposeAdMobSymbols(isSelected(result.admob));
}
if(usingAndroid) {
if (usingAndroid) {
writeGradleFile(result);
writeGoogleServiceCopyHook();
writeGoogleServiceGradleHook();
}
console.log('Firebase post install completed. To re-run this script, navigate to the root directory of `nativescript-plugin-firebase` in your `node_modules` folder and run: `npm run config`.');
}

function exposeAdMobSymbols(enable) {
if (enable && fs.existsSync(directories.ios + '/build.xcconfig.admob')) {
fs.renameSync(directories.ios + '/build.xcconfig.admob', directories.ios + '/build.xcconfig');
} else if (!enable && fs.existsSync(directories.ios + '/build.xcconfig')) {
fs.renameSync(directories.ios + '/build.xcconfig', directories.ios + '/build.xcconfig.admob');
}
}

function askSaveConfigPrompt() {
prompt.get({
name: 'save_config',
Expand Down

0 comments on commit be37a27

Please sign in to comment.