As an academic and mental exercise, how would one download a precompiled binary file and execute methods in it on an iOS device?
I understand this violates Apple's License Agreement, section 3.2.2, but I am asking for personal projects and to learn more about the iOS runtime.
Goal
- Download http://someexample.com/MyCoolBinary.a
- Save downloaded binary to device disk.
- Call a known method that exists in the binary.
What I've tried
I haven't attempted anything concrete, but I would imagine that it would be possible to do something along the lines of...
void *myDownloadedLibrary = dlopen("/path/to/newly/downloaded/framework/MyCoolBinary.framework")
dlsym(myDownloadedLibrary)
Any examples or pointers on what kind of libraries this would work with would be appreciated.
Thanks.