Supported Feed Formats:
- Square Feed
- Vertical Feed
Square Feed:
Class Name :
GluedInFeedSDK
Protocol Class :
FeedDelegate
Integration Steps:
- Create the entry point from where you wanted to load the feed module into your application/Module
- Write the navigation flow on self and call the feed controller as show in code snippet
- Convenient to load baked feed module and its protocol callback methods.
self.navigationController?.pushViewController(
GluedInFeed.shared.getFeedViewController(
delegate: self,
isBackEnable: true) ?? UIViewController(),
animated: true)
How to call ?
// Baked Feed method to launch Feed module
// Option to launch baked feed by clicking on feed button
// Controller can be open from any button or bottom bar or load screen or any user interction option
@IBAction func callToLaunchedBackedFeedMethod(_ sender: Any) {
self.navigationController?.pushViewController(
GluedInFeed.shared.getFeedViewController(
delegate: self,
isBackEnable: true) ?? UIViewController(),
animated: true)
}
Available Callback Methods :
Below are the methods which will be triggered on multiple events like video play/pause.
func didSelectUnlike(videoAsset: FeedModel?) {}
func didSelectShoppableProduct(feedModel: FeedModel?,
shoppableProduct: ShoppableProduct?) {}
func didSelectProfile(feedModel: FeedModel?,
profileId: String,
navigationController: UINavigationController) {}
func didSelectHashtag(feedModel: FeedModel?,
hashtagName: String,
hashtagId: String,
navigationController: UINavigationController) {}
func didSelectChallenge(feedModel: FeedModel?,
challengeName: String,
challengeId: String,
navigationController: UINavigationController) {}
func didSelectShare(feedModel: FeedModel?,
shareType: ShareType,
navigationController: UINavigationController?,
completion: completionHandler?) -> () {}
func showLoginRegisterPopup(navigationController: UINavigationController) {}
func showCoachMark(navigationController: UINavigationController?) -> () {}
Analytics Callback events for baked feed:
Below are the analytics call back events which can be further used for user activity tracking purpose. For example if user click on view more CTA then we will receive a call back which can be further user for analytics purpose.
// Analytics
func appScreenViewEvent() -> () {}
func appViewMoreEvent() -> () {}
func appContentUnLikeEvent(feed: FeedModel?) -> () {}
func appContentLikeEvent(feed: FeedModel?) -> () {}
func appVideoPlayEvent(feed: FeedModel?) -> () {}
func appVideoResumeEvent(feed: FeedModel?) -> () {}
func appVideoPauseEvent(feed: FeedModel?) -> () {}
func appVideoReplayEvent(feed: FeedModel?) -> () {}
func appVideoStopEvent(feed: FeedModel?, duration: String?) -> () {}
func appViewClickEvent(feed: FeedModel?) -> () {}
func didSelectBack(videoAsset: FeedModel?) {}
func didScrolledToNextVideo(videoAsset: FeedModel?) {}
func didScrolledToPreviousVideo(videoAsset: FeedModel?) {}
func didVideoWatched(videoAsset: FeedModel?, currentDuration: Int64, totalDuration: Int64) {}
func didMediaReady(videoAsset: FeedModel?) {}
func onVideoRestarted(videoAsset: FeedModel?) {}
func didVideoStarted(videoAsset: FeedModel?) {}
func playerItemNewAccessLogEntry(aVPlayerItemAccessLog: AVPlayerItemAccessLog?) {}
func playerItemErrorLog(aVPlayerItemErrorLog: AVPlayerItemErrorLog?) {}
func playerStatusError(error: Error?, videoAsset: FeedModel?) {}
func didSelectlike(videoAsset: FeedModel?) {}
func didSelectComment(videoAsset: FeedModel?) {}
func didVideoPlayPause(isPlaying: Bool?, videoAsset: FeedModel?) {}
func didDoubleTap(videoAsset: FeedModel?) {}
func didPlaybackCompleted(videoAsset: FeedModel?) {}
func onVideoEnd(videoAsset: FeedModel?) {}
func didNetworkOffline() {}