GithubHelp home page GithubHelp logo

Comments (11)

zxcware avatar zxcware commented on May 22, 2024 1

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.

alexblom avatar alexblom commented on May 22, 2024

If you run a standard ember cdv:build without liveReload, is that successful?

from corber.

zxcware avatar zxcware commented on May 22, 2024

@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.

zxcware avatar zxcware commented on May 22, 2024

@alexblom What's the best way to reach you? email or twitter?

from corber.

alexblom avatar alexblom commented on May 22, 2024

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.

zxcware avatar zxcware commented on May 22, 2024

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.

AmilKey avatar AmilKey commented on May 22, 2024

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.

alexblom avatar alexblom commented on May 22, 2024

@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:

  1. ember builds produce a working dist; and.
  2. ember cdv:build produces a working build.
    Hence the questions.

from corber.

zxcware avatar zxcware commented on May 22, 2024

@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.

alexblom avatar alexblom commented on May 22, 2024

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.

alexblom avatar alexblom commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.