

The STPEventProducer protocol describes an object that monitors system events, produces a promotion event ( STPPromotionEvent), and delegates event processing to another object (in our case, to STPEventProcessor via STPEventController). EventProducer (conforms to the STPEventProducer protocol) The objects to be used for smart suggestion triggers are in the Promotions Core directory of this repository.

SETAPP PROMO CODE CODE
The smart suggestions code is executed in the Setapp's helper tool and in a non-sandboxed environment. Promotion event is a basic entity of smart suggestions: used as a criteria of app promotion, it is produced on the basis of system events that take place on a Setapp user's Mac. Any recommendation includes a promotional text and a URI that instantly redirects a Setapp user to an app's page in the Setapp desktop app. The display of any app recommendation is based on the logic, specified in its trigger.įrom a user's perspective, a recommendation can be either a push notification (displayed via macOS's User Notification Center) or a section on the page of the Setapp desktop app. Your code must conform to the STPEventProducer and the STPEventProcessor protocols, declared in the Promotions Core directory of this repository.Īpp promotion (or app recommendation), in the context of this doc, is a fact of presenting a recommendation of an app to a Setapp member. Smart suggestion trigger is a code that allows the Setapp desktop app to show a recommendation to a Setapp user. We'll be happy to discuss them with you! Glossary However (and it matters a lot for us!), we ask you not to stop on our proposed implementations but go beyond and propose new ideas. Common protocols is the only way for the Setapp Review Team to quickly review your code and integrate it into the Setapp codebase.When writing triggers using our classes, you don't have to invent own code structure, so, hopefully, you save some time.Why follow the protocols of this repository? This document is purely technical for a wider smart suggestions overview and the business-related info, see "Smart suggestions" on Setapp DevDoc. The repo contains the required classes, an example of a smart suggestion trigger implementation, and an example of a pull request with such a trigger. This repository was created to help developers create smart suggestions for their apps in Setapp. For example, when a MacBook is unplugged from a power outlet, Setapp suggests an app that optimizes power consumption or battery usage. With smart suggestions, Setapp gives personalized recommendations to its users.
