2017-05-26 45 views
2

我寫了一個使用電子的應用程序,並簽署了它。避免「應用程序從互聯網下載」警告

我確認我已與codesign -dvvv指揮得當簽署:

Executable=/Volumes/MyApp/MyApp.app/Contents/MacOS/MyApp 
Identifier=com.example.my-app 
Format=app bundle with Mach-O thin (x86_64) 
CodeDirectory v=20200 size=285 flags=0x0(none) hashes=3+3 location=embedded 
Hash type=sha256 size=32 
CandidateCDHash sha1=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
CandidateCDHash sha256=exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
Hash choices=sha1,sha256 
CDHash=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
Signature size=8925 
Authority=Developer ID Application: Example, LLC (XXXXXXXXX) 
Authority=Developer ID Certification Authority 
Authority=Apple Root CA 
Timestamp=May 24, 2017, 4:30:26 PM 
Info.plist entries=21 
TeamIdentifier=XXXXXXXXXX 
Sealed Resources version=2 rules=13 files=10 
Internal requirements count=1 size=192 

然而,當我的同事從互聯網上下載它用於測試,他收到這樣的警告:

"MyApp" is an application downloaded from the Internet. Are you sure you want to open it? 

這是儘管從設置中的「安全&隱私」屏幕選擇「Mac App Store和確定的開發者」。

基於網守的描述:

https://support.apple.com/en-us/HT202491

我不希望得到的警告。

我該如何更改構建或分發應用程序的方式,以便用戶不會收到該警告?我們的用戶根本不懂技術,因此任何警告信息都會使我們的電話響起。

回答

2

article you linked about Gatekeeper,如果應用程序沒有正確簽名,警告將會不同 - 「[MyApp]來自未識別的開發者」或「[MyApp]已損壞且無法打開」。

因此,您得到「[MyApp]是從互聯網下載的應用程序」這一事實很正常,並且顯示您的應用程序已正確簽名。

你看到的是相同的警告,用戶將從互聯網下載任何應用程序。例如,如果你下載谷歌瀏覽器,你會看到相同的信息:

enter image description here

所以你的用戶應該是看慣的消息時,下載的Mac App Store中的東西之外的任何時間。

要刪除警告,他們需要完全禁用他們的系統上的Gatekeeper。有在this blog post這樣做的說明。

+0

我確實相信你是基於經驗的,但它似乎與Gatekeeper中的「和已確定的開發人員」設置相沖突。爲什麼有這樣的設置,如果仍然收到警告? –

+1

如果Gatekeeper阻止應用程序運行,則根本沒有得到「打開」選項。使用已識別的開發人員*允許*運行的應用程序,您可以在屏幕截圖中看到該消息 - 它允許您運行該應用程序。 –