If the generate_hash script fails with an error including
YourApplication.app: code object is not signed at all
Could not open file or uri for loading certificate from .../codesign0: No such file or directory
Could not open file or uri for loading certificate from .../codesign1: No such file or directory
Could not open file or uri for loading certificate from .../codesign2: No such file or directory
Mean:
-
The
.app
inside the.ipa
is completely unsigned -
Your tool/script expects to find certs used for signing in the Keychain or temp files, like
codesign0
FIX: Sign the App First (Manually via Terminal or Xcode)
🔹 Option 1: Sign Manually via Terminal (Quick fix)
Step 1: Unpack the IPA
Step 2: Find the .app
Go to:
You should see: YourApplication.app
Step 3: Sign the .app
Find your certificate identity:
Pick the correct identity string (e.g., Apple Distribution: Your Company
)
Then sign IPA:
Flags explained:
-
-f
– force re-sign -
-s
– signing identity -
--deep
– signs all nested frameworks/plugins -
--entitlements
– required if your app has special permissions
Step 4: Repack the IPA
Now you have a valid, signed IPA. Your generate_hash
script should work now.
🔹 Option 2: Re-sign using Xcode (More GUI-driven)
If you have access to the project:
-
Open the Xcode project
-
Set your Team, Bundle ID, and enable Automatic Signing
-
Archive via: Product > Archive
-
In Organizer, click Distribute App > choose method (e.g., Ad Hoc)
-
Export the signed
.ipa
🧠 Bonus: Check That It's Now Signed
Run this:
You should now see:
-
Authority = Apple Distribution: ...
-
TeamIdentifier = ...
-
Entitlements block