1. Beatrix Willius
  2. Valentina Database ADK
  3. Freitag, April 19 2019, 11:59 AM
  4.  Abonnieren via E-Mail
I'm trying to make a version of my application for the Mac App Store. But codesign gives me problems. Codesigning the app without sandboxing works fine. Codesigning with sandboxing done with the application AppWrapper gave me the error message

9:20:59
codeSigned: /Contents/vcomponents_x64/libvclient_fat_release_x64.dylib
09:21:00
codeSigned: /Contents/vcomponents_x64/libvkernel_fat_release_x64.dylib
09:21:00
codeSigned: /Contents/vcomponents_x64/libvreport_fat_release_x64.dylib
09:21:01
codeSigned: /Contents/vcomponents_x64/libvshared_fat_release_x64.dylib
09:21:02
Critical Error: Failed to sign Mail Archiver X Lite.app resource fork, Finder information, or similar detritus not allowed
09:21:02
/usr/bin/codesign -f -s "Developer ID Application: Beatrix Willius (72695Z3887)" /Users/beatrixwillius\ 1/Documents/Development/Mail\ Archiver/code\ current/Builds\ \-\ max.rbp/OS\ X\ 64\ bit/Wrapped\ Application/Mail\ Archiver\ X\ Lite.app --entitlement /Users/beatrixwillius\ 1/Library/Application\ Support/com.ohanaware.appWrapper3/com.mothsoftware.mailarchiverxlite/mainApplication.entitlements
09:21:02
3 Rejected


or

13:04:44
codeSigned: /Contents/vcomponents_x64/libvshared_fat_release_x64.dylib
13:04:46
Critical Error: Failed to sign Mail Archiver X Lite.app replacing existing signature
resource fork, Finder information, or similar detritus not allowed
13:04:46
/usr/bin/codesign -f -s "Developer ID Application: Beatrix Willius (72695Z3887)" /Users/beatrixwillius\ 1/Documents/Development/Mail\ Archiver/code\ current/Builds\ \-\ max.rbp/OS\ X\ 64\ bit/Wrapped\ Application/Mail\ Archiver\ X\ Lite.app
13:04:46
1 Invalid Resource Directory (directory Or Signature Have Been Modified)
13:04:46
Critical Error: Gate Keeper 1 Invalid Resource Directory (directory Or Signature Have Been Modified)
13:04:46
: invalid Info.plist (plist or signature have been modified) In architecture: x86_64
13:04:46
Critical Error: Code sign diagnosis: : invalid Info.plist (plist or signature have been modified) In architecture: x86_64


After checking all my build scripts I found out that when removing the Valentina deployment script the signing would work.

I thought that the file after the libvshared_fat_release_x64.dylib makes the problem. Which is the folder vresources. I took the folder out, tried to codesign again and there was no error message. Of course, the app needs the folder and I can't start it with the usual message "could not open plugin".

How do I solve this problem?

Xojo 2018r3, Valentina 9.1.2, High Sierra.

Mit freundlichen Grüßen/Regards

Beatrix Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hello Beatrix,

Thank you, we'll update the build script to skip these files.
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
Sam Rowlands was able to solve the problem. There was a folder .gitignore that confused the codesign. Please remove this folder.

Regards

Beatrix Willius
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hello Beatrix,

Here's the part our code signing script.
Note, VComponents are signed separately because Application Loader.app started to complain that they are not signed.
Maybe it will help.

MASPackage variable indicates whether we will upload an application to the app store, or just test it locally.


VSharedLibName="libvshared_fat_release_x64.dylib"
VKernelLibName="libvkernel_fat_release_x64.dylib"
VClientLibName="libvclient_fat_release_x64.dylib"
VReportLibName="libvreport_fat_release_x64.dylib"

V8LibName="libv8_64.dylib"

if [ "$MASPackage" = "1" ] ; then
cert_app="3rd Party Mac Developer Application: Paradigma Software"
cert_inst="3rd Party Mac Developer Installer: Paradigma Software"
ent_plist="$xcode_folder/plists/Valentina Studio.entitlements"
prov_profile="$xcode_folder/profiles/Valentina_Studio_Distribution_Profile.provisionprofile"

pkg_name="Valentina_Studio.pkg"
else
cert_app="Mac Developer: username (XXXXXXXXX)"
ent_plist="$xcode_folder/plists/Valentina Studio Development.entitlements"
prov_profile="$xcode_folder/profiles/Valentina_Studio_Development_Profile.provisionprofile"
fi

function SIGN_CODE
{
codesign -f -v --deep --entitlements "$ent_plist" -s "$cert_app" "$1"
}


cp "$prov_profile" "$BUILT_PRODUCTS_DIR/$app_name.app/Contents/embedded.provisionprofile"

####################################################################################
# CODESIGN VCOMPONENTS
SIGN_CODE "$BUILT_PRODUCTS_DIR/$app_name.app/Contents/vcomponents_x64/$VSharedLibName"
SIGN_CODE "$BUILT_PRODUCTS_DIR/$app_name.app/Contents/vcomponents_x64/$VKernelLibName"
SIGN_CODE "$BUILT_PRODUCTS_DIR/$app_name.app/Contents/vcomponents_x64/$VClientLibName"
SIGN_CODE "$BUILT_PRODUCTS_DIR/$app_name.app/Contents/vcomponents_x64/$VReportLibName"

SIGN_CODE "$BUILT_PRODUCTS_DIR/$app_name.app/Contents/vcomponents_x64/$V8LibName"


####################################################################################
# CODESIGN APP
SIGN_CODE "$app_name.app"


####################################################################################
# MAS PACKAGE
if [ "$MASPackage" = "1" ] ; then
productbuild --component "$app_name.app" /Applications --sign "$cert_inst" "$pkg_name"
fi
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
I did an app with just one line of code Valentina.Init(100 * 1024 * 1024, "V4RB-xxx";)
I compiled the app.
I did the Valentina deployment script.
And finally I let AppWrapper run.
The result is that the app isn't codesigned.

What now? I really can't be the only one who wants to do an app for the Mac App Store. This also works for Valentina Studio.

Happy bunny weekend.

Mit freundlichen Grüßen/Regards

Beatrix Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
Hi Sergey,

I'm already doing the xattr. It's required nowadays even for non-Mac App Store. I also find it strange that I get 2 different errors. I'll next try to codesign a "Hello World" app.

Regards

Beatrix Willius
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
For error "resource fork, Finder information, or similar detritus not allowed" the following command works well

xattr -cr My\ Application.app/


After that codesigning finished successfully for my test app
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
I think I'll need to ask the developer of AppWrapper if the deep is done or not.

AppWrapper uses an IDE script and then does some stuff itself. The IDE script does the deep:


dim result, errors as string
// --- Codesigning & Sandboxing.
result = DoShellCommand( "/usr/bin/codesign -f -v --deep --timestamp=none -s ""Developer ID Application: Beatrix Willius (72695Z3887)"" " + appPath + " --entitlement /Users/beatrixwillius\ 1/Library/Application\ Support/com.ohanaware.appWrapper3/com.mothsoftware.mailarchiverxlite/inheritedEntitlements.entitlements" )
if instr( result, "replacing existing signature" ) = 0 and trim( result ) <> "" then errors = errors + "• " + trim( result ) + "." + endOfLine
result = DoShellCommand( "/usr/bin/codesign -f -v --timestamp=none -s ""Developer ID Application: Beatrix Willius (72695Z3887)"" " + appPath + " --entitlement /Users/beatrixwillius\ 1/Library/Application\ Support/com.ohanaware.appWrapper3/com.mothsoftware.mailarchiverxlite/debugging.Entitlements" )
if instr( result, "replacing existing signature" ) = 0 and trim( result ) <> "" then errors = errors + "• " + trim( result ) + "." + endOfLine


But the result doesn't show the deep option:

:17:34 codeSigned: /Contents/vcomponents_x64/libvshared_fat_release_x64.dylib
16:17:40 Critical Error: Failed to sign Mail Archiver X.app resource fork, Finder information, or similar detritus not allowed
16:17:40 /usr/bin/codesign -f -s "Developer ID Application: Beatrix Willius (72695Z3887)" /Users/beatrixwillius\ 1/Documents/Development/Mail\ Archiver/code\ current/Builds\ \-\ max.rbp/OS\ X\ 64\ bit/Wrapped\ Application/Mail\ Archiver\ X.app
16:17:40 3 Rejected
16:17:40 Critical Error: Gate Keeper 3 Rejected
16:17:40 : code object is not signed at all In architecture: x86_64
16:17:40 Critical Error: Code sign diagnosis: : code object is not signed at all In architecture: x86_64
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hello Beatrix,

Please try to add -v and --deep flags to the codesign call.

Here's how we codesign the Valentina Studio for the Mac App Store:
codesign -f -v --deep --entitlements "$ent_plist" -s "$cert_app" "$1"
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories