RxReader / alipay_kit

Flutter版支付宝登录/支付
MIT License
313 stars 56 forks source link

Xcode 15 AlipaySDK.framework/AlipaySDK compiled without category class properties #60

Closed gujintao1900 closed 9 months ago

gujintao1900 commented 10 months ago

Xcode 15 编译失败,日志如下

ld: warning: mixed ObjC ABI, /Users/.pub-cache/hosted/pub.flutter-io.cn/alipay_kit_ios-6.0.1/ios/Libraries/utdid/AlipaySDK.framework/AlipaySDK compiled without category class properties
0  0x10aba2f43  __assert_rtn + 64
1  0x10ab4ad4b  void dispatchForEach<mach_o::CompactUnwind::Diff24Fixup const, ld::LayoutExecutable::writeCompactUnwind(std::__1::span<unsigned char, 18446744073709551615ul>, unsigned long long, ld::SectionLayout const&) const::$_26>(std::__1::span<mach_o::CompactUnwind::Diff24Fixup const, 18446744073709551615ul>, unsigned long, ld::LayoutExecutable::writeCompactUnwind(std::__1::span<unsigned char, 18446744073709551615ul>, unsigned long long, ld::SectionLayout const&) const::$_26)::'lambda'(unsigned long)::operator()(unsigned long) const + 347
2  0x10ab4b13b  ld::LayoutExecutable::writeContentWithoutLinkEdit(std::__1::span<unsigned char, 18446744073709551615ul>, unsigned long long) + 987
3  0x10ab529fa  ld::LayoutExecutable::writeToFile(char const*) + 21546
4  0x10aaf1f9f  main + 12831
ld: Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.

image

根据 https://developer.apple.com/forums/thread/735426Other Link Flags 添加 -ld64 还是报错

但是换了另一个支付宝 https://github.com/OpenFlutter/tobias 编译能通过

Jayshanx commented 10 months ago

我通过这种方式暂时解决

image

acerpeanut commented 10 months ago

在Podfile里的post_install里添加这段可以编译通过:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)

    target.build_configurations.each do |config|

      # alipay_kit_ios,使编译成功
      if target.name == "alipay_kit_ios"
        config.build_settings["OTHER_LDFLAGS"] = config.build_settings["OTHER_LDFLAGS"] + " -ld_classic"
      end

      #......

    end
  end
end