Bảo mật truyền tải ứng dụng
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
App Transport Security (ATS) là một tính năng về quyền riêng tư giúp thực thi các kết nối an toàn. Tính năng này được bật theo mặc định cho các ứng dụng mới.
Thông báo nhật ký sau đây sẽ xuất hiện khi một ứng dụng không tuân thủ ATS cố gắng phân phát quảng cáo bằng HTTP:
App Transport Security đã chặn một hoạt động tải tài nguyên HTTP (http://)
ở dạng văn bản thô vì tài nguyên đó không an toàn. Bạn có thể định cấu hình cho các trường hợp ngoại lệ tạm thời trong tệp Info.plist
của ứng dụng.
Để vô hiệu hoá các quy định hạn chế của ATS, hãy thêm các trường hợp ngoại lệ sau vào Info.plist
của ứng dụng:
NSAllowsArbitraryLoadsForMedia
NSAllowsArbitraryLoadsInWebContent
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoadsForMedia</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
Bạn phải có các khoá NSAllowsArbitraryLoadsForMedia
và NSAllowsArbitraryLoadsInWebContent
để đảm bảo ATS không ảnh hưởng đến quảng cáo của bạn.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-27 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-27 UTC."],[[["\u003cp\u003eApp Transport Security (ATS) enforces secure connections by default and may block ads served over HTTP.\u003c/p\u003e\n"],["\u003cp\u003eIf your app is impacted, add \u003ccode\u003eNSAllowsArbitraryLoadsForMedia\u003c/code\u003e and \u003ccode\u003eNSAllowsArbitraryLoadsInWebContent\u003c/code\u003e exceptions to your \u003ccode\u003eInfo.plist\u003c/code\u003e file to disable ATS restrictions for media and web content, ensuring your ads are delivered.\u003c/p\u003e\n"]]],[],null,["# App Transport Security\n\n[App Transport Security\n(ATS)](//developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/)\nis a privacy feature that enforces secure connections. It's enabled by default\nfor new apps.\n\nThe following log message appears when a non-ATS compliant app attempts to serve\nan ad using HTTP:\n\u003e App Transport Security has blocked a cleartext HTTP (http://)\n\u003e resource load since it is insecure. Temporary exceptions can be\n\u003e configured in your app's `Info.plist` file.\n\nTo disable ATS restrictions, add the following exceptions to your app's\n`Info.plist`:\n\n- `NSAllowsArbitraryLoadsForMedia`\n- `NSAllowsArbitraryLoadsInWebContent`\n\n \u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\n \u003cdict\u003e\n \u003ckey\u003eNSAllowsArbitraryLoadsForMedia\u003c/key\u003e\n \u003ctrue/\u003e\n \u003ckey\u003eNSAllowsArbitraryLoadsInWebContent\u003c/key\u003e\n \u003ctrue/\u003e\n \u003c/dict\u003e\n\nThe `NSAllowsArbitraryLoadsForMedia` and `NSAllowsArbitraryLoadsInWebContent`\nkeys are required to make sure your ads are not impacted by ATS."]]