Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obfuscating objective-c project with Swift frameworks #31

Open
punto2018 opened this issue Oct 3, 2019 · 6 comments
Open

Obfuscating objective-c project with Swift frameworks #31

punto2018 opened this issue Oct 3, 2019 · 6 comments

Comments

@punto2018
Copy link

Hi,
I've an objective-c project that use several pods. Some of that pods are written in swift.

I've understood that swift code is not supported, so I've tried to include swift pods as compiled .frameworks (so NO swift code, but compiled binaries), but I obtain the same error "PPiOS-Rename cannot process apps containing Swift code".

As you know objective-c is dying, and any modern project use dependencies
which will increasingly be in swift.

Any idea how to bypass the restriction? Maybe an exclude feature, or a bridge header, or something?

Thanks for your precious support.

@neuralmer
Copy link

Swift binaries themselves are different from those of Objective-C. The check and error message you encountered were added to help preempt issues always encountered with Swift binaries. The error message could be clearer, but "containing Swift code" was meant to include the compiled form as well.

PPiOS-Rename always works by scanning the compiled binary for symbols, so unfortunately compiling the Swift pods as .frameworks won't work around the issue.

Unfortunately, PPiOS-Rename will become less relevant as projects adopt Swift.

@amitt0488
Copy link

I am getting the same error "Error: PPiOS-Rename cannot process apps containing Swift code"
My project is a mix of objective c and swift code. How to make sure to obfuscate only objective c code?

@kremvalo
Copy link

I have the same problem. I work with React-Native and there are libraries for Swift. Are there options to avoiding these libraries?

@iOSNinja
Copy link

iOSNinja commented Jan 5, 2022

Hi,
My project contains both Objective-C & Swift code and also uses some pods (some written in Swift, some in Objective-C). I'm getting the same error: "Error: PPiOS-Rename cannot process apps containing Swift code".

Is it possible to obfuscate only Objective-C part of the code? I've heard that 'PPiOS-rename' supporting Swift code obfuscation would be released in 3rd or 4th quarter this year. Is this info correct?

Thank you.

@krystiankolodziej
Copy link

I'm working on a project that has Objective-C and Swift code. You can comment out the line in 'PPiOS-rename' that is causing this error so that 'PPiOS-rename' will work. Of course, you may encounter various issues, for example, if you have a protocol in Objective-C and its implementation in Swift...

@mfarhand-sa
Copy link

@krystiankolodziej @neuralmer can't we exclude the Swift framework by passing -x or -F? in our obfuscation cmd?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants