WeChat SDK on arm64

2019-01-23 18:48发布

问题:

I was trying to use libWeChatSDK.a library in my iPhone application and on iPhone 5 it works as it should. However I encountered problems with the newest iPhone, it seems that this library does not support arm64 architecture.

The error I've got is the following:

ld: warning: ignoring file .../libWeChatSDK.a, missing required architecture arm64 in file .../libWeChatSDK.a (3 slices)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_SendMessageToWXReq", referenced from:
      objc-class-ref in WeChatCustomActivity.o
  "_OBJC_CLASS_$_WXApi", referenced from:
      objc-class-ref in WeChatCustomActivity.o
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Do you know if there are some kind of workarounds for this problem?

回答1:

As far as I know, it's available now.

But If you're not good at Chinese, just download it by tap here.



回答2:

the link to the arm64 library does work (confirmed) however the code will not compile unless you also add libc++.dylib library to your project. This is not mentioned in any other links!

I spent hours searching for this. Enjoy.



回答3:

Don't build your app for architecture arm64. libWeChatSDK.a is apparently only built for 32 bit targets. There is no real penalty for running 32 bit architecture code on the 64bit iPhone/iPads.