简体   繁体   English

应用程序不断崩溃 [FBLPromise HTTPBody] 无法识别的选择器发送到实例

[英]App is keep on Crashing [FBLPromise HTTPBody] unrecognized selector sent to instance

I've integrated Firebase with my iOS project and all necessary steps mentioned here https://firebase.google.com/docs/cloud-messaging/ios/client but its keep on crashing on this line [FIRApp configure] , inside - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions我已经将 Firebase 与我的 iOS 项目以及此处提到的所有必要步骤https://firebase.google.com/docs/docs/cloud-messaging/ios/client [FIRApp configure] - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions所有必要步骤集成在了- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

this is the error I'm getting Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBLPromise HTTPBody]: unrecognized selector sent to instance这是由于未捕获的异常“NSInvalidArgumentException”而导致应用程序终止的错误,原因:'-[FBLPromise HTTPBody]:无法识别的选择器已发送到实例

stupid but it works愚蠢但有效

//   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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 -[FBLPromise HTTPBody]:发送到实例的无法识别的选择器 - -[FBLPromise HTTPBody]: unrecognized selector sent to instance 应用程序因错误而崩溃:-[NSNull 长度]:无法识别的选择器发送到实例 - App crashing with error: -[NSNull length]: unrecognized selector sent to instance 调用sizeToFit时,ios应用崩溃,无法识别的选择器发送到实例 - ios app crashing with unrecognized selector sent to instance when sizeToFit is called 核心数据应用因“ controllerWillChangeContent:无法识别的选择器发送到实例”而崩溃 - Core Data app crashing with “controllerWillChangeContent : unrecognized selector sent to instance” 崩溃:_finishDecodingLayoutGuideConnections:]无法识别的选择器已发送到实例 - crashing: _finishDecodingLayoutGuideConnections:] unrecognized selector sent to instance 我的iPhone应用程序崩溃并显示[__NSCFDictionary stringByReplacingOccurrencesOfString:withString:]:无法识别的选择器已发送到实例 - My iPhone app is crashing and showing [__NSCFDictionary stringByReplacingOccurrencesOfString:withString:]: unrecognized selector sent to instance iOS应用程式因错误而当机:NSCFNumber stringByReplacingOccurrencesOfString:withString:无法识别的选择器已传送至执行个体 - iOS app crashing with error: NSCFNumber stringByReplacingOccurrencesOfString:withString: unrecognized selector sent to instance NSXMLParser应用终止“无法识别的选择器发送到实例” - NSXMLParser app terminating “unrecognized selector sent to instance” 无法识别的选择器已从App委托发送到实例 - Unrecognized Selector Sent to instance from App Delegate 应用程序崩溃,错误无法识别的选择器发送到实例 - App crashes with error unrecognized selector sent to instance
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM