【发布时间】:2020-07-05 13:57:20
【问题描述】:
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 并针对 iOS 13.4
-
仅供参考,您可以编辑问题以包含更多信息,而不是添加 cmets。
标签: ios stripe-payments