KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Avoid common errors when manually signing 4D app
PRODUCT: 4D | VERSION: 17 | PLATFORM: Mac
Published On: February 22, 2019
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

When manually signing your 4D app with an example command below, you may or may not come across some possible errors depending on the app:

Example:

$ codesign -s "Developer ID Application: Some Name (1231231231)" /path/to/MyApp.app


Possible Error 1: codesign fails due to an issue with a subcomponent of my app

/path/to/MyApp.app: code object is not signed at all
In subcomponent: /path/to/MyApp.app/Contents/Frameworks/SomeFramework.framework


This error means that the codesign failed due to nested code within the framework or that the framework itself was also not signed. To prevent this situation, sign your app with option --deep to make sure all binaries and frameworks within the app are also signed and option --force to resign the app if needed.

$ codesign --deep --force -s "Developer ID Application: Some Name (1231231231)" /path/to/MyApp.app


Possible Error 2: codesign fails due to resource fork, Finder information, or similar detritus not allowed

This error is caused by a security change in macOS Sierra 10.12 where the app can no longer have files containing an extended attribute to a resource fork or Finder info. To prevent this situation, use the command below to remove all extended attributes within your 4D app.

$ xattr -cr /path/to/MyApp.app


Verifying whether the app is signed

Use the command below to check whether your app is signed. If your app is not signed, the command will return "code object is not signed at all". Otherwise, the command will return additional info related to the signed app.

$ codesign -dvvv /path/to/MyApp.app