Skip to content

[iOS] Fails to build in projects with dynamic framework linkage #166

Description

@birdofpreyru

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    On HoldCannot be resolved at the moment.P1High priority issue.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions