ios - Stripe iOS SDK - 发送不兼容的块指针类型
问题描述
Stripe SDK 导致构建失败。具体错误是:
发送'__strong STPAPIResponseBlock _Nonnull'的不兼容块指针类型(又名'void(^__strong)(ResponseType _Nullable __strong,NSHTTPURLResponse * _Nullable __strong,NSError * _Nullable __strong)')
类型为“void (^ _Nonnull)(STPSource * _Nullable __strong, NSHTTPURLResponse * _Nullable __strong, NSError * _Nullable __strong)”的参数
它失败的代码是 STPAPIClient.m 中的以下代码......
- (NSURLSessionDataTask *)retrieveSourceWithId:(NSString *)identifier clientSecret:(NSString *)secret responseCompletion:(STPAPIResponseBlock)completion {
NSString *endpoint = [NSString stringWithFormat:@"%@/%@", APIEndpointSources, identifier];
NSDictionary *parameters = @{@"client_secret": secret};
return [STPAPIRequest<STPSource *> getWithAPIClient:self
endpoint:endpoint
parameters:parameters
deserializer:[STPSource new]
completion:completion];
}
一切正常 - 然后我相信 Xcode 更新了。现在我遇到了这个问题。我尝试从头开始构建一个新应用程序,除了 Stripe SDK(通过 CocoaPods 安装)之外什么都没有,但没有成功。
在我回滚到早期版本的 Xcode 之前 - 任何帮助将不胜感激。
解决方案
XCode 11.4 打破了 stripe pod v19.0 并在 v19.0.1 中得到修复
以升级 stripe pod,运行pod update Stripe
推荐阅读
- dockpanel-suite - DockPanel Suite - 将 DockContent 从一个 Dock 面板移动到另一个
- python - 根据现有列在 pandas 数据框中创建新列
- python - 如果对象的计数最大,则仅保留行
- python - Python 子进程、通信和多处理/多线程
- c# - 如何将方向盘旋转到 Unity3D 中的原始旋转?
- php - 具有来自多个表的数据的 PIVOT 表 mysql
- python - 如何在python中连接X点和Y点?
- r - Linear mixed model confidence intervals question
- c++ - 为什么继承会强制对其他大小为零的结构进行膨胀?
- r - 在 R 中为抛物线创建函数,但不向上平移