gpt4 book ai didi

ios - 应用程序继续崩溃 [FBLPromise HTTPBody] 无法识别的选择器发送到实例

转载 作者:行者123 更新时间:2023-12-04 01:02:55 46 4
gpt4 key购买 nike

我已将 Firebase 与我的 iOS 项目以及此处提到的所有必要步骤集成 https://firebase.google.com/docs/cloud-messaging/ios/client但它继续在这条线上崩溃 [FIRApp configure] , 内部 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions这是我得到的错误
由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[FBLPromise HTTPBody]:发送到实例的无法识别的选择器

最佳答案

愚蠢但有效

//   GlobalImport.pch
#ifndef GlobalImport_pch
#define GlobalImport_pch
#import "FBLPromise+Extension.h"
#endif
//  FBLPromise+Extension.h
#if __has_include(<FBLPromises/FBLPromises.h>)
#import <FBLPromises/FBLPromises.h>
#else
#import "FBLPromises.h"
#endif

@interface FBLPromise (Extension)

@property(nonatomic, readonly) NSHTTPURLResponse *HTTPResponse;
@property(nonatomic, readonly) NSData *HTTPBody;

- (instancetype)initWithResponse:(NSHTTPURLResponse *)response HTTPBody:(NSData *)body;

@end
//  FBLPromise+Extension.m
#import "FBLPromise+Extension.h"

@implementation FBLPromise (Extension)
+ (NSData *)HTTPBody {
return nil;
}

- (NSData *)HTTPBody {
return nil;
}

+ (void)setHTTPBody:(NSData *)data {
}

- (void)setHTTPBody:(NSData *)data {
}

+ (NSHTTPURLResponse *)HTTPResponse {
return nil;
}

- (NSHTTPURLResponse *)HTTPResponse {
return nil;
}

+ (void)setHTTPResponse:(NSHTTPURLResponse *)data {
}

- (void)setHTTPResponse:(NSHTTPURLResponse *)data {
}

+ (instancetype)initWithResponse:(NSHTTPURLResponse *)response HTTPBody:(nullable NSData *)body {
return nil;
}

- (instancetype)initWithResponse:(NSHTTPURLResponse *)response HTTPBody:(nullable NSData *)body {
return nil;
}
@end

关于ios - 应用程序继续崩溃 [FBLPromise HTTPBody] 无法识别的选择器发送到实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67602772/

46 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com