GNSPublicationParams 클래스
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
게시의 선택적 매개변수입니다.
각 매개변수에 관한 설명은 아래 속성 선언을 참고하세요.
NSObject를 상속합니다.
- (GNSOperationStatusHandler) statusHandler |
|
readwritenonatomiccopy |
게시 상태의 핸들러입니다.
새로 생성된 간행물의 상태를 추적하는 데 사용할 수 있습니다.
- (GNSPermissionRequestHandler) permissionRequestHandler |
|
readwritenonatomiccopy |
Nearby를 사용할 수 있는 사용자 권한을 요청하기 위한 핸들러입니다.
이 핸들러는 Nearby가 사용하는 기본 대화상자를 재정의합니다. 이 핸들러를 제공하면 Nearby는 권한 대화상자를 표시하지 않습니다.
요청 핸들러에서 Nearby 사용이 필요한 작업을 수행하기 위해 사용자의 권한을 요청하고 Nearby가 사용되는 이유를 설명해야 합니다. 사용자가 동의를 제공하거나 거부한 경우 요청 핸들러에 전달된 블록을 호출해야 합니다. YES
를 블록에 전달하면 사용자가 Nearby 작동에 동의했음을 의미합니다. NO
를 통과하면 사용자가 동의하지 않았음을 의미합니다. 동의를 받을 때까지 간행물과 구독이 작동하지 않습니다.
핸들러는 iOS 권한 대화상자의 '프리플라이트' 메서드로도 사용할 수 있습니다. 앱에서 Nearby 관련 기능을 실행하기 전에 사용자가 iOS 권한에 동의해야 하는 이유를 설명하는 데 사용할 수 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 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."]]