{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":""},"next":{"description":"","pages":[]},"title":"PulsateManager Methods","type":"basic","slug":"pulsatemanager-methods","excerpt":"","body":"[block:code]\n{\n \"codes\": [\n {\n \"code\": \":::at:::interface PULPulsateManager : NSObject\\n\\[email protected] (nonnull, nonatomic, retain) IBOutlet id<PULPulsateUnauthorizedManagerDelegate> unauthorizedDelegate;\\[email protected] (nonnull, nonatomic, retain) IBOutlet id<PULPulsateBadgeDelegate> badgeDelegate;\\n\\ntypedef void(^RequestListener)(BOOL success, NSError* _Nullable error);\\ntypedef void(^FeedListener)(NSArray* _Nullable feed, NSError* _Nullable error);\\n\\ntypedef NS_ENUM(NSUInteger, PULUserGender){\\n PULMale,\\n PULFemale\\n};\\n\\ntypedef NS_ENUM(NSUInteger, PULPrivacyLevel){\\n PULPrivacySubscribed,\\n PULPrivacyUnsubscribed\\n};\\n\\n/**\\n * Starts Pulsate session lifecycle. If location and push were set as enabled it'll show the prompts to the user.\\n * Session starts when the app enters foreground and ends when it goes to background.\\n */\\n-(void)startPulsateSession:(nullable RequestListener)listener;\\n\\n/**\\n * Starts Pulsate session lifecycle for given user (alias). If location and push were set as enabled it'll show the prompts to the user.\\n * Session starts when the app enters foreground and ends when it goes to background.\\n */\\n-(void)startPulsateSessionForAlias:(nonnull NSString*)alias withListener:(nonnull RequestListener)listener;\\n\\n/**\\n * Logs out the current user\\n */\\n-(void)logout:(nonnull RequestListener)listener;\\n\\n/**\\n * If you chose to have location disabled when instantiating the Pulsate Manager, you can enable it later.\\n * This enables you to postpone the location query prompt.\\n */\\n-(void)startLocation;\\n\\n/**\\n * If you chose to have push disabled when instantiating the Pulsate Manager, you can enable it later.\\n * This enables you to postpone the push query prompt.\\n */\\n-(void)startRemoteNotifications;\\n\\n/**\\n * If you chose to have push disabled when instantiating the Pulsate Manager, you can enable it later.\\n * This enables you to postpone the push query prompt and customize the push settings\\n */\\n-(void)startRemoteNotificationsWithSettings:(nonnull UIUserNotificationSettings*)notificationSettings;\\n\\n/**\\n * Creates and returns a Pulsate Feeed Navigation Controller. You can choose to present it however you see fit.\\n *\\n */\\n-(nonnull UINavigationController*)getFeedNavigationController;\\n\\n/**\\n * Allows Developers to get the Pulsate Inbox JSON that they can later render and show to the user in a custom way\\n *\\n */\\n-(void)getFeed:(nonnull NSString*)page withListener:(nonnull FeedListener)listener;\\n\\n/**\\n * When using -(void)getFeed:(NSString*)page withListener:(nonnull FeedListener)listener;\\n * We recommend using this method to pass user onClick events to Pulsate to properly handle it.\\n * Pulsate will make sure that the click does what it should do - open url, open deeplink, send custom events, record opens / clicks\\n *\\n */\\n-(void)handleFeedClick:(nonnull id)pulsateInboxItem;\\n\\n/**\\n * If feed is opened automatically (by pressing a push notification for example) you might want to\\n * hide it programatically.\\n */\\n-(void)closeAutomaticallyOpenedFeed;\\n\\n/**\\n * Developers can now add an additional button in the Pulsate Feed. The button will appear in the main Feed Toolbar in the right corner.\\n * To add this button you need to call the new setInboxRightButton method and pass an UIBarButtonItem that you want to show. This should be\\n * done in the AppDelegate under didFinishLaunchingWithOptions.\\n * @param rightButton\\n */\\n-(void)setInboxRightButton:(nullable UIBarButtonItem*)rightButton;\\n\\n/**\\n * Disables or Enables push notifications for Pulsate\\n *\\n * @param disable user's push notification preference\\n */\\n-(void)setPushNotificationEnabled:(BOOL)enabled;\\n\\n-(BOOL)isPushNotificationEnabled;\\n\\n/**\\n * Sets user's privacy settings.\\n *\\n * @param privacyLevel user's privacy level\\n */\\n-(void)setPrivacy:(PULPrivacyLevel)privacyLevel;\\n\\n-(NSUInteger)getPrivacy;\\n\\n/**\\n * Enables or Disables using the user initials as the user avatar.\\n * When disabled the avatar will always be an anon icon.\\n * By default enabled\\n *\\n * @param useInitials\\n */\\n-(void)useInitialsForUserAvatar:(BOOL)useInitials;\\n\\n-(BOOL)getUseInitialsForUserAvatar;\\n\\n\\n/**\\n * Enables or Disables the Geofencing and Beacon Scanning.\\n * By default enabled.\\n */\\n-(void)setLocationUpdatesEnabled:(BOOL)enabled;\\n\\n-(BOOL)isLocationEnabled;\\n\\n/**\\n * Enables or Disables In-App Notifications. Default - YES.\\n */\\n-(void)enableInAppNotification:(BOOL)enabled;\\n\\n-(BOOL)isInAppNotificationEnabled;\\n\\n-(void)setSmallInAppNotificationDuration:(NSInteger)seconds;\\n\\n-(NSInteger)getSmallInAppNotificationDuration;\\n\\n/**\\n * Shows the last in app notification. In App Notification need to be enabled.\\n * To enable in app notifications use enableInAppNotification(BOOL).\\n */\\n-(void)showLastInAppNotification;\\n\\n/**\\n * Set if user is authorized or not. The default is YES.\\n */\\n-(void)setUserAuthorized:(BOOL)authorized;\\n\\n-(BOOL)isUserAuthorized;\\n\\n/**\\n * Shows the last blocked message or card. User must be authorized.\\n * To authorize a user use setUserAuthorized(BOOL).\\n */\\n-(void)showLastUnauthorizedMessage;\\n\\n/**\\n * Sets the create thread button in feed visibility.\\n *\\n * @param buttonEnabled decides if the button should be enabled\\n */\\n-(void)setNewThreadButtonEnabled:(BOOL)buttonEnabled;\\n\\n-(BOOL)isNewThreadButtonEnabled;\\n\\n/**\\n * Updates the user's first name. Gets updated when entering background.\\n *\\n * @param firstName firstName - can't be nil\\n */\\n-(void)updateFirstName:(nonnull NSString*)firstName;\\n\\n/**\\n * Updates the user's last name. Gets updated when entering background.\\n *\\n * @param lastName lastName - can't be nil\\n */\\n-(void)updateLastName:(nonnull NSString*)lastName;\\n\\n/**\\n * Updates the user's email. Gets updated when entering background.\\n *\\n * @param email email - can't be nil\\n */\\n-(void)updateEmail:(nonnull NSString*)email;\\n\\n/**\\n * Updates user's age. Gets updated when entering background.\\n *\\n * @param age user's age\\n */\\n-(void)updateAge:(NSUInteger)age;\\n\\n/**\\n * Updates user's gender. Gets updated when entering background.\\n *\\n * @param gender user's gender\\n */\\n-(void)updateGender:(PULUserGender)gender;\\n\\n/**\\n * Creates a custom attribute with a string. Neither can be nil. Gets updated when entering background.\\n *\\n * @param propertyName custom attribute name\\n * @param value attribute value\\n */\\n-(void)createAttribute:(nonnull NSString *)propertyName withString:(nonnull NSString *)value;\\n\\n/**\\n * Creates a custom attribute with a float. Key can't be nil. Gets updated when entering background.\\n *\\n * @param propertyName custom attribute name\\n * @param number attribute value\\n */\\n-(void)createAttribute:(nonnull NSString*)attributeName withDecimal:(nonnull NSDecimalNumber*)value;\\n\\n/**\\n * Creates a custom attribute with an integer. Key can't be nil. Gets updated when entering background.\\n *\\n * @param propertyName custom attribute name\\n * @param number attribute value\\n */\\n-(void)createAttribute:(nonnull NSString *)propertyName withInteger:(NSInteger)number;\\n\\n/**\\n * Creates custom attribute with a bool. Key can't be nil. Gets updated when entering background.\\n *\\n * @param propertyName custom attribute name\\n * @param boolean attribute value\\n */\\n-(void)createAttribute:(nonnull NSString *)propertyName withBoolean:(BOOL)boolean;\\n\\n/**\\n * Creates custom attribute with a date. Key can't be nil. Gets updated when entering background.\\n *\\n * @param propertyName custom attribute name\\n * @param date attribute value\\n */\\n-(void)createAttribute:(nonnull NSString *)propertyName withDate:(nonnull NSDate*)date;\\n\\n/**\\n * Increments given integer attribute by given value. Gets updated when entering background.\\n *\\n * @param attributeName which attribute to increment\\n * @param value value to increment by\\n */\\n-(void)incrementIntegerAttribute:(nonnull NSString*)attributeName withInteger:(NSInteger)value;\\n\\n/**\\n * Decrements given integer attribute by given. Gets updated when entering background.\\n *\\n * @param attributeName custom attribute name\\n * @param value attribute value\\n */\\n-(void)decrementIntegerAttribute:(nonnull NSString*)attributeName withInteger:(NSInteger)value;\\n\\n/**\\n * Increments given float attribute with given value. Gets updated when entering background.\\n *\\n * @param attributeName custom attribute name\\n * @param value attribute value\\n */\\n-(void)incrementDecimalAttribute:(nonnull NSString*)attributeName withDecimal:(nonnull NSDecimalNumber*)value;\\n\\n/**\\n * Decrements given float attribute with given value. Gets updated when entering background.\\n *\\n * @param attributeName custom attribute name\\n * @param value attribute value\\n */\\n-(void)decrementDecimalAttribute:(nonnull NSString*)attributeName withDecimal:(nonnull NSDecimalNumber*)value;\\n\\n/**\\n * Sends a custom in app event\\n *\\n * @param event event to be sent - can't be nil\\n */\\n-(void)createEvent:(nonnull NSString*)event;\\n\\n/**\\n * Sends a custom revenue event\\n *\\n * @param revenueEvent event to be sent - can't be nil\\n */\\n-(void)createRevenueEvent:(nonnull PULRevenueEvent*)revenueEvent;\\n\\n/**\\n * Attributes synchronize when the app is entering background. This method forces the synchronization to happen instantly.\\n */\\n-(void)forceAttributeSync;\\n\\n/**\\n * Decides if beacon actions should be sent with a location. The default is NO.\\n */\\n-(void)sendLocationWithBeaconEvents:(BOOL)sendLocation;\\n\\n/**\\n * Returns the Device Guid that Pulsate uses to identify users.\\n */\\n-(nonnull NSString*)getDeviceGuid;\\n\\n/**\\n * Sends a request to the server to get the Pulsate badge count.\\n * The badge count will be returned in the PULPulsateBadgeDelegate badgeUpdated callback.\\n */\\n-(void)getBadgeCount;\\n\\n/**\\n * Shows the last in app notification. In App Notification need to be enabled.\\n * To enable in app notifications use enableInAppNotification(BOOL).\\n */\\n-(nonnull id<UIApplicationDelegate, UNUserNotificationCenterDelegate>)getPulsateSystemManager;\\n\\[email protected]\",\n \"language\": \"objectivec\"\n }\n ]\n}\n[/block]","updates":[],"order":4,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5f44d675533c14004a3e844a","createdAt":"2020-08-25T09:14:29.007Z","user":"57bc3654b9c7f0220009c77b","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"SDK Advanced","slug":"sdk-advanced","order":3,"from_sync":false,"reference":false,"_id":"5f44d209703f05006a2a4fa9","createdAt":"2020-08-25T08:55:37.604Z","version":"5e5013741b3b20006532951d","project":"54aa7f773b56130b0056c86e","__v":0},"version":{"version":"2.7","version_clean":"2.7.0","codename":"iOS SDK","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e5013741b3b200065329486","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","5e5013741b3b200065329487","5e5013741b3b200065329488","5e5013741b3b200065329489","5e5013741b3b20006532948a","5e5013741b3b20006532948b","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","5e5013741b3b20006532948c","5e5013741b3b20006532948d","5c73dd27e8fdc000572a206a","5e5013741b3b20006532948e","5e53d9a2f75c0b0020de8935","5f44d1fbd1c58d040fdf03ba","5f44d202a2e3eb02b1c4c806","5f44d209703f05006a2a4fa9","5f44d210b1ba9f004200b689"],"_id":"5e5013741b3b20006532951d","project":"54aa7f773b56130b0056c86e","forked_from":"5e4fbbbda8fb41028f1861fe","__v":5,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z"},"project":"54aa7f773b56130b0056c86e","__v":0,"parentDoc":null}