FlutterTaoBaoKe / flutter_alibc

flutter版本的阿里百川插件
MIT License
125 stars 47 forks source link

iOS初始化失败 #11

Closed epoll-j closed 4 years ago

epoll-j commented 4 years ago

项目工程已经按照阿里百川的官方文档设置了,但是在调用初始化的时候会出错,我也对比过我项目跟example里面的区别,基本是一样的

try {
      // var waite3s = await FlutterAlibc.openItemDetail(itemID: "12345");
      var result = await FlutterAlibc.initAlibc();
      print(result);
    } on Exception {}

错误信息:

2019-09-24 16:44:24.518494+0800 Runner[86591:723092] flutter: Observatory listening on http://127.0.0.1:61585/orcrsEwozhE=/
2019-09-24 16:44:25.291545+0800 Runner[86591:722486] [ALi]20190924[debug]-+[AlibcMtopBridge initialize]-AlibcMtopAdapter 实例获取失败
2019-09-24 16:44:25.292726+0800 Runner[86591:722486] [ALi]20190924[info]-+[AlibcTradeCommonSDK setEnv:]-2d
2019-09-24 16:44:25.293574+0800 Runner[86591:722486] [ALi]20190924[debug]-+[AlibcSecurityGuardBridge initialize]-AlibcSecurityAdapter 实例获取失败
2019-09-24 16:44:25.293907+0800 Runner[86591:722486] [ALi]20190924[info]--[AlibcTradeSDK asyncInitWithSuccess:failure:]-
2019-09-24 16:44:25.294537+0800 Runner[86591:723063] +[AlibcTradeCommonSDK alibc_initMonitor]: unrecognized selector sent to class 0x10327e0b8
2019-09-24 16:44:25.301192+0800 Runner[86591:723063] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[AlibcTradeCommonSDK alibc_initMonitor]: unrecognized selector sent to class 0x10327e0b8'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff23b98bde __exceptionPreprocess + 350
    1   libobjc.A.dylib                     0x00007fff503b5b20 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff23bb9604 +[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x00007fff23b9d7bc ___forwarding___ + 1436
    4   CoreFoundation                      0x00007fff23b9f6c8 _CF_forwarding_prep_0 + 120
    5   flutter_alibc                       0x0000000103181af9 +[AlibcTradeCommonSDK asyncInitWithSuccess:failure:] + 68
    6   flutter_alibc                       0x000000010319b681 +[AlibcTradeBizSDK asyncInitWithSuccess:failure:] + 199
    7   flutter_alibc                       0x00000001031a0879 __46-[AlibcTradeSDK asyncInitWithSuccess:failure:]_block_invoke.21 + 181
    8   libdispatch.dylib                   0x0000000103da7df0 _dispatch_call_block_and_release + 12
    9   libdispatch.dylib                   0x0000000103da8d64 _dispatch_client_callout + 8
    10  libdispatch.dylib                   0x0000000103dab20b _dispatch_queue_override_invoke + 1022
    11  libdispatch.dylib                   0x0000000103dba29a _dispatch_root_queue_drain + 351
    12  libdispatch.dylib                   0x0000000103dbaba4 _dispatch_worker_thread2 + 132
    13  libsystem_pthread.dylib             0x00007fff5141c6b3 _pthread_wqthread + 583
    14  libsystem_pthread.dylib             0x00007fff5141c3fd start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
epoll-j commented 4 years ago

系统版本是iOS13,example里面的项目是可以正常运行的

epoll-j commented 4 years ago

项目创建的是swift的,把swift换成oc就可以正常运行

zhaowenjian commented 4 years ago

@dubhe-jk 怎么把已有项目切成 oc 呢 ,,