Skip to content

Ionic DevApp Support #342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mlynch opened this issue Mar 15, 2018 · 9 comments
Closed

Ionic DevApp Support #342

mlynch opened this issue Mar 15, 2018 · 9 comments

Comments

@mlynch
Copy link
Contributor

mlynch commented Mar 15, 2018

No description provided.

@mlynch mlynch added this to the Beta 2 milestone Apr 17, 2018
@jbarnabe
Copy link

Hi @mlynch, any news about this ? Thx

@sneko
Copy link

sneko commented Oct 24, 2018

+1 also interested in 😃

@mlynch
Copy link
Contributor Author

mlynch commented Oct 24, 2018

Adjusting the priority here, it's not a high priority for us right now. Would rather focus on making the native dev process easier.

@sneko
Copy link

sneko commented Oct 24, 2018

@mlynch it would be great if we could easily precise from the Capacitor CLI where the native app needs to look for the index.html.

I mean, instead of looking locally, the webview could either look on the network (x.x.x.x:8000/index.html) or on an URL (https://aaaa.com/index.html). Like that developers/testers could build the native app once and as long as the native features doesn't change they are able to see updates.

Personnally, building the app with the remote URL (it could be an test environment) is really useful for the team to test directly modifications without having to go through TestFlight (iOS)...

@jcesarmobile
Copy link
Member

That's already implemented, you can configure server.url like this in the capacitor.config.json:

"server": {
    "url": "http://serverip:serverport/"
}

If you are using Ionic, the latest CLI has integrated it, it even configures the url for you
If not using Ionic you can use any server that looks for changes and reload
There is even a mac app called codekit that does it, see this blog post https://medium.com/@corymc/speeding-up-your-capacitor-development-with-codekit-a5fb679c58c

@sneko
Copy link

sneko commented Oct 31, 2018

@jcesarmobile thank you for this information.

And what would you recommend if I need to manage multiple environments, for example: production, staging, development?

Do I need to create three different files (capacitor.XXX.config.json) and find a way to switch between them?

Or maybe just use one file but directly inside each platform override parameters depending on an environment variable while building?

The main goal is for example, having multiple applications on my phone with different id so they can cohabit while having their specific settings

@sandervandenbrink
Copy link

@jcesarmobile

I've been making use of this server.url config property for loading a remote client and it works like your said. Capacitor though, expects that there is a index.html file is locally included in the build even though it won't use it. (https://github.com/ionic-team/capacitor/blob/master/ios/Capacitor/Capacitor/CAPBridgeViewController.swift#L74)

Is there a reason for Capacitor to require an index.html locally while the client could be loaded remotely?

@jcesarmobile
Copy link
Member

certainly it's not required, that check was there before the server url was implemented, nevertheless, some other files are required like cordova.js and native-bridge.js that will only be there if you run npx cap copy

@jcesarmobile
Copy link
Member

Going to close as it's not really a Capacitor issue.

It should be a totally new Dev App for Capacitor, or migrate the existing one to be a Capacitor app. But considering Apple rejections of dev apps last year, it's probably not worth the effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants