Baked feed - GluedIn
Baked Feed
The SDK has an option to use the predefined feed as a separate component that can be integrated into existing applications and can be launched within any UIViewController via any user-defined CTA.
  • Integration steps to add Baked Feed SDK:
    • Add the below pod dependency into your pod file
    • To add only core module pod dependency, add below
                                  		pod 'GluedInCoreSDK'
                                  	
    • To add Baked the Feed module into the project, add below pod SDK along with the core dependency
                                  		pod 'GluedInFeedSDK'
                                  	
    Supported Feed Formats:
    • Square Feed
    • VerticalFeed
  • Square Feed:
    Class Name: GluedInFeedSDK
    Protocol Class: FeedDelegate
    Available Callback Methods: Below are the methods which will be triggered on multiple events like video play/pause.
    Convenient to load baked creator module and its protocol callback methods.
         
      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
      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() {}
                            	
                            
  • 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.
    Convenient to load baked creator option screen module → Creator camera 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)
     }
                            	
                            
  • Enable Ads into Feed:
    • Open info.plist file of the Application
    • Paste add below metadata tag in tag and put your ad keys under key tag.
    • 
      GADApplicationIdentifier
      	ca-app-pub-3940256099942544~1458002511
      	
      
    • Now add Banner, Interstitial and Native Ad ids on the Console. Add label