injectionforxcode icon indicating copy to clipboard operation
injectionforxcode copied to clipboard

AppCode main.m patch has IP address that may change

Open lyahdav opened this issue 9 years ago • 3 comments

When you patch your main.m via the Injection AppCode menu item, it adds your machine's current IP address as a constant. Any reason it doesn't set this to something like "0.0.0.0" which will always work? Most machines these days have a dynamic IP address, so won't this cause issues when you get a new IP?

lyahdav avatar Jun 07 '16 22:06 lyahdav

+1. I dont suppose setting the ip to a non address would work, but on every injection, we can calculate which files change, why can't we calculate the IP address change with ifconfig and set it as an env. variable?

joedaniels29 avatar Jun 21 '16 16:06 joedaniels29

I now always set this to 127.0.0.1 and it never have to change it. Seems like that should always work.

lyahdav avatar Sep 14 '16 16:09 lyahdav

This will work in the simulator but it doesn’t matter anyways as the code detects a build on the simulator and uses 127.0.0.1 internally.

johnno1962 avatar Sep 14 '16 16:09 johnno1962