ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / External file functions
  • Integrating resources when generating the iPhone/iPad application
  • Handling the read-only files found in the directory of resources
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Returns the path of the read-only resources of the application.
Example
// La fonction renvoie le contenu du fichier
fLoadBuffer(fResourceDir() + ["\"] + "data.bin")
Syntax
<Result> = fResourceDir()
<Result>: Character string
Full path of the read-only resources found in the application. Corresponds to the ".app" directory of the application. You cannot write into this directory.
Remarks
iPhone/iPadIOS WidgetMac Catalyst

Integrating resources when generating the iPhone/iPad application

The iOS application generation wizard allows you to include files in the executable. You can include:
  • specific resources.
  • specific images.
  • data files.
If the "Write" option is checked for the files, they will be automatically extracted (e.g., files that must be modified by the application). In this case, specify in which application directory the file should be extracted ("Documents" directory or "Library" directory).
If the "Write" option is unchecked for the files, they can be:
  • used directly (files to be read, for example: sound files, image files, etc.). These files are included in the application and will not be extracted. fResourceDir is used to access these files in read-only mode.
  • extracted programmatically with fExtractResource.
Warning The iOS system is case sensitive.
iPhone/iPadIOS WidgetMac Catalyst

Handling the read-only files found in the directory of resources

The tree structure of the resource directory is identical to the tree structure of the project directory on the development computer:
  • on the development computer, the resource included in the Xcode project can be found in a directory such as:
    <Project_Name>\EXE\<Configuration name>\<Custom directory>.
  • on iPhone or iPad, the resource will be in a directory such as:
    fResourceDir() + \EXE\<Configuration name>\<Custom directory>.
Example The following code checks the existence of the file "stop.png" in the resource directory. On the development computer, this file is in the "C:\My Projects\MyApp\Exe\iOS Application\stop.png" directory.
On the iPhone or iPad, this path corresponds to: "<Application Directory>/MyApp.app/Exe/iOS Application/stop.png".
IF fFileExist(CompleteDir(fResourceDir()) + CompleteDir("Exe") + ...
		CompleteDir("Application iOS") + "stop.png") = True THEN
	Info("L'image a été trouvée")
ELSE
	Info("Image inexistante.")
END
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help