تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
الميزات الرئيسية
بالإضافة إلى توفير أرقام تعريف فريدة للمصادقة، يمكن أن يُنشئ معرّف المثيل
رموز أمان لاستخدامها مع خدمات أخرى. تشمل الميزات الأخرى
ما يلي:
إنشاء الرموز الأمنية
يوفّر معرّف النسخة واجهة برمجة تطبيقات بسيطة لإنشاء رموز أمان تمنح الجهات الخارجية الإذن بالوصول إلى الموارد المُدارة من جهة الخادم في تطبيقك.
التحقّق من أصالة التطبيق
أرسِل علامات تعريف مثيل التطبيق إلى خادمك واستخدِم خدمة مثيل التطبيق
للتحقّق من اسم حزمة التطبيق والتحقّق مما إذا كان يحتوي على توقيع صالح.
يساعد إثبات صحة الرموز المميّزة باستخدام خدمة Instance ID Cloud في تحديد التطبيقات المعروفة. لتقليل التكلفة والاتصالات المتكرّرة ذهابًا وإيابًا، يمكنك ضبط
الخادم لتخزين هذه الرموز المميّزة كي لا يكون عليك التحقّق منها إلا مرة واحدة.
في حال حدوث مشكلة في الأمان، يمكن لتطبيقك حذف الرموز المميّزة أو
رقم تعريف المثيل نفسه وإنشاء رموز جديدة. بالإضافة إلى ذلك، يُعيد
خادم أرقام تعريف المثيل تحميل الرمز المميّز أو رقم تعريف المثيل إذا
رصد أخطاء أو مشاكل في الأمان.
التأكّد من أنّ جهاز التطبيق نشط
يمكن لخادم "رقم تعريف الإصدار" إعلامك بآخر مرة تم فيها استخدام الجهاز الذي
تم تثبيت تطبيقك عليه. استخدِم هذه الميزة لتحديد ما إذا كنت تريد الاحتفاظ بالبيانات من
تطبيقك أو إرسال رسالة فورية لإعادة التفاعل مع المستخدمين.
تحديد التطبيقات وتتبُّعها
يكون رقم تعريف النسخة فريدًا في جميع نُسخ التطبيق في جميع أنحاء العالم، لذلك
يمكن لقاعدة بياناتك استخدامه لتحديد نُسخ التطبيق وتتبُّعها بشكل فريد. يمكن للرمز المُنفَّذ على
الخادم التحقّق، من خلال خدمة السحابة الإلكترونية لـ "رقم تعريف المثيل"، من أنّ
رقم تعريف المثيل أصلي وأنّه هو نفسه رقم تعريف التطبيق الأصلي الذي
تم تسجيله على خادمك. للمحافظة على الخصوصية، يمكن لتطبيقك حذف رقم تعريف النسخة لكي
لا يعود مرتبطًا بأي سجلّ في قاعدة البيانات. في المرة التالية التي يطلب فيها
تطبيقك معرّف النسخة، سيحصل على معرّف نسخة جديد تمامًا بدون
علاقة بمعرّفه السابق.
مراحل نشاط رقم تعريف المثيل
تُصدر خدمة "معرّف النسخة" InstanceID عندما يصبح تطبيقك متصلاً بالإنترنت.
يستند InstanceID إلى مفتاحَين عام/خاص مع تخزين المفتاح الخاص
على الجهاز المحلي والمفتاح العام المسجَّل في خدمة Instance ID.
يمكن لتطبيقك طلب InstanceID جديد كلما لزم الأمر باستخدام getID()
الطريقة. يمكن لتطبيقك تخزينها على خادمك إذا كان لديك خادم متوافق
مع تطبيقك.
يمكن لتطبيقك طلب الرموز المميّزة من خدمة Instance ID حسب الحاجة
باستخدام طريقة getToken()، ومثل InstanceID، يمكن لتطبيقك أيضًا تخزين
الرموز المميّزة على خادمك الخاص. تنتمي جميع الرموز المميّزة التي تم إصدارها لتطبيقك إلى
InstanceID الخاص بالتطبيق.
تكون الرموز المميّزة فريدة وآمنة، ولكن قد يحتاج تطبيقك أو خدمة Instance ID
إلى إعادة تحميل الرموز المميّزة في حال حدوث مشكلة في الأمان أو عندما يزيل مستخدم
تطبيقك ويعيد تثبيته أثناء استعادة الجهاز. يجب أن ينفذ تطبيقك معالجًا للطلبات من أجل الردّ على طلبات إعادة تحميل الرمز المميّز من "خدمة أرقام تعريف النماذج".
تنفيذ العميل
يعمل معرّف النسخ على نظامَي التشغيل Android وiOS. ويتطلّب كل منهما تضمين
المكتبة المناسبة في تطبيق العميل. ويتطلّب Android استخدام
خدمات Google Play. ستحتاج إلى رقم تعريف مشروع تم إنشاؤه
من خلال Google Developers Console إذا كنت تنوي
إنشاء الرموز المميّزة.
للحصول على تعليمات تفصيلية، يُرجى الاطّلاع على دليلَي التنفيذ Android
وiOS.
تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003e\u003cstrong\u003eWarning:\u003c/strong\u003e The Instance ID API is deprecated; for unique app installation identifiers, use the Firebase installations API instead.\u003c/p\u003e\n"],["\u003cp\u003eInstance ID offers key features like generating security tokens, verifying app authenticity, confirming app device activity, and identifying/tracking apps.\u003c/p\u003e\n"],["\u003cp\u003eInstance ID has a lifecycle involving issuing an ID, requesting fresh IDs and tokens, storing them on the server (optional), and handling token refreshes.\u003c/p\u003e\n"],["\u003cp\u003eClient implementation requires including the appropriate library and potentially a Project ID for token generation.\u003c/p\u003e\n"],["\u003cp\u003eFor detailed instructions, refer to the Android and iOS implementation guides.\u003c/p\u003e\n"]]],[],null,["# What is Instance ID?\n\n| **Warning:** The Instance ID API is deprecated. If you need to access unique app installation identifiers, use the [Firebase installations](//firebase.google.com/docs/projects/manage-installations) API. See also [Firebase installations and Instance ID](//firebase.google.com/docs/projects/manage-installations#fid-iid). The [server-side topic management API](https://developers.google.com/instance-id/reference/server#create_relationship_maps_for_app_instances) is still available.\n\nKey features\n------------\n\nIn addition to providing unique IDs for authentication, Instance ID\ncan generate security tokens for use with other services. Other features\ninclude:\n\n### Generate Security Tokens\n\n: Instance ID provides a simple API to generate security tokens that\n authorize third parties to access your app's server side managed resources.\n\n### Verify app authenticity\n\n: Pass Instance ID tokens to your server and use the Instance ID\n service to verify the app package name and check if it has a valid signature.\n Verifying tokens with the Instance ID Cloud Service helps identify known\n apps. To reduce cost and redundant round trip communications, configure your\n server to store these tokens so the check is needed only once.\n In the event of a security concern, your app can delete tokens, or\n Instance ID itself, and generate new ones. In addition, the\n Instance ID server initiates token or Instance ID refresh if it\n detects bugs or security issues.\n\n### Confirm app device is active\n\n: The Instance ID server can tell you when the device on which your app\n is installed was last used. Use this to decide whether to keep data from your\n app or send a push message to reengage with your users.\n\n### Identify and track apps\n\n: Instance ID is unique across all app instances across the world, so\n your database can use it to uniquely identify and track app instances. Your\n server-side code can verify, via the Instance ID cloud service, that an\n Instance ID is genuine and is the same ID as the original app that\n registered with your server. For privacy, your app can delete an Instance ID so\n it is no longer associated with any history in the database. The next time your\n app calls Instance ID it will get an entirely new Instance ID with no\n relationship to its previous one.\n\nInstance ID lifecycle\n---------------------\n\n1. The Instance ID service issues an `InstanceID` when your app comes online. The `InstanceID` is backed by a public/private key pair with the private key stored on the local device and the public key registered with the Instance ID service.\n2. Your app can request a fresh `InstanceID` whenever needed using the `getID()` method. Your app can store it on your server if you have one that supports your app.\n3. Your app can request tokens from the Instance ID service as needed using the `getToken()` method, and like `InstanceID`, your app can also store tokens on your own server. All tokens issued to your app belong to the app's `InstanceID`.\n4. Tokens are unique and secure, but your app or the Instance ID service may need to refresh tokens in the event of a security issue or when a user uninstalls and reinstalls your app during device restoration. Your app must implement a listener to respond to token refresh requests from the Instance ID service.\n\nClient implementation\n---------------------\n\nInstance ID runs on both Android and iOS. Each requires you to include\nthe appropriate library in your client app. Android requires\n[Google Play Services](https://developer.android.com/google/play-services/index.html). You will need a Project ID generated\nby the [](/console/help/new)[Google Developers Console](https://console.developers.google.com/project) if you intend\nto generate tokens.\n\nFor detailed instructions, see the [Android](/instance-id/guides/android-implementation)\nand [iOS](/instance-id/guides/ios-implementation) implementation guides."]]