How can you constantly change the configuration of an iOS app in Meteor Cordova?

Every time I do meteor build

, I have to open XCode and do the following:

  • remove and add the item from "Link Binary With Libraries" (Facebook SDK).
  • add url type (custom url scheme for my app)
  • add "Required Device Capabilities" to "Custom iOS Target Properties"

How can I edit the Meteor project so that these steps are done automatically and add things to automatically AndroidManifest.xml

?

In a sense, use mobile-config.js

or cordova-build-override

?

+3


source to share


2 answers


Unfortunately the plist values โ€‹โ€‹(and presumably AndroidManifest.xml) can only be changed by the plugin:



Add entry to iOS.plist file via Cordova config.xml

0


source


I'm glad to see another guy trying to build a hybrid app using Meteor / while extending the Meteor Cordova iOS app, as I am facing the same issues. Therefore, I am very happy to share with you my impressions and approaches. :-)

So far I have come up with the following approach:

  • I created a basic template for my iOS app using the meteor assembly (not the iOS device meteor run, since I didn't know if Meteor was doing some optimizations for production code).

  • Then I copied the entire Xcode project under / platform / ios into another loaction and used this new project as my "main" project from now on. This project is enriched with its own code eg. it also includes the Cocoa Pods which I need.

  • Of course, I also didn't want to copy the files every time I start a new Meteor build. At least I would like to update the Staging / www folder as this happens quite often.

So my first (rather naive) approach was

  • delete Staging / www folder in main project
  • replace it with a relative link (using Xcode's bind function) to the Staging / www folder inside .meteor / local /.../ ios / project

This approach does not work as the shell script used in the Meteor Xcode project cannot handle these references.

My second approach is to create a symbolic link at the filesystem level. This works as it should and I can build the project in Xcode as it should.



I could have taken the same approach for the Cordova plugins folder, but I decided to replace the plugins manually to get better control over them, even then it would take a little more effort.

Having a symbolic link also means that Xcode version control (as well as the SVN that I use for everything) ignores anything below Staging / www, which is good in my opinion, because I already version the webapp code into the Meteor project itself ...

BTW: I started a discussion thread in a hybrid mobile app on the Meteor forums, but so far it hasn't generated much interest:

https://forums.meteor.com/t/building-a-hybrid-meteor-cordova-app-share-experiences/8212

Perhaps we could keep an eye on the meteoric things there for the Meteor community to participate in the discussion?

EDIT: I would also like to share what failed completely, at least for me, maybe I was too dumb ... Before using the Meteor Xcode template as a starting point, I also tried this "the other way around" i.e. I started with my already existing Xcode application project and tried to include the Meteor / Cordova part manually. Using this approach I was never able to set everything up correctly. I had a lot of trouble and also had to set up a lot of compiler / linker flags. even to get the code compiled. It caused me a lot of gray hair. But even after I managed to collect everything, Meteor hung during startup - and I never figured out why.

One of the remaining issues that I still face is that the push hot push feature for Meteor has some serious issues on iOS which are also documented as GitHub issues. It may happen that the iOS app breaks completely and needs to be reinstalled. I tried the mdg: reload-on-resume package, but it didn't work as it should and made things worse. As far as I can tell from the GitHub discussions, it is best to disable hotcode until the Meteor team has resolved these issues. Aborting the app entirely due to codepresses is not what my users expected.

+3


source







All Articles