# Still can't use ApplicationSupport

**URL:** <https://forum.xojo.com/t/still-cant-use-applicationsupport/43530>\
**Category:** iOS\
**Created:** [May 16, 2018, 12:33pm UTC](https://forum.xojo.com/t/still-cant-use-applicationsupport/43530 "2018-05-16T12:33:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gavin\_Smith](https://forum.xojo.com/user_avatar/forum.xojo.com/gavin_smith/32/13901_2.png) [@Gavin\_Smith](https://forum.xojo.com/u/Gavin_Smith)\
**Post date:** [May 16, 2018, 12:33pm UTC](https://forum.xojo.com/t/still-cant-use-applicationsupport/43530/1 "2018-05-16T12:33:12Z")

</div>

There are specific reasons to use SpecialFolder.ApplicationSupport on iOS (as on the Mac) but Xojo still throws an exception when trying to create a file or folder there. The documentation implies that it works when I’m pretty sure it’s never worked.

I know it’s been discussed before but for bugs like this, that have been reviewed and confirmed by staff and then sat unfixed for a long period of time, couldn’t we get a note added to the documentation? I just wasted half an hour on this, thinking it was something I was doing wrong.

\<[https://xojo.com/issue/37590](https://xojo.com/issue/37590)\>

---

<div class="post-metadata">

**Author:** ![Jeff\_Tullin](https://forum.xojo.com/user_avatar/forum.xojo.com/jeff_tullin/32/693_2.png) [@Jeff\_Tullin](https://forum.xojo.com/u/Jeff_Tullin)\
**Post date:** [May 16, 2018, 1:41pm UTC](https://forum.xojo.com/t/still-cant-use-applicationsupport/43530/2 "2018-05-16T13:41:24Z")

</div>

On MacOS its ApplicationData, which the documentation says resolves to Application Support

in new framework, SpecialFolder.ApplicationSupport resolves to …/Library/Application Support on MacOS, but …/Library/ApplicationSupport (note - no space) on iOS

[http://developer.xojo.com/xojo-io-specialfolder$ApplicationSupport](http://developer.xojo.com/xojo-io-specialfolder%24ApplicationSupport)

Documentation about the iOS file system says this:  
Put app-created support files in the Library/Application support/ directory. (note spaces)

[https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html](https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html)

Does this offer any clues?  
Does it make sense to ‘roll your own’ path to this folder?

---

<div class="post-metadata">

**Author:** ![Arnaud\_N](https://forum.xojo.com/user_avatar/forum.xojo.com/arnaud_n/32/21824_2.png) [@Arnaud\_N](https://forum.xojo.com/u/Arnaud_N)\
**Post date:** [March 14, 2020, 5:37pm UTC](https://forum.xojo.com/t/still-cant-use-applicationsupport/43530/3 "2020-03-14T17:37:47Z")

</div>

I’ve also encountered this issue and searched as much as I could on this forum and on Feedback (I found this case from 2015: \<[https://xojo.com/issue/37590](https://xojo.com/issue/37590)\> still being Reviewed and thought Xojo just had to fix that).

But, for no logical reason, I thought perhaps the folder would just not exist in the first place. And, right, this is the actual problem: iOS doesn’t create the ApplicationSupport folder (inside your app) automatically.

Just use something like this and you can use the ApplicationSupport folder:

[code]dim b As Xojo.IO.BinaryStream  
dim f As Xojo.IO.FolderItem

try  
f=SpecialFolder.ApplicationSupport  
if f\<\>nil and not f.Exists then f.CreateAsFolder  
if f\<\>nil then f=f.Child(“MyCompany”) //Not sure this one is needed, since the ApplicationSupport folder instance is already in the sandboxed app (thus only belonging to the app, perhaps being the reason why it’s not automatically created by the OS).  
if f\<\>nil and not f.Exists then f.CreateAsFolder  
if f\<\>nil then f=f.Child(“com.mycompany.myapp.prefs”)

b=Xojo.IO.BinaryStream.Create(f)  
[/code]

Enjoy!

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:13pm UTC](https://forum.xojo.com/t/still-cant-use-applicationsupport/43530/4 "2020-10-29T19:13:02Z")

</div>


