ความปลอดภัยของการส่งแอป
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
App Transport Security
(ATS)
เป็นฟีเจอร์ด้านความเป็นส่วนตัวที่บังคับใช้การเชื่อมต่อที่ปลอดภัย โดยจะเปิดใช้โดยค่าเริ่มต้น
สำหรับแอปใหม่
ข้อความบันทึกต่อไปนี้จะปรากฏขึ้นเมื่อแอปที่ไม่เป็นไปตาม ATS พยายามแสดง
โฆษณาโดยใช้ HTTP
App Transport Security ได้บล็อกการโหลดทรัพยากร 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
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-27 UTC
[null,null,["อัปเดตล่าสุด 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."]]