Step 2: Integrate Dependency
- Navigate to your project directory in the terminal and open your Project’s Podfile
cd /path/to/your/project
open Podfile
Add the GluedInSDK Dependency
In the Podfile, add the following line under the target for your application:
pod 'GluedInSDK'
Example:
target 'YourAppName' do
use_frameworks!
# Add dependencies below
pod 'GluedInSDK'
end
Install the Pod
Save and close the Podfile.
Run the following command in the terminal to install the dependency:
pod install
This command will download and integrate the GluedInSDK into your project.
Open the Workspace
After installation, always open your project using the .xcworkspace file instead of .xcodeproj:
open YourAppName.xcworkspace
Verify Integration
Build your project to ensure the SDK has been correctly integrated.
Import the SDK in your code to start using it:
import GluedInSDK
Step 4: Enable the widget on the Asset detail page
- First, validate the GluedIn SDK on the Asset Detail page before consuming any APIs or method of SDK
GluedIn.shared.initWithUserInfo(
apiKey: <#T##String#>,
secretKey: <#T##String#>,
email: <#T##String#>,
password: <#T##String#>,
fullName: <#T##String#>
) {
<#code#>
} failure: { <#String#>, <#Int#> in
<#code#>
}
Use the below API methods of the SDK to check whether Micro Community is enabled on the Asset or not
GluedIn.shared.widgetDetailWithFeed(
byAssetId: <#T##String#>
) { <#WidgetResponse?#>, <#FeedDataModel?#> in
<#code#>
} failure: { <#String?#>, <#Int?#> in
<#code#>
}
When Success: SDK will return the widget configuration and widget data
WidgetConfig:
success: ture if data has been fetched succesfully, false otherwise
WidgetConfigDetails:
widgetEnabled: true, if widget has been enabled for an asset, false otherwise
When Failure: SDK will return the failure message and code
If the widget is enabled on the asset then using the SDK API data, you can render the UI on the assets detail page. Refer to the Link for sample app.
Now, launch the GluedIn SDK when user clicks on any of the items.
GluedIn.shared.launchSDK(
typeOfEntry: .subFeed,
assets: <#T##Asset?#>,
contextType: .asset,
contextId: <#T##String?#>,
delegate: <#T##(any GluedInDelegate)?#>
) { <#UIViewController?#> in
<#code#>
} failure: { <#String#> in
<#code#>
}
Content creation around an asset
As Admin if you can enable the content creation around a particular asset from CMS, it will allow the end user to create content, thus increasing user engagement.
Step 1: Enable Creator via Console
- In the “Asset Catalog” menu in CMS, you can enable the “Add Creator” toggle while creating the asset on GluedIn CMS.
Step 2: Enable Creator on the Asset detail page
- Once the creator will be enabled then on the Asset Detail page, the end user will have the option to create content.
- Use the below API methods of the SDK to check whether Creator is enabled on asset or not
GluedIn.shared.widgetDetailWithFeed(
byAssetId: <#T##String#>
) { <#WidgetResponse?#>, <#FeedDataModel?#> in
<#code#>
} failure: { <#String?#>, <#Int?#> in
<#code#>
}
When Success: SDK will return the widget configuration and widget data
WidgetConfig:
success: ture if data has been fetched succesfully, false otherwise
WidgetConfigDetails:
widgetEnabled: true, if widget has been enabled for an asset, false otherwise
creatorEnabled: true, if creator is enabled on an asset, false otherwise
When Failure: SDK will return the failure message and code
If the Creator is enabled on the asset then using the SDK API data, you can render the UI of creator entry point on the assets detail page. Refer to the Link for sample app.
Now, launch the GluedIn SDK when the user clicks on the creator entry point.
GluedIn.shared.launchSDK(
typeOfEntry: .creator,
assets: <#T##Asset?#>,
challenge: <#T##String?#>,
isRewardCallback: <#T##Bool?#>,
delegate: <#T##(any GluedInDelegate)?#>
) { <#UIViewController?#> in
<#code#>
} failure: { <#String#> in
<#code#>
}
Incentivise via challenge & leaderboard
Using GluedIn SDK challenge (with leaderboard) and reward module, admin can incentivise the end user and increase the traction on the App.
Step 1: Create a Challenge via Console
- Goto “Challenge” section on GluedIn Console
- Click on “Create Challenge” option. It will open a form like below:
- Enter the required details of the challenge and click the “Submit” button.
- In next step, enable the leaderboard by clicking on “Turn On Leaderboard” button.
- Now configure the leaderboard setting , eg: Rank Logic, Winner Frequency, Rewards setting
- In next step, if you want to use the GluedIn Rewards system or want to push rewards data to your system.
- Now, link the challenge to an asset, as in the below screenshot.
- Now, “Save” the changes.
Step 2: Enable challenge & leaderboard on Asset detail page
- Once the creator will be enabled then on the Asset Detail page, end user will have the option to create content.
- Use the below API methods of the SDK to check whether Creator is enabled on asset or not
GluedIn.shared.widgetDetailWithFeed(
byAssetId: <#T##String#>
) { <#WidgetResponse?#>, <#FeedDataModel?#> in
<#code#>
} failure: { <#String?#>, <#Int?#> in
<#code#>
}
When Success: SDK will return the widget configuration and widget data
WidgetConfig:
success: ture if data has been fetched succesfully, false otherwise
WidgetConfigDetails:
widgetEnabled: true, if widget has been enabled for an asset, false otherwise
creatorEnabled: true, if creator is enabled on an asset, false otherwise
When Failure: SDK will return the failure message and code
If the creator is enabled on the asset then using the SDK API data, you can render the UI of creator entry point on the assets detail page. Refer to the Link for sample app.
Use the below launch mechanism based on user clicks.
--- When user clicks on challenge/creator entry popint -----
GluedIn.shared.launchSDK(
typeOfEntry: .creator,
assets: <#T##Asset?#>,
challenge: <#T##String?#>,
isRewardCallback: <#T##Bool?#>,
delegate: <#T##(any GluedInDelegate)?#>
) { <#UIViewController?#> in
<#code#>
} failure: { <#String#> in
<#code#>
}
--- When user clicks on leaderboard entry popint -----
GluedIn.shared.launchSDK(
typeOfEntry: .leaderboard,
challengeInfo: <#T##HashtagChallengeModel?#>,
delegate: <#T##GluedInDelegate?#>
) { <#UIViewController?#> in
<#code#>
} failure: { <#String#> in
<#code#>
}
--- When user clicks on rewards entry popint -----
GluedIn.shared.launchSDK(
typeOfEntry: .reward,
delegate: <#T##GluedInDelegate?#>
) { <#UIViewController?#> in
<#code#>
} failure: { <#String#> in
<#code#>
}