FireMonkey - Using NSFileManager in Free Pascal Compiler
Posted on 2012-09-04
When searching for a path in Mac OSX, I was advised to use a FileManager method like URLForDirectory. When I do this for OSX, I reference (in the "uses" statement) the "MacAPI.Foundation module" and it works as expected. Unfortunately, when iOS is the target platform, this doesn’t work in the xcode free pascal compiler. Instead, xcode returns the error: 'Identifier not found "NSFileManager"' together with other errors all of which are related to NSFileManager.
In the "uses" statement, I tried replacing the dot with an underscore like all the other FMX modules do (ie. “MacAPI_Foundation”), but that didn’t work either. I searched the Mac folder where FireMonkey stores all its support PAS files, but nothing looked familiar. When I Googled the problem the search results were not exactly on point. I presume I need to include the correct module in the "uses" statement. Does anyone know the correct corresponding module to place in the "uses" clause when programming for iOS in order to access the path-finding functions?