การแก้ปัญหาและคำถามที่พบบ่อยเกี่ยวกับแพลตฟอร์ม Apple และ Firebase
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
หน้านี้มีเคล็ดลับและการแก้ปัญหาเกี่ยวกับปัญหาเฉพาะแพลตฟอร์ม Apple
ที่คุณอาจพบเมื่อใช้ Firebase
หากพบความท้าทายอื่นๆ หรือไม่เห็นปัญหาของคุณที่ระบุไว้ด้านล่าง อย่าลืมดูคำถามที่พบบ่อยหลักของ Firebase เพื่อดูคำถามที่พบบ่อยเพิ่มเติมเกี่ยวกับ Firebase หรือผลิตภัณฑ์โดยเฉพาะ
นอกจากนี้ คุณยังดูรายการปัญหาที่รายงานและการแก้ปัญหาล่าสุดได้ใน
ที่เก็บ GitHub ของ Firebase Apple Platforms SDK
เราขอแนะนำให้คุณ
รายงานปัญหาที่เกี่ยวข้องกับ Firebase Apple Platforms SDK ที่นั่นด้วย
Firebase รองรับ Xcode เวอร์ชันใดบ้าง
Firebase รองรับ Xcode เวอร์ชันหลักสูงสุด 2 เวอร์ชัน โดยไม่รวม Xcode เวอร์ชันที่ Apple ไม่รองรับอีกต่อไป
ตัวอย่างเช่น ตั้งแต่เดือนมีนาคม 2019
Apple กำหนดให้แอปทั้งหมดต้องมี iOS อย่างน้อย 12 ซึ่งหมายความว่าการรองรับ Xcode 9
จะสิ้นสุดลง และ Xcode 10 จะเป็นเวอร์ชันหลักเดียวที่รองรับ
การเปลี่ยนแปลงการรองรับ Xcode เวอร์ชันย่อยหรือเวอร์ชันแพตช์ที่เฉพาะเจาะจง
(เช่น 9.2.0 เป็น 9.4.1) จะพิจารณาตามความต้องการของ
Firebase Apple Platforms SDK และการสำรวจการใช้งานของนักพัฒนาแอป การเปลี่ยนแปลงเหล่านี้
จะแสดงใน
หมายเหตุประจำรุ่นของ Firebase Apple Platforms SDK
และในหน้าการตั้งค่า Firebase Apple Platforms SDK
หากต้องการดูเวอร์ชัน Xcode ขั้นต่ำที่ SDK รองรับ ให้ดูข้อกำหนดที่ระบุไว้ใน
เพิ่ม Firebase ในโปรเจ็กต์ Apple
การสนับสนุน Firebase สำหรับ Xcode เวอร์ชันเบต้าจะดำเนินการ "อย่างสุดความสามารถ"
นักพัฒนาแอปสามารถติดตามและส่งปัญหาได้ใน
ที่เก็บ SDK ของแพลตฟอร์ม Apple สำหรับ Firebase ใน GitHub
แอปของฉันแจ้งให้ผู้ใช้ป้อนรหัสผ่านเพื่อเข้าถึงรายการในพวงกุญแจบน macOS ฉันจะแก้ไขได้อย่างไร
อัปเกรดทรัพยากร Dependency ของ Firebase เป็นเวอร์ชัน 9.6.0 ขึ้นไป แล้วเพิ่ม
[ความสามารถในการแชร์พวงกุญแจ](/docs/ios/troubleshooting-faq#macos-keychain-sharing)
ลงในเป้าหมาย
เหตุใด Firebase จึงต้องใช้ความสามารถในการแชร์พวงกุญแจใน macOS
Firebase SDK ใช้พวงกุญแจเพื่อจัดเก็บข้อมูล เช่น รหัสการติดตั้ง Firebase ที่ใช้สำหรับ FCM หากไม่มีสิทธิ์เข้าถึงพวงกุญแจ Firebase SDK อาจทำงานไม่ถูกต้อง พวงกุญแจ macOS จะทำงานแตกต่างจากพวงกุญแจสไตล์ iOS
ที่ใช้ในแพลตฟอร์มอื่นๆ (iOS, tvOS, macCatalyst
และ watchOS)
ใน macOS แอปจะใช้พวงกุญแจที่แชร์ซึ่งแอปและกระบวนการอื่นๆ อาจแก้ไขได้
ซึ่งต่างจาก iOS ตรงที่ไม่มีพวงกุญแจที่อยู่ในแซนด์บ็อกซ์ซึ่งแอปมีสิทธิ์เข้าถึงโดยนัย ดังนั้น เมื่อแอป Mac โต้ตอบกับพวงกุญแจ ระบบจะแจ้งให้ผู้ใช้เข้าถึงเนื่องจากแอป Mac อาจแก้ไขรายการในพวงกุญแจที่ไม่ได้สร้างขึ้น Firebase จะค้นหาพวงกุญแจด้วยคีย์ kSecUseDataProtectionKeychain
เพื่อแก้ไขความคลาดเคลื่อนนี้ ซึ่งจะบอกให้แอปค้นหารายการพวงกุญแจที่เป็นส่วนหนึ่งของกลุ่มการเข้าถึงพวงกุญแจ
(นี่คือลักษณะการทำงานเริ่มต้นในแพลตฟอร์มอื่นๆ) ต้องใช้ความสามารถในการแชร์พวงกุญแจ
เนื่องจากแอปต้องใช้ความสามารถนี้เพื่อสังเคราะห์กลุ่มการเข้าถึงที่แชร์
ในกลุ่มเป้าหมายได้ จึงเป็นการให้สิทธิ์แอปในการเข้าถึงรายการพวงกุญแจในกลุ่มการเข้าถึงได้อย่างอิสระ
ดูข้อมูลเพิ่มเติมได้ที่
เอกสารประกอบเกี่ยวกับพวงกุญแจ
ของ Apple
ใน Xcode เวอร์ชัน 13 ขึ้นไป เหตุใดแอป UIKit ของฉันจึงเปิด URL บางรายการที่ฉันลงทะเบียน
ใน Info.plist ไม่ได้
Apple ได้กำหนดขีดจำกัดรายการ LSApplicationQueriesSchemes
ไว้ 50 รายการในไฟล์ Info.plist
ในปี 2015 Apple ได้เปิดตัว
LSApplicationQueriesSchemes
เพื่อจำกัดจำนวนการค้นหา URL
ที่แต่ละแอปจะทำได้ เมื่อเปิดตัว Xcode 13 ระบบจะบังคับใช้ขีดจำกัดเหล่านี้
ขณะที่ใน Xcode 12 และเวอร์ชันก่อนหน้าจะไม่มีขีดจำกัดที่มีผลต่อจำนวน
สคีมา
ผลิตภัณฑ์ Firebase บางอย่าง เช่น Firebase Authentication และ Firebase Dynamic Links
กำหนดให้ใช้สกีม URL ที่กำหนดเองเพื่อเปลี่ยนเส้นทางไปยังแอปพลิเคชันของคุณ URL เหล่านี้เป็นไปตามรูปแบบ URL ที่กระชับและสอดคล้องกัน ซึ่งไม่ควรนับรวม
ในขีดจำกัดรูปแบบลิงก์ 50 รายการ
โปรดทราบว่าสำหรับแอปที่ยังคงลงทะเบียนมากกว่า 50
LSApplicationQueriesSchemes
ระบบจะไม่สนใจบางรูปแบบโดยไม่มีการแจ้งเตือน
แอปอาจเรียกใช้ Deep Link บางรายการไม่ได้
โดยขึ้นอยู่กับลำดับการเพิ่ม
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-16 UTC
[null,null,["อัปเดตล่าสุด 2025-08-16 UTC"],[],[],null,["# Troubleshooting & FAQ for Apple platforms and Firebase\n\n\u003cbr /\u003e\n\nThis page offers tips and troubleshooting for Apple platform-specific issues\nthat you might encounter when using Firebase.\n\nHave other challenges or don't see your issue outlined below? Make sure to check\nout the [main Firebase FAQ](/support/faq) for more pan-Firebase or\nproduct-specific FAQ.\n\nYou can also check out the\n[Firebase Apple platforms SDK GitHub repo](https://github.com/firebase/firebase-ios-sdk/issues)\nfor an up-to-date list of reported issues and troubleshooting. We encourage you\nto file your own Firebase Apple platforms SDK related issues there, too! \n\n#### What versions of Xcode does Firebase support?\n\nFirebase supports up to two major versions of Xcode, not including versions\nof Xcode that Apple no longer supports. For example, starting in March 2019,\nApple required at least iOS 12 on all apps, meaning Xcode 9 support was\ndropped and Xcode 10 was the only major version supported.\n\nChanges to support for specific minor or patch versions of Xcode\n(for example, 9.2.0 to 9.4.1) are determined based on the needs of the\nFirebase Apple platforms SDK and a survey of developer usage. These changes\nare reflected in the\n[Firebase Apple platforms SDK release notes](/support/release-notes/ios)\nand on the [Firebase Apple platforms SDK setup page](/docs/ios/setup).\n\nTo see the minimum Xcode version supported by the SDK, check\nthe requirements listed in\n[Add Firebase to your Apple project](/docs/ios/setup).\n\nFirebase support for Beta releases of Xcode is available on a \"best effort\"\nbasis. Developers can track and submit issues in the\n[Firebase Apple platforms SDK repository on GitHub](//github.com/firebase/firebase-ios-sdk/issues). \n\n#### My app prompts the user for their password to access Keychain items on macOS. How do I fix this?\n\nUpgrade your Firebase dependency to version 9.6.0 or higher and add the\n\\[Keychain Sharing capability\\](/docs/ios/troubleshooting-faq#macos-keychain-sharing)\nto your target. \n\n#### Why does Firebase require the Keychain Sharing capability on macOS?\n\nFirebase SDKs use keychain to store information like the Firebase\ninstallation ID used for FCM. Without Keychain access, Firebase SDKs may not\nfunction correctly. The macOS keychain behaves differently than the iOS-style\nkeychain that is used on other platforms (iOS, tvOS, macCatalyst,\nand watchOS).\n\nOn macOS, apps use a shared keychain that may be modified by other apps and\nprocesses. Unlike iOS, there is no sandboxed keychain that the app has\nimplicit access to. So, when a Mac app interacts with the keychain, the system\nprompts the user for access since the Mac app may be modifying a keychain item\nthat it did not create. To address this discrepancy, Firebase queries the\nkeychain with the `kSecUseDataProtectionKeychain` key, which tells\nthe app to query a keychain item that is part of a keychain access group\n(this is default behavior on other platforms). The Keychain Sharing capability\nis required because the app needs it to synthesize an access group that can be\nshared amongst its targets, thus giving permission for the app to freely\naccess keychain items in the access group.\n\nFor more information, see Apple's\n[Keychain documentation](https://developer.apple.com/documentation/security/keychain_services/keychains). \n\n#### In Xcode versions 13 and later, why can my UIKit apps not open some\nURLs I've registered\nin my Info.plist?\n\nApple introduced a limit of 50 `LSApplicationQueriesSchemes`\nentries in `Info.plist` files. In 2015, Apple introduced\n`LSApplicationQueriesSchemes` to limit the number of URL queries\neach app could make. With the release of Xcode 13, these limits are enforced,\nwhile in Xcode 12 and earlier there was no effective limit to the number of\nschemes.\n\nSome Firebase products, like Firebase Authentication and Firebase Dynamic Links,\nrequire the use of custom URL schemes to redirect to your application. These\nURLs conform to a concise and consistent URL scheme that should not count\nsignificantly against the 50 link scheme limit.\n\nNote that for apps that continue to register more than 50\n`LSApplicationQueriesSchemes`, some schemes will\nbe silently ignored. The app may be unable to execute certain deeplinks,\ndepending on the order in which they are added."]]