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

Adrian
  • 273
  • 1
  • 4
  • 14
  • 1
    Could you post sample code? – Gandhi May 12 '16 at 05:14
  • 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? – Gandhi Aug 17 '16 at 15:26
  • I'm not an expert with cordova IOS. But maybe this is something that could help you. https://github.com/protonet/cordova-plugin-nsuserdefaults-for-app-groups – Initerworker Aug 22 '16 at 06:28
  • @Initerworker 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. – Nate23VT Jan 06 '17 at 19:02
  • @Nate23VT Were you able to solve this? – dariru Jun 07 '18 at 01:17
  • No, ended up going with a native swift app – Nate23VT Jun 08 '18 at 01:29

1 Answers1

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.

Nikita Kunevich
  • 587
  • 4
  • 17