Comments (11)
Oh yeah! It works by setting locationType to hash and adding urlPrefix in mirage!
Now, ember-cordova is backed with emberjs official example! I guess we can update the README and tell the folks we have a working ember-cordova example!
@alexblom, thank you!
from corber.
If you run a standard ember cdv:build without liveReload, is that successful?
from corber.
@alexblom Do you mean not running 'ember cdv:serve' in tab1? I felt I didn't do anything for liveReload. In my idea: Running ember cdv:serve launches a server, the simulator will then be able to fetch the content from the server and renders it out.
from corber.
@alexblom What's the best way to reach you? email or twitter?
from corber.
email or ember-slack (@alexblom there too). Happy to do a quick hero to debug this.
By the question, I'm asking if you just run:
ember cdv:build
ember cordova run ios
Does the app work as expected? (e.g. is your issue that all builds are broken, or live reload builds are broken).
from corber.
No. just running those commands didn't work. I tried it with and without another tab running 'ember serve', both resulting in a white blank screen after the 'cordova robot' splash screen.
My issue is: following the instructions and applying ember-cordova to emberjs example super-rentals app: https://github.com/emberjs/super-rentals doesn't work. Not sure if it can be marked as 'some build is broken'.
Once we make it work, it can be an example app for ember-cordova. I'll set up a git public repository of my sample codes and we'll work together to fix it.
See you on slack.
from corber.
any updates here?
[Error] Failed to load resource: The requested URL was not found on this server. (vendor.css, line 0)
[Error] Failed to load resource: The requested URL was not found on this server. (app.css, line 0)
[Error] Failed to load resource: The requested URL was not found on this server. (cordova.js, line 0)
[Error] Failed to load resource: The requested URL was not found on this server. (vendor.js, line 0)
[Error] Failed to load resource: The requested URL was not found on this server. (app.js, line 0)
from corber.
@AmilKey: Responding to you in your issue.
@zxcware: I just tried to download the super-rentals app (master branch) so you can compare.
I can see it when I run ember server, but builds seem to be generically producing a white screen (ember build --env=development, ember build --env=production).
Can you confirm normal ember builds are working?
In general, for live reload to be working we need to be in a state where:
- ember builds produce a working dist; and.
- ember cdv:build produces a working build.
Hence the questions.
from corber.
@alexblom This is my observation: If you run 'ember server' and hit localhost:4200 in browser, it would work. But if you shut down the server, simply opening the index.html file in browser wouldn't work, a blank screen showing up. I guess this might be what you said 'ember builds are not working'?
The reason is: the paths for all resource files are based on the serving directory: '/' instead of relative paths. Ember seems to assume a server is running to serve resource files at '/'. I don't know if there is any configuration to change it or some tricks to get around it.
from corber.
I just took a deeper look at your app. The builds are fine, it was actually Mirage requests failing.
You need to edit config/environment.js to have locationType of hash (isleofcode/super-rentals-cordova@277271b). Once that is done, you can run ember cdv:build as expected. The build seems to work correctly, and the background changes. Mirage requests still failed though.
To fix Mirage, urlPrefix needed to be defined: isleofcode/super-rentals-cordova@20ad46b
Here is the super-rentals with working ember-cordova: https://github.com/isleofcode/super-rentals-cordova/pull/1/files
from corber.
np, and go for it with the README. Perhaps note that it is not at all optimized for hybrid performance - is just an example of using the container.
from corber.
Related Issues (20)
- corber start "Could not find cordova.js script tag. Plugin loading may fail." HOT 4
- corber make-icons for android additional with round icons HOT 2
- Consider using Ionic Webview as default webview HOT 2
- ionic 5 run on android using vs code HOT 1
- "corber start" hangs on ember build
- corber init --cordova-id is broken
- Cordova 10 support? HOT 1
- corber start initializes with environment undefined
- plans to support cordova-ios v6.2.0? HOT 1
- SSL & Headers Issues in corber.io website
- Trying to run on windows get ANDROID_SDK_ROOT ENV variable not found
- plugin doesn't support this project's cordova-lib version 9.0.1 HOT 1
- plugin cordova-plugin-whitelist HOT 4
- /usr/bin/instruments no longer present on XCode 13 HOT 1
- Issue with `corber init` into 1.4.4 HOT 3
- xctrace not in path with Xcode 12.5.1 HOT 1
- Gives a future for this project? HOT 1
- How `skip-framework-build` option of `corber build` works? HOT 1
- 'browser' is not a valid platform
- Playstore not accepting app built with this anymore HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corber.