MoEngageInAppAssetsManager
public extension MoEngageInAppAssetsManager
-
Get video resource name from URL.
Declaration
Swift
func getInAppVideoName(for url: URL) -> String
Parameters
url
The 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
resourceLinks
The resources to be downloaded.
inAppType
The campaign type.
campaignID
The campaign id.
sdkInstance
The 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) throws
Parameters
resource
The original path.
newPath
The 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
resourceLinks
The resources to be downloaded.
inAppType
The campaign type.
campaignID
The campaign id.
sdkInstance
The instance of sdk.
completionBlock
The block to execute after downloads.