"_OBJC_CLASS_$_PayReq", referenced from:

最近集成微信支付,但是一打开以下代码就报错:

     PayReq *request = [[PayReq alloc] init];
     request.partnerId = weakself.weiXinPayModel.partnerid;
     request.prepayId= weakself.weiXinPayModel.prepayid;
     request.package = weakself.weiXinPayModel.packages;
     request.nonceStr= weakself.weiXinPayModel.noncestr;
     request.timeStamp= [weakself.weiXinPayModel.timestamp intValue];
     request.sign= weakself.weiXinPayModel.sign;
     [WXApi sendReq:request];

报错的原因是:

"_OBJC_CLASS_$_PayReq", referenced from:

猜想是之前集成友盟分享时候,含有微信分享,然后现在手动拖入微信支付文件,导致冲突,解决办法在网上搜索了一下:
果然好使!

  1. 拷贝项目中pod下Wechat文件夹下的libSocialWeChat.a;

  2. 然后把pod下微信的整个文件夹删除掉move to trash;

3.show in finder 将拷贝的libSocialWeChat.a放到新拖进文件的父文件夹下。 编译即可。

你可能感兴趣的:("_OBJC_CLASS_$_PayReq", referenced from:)