MoEngageInAppAssetsManager
public extension MoEngageInAppAssetsManager
-
Get video resource name from URL.
Declaration
Swift
func getInAppVideoName(for url: URL) -> StringParameters
urlThe resource URL.
Return Value
Resource file name.
-
Get assets that aren’t cached and needs download.
Declaration
Swift
func getAssetsToBeDownloaded( resourceLinks: [String: String], withInAppType inAppType: MoEngageInAppType, forCampaignID campaignID: String, forSDKInstance sdkInstance: MoEngageSDKInstance ) -> [URL: URL]?Parameters
resourceLinksThe resources to be downloaded.
inAppTypeThe campaign type.
campaignIDThe campaign id.
sdkInstanceThe instance of SDK.
Return Value
The resources that aren’t cached.
-
Move resource to provided path.
Create path if doesn’t exist.
Declaration
Swift
func move(resource: URL, to newPath: URL) throwsParameters
resourceThe original path.
newPathThe new path.
-
Download video assets.
Declaration
Swift
func downloadVideoAssets( resourceLinks: [String: String], withInAppType inAppType: MoEngageInAppType, forCampaignID campaignID: String, forSDKInstance sdkInstance: MoEngageSDKInstance, andCompletionBlock completionBlock: @escaping (Bool) -> Void )Parameters
resourceLinksThe resources to be downloaded.
inAppTypeThe campaign type.
campaignIDThe campaign id.
sdkInstanceThe instance of sdk.
completionBlockThe block to execute after downloads.