This fixes a regression caused by 88d43a0f16 which is demonstrated in meteor/meteor#7849.
Essentially, with the current implementation some Cordova build elements are "stale" when the build is copied. For example, if you execute a `meteor run ios` and then `meteor build . --server=http://example.com/` (note: `example.com`) the `config.xml` (`<access origin />`), the boilerplate HTML (`__meteor_runtime_config__`) and other elements of the bundle (`Info.plist` on iOS) will still contain the previously used `http://<local_ip>:3000` address instead of `http://example.com` as they should.
Additionally, it would appear that it's impossible to actually checkout a project and immediately run `meteor build` without running `meteor run (android|ios)` first.
Various work-arounds for this seem to exist, such as running `meteor build` twice, or running `meteor run --server=http://production.com` first.
Ultimately, this is occurring because the bundle is being copied before the Cordova `prepareForPlatform` occurs which I believe was not intended.
There is already a test in place which fails without this fix, but marked as `slow` and therefore not executed on CircleCI. Specifically, `cordova builds with server options` would have caught this. Forcibly running this test locally now passes with this change.
Fixes meteor/meteor#7849
Fixes meteor/meteor#7291
Fixes meteor/meteor#6756
Meteor
Meteor is an ultra-simple environment for building modern web applications.
With Meteor you write apps:
- in pure JavaScript
- that send data over the wire, rather than HTML
- using your choice of popular open-source libraries
Try the getting started tutorial.
Next, read the guide or the reference documentation at http://docs.meteor.com/.
Quick Start
On Windows, simply go to https://www.meteor.com/install and use the Windows installer.
On Linux/macOS, use this line:
curl https://install.meteor.com/ | sh
Create a project:
meteor create try-meteor
Run it:
cd try-meteor
meteor
Slow Start (for developers)
If you want to run on the bleeding edge, or help contribute to Meteor, you can run Meteor directly from a Git checkout using these steps:
-
Clone from GitHub
$ git clone --recursive https://github.com/meteor/meteor.git $ cd meteorImportant note about Git submodules!
This repository uses Git submodules. If you clone without the
--recursiveflag, re-fetch withgit pullor experience "Depending on unknown package" errors, run the following in the repository root to sync things up again:$ git submodule update --init --recursive -
(Optional) Compile dependencies
This optional step requires a C and C++ compiler, autotools, and scons. If this step is skipped, Meteor will simply download pre-built binaries.
To build everything from scratch (
node,npm,mongodb, etc.) run the following:$ ./scripts/generate-dev-bundle.sh # OPTIONAL! -
Run a Meteor command to install dependencies
If you did not compile dependencies above, this will also download the binaries.
$ ./meteor --help -
Ready to Go!
Your local Meteor checkout is now ready to use! You can use this
./meteoranywhere you would normally call the systemmeteor. For example,:$ cd my-app/ $ /path/to/meteor-checkout/meteor runNote: When running from a
gitcheckout, you cannot pin apps to specific Meteor releases or change the release using--release.
Uninstalling Meteor
Aside from a short launcher shell script, Meteor installs itself inside your home directory. To uninstall Meteor, run:
rm -rf ~/.meteor/
sudo rm /usr/local/bin/meteor
On Windows, just run the uninstaller from your Control Panel.
Developer Resources
Building an application with Meteor?
- Announcement list: sign up at http://www.meteor.com/
- Having problems? Ask for help at: http://stackoverflow.com/questions/tagged/meteor
- Discussion forums: https://forums.meteor.com/
Interested in contributing to Meteor?
- Issue tracker: https://github.com/meteor/meteor/issues
- Contribution guidelines: https://github.com/meteor/meteor/tree/devel/Contributing.md
We are hiring! Visit https://www.meteor.com/jobs to learn more about working full-time on the Meteor project.