insert_dylib | Command line utility for inserting a dylib load | Command Line Interface library
kandi X-RAY | insert_dylib Summary
kandi X-RAY | insert_dylib Summary
Command line utility for inserting a dylib load command into a Mach-O binary.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of insert_dylib
insert_dylib Key Features
insert_dylib Examples and Code Snippets
Community Discussions
Trending Discussions on insert_dylib
QUESTION
I am trying to hook a function of a target binary on a non-jailbroken device.
It actually works in Objective C. I simply add my own dylib to the binary of the ipa, as it is usual (insert_dylib), and do my swizzling.
Now when I hook the function I'd like to pass the data to Swift and process the data using Swift.
I imported Swift into ObjC using the standard tutorial and this gives no problems.
If I inject the library into the ipa, the ipa works as long my Swift function is not called. When it is called, the app freezes. (It does not print the log that would be printed as soon as the function starts).
My feel is that the library does not "connect to the swift runtime", perhaps it should call some swift initialization?.
Note that the hooked app already uses swift. In fact, otool -L, shows:
...ANSWER
Answered 2021-Feb-19 at 11:33I found a solution: my library was built as a sub-target of another project. This generated a .dylib not really suitable for other binaries. So, I created another framework-project just for this library, I injected the library and it worked, without an additional steps (e.g. optool, install_name_tool, etc...).
The hint that led me to the right way was this crash:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install insert_dylib
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page