IAP iMessage App - Hosted Content inaccessible

HI,

I am trying to have IAP with hosted content within an iMessage App, but having trouble getting access to the content


I receive the callback to say the download has finished, and when I try and access the file, it doesn't matter what I try, when I try to access the url provided in the contentURL property of the SKDownload object, it get a permission denied error.


The URL being returned is: /var/mobile/Library/Application Support/Containers/com.xxx.xxx.MessagesExtension/Library/Caches/42C53110-961D-4689-A6A7-C640609E1694.zip


If I try to copy that to the documents folder, I get:


open on /var/mobile/Library/Application Support/Containers/com.xxx.xxx.MessagesExtension/Library/Caches/42C53110-961D-4689-A6A7-C640609E1694.zip: Operation not permitted

Error Domain=NSCocoaErrorDomain Code=513 "“42C53110-961D-4689-A6A7-C640609E1694.zip” couldn’t be copied because you don’t have permission to access “B0AE2D49-76B7-49EE-81AB-FF4018F50899”." UserInfo={NSSourceFilePathErrorKey=/var/mobile/Library/Application Support/Containers/com.xxx.xxx.MessagesExtension/Library/Caches/42C53110-961D-4689-A6A7-C640609E1694.zip, NSUserStringVariant=(

Copy

), NSDestinationFilePath=/var/mobile/Containers/Data/PluginKitPlugin/B0AE2D49-76B7-49EE-81AB-FF4018F50899/Documents, NSFilePath=/var/mobile/Library/Application Support/Containers/com.xxx.xxx.MessagesExtension/Library/Caches/42C53110-961D-4689-A6A7-C640609E1694.zip, NSUnderlyingError=0x170256200 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}


Interestingly, if I try to access the cache folder, the folder path it returns for me is different to the cache folder that the content has been downloaded too:

file:///private/var/mobile/Containers/Data/PluginKitPlugin/48ED6510-81A1-42A3-8BC7-5EFBBD1D0446/Library/Caches/com.xxx.xxx.MessagesExtension/


Has anyone tried to use IAP and Hosted content within an iMessage extension ?

Years later and Iam stuck on the same problem.


Were you or anyone else able to find a solution for this.

Or is hosted content a no go with iMessage extensions?


Thx

IAP iMessage App - Hosted Content inaccessible
 
 
Q