Feb 20, 2022 The need arose within a library to know if there was a Font in the Assets folder. I didn't know if the developer had uploaded the font to the App, but if he didn't, the library would crash. How to do? This was the solution B4X: Dim no As NativeObject Dim SpecialFolder As String = no.Initialize("NSBundle").RunMethod("mainBundle", Null).RunMethod("bundlePath", Null).AsString If File.Exists(SpecialFolder,FontFileName) Then '...' End If Last edited: Jul 30, 2022 Click to expand...
The need arose within a library to know if there was a Font in the Assets folder. I didn't know if the developer had uploaded the font to the App, but if he didn't, the library would crash. How to do? This was the solution B4X: Dim no As NativeObject Dim SpecialFolder As String = no.Initialize("NSBundle").RunMethod("mainBundle", Null).RunMethod("bundlePath", Null).AsString If File.Exists(SpecialFolder,FontFileName) Then '...' End If