GNSPublicationParams क्लास
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
पब्लिकेशन के लिए वैकल्पिक पैरामीटर.
हर पैरामीटर के बारे में ज़्यादा जानकारी के लिए, नीचे दी गई प्रॉपर्टी से जुड़े एलान देखें.
NSObject को इनहेरिट करता है.
मैसेज पब्लिश करने के लिए इस्तेमाल की जाने वाली रणनीति. डिफ़ॉल्ट वैल्यू के लिए, GNSStrategy
देखें.
- (GNSOperationStatusHandler) statusHandler |
|
readwritenonatomiccopy |
पब्लिकेशन की स्थिति के लिए एक हैंडलर.
इसका इस्तेमाल, नए बनाए गए पब्लिकेशन की स्थिति को ट्रैक करने के लिए किया जा सकता है.
- (GNSPermissionRequestHandler) permissionRequestHandler |
|
readwritenonatomiccopy |
'आस-पास' सुविधा का इस्तेमाल करने के लिए, उपयोगकर्ता की अनुमति का अनुरोध करने के लिए हैंडलर.
यह हैंडलर उस डिफ़ॉल्ट डायलॉग को ओवरराइड करता है जिसका इस्तेमाल 'आस-पास' किया जाता है. अगर आप यह हैंडलर देते हैं, तो 'आस-पास' सुविधा इसकी अनुमति वाला डायलॉग नहीं दिखाएगी.
अपने अनुरोध हैंडलर में, आपको उस काम को करने के लिए उपयोगकर्ता की अनुमति का अनुरोध करना चाहिए जिसके लिए'आस-पास' सुविधा का इस्तेमाल करना ज़रूरी है. साथ ही, आपको यह भी बताना चाहिए कि इसका इस्तेमाल क्यों किया जा रहा है. जब उपयोगकर्ता सहमति देता है या सहमति नहीं देता है, तो आपको अपने अनुरोध हैंडलर में भेजे गए ब्लॉक को कॉल करना होगा. अगर YES
को ब्लॉक में पास किया जाता है, तो इसका मतलब है कि उपयोगकर्ता ने 'आस-पास' सुविधा को काम करने की अनुमति दी है. NO
पास करने का मतलब है कि उपयोगकर्ता ने सहमति नहीं दी है. सहमति मिलने तक आपके पब्लिकेशन और सदस्यताएं काम नहीं करेंगी.
हैंडलर का इस्तेमाल iOS की अनुमति वाले डायलॉग के लिए, "प्रीफ़्लाइटिंग" के तरीके के तौर पर भी किया जा सकता है. इसका इस्तेमाल, यह बताने के लिए किया जा सकता है कि आपके ऐप्लिकेशन के आस-पास मौजूद सुविधाएं इस्तेमाल करने से पहले, उपयोगकर्ता को iOS की अनुमतियों के लिए क्यों सहमति देनी होगी.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-13 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-13 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eGNSPublicationParams provides optional parameters for configuring message publications in Nearby Messages.\u003c/p\u003e\n"],["\u003cp\u003eIt allows customization of the publication strategy, status handling, and user permission requests.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003estrategy\u003c/code\u003e property defines how the message is published, with a default strategy available.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003estatusHandler\u003c/code\u003e and \u003ccode\u003epermissionRequestHandler\u003c/code\u003e properties enable monitoring publication status and managing user permissions, respectively.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can override the default permission dialog by providing a custom \u003ccode\u003epermissionRequestHandler\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# GNSPublicationParams Class\n\n[Properties](#properties) \nGNSPublicationParams Class Reference \n\nOverview\n--------\n\nOptional parameters for a publication.\n\nSee the property declarations below for explanations of each parameter.\n\nInherits NSObject.\n\n|---------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| [GNSStrategy](/nearby/messages/ios/reference/interface_g_n_s_strategy) \\* | [strategy](/nearby/messages/ios/reference/interface_g_n_s_publication_params#aa5b307ccee2b3c5214cde08cd2bfb7e4) |\n| | The strategy to use for publishing the message. See [GNSStrategy](/nearby/messages/ios/reference/interface_g_n_s_strategy \"The strategy to use to detect nearby devices. \") for the default. [More...](#aa5b307ccee2b3c5214cde08cd2bfb7e4) |\n| ||\n| GNSOperationStatusHandler | [statusHandler](/nearby/messages/ios/reference/interface_g_n_s_publication_params#a59b5094d5f639371724e7475defb6b63) |\n| | A handler for publication status. [More...](#a59b5094d5f639371724e7475defb6b63) |\n| ||\n| GNSPermissionRequestHandler | [permissionRequestHandler](/nearby/messages/ios/reference/interface_g_n_s_publication_params#a09124c8fa69e5b3dc46c4d102eddb0b1) |\n| | A handler for requesting user permission to use Nearby. [More...](#a09124c8fa69e5b3dc46c4d102eddb0b1) |\n| ||\n\nProperty Detail\n---------------\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|\n| |---------------------------------------------------------------------------------------| | - ([GNSStrategy](/nearby/messages/ios/reference/interface_g_n_s_strategy)\\*) strategy | | readwritenonatomicassign |\n\nThe strategy to use for publishing the message. See [GNSStrategy](/nearby/messages/ios/reference/interface_g_n_s_strategy \"The strategy to use to detect nearby devices. \") for the default. \n\n|-------------------------------------------------------------------------------------------------|------------------------|\n| |---------------------------------------------| | - (GNSOperationStatusHandler) statusHandler | | readwritenonatomiccopy |\n\nA handler for publication status.\n\nIt can be used for tracking the status of a newly created publication. \n\n|---------------------------------------------------------------------------------------------------------------------------|------------------------|\n| |----------------------------------------------------------| | - (GNSPermissionRequestHandler) permissionRequestHandler | | readwritenonatomiccopy |\n\nA handler for requesting user permission to use Nearby.\n\nThis handler overrides the default dialog used by Nearby; if you supply this handler, Nearby will not show its permission dialog.\n\nIn your request handler, you should request the user's permission to perform the task that requires the use of Nearby, explaining why it's being used. When the user has given or denied consent, you must call the block that's passed into your request handler. If you pass `YES` into the block, it means the user has consented to allow Nearby to function. If you pass `NO`, it means the user has not consented; your publications and subscriptions will not work until consent has been given.\n\nThe handler can also be used as a method of \"preflighting\" for the iOS permission dialogs. You can use it to explain why the user is expected to consent to the iOS permissions before your app can perform its Nearby related functions."]]