With the rise of different apps, which hijack the iOS simulator (such as flawless or now sherlock) I'm curious how this is done.
As far as I've found there were options based on SIMBL but I don't think the above use it. Further more there is Injection (https://github.com/johnno1962/injectionforxcode) which uses XPC's to inject code.
I would guess there are different ways (e.g. how is the UI change done? both either the flawless layer on top of it, or the variable change in sherlock) so it would be great if someone here would point me in the right direction.
I havent used the plugins BUT:
sherlock loads code in the app being run BY the simulator from what I read. (https://www.hackingwithswift.com/articles/131/sherlock-turbocharges-your-ios-simulator)
flawless but afaics on the website all it does is overlay a UIWindow ontop of the simulator window. Even a separate app could do this. (https://flawlessapp.io/)
=> there is still no public / or private api for the simulator AFAIK
=> targeting apps inside simulator seems easier to me
(there are other ways by manipulating defaults or by playing around with simctl process)