-
QuestionHello, I have a developed a Flet app and we're attempting to sign and notarize for distribution outside the Apple Store. However I get a plethora of errors back from notarization, and this discussion is to ask, have other people successfully signed and notarized a Flet application, and if so, how? # Sign inner most binary
codesign --force --verify --verbose -s SHA --timestamp -i one.keri.citadel --entitlements entitlements.plist --options=runtime citadel.app/Contents/MacOS/citadel
# Sign generated .app directory
codesign --force --verify --verbose -s SHA --timestamp -i one.keri.citadel --options=runtime citadel.app
# create dmg
hdiutil create -volname "Citadel" -srcfolder citadel.app -ov -format UDZO citadel.dmg
# sign dmg
codesign --force --verify --verbose -s SHA --timestamp -i one.keri.citadel --options=runtime citadel.dmg
# submit for notary
xcrun notarytool submit citael.dmg --keychain-profile "citadel-notary" --wait
# xcrun stapler citadel.dmg
# spctl -a -vv citadel.dmg I'll one happy to add to the Flet docs/tooling once we're successful. Cheers, Code sampleNone Error messageNone ------------------------------------------------------
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
OK, so one set of common errors - not signing everything in our Frameworks directory. I'll update the sample. |
Beta Was this translation helpful? Give feedback.
-
I gave up and asked ChatGPT
|
Beta Was this translation helpful? Give feedback.
-
I've created a shell script to brute force signing. It passes notarization. https://gist.github.com/m00sey/4708e9a6df55449a9c12d486ac69e8ab |
Beta Was this translation helpful? Give feedback.
-
It appears that with the separation out of # Sign the flet-desktop app package in serious-python
function sign_flet_desktop_package() {
echo "Signing Flet executable and its dependent framework executables..."
cd "$BUILD_DIR/$APP_NAME.app/Contents/Frameworks/serious_python_darwin.framework/Versions/A/Resources/python.bundle/Contents/Resources/site-packages/flet_desktop/app/" || exit 1
mkdir -p tmp
tar -xzf flet-macos.tar.gz -C tmp
# sign Flet executable and its dependent framework executables
FILES=(
"Flet"
"wakelock_plus"
"Avfilter"
"screen_brightness_macos"
"FlutterMacOS"
"Avformat"
"Png16"
"media_kit_libs_macos_video"
"Dav1d"
"Mbedcrypto"
"Freetype"
"Ass"
"media_kit_native_event_loop"
"Swresample"
"window_to_front"
"Harfbuzz"
"media_kit_video"
"Mpv"
"App"
"Mbedtls"
"Avcodec"
"device_info_plus"
"path_provider_foundation"
"audioplayers_darwin"
"Fribidi"
"Avutil"
"geolocator_apple"
"Swscale"
"package_info_plus"
"shared_preferences_foundation"
"Uchardet"
"window_manager"
"Mbedx509"
"screen_retriever_macos"
"webview_flutter_wkwebview"
"Xml2"
"rive_common"
"record_darwin"
"url_launcher_macos"
)
NAME_ARGS=()
for file in "${FILES[@]}"; do
NAME_ARGS+=(-name "$file" -o)
done
unset 'NAME_ARGS[-1]' || exit 1
find "tmp" -type f \( ${NAME_ARGS} \) \
-exec codesign --force --verify --verbose --timestamp --options runtime --sign "$DEVELOPER_ID_APP_CERT" {} \;
# Repack Flet and its dependencies
rm flet-macos.tar.gz
tar czf flet-macos.tar.gz -C tmp .
rm -rf tmp
}
sign_flet_desktop_package |
Beta Was this translation helpful? Give feedback.
I've created a shell script to brute force signing.
It passes notarization.
https://gist.github.com/m00sey/4708e9a6df55449a9c12d486ac69e8ab