應用程式傳輸安全性
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
應用程式傳輸安全 (ATS)
是一項隱私權功能,可強制執行安全連線。新應用程式預設會啟用這項功能。
如果應用程式不符合 ATS 規定,並嘗試使用 HTTP 放送廣告,系統會顯示下列記錄訊息:
應用程式傳輸安全機制已封鎖明文 HTTP (http://) 資源載入,因為這類資源不安全。您可以在應用程式的 Info.plist
檔案中設定暫時例外狀況。
如要停用 ATS 限制,請在應用程式的 Info.plist
中新增下列例外狀況:
NSAllowsArbitraryLoadsForMedia
NSAllowsArbitraryLoadsInWebContent
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoadsForMedia</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
請務必提供 NSAllowsArbitraryLoadsForMedia
和 NSAllowsArbitraryLoadsInWebContent
鍵,確保廣告不受 ATS 影響。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-27 (世界標準時間)。
[null,null,["上次更新時間:2025-08-27 (世界標準時間)。"],[],["App Transport Security (ATS) enforces secure connections and is enabled by default. Non-compliant apps using HTTP trigger a log message indicating blocked insecure resource loads. To disable ATS restrictions for media and web content, add `NSAllowsArbitraryLoadsForMedia` and `NSAllowsArbitraryLoadsInWebContent` keys set to `true` within the app's `Info.plist` file, under the `NSAppTransportSecurity` dictionary. These exceptions are essential to prevent ads from being affected by ATS.\n"],null,[]]