Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Meteor settings inside mobile-config #9873

merged 2 commits into from May 16, 2018

Expose Meteor settings inside mobile-config #9873

merged 2 commits into from May 16, 2018


Copy link

@janowsiany janowsiany commented May 9, 2018

this PR allows to access Meteor.settings inside mobile-config.js file which leads to better developer experience for Cordova i.e. credentials sharing.

there is a feature-request meteor/meteor-feature-requests#37


App.configurePlugin('phonegap-plugin-push', {
  SENDER_ID: Settings.pushNotifications.fcm.projectNumber

What is still missing?
Documentation needs to be updated

try {
settings = JSON.parse(files.readFile(options.settingsFile, 'utf8'));
} catch (e) {
throw new Error("METEOR_SETTINGS are not valid JSON.");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's check if e instanceof SyntaxError here… or better yet, use the optimisticReadJsonOrNull function to cache the parsed JSON.

Copy link
Contributor Author

@benjamn Should i updated the docs, also?

@benjamn benjamn added this to the Release 1.7 milestone May 16, 2018
Copy link

benjamn commented May 16, 2018

Heads up: I'm going to merge this into release-1.7 so that it will be available in Meteor 1.7, with one small modification: I'm going to move the settings to App.settings (more like Meteor.settings) rather than having a separate Settings namespace.

@benjamn benjamn changed the base branch from devel to release-1.7 May 16, 2018 16:22
@benjamn benjamn merged commit b35aab6 into meteor:release-1.7 May 16, 2018
benjamn added a commit that referenced this pull request May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants