How to access app group shared container from Cordova?
Asked Answered
P

1

11

I am using window.resolveLocalFileSystemURL in cordova to access file system. However I could not find a way to get the directory path using app group.

In IOS, I can easily use containerURLForSecurityApplicationGroupIdentifier.

Cheers

Prototrophic answered 12/5, 2016 at 0:31 Comment(6)
Could you post sample code?Mahler
Could you please elaborate your question? "could not find a way to get the directory path using app group." - what do u really mean by this?Mahler
I'm not an expert with cordova IOS. But maybe this is something that could help you. github.com/protonet/…Asturias
@Asturias That example is using NSUserDefaults which I do not think Adrian is looking for. I believe he is looking for a Cordova solution that utilizes the AppGroup shared folder. I am also looking to accomplish something similar.Notary
@Notary Were you able to solve this?Gravamen
No, ended up going with a native swift appNotary
H
0

To do that one need to write a plugin, that will access shared group directory using

-[NSFileManager containerURLForSecurityApplicationGroupIdentifier]

as I didn't find an existing cordova plugin that does that. Writing plugin like that is pretty easy if you're familiar with cordova plugin system.

Hagan answered 10/3, 2017 at 10:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.