mac Codesign my QT app
-
I design a QT app for mac, but when i run the app in macOs sum error occur as follow:
Unable to open 'xxxxx' because the developer cannot be verifiedso I use codesign command to verify my app, The developer certificate has been applied for, after I codesign my app , i use "spctl -a -t exec -vv SurgiCam_v1.0.6.app" command in terminal, the information in terminal as follow:
SurgiCam_v1.0.6.app: accepted
source=Notarized Developer ID
origin=Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)this means I codesign sucess,but when I open the app , it also say "Unable to open 'xxxxx' because the developer cannot be verified", why this occur?
the script codesign in terminal as follow :
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/Frameworks/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/Frameworks/pkgconfig/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/PlugIns/audio/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/PlugIns/bearer/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/PlugIns/iconengines/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/PlugIns/imageformats/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/PlugIns/mediaservice/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/PlugIns/platforminputcontexts/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/PlugIns/platforms/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/PlugIns/printsupport/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/PlugIns/styles/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app/Contents/PlugIns/virtualkeyboard/*
sudo codesign --force --sign "Developer ID Application: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" --entitlements sonsii.entitlements --options=runtime SurgiCam_v1.0.6.app
codesign --verify --verbose SurgiCam_v1.0.6.app
pkgbuild --component "SurgiCam_v1.0.6.app" --identifier "com.sonsii.SurgiCam" --version 6.0 --install-location /Applications "./SurgiCam.pkg"
productsign --sign "Developer ID Installer: Shenzhen Sonsii Intelligent Technology Co.,Ltd. (984L69X2P5)" "SurgiCam.pkg" "./sign_pkg/SurgiCam.pkg"
xcrun notarytool store-credentials "111343562" --apple-id "public@isonsii.com" --team-id "984L69X2P5" --password "cbbx-wrkt-iwwa-azem"
xcrun notarytool submit "./sign_pkg/SurgiCam.pkg" --keychain-profile "111343562" --wait
xcrun stapler staple "./sign_pkg/SurgiCam.pkg"