iOS Question Missing *.xcframework.b4i.xml for internal libraries (e.g. iDateUtils) when using compiled custom library

b4x-de

Active Member
Licensed User
Longtime User
I am using the latest version of B4i and I am compiling a project using Local Builder (version 10.02) with the internal B4i function "Compile to Library" into a custom B4i library that depends on internal B4i libraries. A problem occurred when integrating this custom compiled library.

The generated XML file, which was automatically saved to the "Additional Libraries" folder during the compilation process, contains the following line:

B4X:
<dependsOn includesSingletonModules="true">iDateUtils.xcframework.b4i</dependsOn>

When I add my compiled library to a project, the IDE shows the following error:

B4X:
Error parsing libraries.
The file "...\libraries\idateutils.xcframework.b4i.xml" could not be found.

However, in the internal libraries folder there is only:

idateutils.xml

and not:

idateutils.xcframework.b4i.xml

Renaming idateutils.xml to idateutils.xcframework.b4i.xml removes the error in the IDE. This suggests that the generated XML of my custom library references the .xcframework version of internal libraries. My B4i installation (latest version) does not include these `.xcframework.b4i.xml` files.
  • Should the latest B4i version (10.00) include *.xcframework.b4i.xml files for standard libraries like iDateUtils?
  • Is there a mismatch between the library compiler and the distributed libraries?
  • Is there a recommended way to ensure compatibility when compiling custom libraries that depend on internal ones?
Any help or clarification would be appreciated.
 

b4x-de

Active Member
Licensed User
Longtime User
Unfortunately, that wasn't the solution. It only worked because I still had the renamed iDateUtils.xml file in the internal Libraries folder.

Thank you! Yes, #MinVersion was set to 16. Now I use:

B4X:
    #MinVersion: 15
    #IgnoreWarnings: 37

I added a line to ignore warning #37:

Main - 26: #MinVersion lower than 16. Swift based libraries might fail at runtime. (warning #37)
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It is a bug related to the dependent libraries with singleton modules (static code modules). The name is actually correct as what you see is, are actually flags: https://www.b4x.com/android/forum/t...s-additionallib-and-dependson.169223/#content

Will be fixed.

Workaround is to remove it from the XML and add the dependent library directly. You can also switch to b4xlib. They are simpler and in most cases better than compiled libraries.
 
Upvote 0
Top