Quan trọng: Kể từ ngày 1 tháng 5 năm 2024, Apple cần có Tệp kê khai quyền riêng tư và chữ ký đối với những ứng dụng iOS sử dụng SDK thường dùng, bao gồm cả GoogleSignIn-iOS. Nâng cấp GoogleSignIn-iOS phiên bản 7.1.0 trở lên trước ngày 1 tháng 5 năm 2024. Làm theo hướng dẫn nâng cấp của chúng tôi.
Để bật chế độ thực thi, hãy hoàn tất các bước sau:
Chuyển đến chế độ chỉnh sửa của ứng dụng iOS trong trang Thông tin đăng nhập. Tại đó, bạn sẽ thấy các chỉ số ở bên phải trang trong mục Google Identity cho iOS.
Nhấp vào nút THỰC THI rồi xác nhận lựa chọn của bạn. Sau khi quy trình thực thi có hiệu lực, tất cả các yêu cầu chưa được xác minh từ ứng dụng của bạn sẽ bị từ chối.
Lưu ý : Sau khi bạn bật chế độ thực thi, có thể mất đến 15 phút thì các thay đổi mới có hiệu lực.
Bật chế độ thực thi trong Bảng điều khiển của Firebase
Bạn có thể thực thi App Check cho một số ứng dụng iOS cụ thể hoặc cho tất cả ứng dụng iOS
Bật chế độ thực thi cho tất cả ứng dụng iOS
Để bật chế độ thực thi cho tính năng Đăng nhập bằng Google trên iOS, hãy hoàn tất các bước sau.
Sau khi bạn bật chế độ thực thi, tất cả các yêu cầu chưa được xác minh sẽ bị từ chối, bao gồm cả những yêu cầu liên kết với các ứng dụng OAuth trên iOS không được liên kết với một ứng dụng Firebase.
Mở mục App Check trên bảng điều khiển của Firebase.
Mở rộng mục Google Identity cho iOS.
Nhấp vào Thực thi rồi xác nhận lựa chọn của bạn.
Xin lưu ý rằng có thể mất đến 15 phút sau khi bạn bật chế độ thực thi thì chế độ này mới có hiệu lực.
Bật chế độ thực thi cho các ứng dụng iOS cụ thể
Bạn cũng có thể định cấu hình chế độ thực thi App Check cho các ứng dụng OAuth iOS cụ thể. Cách thực hiện:
Mở Ứng dụng OAuth trong phần Kiểm tra ứng dụng của bảng điều khiển Firebase.
Mở rộng chế độ xem chỉ số cho ứng dụng OAuth mà bạn muốn định cấu hình.
Nếu ứng dụng chưa được liên kết với ứng dụng, hãy liên kết.
Nhấp vào Tạo chế độ ghi đè việc thực thi.
Chọn xem bạn có muốn thực thi hay không thực thi App Check cho ứng dụng khách OAuth này. Chế độ cài đặt này sẽ thay thế chế độ cài đặt thực thi Google Identity cho iOS trên toàn cầu của dự án.
Xin lưu ý rằng có thể mất đến 15 phút sau khi bạn bật chế độ thực thi thì chế độ này mới có hiệu lực.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 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."]]