Skip to content

An open-source cross-platform alternative to AirDrop

chore: update ios signing process

Tien Do Nam82a537675981
diff --git a/scripts/compile_mac_dmg.sh b/scripts/compile_mac_dmg.sh
index 76896587..8fab21fb 100644
--- a/scripts/compile_mac_dmg.sh
+++ b/scripts/compile_mac_dmg.sh
@@ -7,5 +7,28 @@ fvm flutter pub get
fvm flutter pub run build_runner build -d
fvm flutter build macos
+# sign the app
+codesign --deep --force --verbose --options runtime --sign "36F60C6744929E06BA64EB7463B7AFFCEFF49DD0" build/macos/Build/Products/Release/LocalSend.app
+
+# create dmg
# if appdmg is not installed yet: npm install -g appdmg
appdmg scripts/dmg/config.json LocalSend.dmg
+
+# send to apple for notarization
+APP_PASSWORD=abcd-efgh-ijkl-mnop
+NOTARIZE_OUTPUT=$(xcrun altool --notarize-app --primary-bundle-id "org.localsend.localsendApp" --username $DEV_EMAIL --password $APP_PASSWORD --file LocalSend.dmg)
+echo "$NOTARIZE_OUTPUT"
+
+# extract request UUID from the output
+REQUEST_UUID=$(echo "$NOTARIZE_OUTPUT" | awk -F ' = ' '/RequestUUID/ {print $2}')
+
+# print command to check notarization status
+echo ""
+echo "Check notarization status with:"
+echo "xcrun altool --notarization-info $REQUEST_UUID --username $DEV_EMAIL --password $APP_PASSWORD"
+
+# print command to add staple to the app
+echo ""
+echo "Add staple to the app with:"
+echo "xcrun stapler staple LocalSend.dmg"
diff --git a/scripts/dmg/config.json b/scripts/dmg/config.json
index 4a2cb18f..615fb135 100644
--- a/scripts/dmg/config.json
+++ b/scripts/dmg/config.json
@@ -18,7 +18,7 @@
}
],
"code-sign": {
- "signing-identity": "Apple Distribution: Tien Do Nam (3W7H4PYMCV)",
- "identifier": "465ED3F1559A17539E49D338B4F14A7D0FF1582F"
+ "signing-identity": "Developer ID Application: Tien Do Nam (3W7H4PYMCV)",
+ "identifier": "36F60C6744929E06BA64EB7463B7AFFCEFF49DD0"
}
}