GetSocial Class Reference

Inherits from NSObject
Declared in GetSocial.h

Other Methods

+ sdkVersion

Returns version of GetSocial Framework.

+ (NSString *)sdkVersion

Return Value

String value of the framework version.

Declared In

GetSocial.h

Initialization

+ init

Init the SDK. Use executeWhenInitialized: to be notified when SDK is initialized. GetSocial App Id will be taken from .plist metadata. Check errors in logs or in GetSocialGlobalErrorHandler.

+ (void)init

Declared In

GetSocial.h

+ initWithAppId:

Init the SDK. Use executeWhenInitialized: to be notified when SDK is initialized. Check errors in logs or in GetSocialGlobalErrorHandler.

+ (void)initWithAppId:(NSString *)appId

Parameters

appId

GetSocial App Id. You can find your App Id on the GetSocial Dashboard.

Declared In

GetSocial.h

+ executeWhenInitialized:

Set an action, which should be executed after SDK initialized. Executed immediately, if SDK is already initialized.

+ (void)executeWhenInitialized:(void ( ^ ) ( void ))action

Parameters

action

Action to execute.

Declared In

GetSocial.h

+ isInitialized

Provides the status of GetSocial Framework initialization.

+ (BOOL)isInitialized

Return Value

YES if initialization completed successfully, otherwise NO.

Declared In

GetSocial.h

+ setGlobalErrorHandler:

Sets the global error handler block, that will we called after each internal crash in GetSocial Framework.

+ (BOOL)setGlobalErrorHandler:(GetSocialGlobalErrorHandler)errorHandler

Parameters

errorHandler

block to be called.

Return Value

YES if the operation was successful, otherwise NO.

Declared In

GetSocial.h

+ removeGlobalErrorHandler

Removes the global error handler.

+ (BOOL)removeGlobalErrorHandler

Return Value

YES if operation was successful, otherwise NO.

Declared In

GetSocial.h

Languages

+ setLanguage:

Sets the language of GetSocial Framework.

+ (BOOL)setLanguage:(NSString *)languageCode

Parameters

languageCode

as defined in GetSocialConstants

Return Value

YES if operation was successful, otherwise NO.

Discussion

If provided value is incorrect, sets the default language.

Declared In

GetSocial.h

+ language

Returns current language of GetSocial Framework.

+ (NSString *)language

Return Value

language code as defined in @see GetSocialConstants.h, or default language in case of failure.

Declared In

GetSocial.h

Invites

+ isInviteChannelAvailable:

Check if invite channel with specified id is available to sent invitations.

+ (BOOL)isInviteChannelAvailable:(NSString *)channelId

Parameters

channelId

as defined in GetSocialConstants.

Return Value

YES if channel is available for sending invites, NO otherwise.

Declared In

GetSocial.h

+ inviteChannels

Returns list of available invite channels.

+ (NSArray<GetSocialInviteChannel*> *)inviteChannels

Return Value

list of GetSocialInviteChannel classes.

Declared In

GetSocial.h

+ sendInviteWithChannelId:success:cancel:failure:

Sends an invitation using the specified channel.

+ (void)sendInviteWithChannelId:(NSString *)channelId success:(GetSocialInviteSuccessCallback)success cancel:(GetSocialInviteCancelCallback)cancel failure:(GetSocialFailureCallback)failure

Parameters

channelId

Id of channel to use.

success

Called if invitation was sent successfully.

cancel

Called if invitation sending was canceled.

failure

Called if invitation could not be sent due to an error.

Declared In

GetSocial.h

+ sendInviteWithChannelId:inviteContent:success:cancel:failure:

Sends an invitation using the specified channel and invite content.

+ (void)sendInviteWithChannelId:(NSString *)channelId inviteContent:(GetSocialMutableInviteContent *_Nullable)customInviteContent success:(GetSocialInviteSuccessCallback)success cancel:(GetSocialInviteCancelCallback)cancel failure:(GetSocialFailureCallback)failure

Parameters

channelId

Id of channel to use.

customInviteContent

Invite Content to send.

success

Called if invitation was sent successfully.

cancel

Called if invitation sending was canceled.

failure

Called if invitation could not be sent due to an error.

Declared In

GetSocial.h

+ sendInviteWithChannelId:inviteContent:customReferralData:success:cancel:failure:

Sends an invitation using the specified channel and invite content. (Deprecated: Use sendInviteWithChannelId:inviteContent:linkParams instead.)

+ (void)sendInviteWithChannelId:(NSString *)channelId inviteContent:(GetSocialMutableInviteContent *_Nullable)customInviteContent customReferralData:(NSDictionary *_Nullable)customReferralData success:(GetSocialInviteSuccessCallback)success cancel:(GetSocialInviteCancelCallback)cancel failure:(GetSocialFailureCallback)failure

Parameters

channelId

Id of channel to use.

customInviteContent

Invite Content to send.

customReferralData

Custom referral data to send.

success

Called if invitation was sent successfully.

cancel

Called if invitation sending was canceled.

failure

Called if invitation could not be sent due to an error.

Declared In

GetSocial.h

+ sendInviteWithChannelId:inviteContent:linkParams:success:cancel:failure:

Sends an invitation using the specified channel and invite content.

+ (void)sendInviteWithChannelId:(NSString *)channelId inviteContent:(GetSocialMutableInviteContent *_Nullable)customInviteContent linkParams:(NSDictionary *_Nullable)linkParams success:(GetSocialInviteSuccessCallback)success cancel:(GetSocialInviteCancelCallback)cancel failure:(GetSocialFailureCallback)failure

Parameters

channelId

Id of channel to use.

customInviteContent

Invite Content to send.

linkParams

Custom link parameters to send.

success

Called if invitation was sent successfully.

cancel

Called if invitation sending was canceled.

failure

Called if invitation could not be sent due to an error.

Declared In

GetSocial.h

+ registerInviteChannelPlugin:forChannelId:

Registers an invite channel plugin for the specified channel id.

+ (BOOL)registerInviteChannelPlugin:(__kindof GetSocialInviteChannelPlugin *)inviteChannelPlugin forChannelId:(NSString *)channelId

Parameters

inviteChannelPlugin

plugin to register.

channelId

channel id.

Return Value

YES if the operation was successful, otherwise NO.

Declared In

GetSocial.h

+ referralDataWithSuccess:failure:

Returns referral data received.

+ (void)referralDataWithSuccess:(GetSocialReferralDataCallback)success failure:(GetSocialFailureCallback)failure

Parameters

success

Called if getting referral data finished. Referral data can be nil.

failure

Called if getting referral data failed.

Declared In

GetSocial.h

+ referredUsersWithSuccess:failure:

Returns list of users who installed the app by accepting invite of current user.

+ (void)referredUsersWithSuccess:(GetSocialReferredUsersResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

success

Called if getting list of referred users finished. If there is no referred user, the list is empty.

failure

Called if getting list of referred users failed.

Declared In

GetSocial.h

+ createInviteLinkWithParams:success:failure:

Creates a Smart Link with user referral data attached used for Smart Invites.

+ (void)createInviteLinkWithParams:(NSDictionary *_Nullable)linkParams success:(GetSocialStringResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

linkParams

Custom link parameters to send. More info @see here

success

Called if creating invite url finished.

failure

Called if creating invite url failed.

Declared In

GetSocial.h

Push notifications

+ registerForPushNotifications

If im.getsocial.sdk.AutoRegisterForPush meta property is set to false in the Info.plist, call this method to register for push notifications. Register your application for a push notifications.

+ (void)registerForPushNotifications

Declared In

GetSocial.h

+ setNotificationHandler:

Set a handler to be notified if application is started with clicking on GetSocial notification.

+ (void)setNotificationHandler:(GetSocialNotificationHandler)handler

Parameters

handler

Called with action.

Declared In

GetSocial.h

Activities

+ announcementsForGlobalFeedWithSuccess:failure:

Retrieve list of announcements for global feed.

+ (void)announcementsForGlobalFeedWithSuccess:(GetSocialActivitiesResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

success

Called with resulting list of activities if call was successful.

failure

Called if operation can not be called due to an error.

Declared In

GetSocial.h

+ announcementsForFeed:success:failure:

Retrieve list of announcements for feed.

+ (void)announcementsForFeed:(NSString *)feed success:(GetSocialActivitiesResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

feed

Feed name

success

Called with resulting list of activities if call was successful

failure

Called if operation can not be called due to an error

Discussion

Retrieve list of announcements for feed.

Declared In

GetSocial.h

+ activitiesWithQuery:success:failure:

Retrieve list of activities.

+ (void)activitiesWithQuery:(GetSocialActivitiesQuery *)query success:(GetSocialActivitiesResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

query

Filtering options.

success

Called with resulting list of activities if call was successful.

failure

Called if operation can not be called due to an error.

Declared In

GetSocial.h

+ activityWithId:success:failure:

Retrieve activity by id.

+ (void)activityWithId:(GetSocialId)activityId success:(GetSocialActivityResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

activityId

Identifier of activity.

success

Called with resulting activity if call was successful.

failure

Called if operation can not be called due to an error.

Declared In

GetSocial.h

+ postActivityToGlobalFeed:success:failure:

Post activity to global activity feed.

+ (void)postActivityToGlobalFeed:(GetSocialActivityPostContent *)activity success:(GetSocialActivityResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

activity

content of activity, that should be posted.

success

Called with resulting activity if activity was posted successfully.

failure

Called if operation can not be called due to an error.

Declared In

GetSocial.h

+ postActivity:toFeed:success:failure:

Post activity to activity feed.

+ (void)postActivity:(GetSocialActivityPostContent *)activity toFeed:(NSString *)feed success:(GetSocialActivityResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

activity

content of activity, that should be posted.

feed

Name of feed.

success

Called with resulting activity if activity was posted successfully.

failure

Called if operation can not be called due to an error.

Declared In

GetSocial.h

+ postComment:toActivityWithId:success:failure:

Post comment to activity with specified id.

+ (void)postComment:(GetSocialActivityPostContent *)comment toActivityWithId:(GetSocialId)activityId success:(GetSocialActivityResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

comment

content of comment, that should be posted.

activityId

identifier of activity, that we want to comment.

success

Called with resulting activity if activity was posted successfully.

failure

Called if operation can not be called due to an error.

Declared In

GetSocial.h

+ likeActivityWithId:isLiked:success:failure:

Like or unlike activity.

+ (void)likeActivityWithId:(GetSocialId)activityId isLiked:(BOOL)isLiked success:(GetSocialActivityResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

activityId

identifier of activity, that we want to like or unlike.

isLiked

should activity be liked or not.

success

Called with resulting activity if activity was liked/unliked successfully.

failure

Called if operation can not be called due to an error.

Declared In

GetSocial.h

+ activityLikers:offset:limit:success:failure:

Get a list of users, that liked activity.

+ (void)activityLikers:(GetSocialId)activityId offset:(int)offset limit:(int)limit success:(GetSocialUsersResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

activityId

identifier of activity, that we want to get who liked it.

offset

Offset position.

limit

Maximum count of users.

success

Called with list of users, that liked activity.

failure

Called if operation can not be called due to an error.

Declared In

GetSocial.h

+ reportActivity:reason:success:failure:

Report activity because of its content.

+ (void)reportActivity:(GetSocialId)activityId reason:(GetSocialReportingReason)reportingReason success:(GetSocialSuccessCallback)success failure:(GetSocialFailureCallback)failure

Parameters

activityId

Id of activity to report.

reportingReason

Reason of reporting.

success

Called if operation succeed.

failure

Called if operation failed.

Declared In

GetSocial.h

+ deleteActivity:success:failure:

Delete your activity. Attempt to delete other user activity will result in failure.

+ (void)deleteActivity:(GetSocialId)activityId success:(GetSocialSuccessCallback)success failure:(GetSocialFailureCallback)failure

Parameters

activityId

Id of activity to delete.

success

Called if operation succeed.

failure

Called if operation failed.

Declared In

GetSocial.h

+ findTags:success:failure:

Find all possible tags for query.

+ (void)findTags:(GetSocialTagsQuery *)query success:(GetSocialTagsResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

query

Query.

success

Called with list of tags.

failure

Called if operation failed.

Declared In

GetSocial.h

User management

+ userWithId:success:failure:

Fetch user by user id.

+ (void)userWithId:(GetSocialId)userId success:(GetSocialPublicUserSuccessCallback)success failure:(GetSocialFailureCallback)failure

Parameters

userId

id of user.

success

Called with public user or nil, if the user not found.

failure

Called if operation can not be called due to an error.

Declared In

GetSocial.h

+ userWithId:forProvider:success:failure:

Fetch user by auth identity provider user id.

+ (void)userWithId:(NSString *)providerUserId forProvider:(NSString *)providerId success:(GetSocialPublicUserSuccessCallback)success failure:(GetSocialFailureCallback)failure

Parameters

providerUserId

User id on the selected identity provider for which public user will be returned.

providerId

Auth identity provider id for which user id is provided.

success

Called with public user or nil, if the user not found.

failure

Called if operation can not be called due to an error.

Declared In

GetSocial.h

+ usersWithIds:forProvider:success:failure:

Fetch list of users by auth identity provider user ids.

+ (void)usersWithIds:(NSArray *)providerUserIds forProvider:(NSString *)providerId success:(GetSocialPublicUsersDictionarySuccessCallback)success failure:(GetSocialFailureCallback)failure

Parameters

providerUserIds

User ids on the selected identity provider for which public users will be returned.

providerId

Auth identity provider id for which user id is provided.

success

Called with dictionary of user ids and public users for provided arguments. Please note, that not all requested user may be returned.

failure

Called if operation can not be called due to an error.

Declared In

GetSocial.h

+ findUsers:success:failure:

Find users matching query.

+ (void)findUsers:(GetSocialUsersQuery *)query success:(GetSocialUserReferencesResultCallback)success failure:(GetSocialFailureCallback)failure

Parameters

query

Users query.

success

Success callback.

failure

Failure callback.

Declared In

GetSocial.h

Analytics

+ trackPurchaseData:success:failure:

Reports in-app purchase to Dashboard

+ (void)trackPurchaseData:(GetSocialPurchaseData *)purchaseData success:(GetSocialSuccessCallback)success failure:(GetSocialFailureCallback)failure

Parameters

purchaseData

Data of purchase.

success

Success callback.

failure

Failure callback.

Declared In

GetSocial.h