Hacker News new | ask | show | jobs
by ma2rten 3393 days ago
You were relying on a huge loophole. The code runs inside JavascriptCore but it injects native code into the app.
2 comments

An 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.

> 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.

I 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.
Swizzling is incredibly useful. AFNetworking, MagicalRecord and GPGMail use it, just to name a few.
That sounds like a huge hack. They built a company around that?
Built a company with 3 million in funding https://www.crunchbase.com/organization/rollout-io-2#/entity.
lol