2016-04-04 34 views
0

Mac App Store'a bir Elektron tabanlı uygulama göndermeye çalışıyorum. (https://github.com/atom/electron/blob/master/docs/tutorial/mac-app-store-submission-guide.md göre) Bu senaryoyu kullanıyorum uygulamayı imzalamak için: İki yetkileri dosyalarlaElectron Uygulamasını Mac App Store'a Gönderme: Hata "Geçersiz İmza"

#!/bin/bash 
# Name of your app. 
APP="MyApp" 
# The path of you app to sign. 
APP_PATH="MyApp.app" 
# The path to the location you want to put the signed package. 
RESULT_PATH="$APP.pkg" 
# The name of certificates you requested. 
APP_KEY="3rd Party Mac Developer Application: MYCOMPANY (XXX)" 
INSTALLER_KEY="3rd Party Mac Developer Installer: MYCOMPANY (XXX)" 

FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks" 

codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A" 
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/$APP Helper.app/" 
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/$APP Helper EH.app/" 
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/$APP Helper NP.app/" 
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/$APP Framework.framework/Libraries/libnode.dylib" 
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/$APP Framework.framework/Electron Framework" 

# Signage of terminal-notifier 
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$APP_PATH/Contents/Resources/app/node_modules/node-notifier/vendor/terminal-notifier.app" 

if [ -d "$FRAMEWORKS_PATH/Squirrel.framework/Versions/A" ]; then 
    # Signing a non-MAS build. 
    codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/Mantle.framework/Versions/A" 
    codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/ReactiveCocoa.framework/Versions/A" 
    codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/Squirrel.framework/Versions/A" 
fi 
codesign -fs "$APP_KEY" --entitlements parent.plist "$APP_PATH" 

productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH" 

: child.plist

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
<plist version="1.0"> 
    <dict> 
     <key>com.apple.security.app-sandbox</key> 
     <true/> 
     <key>com.apple.security.inherit</key> 
     <true/> 
    </dict> 
</plist> 

ve parent.plist

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
<plist version="1.0"> 
    <dict> 
    <key>com.apple.security.app-sandbox</key> 
    <true/> 
    </dict> 
</plist> 

Kullandığım komut dosyasını çalıştırdıktan sonra d PKG Dosyasını MAS'a göndermek için Uygulama Yükleyicisi. Şimdiye kadar çalışıyor. Ama göndererek işleminden sonra aşağıdaki hata ile Apple bir mail alıyorum:

Invalid Signature - This error occurs when you have signed your app's installer incorrectly. There are two certs required for this process: the "3rd Party Mac Developer Application" cert and the "3rd Party Mac Developer Installer" cert. When signing your package, you need to ensure that you are using the Installer cert to sign your package. Ensure that you are specifying this cert when submitting your app via the Xcode Organizer or when running productbuild from the command line.

Paketi imzalamak için "3 Parti Mac Geliştirici Yükleyici" sertifikası kullanılmaktadır. Bu sorunu nasıl çözebilirim?

cevap

0

electron-osx-sign numaralı telefondan bir öneride bulunmanızı öneririz. İmza senaryonuzun alıntılarından, sürecin yanlış gittiğini söylemek biraz belirsiz. Bu modül ile Yani, yapmanız gereken her şeyi bu:

$ electron-osx-sign path/to/my.app

Ve yetkilerini kurma ve içeren çerçeveler farklı versiyonlarını imzalanması geri kalanı sizin için yapılabilir.

0

Paketi elektron-paketleyiciyle oluşturduktan sonra.
Paket içinde info.plist dosyasını düzenleyebilirsiniz. Bir çift (anahtar, değer) info.plist'e ekleyin. Anahtar "ElectronTeamId" ve değer Team ID'nizdir.
Ekip Kimliğinizi bulmak için, Apple Geliştirici Merkezi'nde oturum açın ve kenar çubuğunda Üyelik'i tıklayın. Ekip Kimliğiniz, takım adı altındaki Üyelik Bilgileri bölümünde görünür.

İlgili konular