DEV Community

How to protect your Mac app from AI reverse engineering

Short answer: you can't make reverse engineering impossible, but you can give AI tools much less to read. Keep real secrets off the client, verify a signed license offline with just a public key in the app, spread the license decision across more than one place, and ship a hardened build where the code, symbols and strings aren't readable on disk. Then watch public listings so you notice when a cracked or cloned copy shows up.

Why AI changes the math for indie Mac apps

A normal Mac build carries a lot in plain sight: function names, strings, the license check, and sometimes an embedded key. Reading that used to take a skilled person an afternoon. Now anyone can paste a disassembly into an AI chat and ask where the license check is and how to skip it.

In our tests on two small Mac license apps we own, standard tools and a one-shot AI pass recovered the secret and the license key from both the unprotected build and the build made with Apple's strip -x plus -O2. A short script then patched out the license check so a wrong key unlocked the paid feature. Stripping symbols helped less than most developers expect.

What actually makes AI reverse engineering harder

  • Don't ship secrets you can't afford to lose. Anything in the binary can eventually be read. API keys with real power, signing keys and paid content keys belong on a server.
  • Encrypt what has to ship. If code and strings aren't readable on disk, a static read, human or AI, starts with nothing useful.
  • Make debugging and patching expensive. Anti-debug checks and integrity checks mean a debugger or a patched byte trips the build instead of quietly working.
  • Don't keep the license decision in one function. One isLicensed() that returns true is a one-byte patch. More than one check, in more than one place, takes more work.
  • Watch after you ship. No hardening holds forever. Searching public listings on a schedule tells you when it's time to rotate keys or ship a new build.

How should a Mac app check its license?

Use a license that's signed on your server and verified in the app, so honest customers stay unlocked offline:

  • Sign each license with a private key that never leaves your server. Ed25519 is a common choice.
  • Ship just the public key in the app. A public key can verify a license but can't make new ones, so a key generator needs your server's private key.
  • Verify the signature at launch and again where the paid feature runs, not just in one place.
  • Keep features that really matter on the server side when you can, since nothing on the client is fully safe.
  • Harden the build, so the check and the public key are harder to find and patch.

That way an honest customer on a plane still gets in, and a cracker has to patch your checks instead of typing in a generated key. Patching is still possible, which is why hardening and watching listings come next.

What our tests showed, wins and losses

These are our own small test apps, not a broad benchmark. Full method and tables are on How we test.

Mac (owned C and Swift license apps, 15-16 November 2026): From Fortifie's builds, the same standard tools recovered nothing. A one-shot AI pass recovered nothing. Attaching a debugger made the build abort before decrypting. A four-round AI agent recovered nothing from the C build. On Swift, one model used all four rounds with nothing recovered and the other hit an API refusal. The Fortifie builds were about 2.4x (C) and 2.8x (Swift) the unprotected size and added about 2-3 ms at launch.

Where it loses on Mac: after a valid key launches the app, the original code runs in memory. A determined attacker who defeats the anti-debug check and dumps memory can still recover it. C++ Mac apps are not supported yet.

JavaScript (two small owned test apps, five builds each): two free deobfuscators, webcrack and synchrony, recovered the embedded secret from every javascript-obfuscator default build and from none of Fortifie's default builds. A one-shot AI pass also recovered nothing from Fortifie's builds (0 of 6). The Fortifie build was about 2.8x the original size, with no measurable change in run time.

Where it loses on JavaScript: a strong AI agent that writes and runs its own decoding scripts still recovered the secret in some runs. A simple scripted patch still unlocked every protected build, Fortifie's included. Hardening raises the cost and time of an attack. It doesn't make cracking impossible.

How Fortifie fits

Fortifie hardens the Mac or JavaScript build you ship, tuned against AI reverse engineering. On a Mac build that means an encrypted binary, a loader with anti-debug and integrity sealing, and encrypted loader strings with flattened control flow. A verify pass reports which protections held. You keep your Developer ID, you re-sign and notarize, and you launch-test the aardened build before you release it. Nothing ships without you.

After you ship, Fortifie searches the web, GitHub and the App Store for listings that advertise a crack or a lookalike of your app. That's a search, not proof. Paid JavaScript builds can also carry a canary that reports when a cracked copy runs. A cracked copy can strip the canary, so silence doesn't mean there's no crack.

Solo is $39/month and Studio is $149/month, and new monthly plans are 50% off the first month. See pricing, or run the free cracked listings check on an app you own.

Frequently asked questions

Can AI crack my Mac app? On a normal build, often yes. In our tests a one-shot AI pass recovered the secret and the license key from both the unprotected build and the stripped build. On our hardened test builds it recovered nothing, but a memory dump after launch is still possible.

Does stripping symbols stop AI reverse engineering? Not by itself. In our tests, Apple's strip -x plus -O2 still left the secret and the license key recoverable with standard tools and a one-shot AI pass.

Is obfuscation enough to stop cracking? No. Obfuscation and hardening raise the cost of an attack. Pair them with a signed offline license, secrets kept on the server, and a regular search of public listings.

Will hardening slow my app down? In our Mac tests it added about 2-3 ms at launch, and the build was about 2.4x to 2.8x larger. On JavaScript we saw no measurable change in run time. See How we test.

How do I know if my app is already cracked? Read How to tell if your Mac app has been cracked. For broader steps, see How to stop your Mac app from being cracked.

Originally published on fortifie.xyz by the Fortifie team.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.