Skip to content

GetSocial iOS SDK Changelog

v7.4.6 - 31 Mar, 2021

Fixed:

  • Overall improvements.

v7.4.5 - 3 Mar, 2021

Fixed:

  • Issue with missing sender information in last chat message object.

v7.4.4 - 24 Feb, 2021

New:

  • New method to refresh current user properties.

v7.4.3 - 10 Feb, 2021

New:

  • New methods to increment/decrement public and private user properties.

v7.4.2 - 27 Jan, 2021

Fixed:

  • Made some group related properties available in Objective-C.

v7.4.1 - 19 Jan, 2021

Fixed:

  • Added missing id to ChatMessage class.

v7.4.0 - 13 Jan, 2021

New:


v7.3.3 - 9 Dec, 2020

Fixed:

  • Issue with clearing referral data.

v7.3.2 - 2 Dec, 2020

Fixed:

  • Issue with topics permissions.

v7.3.1 - Nov 30, 2020

Fixed:

  • Overall improvements.

v7.3.0 - 16 Nov, 2020

New:


v7.2.7 - Oct 5, 2020

New:

  • Added new method to provide custom error messages on UI.
  • New error codes for rate limiting errors when posting activities.

v7.2.6 - Sep 21, 2020

Fixed:

  • Overall improvements.

v7.2.5 - Sep 14, 2020

Fixed:

  • Overall improvements.

v7.2.4 - Sep 3, 2020

Fixed:

  • Issue when deleting a comment on Comments view when moderation is turned on, on iOS.

v7.2.3 - 27 Aug, 2020

Fixed:

  • UI issue in landscape mode on iOS 13.

v7.2.2 - 19 Aug, 2020

New:

  • Added Copy option to when sending invite using Native Share.

v7.2.1 - 14 Aug, 2020

Fixed:

  • Minor issue with UserId object.

v7.2.0 - 10 Aug, 2020

New:

  • Added new method to initialize the SDK with an existing identity.

v7.1.2 - 30 Jul, 2020

Fixed:

  • Showing UI on top of SwiftUI screens.

v7.1.1 - 24 Jul, 2020

Fixed:

  • Handling optional values in getsocial.json configuration file.

v7.1.0 - 13 Jul, 2020

New:

  • Overall API improvements.

Changed:

  • UserId.userWithId is UserId.create.
  • UserId.userWithIdentityId is UserId.create(provider:, id: ).
  • UserIdList.usersWithIds is UserIdList.create.
  • UserIdList.usersWithIdentityIds is UserIdList.create(provider:, ids: ).

v7.0.0 Beta 4 - 22 Jun, 2020

Fixed:

  • Issue caused by incorrect compiler flag.

v7.0.0 Beta 3 - 18 Jun, 2020

New:

  • Added new methods to filter activities by tag or by user.

v7.0.0 Beta 2 - 28 May, 2020

New:

  • Overall improvements.

v7.0.0 Beta 1 - 21 Apr, 2020

Fixed:

  • Xcode requirement is now 11.1 and later. The change required to change module name from GetSocial to GetSocialSDK.

Upgrading:

  • import GetSocial is now import GetSocialSDK
  • UserId.user("") is now UserId.user(withId: "")
  • UserIdList.users("") is now UserIdList.users(withIds: "")
  • Identity.customIdentity() is now Identity.custom()
  • Identity.facebookIdentity() is now Identity.facebook(withAccessToken:)

v7.0.0-alpha-0.0.1 - 21 Apr, 2020

GetSocial SDK version 7 is a major update that brings a lot of improvements, new features and breaking changes. Follow the guide below to learn about what changed and how to upgrade to SDK v7.

Upgrading

  1. In your Xcode project go to Project Settings → select target you want to modify → Build Phases tab.
  2. Create new Run Script phase with the content:

    "$PROJECT_DIR/getsocial-sdk7.sh --app-id=[your-getsocial-app-id] --framework-version=[latest]"
    
  3. Build your project.

Configuration

Most of the GetSocial settings are moved to a single getsocial.json file which could be used across all platforms. You can read more about this configuration file.

Open getsocial.json, which should reside in the root directory of your project and generated automatically by our script.. in the key name means it is inner json object, e.g. pushNotifications.autoRegister in json file should be translated to:

// getsocial.json
{
    ...
    "pushNotifications": {
        ...
        "autoRegister": true
    }
}

iOS Installer script

framework-version, use-ui and app-id are still used as parameter for getsocial-sdk7.sh.

getsocial.sh parameter getsocial.json key
autoInit autoInit
uiConfig uiConfig
autoRegisterForPush pushNotifications.autoRegister
foregroundNotifications pushNotifications.foreground
disableFacebookReferralCheck disableFacebookReferralCheck

CocoaPods

  1. Update GetSocial SDK version to 7.0.0-alpha-0.0.2 in your Podfile
  2. Execute pod update

Manual Integration

  1. Download the latest GetSocial frameworks from the Downloads page.
  2. Overwrite your existing instances with the new version.

Methods

All methods that supported operations by GetSocial User ID now support both GetSocial ID and Identity ID. This is encapsulated in UserId and UserIdList classes for a single and multiple users respectively. Read more about this.

All methods that support pagination are now unified and use the same approach with classes PagingQuery and PagingResult. Read more about this.

Initialization

whenInitialized is changed to addOnInitializedListener. You can add multiple listeners.

SDK v6 Method SDK v7 Method
GetSocial.whenInitialized GetSocial.addOnInitializedListener

User Management

Current User

All methods related to the current user were in GetSocial.User class. Now you can get an object of CurrentUser using GetSocial.currentUser(). This method returns nil if SDK is not initialized. When you update user properties like avatar or display name, the object is automatically updated after operation succeeded. If you switch or reset user, this object is changed to a new one. You will receive the new object in OnCurrentUserChangedListener or you can call GetSocial.currentUser() again and get the new instance.

All getters should be called on GetSocial.currentUser() instance.
All setters are removed and you should use a single method GetSocial.currentUser().updateDetails(...) instead.

GetSocial.addOnCurrentUserChangedListener can be called multiple times with different listeners. It returns a String - listener ID - which can be used in GetSocial.removeOnCurrentUserChangedListener if you want to remove a certain listener.

SDK v6 Method SDK v7 Method
GetSocial.User.get* GetSocial.currentUser().*
GetSocial.User.set* GetSocial.currentUser().updateDetails
GetSocial.User.addAuthIdentity GetSocial.currentUser().addIdentity
GetSocial.User.removeAuthIdentity GetSocial.currentUser().removeIdentity
GetSocial.User.switchUser GetSocial.switchUser
GetSocial.User.reset GetSocial.resetUser
GetSocial.User.setOnUserChangedListener GetSocial.addOnCurrentUserChangedListener
GetSocial.User.removeOnUserChangedListener GetSocial.removeOnCurrentUserChangedListener

Search Users

findUsers returned only the first page of matching users. New Communities.users method supports pagination.
You can also get a number of users that match a certain query using Communities.usersCount.

SDK v6 Method SDK v7 Method
GetSocial.userWithId(id), GetSocial.userWithId(id, providerId) Communities.user(UserId, ResultCallback, FailureCallback)
GetSocial.usersWithIds(ids, providerId) Communities.users(UserIdList, ResultCallback<[String: User]>, FailureCallback)
GetSocial.findUsers Communities.users(UsersPagingQuery, ResultCallback, FailureCallback)

Activities

All activities related methods are moved to Communities class.
Like concept is now extended to Reaction and supports multiple reactions, like is one of them.

All GetSocial.post* methods are replaced with a single Communities.postActivity method with PostActivityTarget parameter. Read more about new features in Feeds 2.0.

SDK v6 Method SDK v7 Method
GetSocial.postActivityToFeed, GetSocial.postActivityToGlobalFeed, GetSocial.postCommentToActivity Communities.postActivity
GetSocial.likeActivity(…, true, …) Communities.addReaction
GetSocial.likeActivity(…, false, …) Communities.removeReaction
GetSocial.getActivityLikers Communities.reactions
GetSocial.findTags Communities.tags

Notifications

All notifications related methods are moved to Notifications class.

NotificationListener is now split into two: OnNotificationClickedListener and OnNoticationReceivedListener.

OnNotificationReceivedListener is called when application is in foreground and GetSocial Push Notification is received. Note that now it is called even if notifications in foreground are enabled.

Enable Click Listener

In order to make OnNotificationClickedListener being invoked, you have to set pushNotifications.customListener to true in getsocial.json:

// getsocial.json
{
    ...
    "pushNotifications": {
        ...
        "customListener": true
    }
}

OnNotificationClickedListener does not need to return a boolean anymore. If you have a custom listener and want to invoke a default behaviour, you should call GetSocial.handle(_ action) in places where you would return false in SDK 6.

SDK v6 Method SDK v7 Method
GetSocial.registerForPushNotifications Notifications.registerDevice
GetSocial.setNotificationListener Notifications.setOnNotificationClickedListener, Notifications.setOnNotificationReceivedListener
GetSocial.setPushNotificationTokenListener Notifications.setOnTokenReceivedListener
GetSocial.User.getNotifications Notifications.get
GetSocial.User.getNotificationsCount Notifications.getCount
GetSocial.User.sendNotification Notifications.send
GetSocial.User.setNotificationsStatus Notifications.setStatus
GetSocial.User.setPushNotificationsEnabled Notifications.setPushNotificationsEnabled
GetSocial.User.isPushNotificationsEnabled Notifications.arePushNotificationsEnabled

Invites

All invites related methods are moved to Invites class.

Getting list of available invite channels is now asynchronous operation.

To get referral data, you now have a ReferralDataListener, which will be called every time when the new referral data appears after clicking on the link, whether on application launch or if application was running before.

SDK v6 Method SDK v7 Method
GetSocial.isInviteChannelAvailable Removed. You can get the list of available invite channels and check if invite channel is there.
GetSocial.getInviteChannels Invites.getAvailableChannels
GetSocial.sendInvite Invites.send
GetSocial.registerInviteChannelPlugin Invites.registerPlugin
GetSocial.getReferralData Invites.setReferralDataListener
GetSocial.clearReferralData Removed. You don’t need to clear referral data anymore, as you will receive only the new referral data in the listener.

Analytics

All analytics methods are moved to Analytics class.

SDK v6 Method SDK v7 Method
GetSocial.trackCustomEvent Analytics.trackCustomEvent
GetSocial.trackPurchaseEvent Analytics.trackPurchase

Promo Codes

All promo codes methods are moved to PromoCodes class.

SDK v6 Method SDK v7 Method
GetSocial.createPromoCode PromoCodes.create
GetSocial.getPromoCode PromoCodes.get
GetSocial.claimPromoCode PromoCodes.claim

Give us your feedback! Was this article helpful?

😀 🙁