GetSocial Flutter SDK
Overview
GetSocial is a social engagement and referral marketing platform for mobile apps to increase user engagement, retention, acquisition and monetization. Key benefits of the technology include:
- Referral marketing and content sharing solution to drive organic growth
- Community engagement solution to enable user-to-user and developer-to-user interaction
- Mobile marketing automation to create automated marketing flows that engage, re-engage and retain users
- User segmentation and targeting with push notifications
- Social graph and friend recommendation to connect users with their invited friends, and other users
- Deeplinks for emails, social media, influencer, and other marketing promotions to measuring the performance of your marketing campaigns
- Convert mobile and desktop web visitors to high-value app installs.
System Requirements
To use GetSocial SDK your execution and development environment should match the following requirements:
Android
- Android v4.0.3 (SDK v15) or higher
- Android Developers Tools (ADT) version 19 or above
- Google Play Services library v6.1.11 or above (for push notifications)
iOS
- Xcode 10.2 or above
- iOS 8 or higher
Not sure if GetSocial is going to work in your specific configuration? Feel free to reach us via Intercom or email.
Adding GetSocial to Your App
Create App on the Dashboard
To start using GetSocial, you have to create a free account and login to GetSocial Dashboard. Dashboard provides a web interface to manage all GetSocial services.
- Login to GetSocial Dashboard.
- Open Add new app wizard.
- Fill in App name and upload App icon image.
- Select React Native platform and Finish the wizard.
Learn more about the products we build at getsocial.im.
Install Flutter package
- Add
getsocial_flutter_sdk
package to your app'spubspec.yaml
. - Execute
flutter pub get
Enable Supported App Stores on the Dashboard
Next step is to enable Google Play and Apple App Store on the GetSocial Dashboard:
-
On the App settings section --> App information tab.
-
Enable Google Play store --> fill in Package name and Signing-certificate fingerprint fields.
Package name is the
applicationId
in your app-levelbuild.gradle
file.Signing-certificate fingerprint is a list of SHA-256 hashes of the certificates you use to sign your application. You have to add fingerprints of all keys you use to sign app. GetSocial Gradle plugin adds a helper task
printSigningCertificateSHA256
to print SHA-256 fingerprints for all configured build flavors:gradle printSigningCertificateSHA256
!!! tip "Using Google Play App Signing?" If you are using Google Play App Signing you can copy SHA256 from the Play Console. If you're using a separate Upload certificate, please add his SHA256 to GetSocial Dashboard as well. Learn more in the detailed guide.
-
Enable Apple App Store --> fill in Bundle ID, Team ID and optionally App Store ID fields:
Bundle ID is a part of the iOS App ID. You can find bundle identifier in the Xcode project --> General Settings --> Identity --> Bundle Identifier.
Team ID is a unique 10-character string generated by Apple that’s assigned to your team. You can find your Team ID using your Apple developer account --> Membership.
App Store ID number can be found in the iTunes store URL as the string of numbers directly after
id
. For Example, inhttps://itunes.apple.com/us/app/yourapp/id284709449
the ID is:284709449
.
Configure GetSocial SDK
Android
To start using GetSocial, you have to add and configure GetSocial Gradle Plugin to your Android project. Plugin adds all GetSocial dependencies to the project and configures AndroidManifest.xml
.
To add GetSocial Gradle plugin:
-
Add repository and classpath dependency for the plugin in your top-level
build.gradle
. This file is for the entire project so it will be used for global project configurations:buildscript { repositories { ... maven { url "https://plugins.gradle.org/m2/" } } dependencies { ... classpath "im.getsocial:plugin-v7:[1,2)" } }
-
In the Android application project
build.gradle
(this file is the module build file, so it will be used for specific module level configs) applyim.getsocial
plugin aftercom.android.application
plugin:apply plugin: 'com.android.application' apply plugin: 'im.getsocial' // should be applied after com.android.application plugin
-
In the same
build.gradle
configure GetSocial plugin with GetSocial App id:getsocial { appId "put-your-getsocial-app-id-here" ... }
Check the GetSocial Gradle plugin reference for the full list of available configurations.
iOS
To start using GetSocial, you have to add and configure GetSocial installer script to your Xcode project. The script adds GetSocial frameworks to the project and configures app entitlements, plist files, and Xcode project settings.
To add GetSocial installer script:
-
In your Xcode project go to Project Settings --> select target you want to modify --> Build Phases tab.
-
Create new Run Script phase with the content:
"$PROJECT_DIR/getsocial-sdk7.sh" --app-id="your-getsocial-app-id"
-
Move Run Script phase before the Compile Sources phase.
-
Build your project.
!!! tip "Project Backups"
GetSocial installer script creates a backup of your project.pbxproj
file every time it is executed. If something goes wrong, you can always roll back to the previous version.
!!! tip "Source Control Configuration"
We suggest adding .backup
files under .xcodeproj
to ignore list to keep your version control history clean.
Start Using GetSocial
SDK Initialization
GetSocial SDK is auto-initialized, just provide a GetSocial App Id in the Gradle plugin on Android, or as a parameter to the iOS Installer Script on iOS, and we will do the magic.
If you want to be notified about initialization complete, you can register a listener, which will be invoked when SDK gets initialized or invoked immediately if it is already initialized:
import 'package:getsocial_flutter_sdk/getsocial_flutter_sdk.dart';
...
GetSocial.addOnInitializedListener(() => {
// GetSocial SDK is ready to use
});
Send your first invite
import 'package:getsocial_flutter_sdk/getsocial_flutter_sdk.dart';
...
Invites.send(nil, onChannel: InviteChannelIds.email, success: {
print('Invitation via email was sent')
}, cancel: {
print('Invitation via email was cancelled')
}, failure: { error in
print('Failed to send invitation via email failed, error: \(error)')
})
After calling this method email client will be opened:
!!! note "Note about Simulator"
Try this example on the device. On the simulator failure
block will be invoked, as the email client is not configured.
Demo Application
To showcase all GetSocial Flutter SDK features, we have created a simple demo application, it is available on GitHub.
Next Steps
Well-done! GetSocial SDK is now set up and ready to rock, check what you can do next:
- Set up deep linking and drive users from web to your mobile app with Smart Links, Smart Widget and Smart Banners.
- Implement referral campaigns or content sharing with Smart Invites.
Libraries
- analytics
- analytics/public
- analytics/purchasedata
- common/action
- common/codable
- common/language_codes
- common/media_attachment
- common/pagingquery
- common/pagingresult
- common/public
- common/userid
- common/useridlist
- communities
- communities/activity
- communities/activitycontent
- communities/chat
- communities/chatid
- communities/chatmessage
- communities/chatmessagecontent
- communities/communitiesaction
- communities/communitiesentity
- communities/communitiessettings
- communities/group
- communities/groupcontent
- communities/groupmember
- communities/label
- communities/membership
- communities/memberstatus
- communities/mention
- communities/poll
- communities/pollcontent
- communities/polloption
- communities/polloptioncontent
- communities/pollstatus
- communities/postactivitytarget
- communities/public
- communities/queries/activitiesquery
- communities/queries/addgroupmembersquery
- communities/queries/announcementsquery
- communities/queries/chatmessagespagingquery
- communities/queries/chatmessagesquery
- communities/queries/followersquery
- communities/queries/followquery
- communities/queries/friendsquery
- communities/queries/groupsquery
- communities/queries/joingroupquery
- communities/queries/labelsquery
- communities/queries/membersquery
- communities/queries/public
- communities/queries/reactionsquery
- communities/queries/removeactivitiesquery
- communities/queries/removegroupmembersquery
- communities/queries/topicsquery
- communities/queries/updategroupmembersquery
- communities/queries/usersquery
- communities/queries/votesquery
- communities/reportingreason
- communities/responses/chatmessagespagingresult
- communities/responses/public
- communities/role
- communities/suggestedfriend
- communities/tag
- communities/topic
- communities/userreactions
- communities/uservotes
- current_user
- GetSocial Flutter SDK
- invites
- invites/invite
- invites/invitechannel
- invites/invitechannelids
- invites/invitecontent
- invites/public
- invites/referraldata
- invites/referraluser
- invites/referralusersquery
- notifications
- notifications/notificationbadge
- notifications/notificationcontent
- notifications/notificationcontext
- notifications/notificationcustomization
- notifications/public
- notifications/queries/notificationsquery
- notifications/queries/public
- notifications/sendnotificationtarget
- usermanagement/ban_info
- usermanagement/conflict_user
- usermanagement/identity
- usermanagement/public
- usermanagement/user
- usermanagement/user_update