类列表
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Nearby Messages API for iOS 中的类和协议:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-13。
[null,null,["最后更新时间 (UTC):2025-08-13。"],[[["\u003cp\u003eThe Nearby Messages API for iOS enables communication between devices in close proximity.\u003c/p\u003e\n"],["\u003cp\u003eThis API uses publications to share messages and subscriptions to receive them, managed by the GNSMessageManager.\u003c/p\u003e\n"],["\u003cp\u003eStrategies and parameters, like GNSStrategy and GNSBeaconStrategy, control device detection and message delivery.\u003c/p\u003e\n"],["\u003cp\u003eGNSPermission handles user authorization for using Nearby capabilities.\u003c/p\u003e\n"]]],["The Nearby Messages API for iOS provides classes and protocols for managing interactions between nearby devices. Key actions include using `GNSMessageManager` to create message publications and subscriptions, represented by `GNSPublication` and `GNSSubscription` respectively. `GNSStrategy` and `GNSBeaconStrategy` define how devices are detected and scanned. `GNSMessage` represents published objects, while `GNSPermission` manages app permissions. Optional parameters for strategies, managers, publications, and subscriptions are provided via classes like `GNSStrategyParams`.\n"],null,["# Class List \nThe classes and protocols in Nearby Messages API for iOS: \n\n|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| C[GNSBeaconStrategy](/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy) | The strategy to use to scan for beacons |\n| C[GNSBeaconStrategyParams](/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy_params) | Optional params for a beacon strategy. See properties with the same names in [GNSBeaconStrategy](/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy \"The strategy to use to scan for beacons. \") |\n| C[GNSMessage](/nearby/messages/ios/reference/interface_g_n_s_message) | A message is a published object that is delivered between nearby devices |\n| C[GNSMessageManager](/nearby/messages/ios/reference/interface_g_n_s_message_manager) | The message manager lets you create publications and subscriptions |\n| C[GNSMessageManagerParams](/nearby/messages/ios/reference/interface_g_n_s_message_manager_params) | Additional parameters for the message manager |\n| C[GNSPermission](/nearby/messages/ios/reference/interface_g_n_s_permission) | This class lets you manage the Nearby permission state for the app on the current device |\n| C[\\\u003cGNSPublication\\\u003e](/nearby/messages/ios/reference/protocol_g_n_s_publication-p) | A publication object represents a message published to nearby devices |\n| C[GNSPublicationParams](/nearby/messages/ios/reference/interface_g_n_s_publication_params) | Optional parameters for a publication |\n| C[GNSStrategy](/nearby/messages/ios/reference/interface_g_n_s_strategy) | The strategy to use to detect nearby devices |\n| C[GNSStrategyParams](/nearby/messages/ios/reference/interface_g_n_s_strategy_params) | Optional params for a strategy. See properties with the same names in [GNSStrategy](/nearby/messages/ios/reference/interface_g_n_s_strategy \"The strategy to use to detect nearby devices. \") |\n| C[\\\u003cGNSSubscription\\\u003e](/nearby/messages/ios/reference/protocol_g_n_s_subscription-p) | A subscription object represents the act of subscribing to messages of a certain type from nearby devices |\n| C[GNSSubscriptionParams](/nearby/messages/ios/reference/interface_g_n_s_subscription_params) | Optional parameters for a subscription |"]]