How to remove these mangled selectors from iOS app
Asked Answered
L

1

6

I need help in removing known mangled selectors in my iOS app.

Apple rejected my app stating:

Regarding Guideline 2.3.1, this app is verified to contain mangled selectors such as - x7kQPFEZS4af59md1eVMqf42YSTGAZVO: and i5B8qlaSJwvmVviceDOQkqQ0vwGq35XMmtV81zlsmHnws.

I tried running nm command which listed all the symbols, and then searched for above mentioned selectors using grep:

grep -r x7kQPFEZS4af59md1eVMqf42YSTGAZVO .

grep -r i5B8qlaSJwvmVviceDOQkqQ0vwGq35XMmtV81zlsmHnws .

Both grep shows following result:

Binary file ./Payload/MyAppName.app/MyAppName matches

MyAppName is a binary file (unix executable).

How do I proceed further and remove these mangled selectors from my iOS app? (or at least locate what code / framework is creating this selector)

Lavettelavigne answered 14/2, 2019 at 5:22 Comment(3)
do you find any answer ?Coarsen
@NabeelAhmed Yes. Added as answer, might help others.Lavettelavigne
grep -r x7kQPFEZS4af59md1eVMqf42YSTGAZVO . This works for meTolidine
L
4

I used a disassembler Hopper to locate a library that had the mangled selectors. I followed these steps:

  1. Create .ipa file from Xcode project (Not sure if it was exported as development or App Store build, you may have to try each).
  2. Unzip the .ipa file
  3. Open Hopper application, drag and drop the .app file inside Payload folder after unzip.
  4. Load it as 'FAT archive' when asked.
  5. Let the application complete the scan.
  6. Search for the mangled selector name on the left menu.
  7. Select the matched selector, on the right detail pane, I could find some project specific class / method names. I searched these Class and method names in my project and located the library.

The app was approved after I removed that library.

Lavettelavigne answered 1/3, 2019 at 13:49 Comment(2)
I had similar issue but apple didnt mention any mangled selectors. Would you recommend using Hooper ? Apple's response. We discovered that your app contains obfuscated code, selector mangling, or features meant to subvert the App Review process by changing this app's concept after approval to the App Store. The next submission of this app may require a longer review time, and this app will not be eligible for an expedited review until this issue is resolved.Wigeon
@TaimurAjmal I had to ask further details from Apple, then they provided the mangled selectors. Hopper won't be useful here if you don't know the selectors. Ask Apple for the mangled selectors first. Sorry for the late reply! Hope you fixed already :)Lavettelavigne

© 2022 - 2024 — McMap. All rights reserved.