Stay organized with collections
Save and categorize content based on your preferences.
<GNSPublication> Protocol Reference
Overview
A publication object represents a message published to nearby devices.
As long as it lives, the messages library will do its best to make sure the message is being published, as long as the required conditions are met (e.g., the app must be in the foreground). When the publication object is deallocated, the message will no longer be published.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-12 UTC."],[[["\u003cp\u003eGNSPublication objects represent messages that are broadcasted to nearby devices.\u003c/p\u003e\n"],["\u003cp\u003eMessages continue to be published while the publication object exists and conditions are met, like the app being in the foreground.\u003c/p\u003e\n"],["\u003cp\u003eDeallocation of the publication object stops further message broadcasting.\u003c/p\u003e\n"],["\u003cp\u003eGNSPublication inherits functionality from the NSObject class.\u003c/p\u003e\n"]]],["A publication object signifies a message broadcast to nearby devices. The message library ensures the message's publication while the object exists, provided necessary conditions are satisfied, such as the app being in the foreground. Upon deallocation of the publication object, the message is no longer published. This object is derived from the base class `\u003cNSObject\u003e`. It represents the lifecycle of message delivery.\n"],null,["# <GNSPublication> Protocol\n\n\\\u003cGNSPublication\\\u003e Protocol Reference \n\nOverview\n--------\n\nA publication object represents a message published to nearby devices.\n\nAs long as it lives, the messages library will do its best to make sure the message is being published, as long as the required conditions are met (e.g., the app must be in the foreground). When the publication object is deallocated, the message will no longer be published.\n\nInherits \\\u003cNSObject\\\u003e."]]