สำคัญ: ตั้งแต่วันที่
1 พฤษภาคม 2024 เป็นต้นไป Apple จะ
กำหนดให้ใช้ไฟล์ Manifest ด้านความเป็นส่วนตัวและลายเซ็นสำหรับแอปพลิเคชัน iOS ที่ใช้ SDK ที่ใช้กันโดยทั่วไป ซึ่งรวมถึง GoogleSignIn-iOS อัปเกรดเป็น GoogleSignIn-iOS v7.1.0 ขึ้นไปก่อนวันที่ 1 พฤษภาคม 2024 ทำตาม
คู่มือการอัปเกรด
เปิดใช้การบังคับใช้ App Check
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เมื่อเข้าใจว่า App Check จะส่งผลต่อผู้ใช้อย่างไร
และพร้อมดำเนินการต่อแล้ว คุณก็เปิดใช้การบังคับใช้ App Check ได้
เปิดใช้การบังคับใช้ใน Google API Console
หากต้องการเปิดใช้การบังคับใช้ ให้ทำตามขั้นตอนต่อไปนี้
ไปที่มุมมองการแก้ไขของไคลเอ็นต์ iOS ในหน้าข้อมูลเข้าสู่ระบบ คุณจะเห็นเมตริกทางด้านขวาของหน้า
ในส่วนข้อมูลระบุตัวตนของ Google สำหรับ iOS
คลิกปุ่มบังคับใช้และยืนยันตัวเลือก เมื่อการบังคับใช้
มีผลแล้ว ระบบจะปฏิเสธคำขอที่ยังไม่ยืนยันทั้งหมดจากไคลเอ็นต์ของคุณ
หมายเหตุ : หลังจากเปิดใช้การบังคับใช้แล้ว ระบบอาจใช้เวลาถึง 15 นาทีเพื่อให้การเปลี่ยนแปลงมีผล
เปิดใช้การบังคับใช้ในคอนโซล Firebase
คุณสามารถบังคับใช้ App Check สำหรับไคลเอ็นต์ iOS ที่เฉพาะเจาะจงหรือสำหรับไคลเอ็นต์ iOS ทั้งหมดได้
เปิดใช้การบังคับใช้สำหรับไคลเอ็นต์ iOS ทั้งหมด
หากต้องการเปิดใช้การบังคับใช้สำหรับการลงชื่อเข้าใช้ด้วย Google ใน iOS ให้ทำตามขั้นตอนต่อไปนี้
เมื่อเปิดใช้การบังคับใช้แล้ว ระบบจะปฏิเสธคำขอที่ยังไม่ยืนยันทั้งหมด รวมถึงคำขอที่เชื่อมโยงกับไคลเอ็นต์ OAuth ของ iOS ที่ไม่ได้ลิงก์กับแอป Firebase
เปิดส่วน App Check ของคอนโซล Firebase
ขยายส่วน Google Identity สำหรับ iOS
คลิกบังคับใช้และยืนยันตัวเลือก
โปรดทราบว่าหลังจากที่คุณเปิดใช้การบังคับใช้แล้ว ระบบอาจใช้เวลาถึง 15 นาที
จึงจะมีผล
เปิดใช้การบังคับใช้สำหรับไคลเอ็นต์ iOS ที่เฉพาะเจาะจง
นอกจากนี้ คุณยังกำหนดค่าการบังคับใช้ App Check สำหรับไคลเอ็นต์ OAuth ของ iOS ที่เฉพาะเจาะจงได้ด้วย โดยทำดังนี้
เปิดไคลเอ็นต์ OAuth ในส่วน App Check ของ
คอนโซล Firebase
ขยายมุมมองเมตริกสำหรับไคลเอ็นต์ OAuth ที่ต้องการกำหนดค่า
หากยังไม่ได้ลิงก์ไคลเอ็นต์กับแอป ให้ดำเนินการดังกล่าว
คลิกสร้างการลบล้างการบังคับใช้
เลือกว่าจะบังคับใช้หรือยกเลิกการบังคับใช้ App Check สำหรับไคลเอ็นต์ OAuth นี้ การตั้งค่านี้จะลบล้างการตั้งค่าการบังคับใช้ข้อมูลประจำตัว Google ทั่วโลกสำหรับ iOS ของโปรเจ็กต์
โปรดทราบว่าหลังจากที่คุณเปิดใช้การบังคับใช้แล้ว ระบบอาจใช้เวลาถึง 15 นาที
จึงจะมีผล
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 2025-08-31 UTC"],[[["\u003cp\u003eApp Check enforcement can be enabled to ensure only verified requests are accepted, rejecting unverified ones.\u003c/p\u003e\n"],["\u003cp\u003eEnforcement can be enabled through the Google API Console or the Firebase Console, with options for specific or all iOS clients.\u003c/p\u003e\n"],["\u003cp\u003eEnabling enforcement involves navigating to the respective platform's console, locating the App Check or Google Identity for iOS settings, and clicking the 'Enforce' button.\u003c/p\u003e\n"],["\u003cp\u003eAfter enabling, it takes up to 15 minutes for the changes to take effect, impacting all subsequent requests.\u003c/p\u003e\n"],["\u003cp\u003eFirebase Console provides granular control, allowing enforcement overrides for individual iOS OAuth clients linked to your project.\u003c/p\u003e\n"]]],[],null,["When you [understand how App Check will affect your users](/identity/sign-in/ios/appcheck/monitor-metrics)\nand you're ready to proceed, you can enable App Check enforcement.\n\nEnable enforcement in the Google API Console\n\nTo enable enforcement, complete the following steps:\n\n1. Go to the edit view of your iOS client in the\n [Credentials page](https://console.cloud.google.com/apis/credentials). There, you will see metrics to the right of the page\n under the **Google Identity for iOS** section.\n\n2. Click the **ENFORCE** button and confirm your choice. Once enforcement is\n active, all unverified requests from your client will be rejected.\n\n**Note** : After you enable enforcement, it can take up to 15 minutes for the\nchanges to take effect.\n\nEnable enforcement in the Firebase Console\n\nApp Check can be enforced for specific iOS clients or for all your iOS clients\n\nEnable enforcement for all iOS clients\n\nTo enable enforcement for Google Sign-in on iOS, complete the following steps.\nOnce you enable enforcement, all unverified requests will be rejected, including\nrequests associated with iOS OAuth clients that aren't linked to a Firebase app.\n\n1. Open the [App Check](https://console.firebase.google.com/project/_/appcheck) section of the Firebase console.\n\n2. Expand the **Google Identity for iOS** section.\n\n3. Click **Enforce** and confirm your choice.\n\nNote that it can take up to 15 minutes after you enable enforcement for it to\ntake effect.\n\nEnable enforcement for specific iOS clients\n\nYou can also configure App Check enforcement for specific iOS OAuth clients. To\ndo so:\n\n1. Open [OAuth clients](https://console.firebase.google.com/project/_/appcheck/products/oauth) under the App Check section of\n the Firebase console.\n\n2. Expand the metrics view for the OAuth client you want to configure.\n\n3. If the client is not yet linked to an app, do so.\n\n4. Click **Create enforcement override**.\n\n5. Choose whether to enforce or unenforce App Check for this OAuth client. This\n setting overrides your project's global Google Identity for iOS enforcement\n setting.\n\nNote that it can take up to 15 minutes after you enable enforcement for it to\ntake effect."]]