极光的坑太多了
IOS底下,setup的时候报错:
NSInvalidArgumentException', reason: '+[JCOREService apiRecord:methodName:]: unrecognized selector sent to class
flutter: | JPUSH | Flutter | applyPushAuthority:
+[JCOREService apiRecord:methodName:]: unrecognized selector sent to class 0x1052f0060
flutter: | JPUSH | Flutter | addEventHandler:
解决:
这个是缺少库引起,需要把JPush升级到最新的库,3.2.0。
点开ios目录下.symlinks/plugins,打开jpush_flutter/ios/jpush_flutter.podspec文件,修改如下两行:
我的jpush_flutter.podspec:
s.version = '0.0.1'
s.dependency 'JCore','3.2.0'
s.dependency 'JPush','4.4.0'
jverify_podspec:
s.name = 'jverify'
s.version = '0.0.1'
s.dependency 'JCore', '3.2.0'
s.dependency 'JVerification', '2.7.9'
pubspec.yaml:
jpush_flutter: ^2.2.9 #极光推送
jverify: ^2.2.5 #极光验证
另外一个也是经常遇到的问题:Jpush,Jverify的版本冲突问题,记录下
https://blog.csdn.net/weixin_29003023/article/details/120298366