WeChat SDK on arm64
Asked Answered
A

4

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?

Alexandrine answered 8/5, 2014 at 10:22 Comment(1)
Getting the WeChat SDK to work in a Swift project: stackoverflow.com/a/35862318Aslam
R
11

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

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

Rearmost answered 22/7, 2014 at 5:27 Comment(3)
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)]Madelinemadella
@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 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.Rearmost
add this SDK and use these frameworks: SystemConfiguration.framework,libz.dylib,libsqlite3.0.dylibFranza
O
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.

Overriding answered 24/4, 2015 at 5:26 Comment(2)
lbdakine, nice photo!!:)Alexandrine
This is the correct answer - now it's finally building.Barimah
L
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.

Legitimize answered 8/5, 2014 at 13:48 Comment(1)
No. Apple requires all apps to have 64-bit support now.Sural
A
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

Ankerite answered 4/1, 2023 at 5:40 Comment(1)
You also don't need to exclude arm on simulator, because it support arm64 armv7 on ios, arm64 x86_64 on simulatorAnkerite

© 2022 - 2024 — McMap. All rights reserved.