I want to manipulate iOS binary file and change two strings in it. I used hex editor to search and change these strings. But after the binary file is uploaded and replaced with the origin app's binary file, it closes immediately when I launch the app, even though I fixed mode and permission of binary, the problem still exists. any suggestions will be appreciated
All apps and binaries that are executed on Apple platforms need to be signed by key/certificate issued by Apple. By modifying a single byte in the app binaries, you have invalidated this signature and thus iOS will refuse to execute this binary.
Look into the system log of the device, there you will find the error message about the invalid signature of the binary.
Even on jailbroken devices, this signature is still checked. However, depending on the jailbreak, usually a shortcut to accept "fake signed binaries" is added by the jailbreak. Therefore, binaries signed by
ldid2 are accepted by the OS as valid signature. You can try to resign your binary with one of those tools and re-try.
Additionally, I recommend not to overwrite the binary as this often causes cache problems. The recommended way if to delete the binary and then copy the new binary to the same place. This seems to avoid some problems.