Open km-steve-ham opened 3 weeks ago
Hey,
@km-steve-ham Thanks for opening an issue.
Looking at this issue in the CocoaPods repo, it seems that you can manually set it with a post_install
. The Flatbuffers.podspec
file follows what other repositories do with their podspec
files, and thus we will try to keep it to minimal changes.
It might look like this:
post_install do |installer|
...
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
# maybe check if the lib is flatbuffers
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
Regarding the version, https://github.com/google/flatbuffers/pull/8328 should fix it. When it's merged I'll publish a newer version of the lib.
Thank you for the quick response and for addressing the version issue with #8328.
However, I would like to clarify that the proposed change to add BUILD_LIBRARY_FOR_DISTRIBUTION
to the FlatBuffers.podspec
is crucial for ABI stability. The lack of this setting has been causing runtime crashes due to symbol resolution issues, as shown in the crash log I provided.
While I understand that you prefer to keep the podspec minimal and suggest using a post-install script, this approach places an additional burden on users and increases the risk of these issues being overlooked. Including the following configuration directly in the FlatBuffers.podspec
would ensure that all users benefit from the necessary ABI stability without requiring manual intervention:
s.pod_target_xcconfig = {
'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES'
}
Could you please reconsider adding this to the podspec to prevent potential runtime issues for all users?
Thank you for your attention to this matter.
Description: I am writing to request the addition of the following configuration to the
FlatBuffers.podspec
file to ensure ABI stability and proper framework distribution:Issue: The latest version of FlatBuffers distributed to CocoaPods is
22.9.24
, even though theFlatBuffers.podspec
in the GitHub repository shows the version as24.3.25
. The actual distributed FlatBuffers need to have the above code added to ensure proper functionality and avoid runtime errors.Crash Log: Due to the missing
BUILD_LIBRARY_FOR_DISTRIBUTION = YES
setting, there are issues with ABI stability, causing the following crash:Steps to Reproduce:
FlatBuffers
as a dependency.FlatBuffers
framework without theBUILD_LIBRARY_FOR_DISTRIBUTION
setting enabled.Proposed Solution: Please update the
FlatBuffers.podspec
to include the following configuration:This change will ensure ABI stability and prevent runtime crashes related to missing symbols.
Thank you for considering this request. Ensuring ABI stability is crucial for the smooth integration and functionality of projects relying on FlatBuffers.
Thank you for submitting an issue!
Please make sure you include the names of the affected language(s), compiler version(s), operating system version(s), and FlatBuffers version(s) in your issue title.
This helps us get the correct maintainers to look at your issue. Here are examples of good titles:
Include other details as appropriate.
Thanks!