Reputation: 5015
I'm trying to run a polymer dart app from Cordova via pub serve
.
Here's what I tried:
config.xml
: I set both access origin, and allow navigation to *
.<content src="http://localhost:8080/index.html" />
instead of <content src="index.html" />
(also tried to put the LAN IP instead of localhost).csp: true
in $dart2js and web_components transformers.Content-Security-Policy
meta tag to allow pretty much everything.pub serve --hostname 0.0.0.0
.cordova run ios
-> then I get a white blank app.Upvotes: 2
Views: 202
Reputation: 5015
The "fix" was to use a later version of Cordova.
Had this issue with 5.1.1, when I updated to the latest (5.4.1 at the moment of writing), it works fine, didn't even need to re-create the Cordova project folder.
I went back and forth between these 2 versions to verify that this was the problem.
Upvotes: 1
Reputation: 2086
I've had success wrapping my Polymer.dart app with Cordova.
Did you verify that your App Transport Security Settings are correct and that Allow Arbitrary Loads is YES? You say you used a plugin for that, but perhaps it wasn't set appropriately.
Did you enable CORS in your Dart server, so that your Cordova app can make requests of it?
Did you drop the output of pub build
(in /build) into the platforms/ios//www folder of your Cordova project?
Upvotes: 0