6 ms·
You were relying on a huge loophole. The code runs inside JavascriptCore but it injects native code into the app.
by ma2rten 10y ago
You were relying on a huge loophole. The code runs inside JavascriptCore but it injects native code into the app.
- mahyarm 10y agoAn objc swizzle is not native code injection, it's a function pointer swap. They swizzle the method to their general objc message handler which then executes a piece of javascript code. For swift they basically patch the app before it gets compiled so that every function, if it meets the conditional would execute their javascript code handler instead. No binary code being injected.
- wrasee 10y ago> No binary code being injected. A number of other posts talk explicitly of dynamic delivery of native code. If you're sure, it's a genuine question: I'm interested to know how this works. Function pointer swaps are one thing, but how would this allow you to patch bugs in the app? I can see how this could let you change the app's behaviour, even including calling private API's, but surely this would be constrained to calling pre-existing behaviour? Or by adding new behaviour is this to mean new javascript behaviour.
- mahyarm 10y agoI think they are confused by the downloading of JavaScript files and executing that inside a 'native context'. I looked at how rollout did their stuff in detail a while back, so i can see how its easy to confuse the two.
- burntrelish1273 10y agoSwizzling is incredibly useful. AFNetworking, MagicalRecord and GPGMail use it, just to name a few.
- artursapek 10y agoThat sounds like a huge hack. They built a company around that?
- vlunkr 10y agoBuilt a company with 3 million in funding https://www.crunchbase.com/organization/rollout-io-2#/entity https://www.crunchbase.com/organization/rollout-io-2#/entity.
- artursapek 10y agolol