Use resolveLocalFileSystemURL, not requestLocalFileSystem
The easiest way to do this (starting with v1.2.0) is via the cordova.file.dataDirectory property. This should be the path to the library-nosync directory. You can use it in combination with resolveLocalFileSystemURL to get a directory entry object into which you can create files.
Something like this should work:
resolveLocalFileSystemURL(cordova.file.dataDirectory, function(entry) { console.log("Success! Got a DirectoryEntry");
Some other notes
To clarify the two parameters that you indicated in your question:
<preference name="iosPersistentFileLocation" value="Library" />
This preference simply tells the File plugin that, by default, the PERSISTENT file system should store files in the deviceβs Library directory. Without this setting, the default location used by previous versions of Cordoba, the Documents directory, is used. Regardless of the fact that the library file system is available for your application (if you have not disabled it with the following setting)
<preference name="iosExtraFilesystems" value="library-nosync" />
Preference iosExtraFilesystems tells the File plan to which the root file system belongs, in addition to the default settings (temporary and permanent) for the installation. By default, it is set to string
"library,library-nosync,documents,documents-nosync,cache,bundle,root"
This already includes library-nosync , so you do not need to add it. In fact, installing it the way you really removed the other filesystem roots from your application.