PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Integrating resources when generating the iPhone/iPad application
  • Handling the read-only files found in the directory of resources
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the path of the read-only resources of the application.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// The function returns the content of the file
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/iPad

Integrating resources when generating the iPhone/iPad application

The wizard for generating the application for iOS allows you to include files in the executable. You have the ability to include:
  • specific resources.
  • specific images.
  • data files.
If the "Write" option is checked for the files, these files will be automatically checked out (files that must be modified by the application for example). In this case, specify the application directory into which this file must be checked out ("Documents" directory or "Library" directory).
If the "Write" option is unchecked for the files, these files can be:
  • used directly (files to read for example: sound files, image files, ...). These files are included in the application and they will not be checked out. fResourceDir is used to access these files in read mode.
  • checked out by programming with fExtractResource.
Caution: The iOS system is case sensitive.
iPhone/iPad

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 the iPhone or on the iPad, the resource will be found in a directory such as:
    fResourceDir() + \EXE\<Configuration Name>\<Custom Directory>.
Example: the following code is used to check the existence of the "stop.png" file in the directory of resources. On the development computer, this file was found in the "C:\My Mobile Projects\MyApp\Exe\iOS Application\stop.png" directory.
On the iPhone or on the iPad, this path corresponds to: "<Application Directory>/MyApp.app/Exe/iOS Application/stop.png".
IF fFileExist(CompleteDir(fResourceDir()) + CompleteDir("Exe") + ...
CompleteDir("iOS Application") + "stop.png") = True THEN
Info("The image was found")
ELSE
Info("Image not found.")
END
Minimum required version
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment