On iOS, if the host app uses use_frameworks! :linkage => :dynamic in its Podfile, the library fails to build at its linkage step, saying symbols from lighttpd are not available.
A workaround is to enforce static linkage for this library, by adding to the Podfile
pre_install do |installer|
installer.pod_targets.each do |pod|
if ['ReactNativeStaticServer'].include?(pod.name)
def pod.build_type; Pod::BuildType.static_library; end
end
end
end
Unfortunately, (1) my current understanding of Xcode builds for iOS (with additional Cmake build and linkage of C library) is not sufficient for a proper, quick fix. of the issue; and (2) Podfiles (Cocoapods) are already deprecated, and RN ecosystem moves to Swift package manager; I guess, this will anyway require another learning of new stuff and re-work of the library build... thus, most probably I'll wait for RN getting rid of Cocoapods, and then will look into upgrading the library build setup.
P.S.: Also we have PR #151 submitted a while ago, which changes the build setup to use pre-build iOS lighttpd server as xcframework — I have not looked into it, as it does stuff I had no previous experience with, but now it feels like it might be also the proper solution of this issue, thus I should finally look into it.
On iOS, if the host app uses
use_frameworks! :linkage => :dynamicin its Podfile, the library fails to build at its linkage step, saying symbols from lighttpd are not available.A workaround is to enforce static linkage for this library, by adding to the Podfile
Unfortunately, (1) my current understanding of Xcode builds for iOS (with additional Cmake build and linkage of C library) is not sufficient for a proper, quick fix. of the issue; and (2) Podfiles (Cocoapods) are already deprecated, and RN ecosystem moves to Swift package manager; I guess, this will anyway require another learning of new stuff and re-work of the library build... thus, most probably I'll wait for RN getting rid of Cocoapods, and then will look into upgrading the library build setup.
P.S.: Also we have PR #151 submitted a while ago, which changes the build setup to use pre-build iOS lighttpd server as xcframework — I have not looked into it, as it does stuff I had no previous experience with, but now it feels like it might be also the proper solution of this issue, thus I should finally look into it.