Comments (44)
Hi, thanks very much for spending the time on this. There is some very similar code at the end of SimpleSocket.mm though it no longer seems to work. My first impression is that I'd be reluctant to build something iOS 17 specific into the app for now but if you come up with a PR that is backward compatible I'll take a look after testing it out. As it stands I don't think the environment variable override variable is an entirely bad solution for the minority of people who are using device injection (which didn't even work 6 months ago though the number using it does seem to be steadily increasing.) Apologies in advance for the time you spend refactoring ClientBoot.mm. It's overdue for a rewrite.
from injectioniii.
no worries, seems like the current solution with multicasts no longer works, but this solution with broadcasts does work ... not sure why, I can try to dig into the current code and see if I can fix it.
from injectioniii.
I look forward to the reviewing it; You write quality C. I may have a try myself now you've suggested using broadcast instead of multicast addresses.
from injectioniii.
hi @johnno1962 seems like this idea have some issues:
- It seems like the iOS17 network ip address is only set up after around 30-60 seconds of connection over USB.
- no support for older devices.
- the device fails to find the host if it connected to wifi.
A colleague of mine suggested looking at the Peertalk library and try using it instead, looking at the library and the examples.
Am I right to assume that all of the communication in Injection/Hotreloading is done by the SimpleSocket
file is that right?
seems like behind the scenes, all of the network code there boils down to this method:
- (BOOL)perform:(io_func)io ofBytes:(const void *)buffer
length:(size_t)length cmd:(SEL)cmd {
size_t rd, ptr = 0;
SLog(@"#%d %s %lu [%p] %s", clientSocket, io == read ?
"<-" : "->", length, buffer, sel_getName(cmd));
while (ptr < length &&
(rd = io(clientSocket, (char *)buffer+ptr, length-ptr)) > 0)
ptr += rd;
if (ptr < length) {
NSLog(@"[%@ %s:%p length:%lu] error: %lu %s",
self, sel_getName(cmd), buffer, length, ptr, strerror(errno));
return FALSE;
}
return TRUE;
}
so maybe we can re-implement it over their network stack?
from injectioniii.
Hi again, my first impression is I'd be reluctant to change the network "stack" at this stage so I'd be wanting to try other alternatives first. I also note that project hasn't been updated for three years which is either very good or very not good when one is thinking of adopting it. I've a tried few simple broadcast things this morning but the problem is getting the local address(es) of the device to construct the broadcast addresses to try. I'll try a bit harder later on unless you can suggest other alternatives. Thanks for continuing to look into this. It would be nice to find a better solution for devices.
from injectioniii.
Related Issues (20)
- Adjust the "Header Search Paths" in your project's Build Settings
- Adjust the "Header Search Paths" in your project's Build Settings HOT 14
- Re-compilation failed (see: /var/folders/hf/f61grvh50_b57h3f4qr1zx980000gn/T/com.johnholdsworth.InjectionIII/command.sh) HOT 1
- Could not locate compile command for ... HOT 14
- Could not locate compile command for {modified swift file} HOT 3
- xcode14.3.1,load InjectionIII.bundle fail HOT 4
- [Question] Does InjectionIII supports Bazel 6.1.x? HOT 8
- My device is M1 series, and I want to run iOS App on my M1 Pro. At present, InjectionIII only supports simulators. Do you think it is possible to support M1 series Mac? HOT 1
- Can't launch builds from Xcode 15 beta HOT 4
- Codesign failed. If you are using macOS 11+, Please download a new release from HOT 1
- Codesign failed. If you are using macOS 11+, Please download a new release from https://github.com/johnno1962/InjectionIII/releases HOT 9
- Crashing quite often HOT 26
- often crash when save file HOT 10
- [Feature Request]: Supporting Bazel Build System with Hot Reloading HOT 1
- Re-compilation failed, error: cannot find type '*' in scope HOT 3
- cannot open file while injecting HOT 5
- [Question] Does Injection recompile the whole module? HOT 2
- Inheritance seemingly not fully supported HOT 16
- Usage with pure Swift Package executable HOT 10
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 injectioniii.