7

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?

Bhavesh Nayi
  • 3,626
  • 1
  • 27
  • 42
Wojtek
  • 1,006
  • 11
  • 30

4 Answers4

11

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

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

demon
  • 833
  • 1
  • 10
  • 20
  • Even if downloading the latest version from their Chinese website, still can't compile! I get 3 errors => [ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)] – KBog Feb 07 '15 at 19:44
  • 2
    @oKBo If you're sure about that you got is the latest version SDK, you'd blame the 'Wechat' official developer cause the mistake, then I'm sure about the [link](https://open.weixin.qq.com/zh_CN/htmledition/res/dev/download/sdk/iOS_SDK-64.zip) is avaliable, I test the fat file via 'lipo -info'. `Architectures in the fat file: libWeChatSDK.a are: armv7 i386 x86_64 arm64` is what I got. – demon Feb 10 '15 at 07:26
  • Thanks bro :) ur great – Ahmed Z. Jun 25 '15 at 10:17
  • add this SDK and use these frameworks: SystemConfiguration.framework,libz.dylib,libsqlite3.0.dylib – bisma Jun 30 '17 at 06:34
7

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.

Raptor
  • 53,206
  • 45
  • 230
  • 366
Ibdakine
  • 504
  • 4
  • 17
0

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.

ahwulf
  • 2,584
  • 15
  • 29
0

try this https://github.com/yorkzero831/WechatSDK-in-xcframework It converted arm64 to sim-arm64 package all libs in sxframework, should solve your problem

takuto yu
  • 11
  • 1
  • You also don't need to exclude arm on simulator, because it support arm64 armv7 on ios, arm64 x86_64 on simulator – takuto yu Jan 04 '23 at 05:41