Closed hardeverick closed 1 year ago
Hi, instead of setting "BUILD_LIBRARY_FOR_DISTRIBUTION": "YES"
you should set "library_evolution_support": true
(see https://github.com/Subito-it/PodBuilder#library_evolution_support).
In general however I would advise to set "build_xcframeworks_all": true
(which implies library evo support) which will produce xcframeworks adding Apple Silicon support
Thanks for the reply @tcamin
I tried this and I'm no longer getting the cannot be imported error, but I'm getting a lot these errors (see screenshot below):
is there anything else I'm doing wrong?
Thanks
@tcamin It seems like this is caused because the Module and class name are the same according to this https://developer.apple.com/forums/thread/123253. There's a proposed fix in that link that runs this command find . -name "*.swiftinterface" -exec sed -i -e 's/frameworkName\.//g' {} \;
. Is there something similar that I could run in PodBuilder?
In the mean time I worked around the problem by switching the pods with problems to use SPM (Swift Package Manager).
You should be able to patch the switfinterface files by adding this to your Podfile
post_install do |installer|
swift_interface_paths = Dir.glob("./PodBuilder/Prebuilt/RealmSwift/**/*.swiftinterface")
swift_interface_paths.each do |path|
content = File.read(path)
content.gsub!("Realm.RLM", "RLM")
content.gsub!("Realm.Realm", "Realm")
File.write(path, content)
end
end
With respect to your workaround of using SPM you could alternatively just add the non working pods to the skip list as documented here
Hi,
Every time I update Xcode I get this error and I have to manually specify the Swift version for some pods to match the Swift compiler in the version of Xcode I'm using. I looked online and this answer suggests setting the option
BUILD_LIBRARY_FOR_DISTRIBUTION
but it doesn't seem to work.This is my Podbuilder.json file