Skip to content

ionic emulate ios --livereload changes config.xml #1841

Closed

Description

@sryze

Short description of the problem:

After running ionic emulate ios --livereload ionic adds a new <allow-navigation> entry to config.xml which results in unwanted version control changes.

After some time config.xml contains a lot of things like:

   <allow-navigation href="http://192.168.0.1:8102"/>
   <allow-navigation href="http://192.168.1.10:8100"/>

Basically IP addresses of every development machine where you used livereload on iOS.

What behavior are you expecting?

No config.xml changes.

Steps to reproduce:

  1. Remove all allow-navigation elements from config.xml
  2. Execute ionic emulate ios -l
  3. Config is modified

Ionic info

Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
ios-deploy version: 1.9.0
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v7.0.0
Xcode version: Xcode 8.2.1 Build version 8C1002

Activity

  1. renjithspace commented on Jan 8, 2018

    @renjithspace

    +1

  2. added this to the CLI Future milestone on Jan 8, 2018
  3. imhoffd commented on Jan 23, 2018

    @imhoffd
    Contributor

    🔖 2018 Update: The latest CLI still leaves multiple <allow-navigation> tags in config.xml after the Cordova run/emulate is finished. These configuration entries are only necessary during run/emulate, not after. We already are successfully changing <content src="index.html"> during run/emulate, and reverting it to what it was when the command finishes. I imagine the code for removing unnecessary <allow-navigation tags would live in the same spot.

  4. self-assigned this
    on Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions