收藏
回答

iOS微信注册崩溃

引用微信SDK后调用注册方法

[WXApi registerApp:K_WX_AppID enableMTA:true]; 

程序崩溃,怎么解决

回答关注问题邀请回答
收藏

9 个回答

  • 微信技术专员-aizen
    微信技术专员-aizen
    2019-11-04

    [4] 在你的工程文件中选择 Build Setting,在"Other Linker Flags"中加入"-ObjC -all_load",在 Search Paths 中添加 libWeChatSDK.a ,WXApi.h,WXApiObject.h,文件所在位置(如下图所示)。


    https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html

    请问这一步做了吗?

    2019-11-04
    有用
    回复 6
    • 㠩㞷
      㠩㞷
      2019-11-05
      做了,还是崩溃
      2019-11-05
      回复
    • 微信技术专员-aizen
      微信技术专员-aizen
      2019-11-05回复㠩㞷
      请贴一下crash的详细堆栈,另外请调用WXApi的getApiVersion打印出版本号,确认版本号是多少?
      2019-11-05
      回复
    • lj春
      lj春
      2019-11-13回复微信技术专员-aizen
      Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[WXApi registerApp:]: unrecognized selector sent to class 0x103c7e270'
      2019-11-13
      回复
    • lj春
      lj春
      2019-11-13
      2019-11-13
      回复
    • lj春
      lj春
      2019-11-13回复微信技术专员-aizen
      -all_load会导致duplicate报错,-force_load也不行。
      2019-11-13
      回复
    查看更多(1)
  • 清心
    清心
    2021-06-03

    ios 引用 cordova-plugin-wechat 插件,并注册了微信支付的ios平台信息

    但是支付调用时,返回错误信息:“请求支付失败”

    2021-06-03
    有用
    回复
  • A。z益达O_o✨
    A。z益达O_o✨
    2020-07-28

    解决了么,求告知

    2020-07-28
    有用
    回复
  • 陆拾一
    陆拾一
    2020-04-02

    请问这个问题解决了吗,我这边也遇到这个问题


    2020-04-02
    有用
    回复
  • 张洋洋
    张洋洋
    2020-01-20

    2020-01-20 14:19:23.707897+0800 writeHelp_ios[49836:5451815] +[WXApi registerApp:enableMTA:]: unrecognized selector sent to class 0x10d499e08

    2020-01-20 14:19:32.148470+0800 writeHelp_ios[49836:5451815] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[WXApi registerApp:enableMTA:]: unrecognized selector sent to class 0x10d499e08'

    *** First throw call stack:


    0   CoreFoundation                      0x000000010e29527e __exceptionPreprocess + 350

    1   libobjc.A.dylib                     0x000000011243bb20 objc_exception_throw + 48

    2   CoreFoundation                      0x000000010e2b5ed4 +[NSObject(NSObject) doesNotRecognizeSelector:] + 132

    3   CoreFoundation                      0x000000010e299c4c ___forwarding___ + 1436

    4   CoreFoundation                      0x000000010e29bf78 _CF_forwarding_prep_0 + 120

    5   writeHelp_ios                       0x000000010cf0330f -[AppDelegate application:didFinishLaunchingWithOptions:] + 3615

    6   UIKitCore                           0x0000000119ba0ad8 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232

    7   UIKitCore                           0x0000000119ba2460 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3980

    8   UIKitCore                           0x0000000119ba7f05 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1226

    9   UIKitCore                           0x00000001192dc76d -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122

    10  UIKitCore                           0x00000001197cb4c1 _UIScenePerformActionsWithLifecycleActionMask + 83

    11  UIKitCore                           0x00000001192dd27f __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198

    12  UIKitCore                           0x00000001192dcc8e -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 296

    13  UIKitCore                           0x00000001192dd0ac -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 818

    14  UIKitCore                           0x00000001192dc941 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345

    15  UIKitCore                           0x00000001192e0f3f __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 178

    16  UIKitCore                           0x00000001196efc83 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 865

    17  UIKitCore                           0x00000001197e9dff _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240

    18  UIKitCore                           0x00000001192e0c5a __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153

    19  UIKitCore                           0x00000001197e9d02 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84

    20  UIKitCore                           0x00000001192e0ac8 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381

    21  UIKitCore                           0x00000001191376e7 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657

    22  UIKitCore                           0x000000011913626c -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248

    23  UIKitCore                           0x0000000119137411 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210

    24  UIKitCore                           0x0000000119ba6599 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 535

    25  UIKitCore                           0x00000001197117f5 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361

    26  FrontBoardServices                  0x000000011732f165 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 442

    27  FrontBoardServices                  0x00000001173554d8 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102

    28  FrontBoardServices                  0x0000000117339c45 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220

    29  FrontBoardServices                  0x0000000117355169 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355

    30  libdispatch.dylib                   0x00000001136b4d48 _dispatch_client_callout + 8

    31  libdispatch.dylib                   0x00000001136b7cb9 _dispatch_block_invoke_direct + 300

    32  FrontBoardServices                  0x000000011737b37e __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30

    33  FrontBoardServices                  0x000000011737b06c -[FBSSerialQueue _queue_performNextIfPossible] + 441

    34  FrontBoardServices                  0x000000011737b57b -[FBSSerialQueue _performNextFromRunLoopSource] + 22

    35  CoreFoundation                      0x000000010e1f8471 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

    36  CoreFoundation                      0x000000010e1f839c __CFRunLoopDoSource0 + 76

    37  CoreFoundation                      0x000000010e1f7b74 __CFRunLoopDoSources0 + 180

    38  CoreFoundation                      0x000000010e1f287f __CFRunLoopRun + 1263

    39  CoreFoundation                      0x000000010e1f2066 CFRunLoopRunSpecific + 438

    40  GraphicsServices                    0x0000000116889bb0 GSEventRunModal + 65

    41  UIKitCore                           0x0000000119ba9d4d UIApplicationMain + 1621

    42  writeHelp_ios                       0x000000010cffde00 main + 112

    43  libdyld.dylib                       0x000000011373cc25 start + 1


    libc++abi.dylib: terminating with uncaught exception of type NSException


    2020-01-20
    有用
    回复 1
    • 张洋洋
      张洋洋
      2020-01-20
      我的错误信息。。
      2020-01-20
      回复
  • lj春
    lj春
    2019-11-15

    没人管了??

    2019-11-15
    有用
    回复
  • baci
    baci
    2019-11-12

    我也是这样的问题,请问楼主解决了吗?

    2019-11-12
    有用
    回复
  • Lz_Jie
    Lz_Jie
    2019-11-04

    我这边也遇到了这个问题,-all_load,-force_load都试过了都不行,楼主有解决办法了吗

    2019-11-04
    有用
    回复 2
    • 㠩㞷
      㠩㞷
      2019-11-05
      还没解决
      2019-11-05
      回复
    • 微信技术专员-aizen
      微信技术专员-aizen
      2019-11-05
      请贴一下crash的详细堆栈,另外请调用WXApi的getApiVersion打印出版本号,确认版本号是多少?
      2019-11-05
      回复
  • 疯狂的小辣椒
    疯狂的小辣椒
    2019-11-04

    请具体描述问题出现的流程。

    2019-11-04
    有用
    回复 4
    • 㠩㞷
      㠩㞷
      2019-11-04
      1.导入微信SDK
      2.注册微信APPID
      3.启动项目后调起微信支付
      4.程序崩溃  错误信息+[WXApi registerApp:]: unrecognized selector sent to class 0x1025eab88
      2019-11-04
      回复
    • 疯狂的小辣椒
      疯狂的小辣椒
      2019-11-04回复㠩㞷
      麻烦再复现一次,在手机微信那里上传下日志: 我->设置->帮助与反馈右上角有个上报日志的入口,麻烦提供一下微信号,时间点
      2019-11-04
      回复
    • 㠩㞷
      㠩㞷
      2019-11-04
      微信号:hr707090445 时间11月4日12:44
      2019-11-04
      回复
    • 㠩㞷
      㠩㞷
      2019-11-04
      我这边是APP调用微信支付,不是小程序
      2019-11-04
      回复
登录 后发表内容
问题标签