Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React本机Firebase推送通知IOS仅工作我的帐户电话Plz帮助;(_Firebase_React Native_Push Notification_Firebase Cloud Messaging_Apple Push Notifications - Fatal编程技术网

React本机Firebase推送通知IOS仅工作我的帐户电话Plz帮助;(

React本机Firebase推送通知IOS仅工作我的帐户电话Plz帮助;(,firebase,react-native,push-notification,firebase-cloud-messaging,apple-push-notifications,Firebase,React Native,Push Notification,Firebase Cloud Messaging,Apple Push Notifications,我尝试在android和IOS上使用firebase推送通知 它可以在安卓系统上运行,但在IOS上无法运行 我尝试在IOS上测试cloud消息,但当我尝试将appstore应用程序的消息云化时 它不起作用 我该怎么办 这是我的RN和lib版本 Xcode版本12.1(12A7403) “本机反应”:“^0.63.2”, “反应本机推送通知”:“^6.1.2”, “@react本机社区/推送通知ios”:“^1.7.1” 证书 添加苹果推送服务 标识符 推送通知-推送服务添加 钥匙 已启用的服务添

我尝试在android和IOS上使用firebase推送通知 它可以在安卓系统上运行,但在IOS上无法运行 我尝试在IOS上测试cloud消息,但当我尝试将appstore应用程序的消息云化时 它不起作用 我该怎么办

这是我的RN和lib版本

Xcode版本12.1(12A7403) “本机反应”:“^0.63.2”, “反应本机推送通知”:“^6.1.2”, “@react本机社区/推送通知ios”:“^1.7.1”

证书 添加苹果推送服务

标识符 推送通知-推送服务添加

钥匙 已启用的服务添加 轮廓 已启用的功能-推送通知添加

这是我的Xcode AppDelegate.m源代码

#导入“AppDelegate.h”
#进口
#进口
#进口
#进口
#进口
#进口
#进口
#进口
#ifdef FB_声纳套件已启用
#进口
#进口
#进口
#进口
#进口
#进口
#进口
#进口
#进口
#进口。
静态无效初始化EFLIPPER(UIApplication*应用程序){
FlipperClient*客户端=[FlipperClient sharedClient];
SKDescriptorMapper*layoutDescriptorMapper=[[SKDescriptorMapper alloc]initWithDefaults];
[客户端添加插件:[[FlipperKitLayoutPlugin alloc]initWithRootNode:应用程序withDescriptorMapper:layoutDescriptorMapper];
[客户端添加插件:[[FKUserDefaultsPlugin alloc]initWithSuiteName:nil];
[客户端添加插件:[FlipperKitReactPlugin new]];
[客户端添加插件:[[FlipperKitNetworkPlugin alloc]initWithNetworkAdapter:[SKIOSNetworkAdapter new]];
[客户端启动];
}
#恩迪夫
@实现AppDelegate
-(BOOL)应用程序:(UIApplication*)应用程序使用选项完成启动:(NSDictionary*)启动选项
//[本机寄存器];
//[AppCenterReactNativeAnalytics注册表初始启用:true];
//[AppCenterReactNativeCrashes注册表,具有自动处理功能];
//代码推送IOS
{
如果([FIRApp defaultApp]==nil){
[FIRApp配置];
}
[[FBSDKApplicationDelegate sharedInstance]应用程序:应用程序
didFinishLaunchingWithOptions:launchOptions];
//如果([FIRApp defaultApp]==nil){
//[FIRApp配置];
////[RNFirebaseNotifications配置];
//  }
如果([UNUserNotificationCenter类]!=nil){
//iOS 10或更高版本
//对于iOS 10显示通知(通过APNS发送)
[UnuseNotificationCenter currentNotificationCenter]。委托=自身;
未授权选项authOptions=未授权选项ERT|
未授权选项声音|未授权选项徽章;
[[UNUserNotificationCenter currentNotificationCenter]
requestAuthorizationWithOptions:authOptions
completionHandler:^(BOOL已授予,n错误*\u可为空错误){
// ...
}];
}否则{
//iOS 10通知不可用;请退回到iOS 8-9通知。
UIUserNotificationType所有NotificationType=
(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);
UIUserNotificationSettings*设置=
[UIUserNotificationSettings设置类型:allNotificationTypes类别:nil];
[应用程序注册表通知设置:设置];
}
[申请登记处证明];
[FIRMessaging messaging].delegate=self;
[[FIRMessaging messaging]完成标记:^(NSString*标记,NSError*错误){
如果(错误!=nil){
NSLog(@“获取FCM注册令牌时出错:%@”,错误);
}否则{
NSLog(@“FCM注册令牌:%@”,令牌);
self.fcmRegTokenMessage.text=令牌;
}
}];
#如果调试
#恩迪夫
[GMSServices provideAPIKey:@“AIzaSyBJao2sARSCYwF74BCqwRf3hexsP8Pkzj0”];//使用从Google控制台获得的api密钥添加此行
#ifdef FB_声纳套件已启用
初始化Lipper(应用程序);
#恩迪夫
RCTBridge*bridge=[[RCTBridge alloc]initWithDelegate:self-launchOptions:launchOptions];
RCTRootView*rootView=[[RCTRootView alloc]初始化WithBridge:bridge
模块名称:@“sikju_remaster”
初始属性:nil];
rootView.backgroundColor=[[UIColor alloc]initWithRed:1.0f绿色:1.0f蓝色:1.0f alpha:1];
self.window=[[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
UIViewController*rootViewController=[UIViewController新建];
rootViewController.view=rootView;
self.window.rootViewController=rootViewController;
[self.window makeKeyAndVisible];
//通知
UNUserNotificationCenter*中心=[UNUserNotificationCenter currentNotificationCenter];
center.delegate=self;
返回YES;
}
-(void)用户通知中心:(UNUserNotificationCenter*)中心
遗嘱提示通知:(未通知*)通知
withCompletionHandler:
(无效(^)(未通知提示选项))
完成处理程序{
完成处理程序(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionBadge | UnnotificationPresentationOptionErt);
}
#如果调试
-(void)应用程序:(UIApplication*)应用程序didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings
{
[RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];
}
//注册事件所需。
-(无效)应用程序:(UIApplication*)应用程序DIdRegisterForRemotionTificationswithDeviceToken:(NSData*)deviceToken
{
[RNCPushNotificationIOS DID注册器用于与deviceToken进行删除通知:deviceToken];
}
//通知事件必需。处理远程通知后必须调用完成处理程序。
-(无效)应用程序:(UIApplication*)应用程序DidReceiveMemotentification:(NSDictionary*)用户信息
fetchCompletionHandler:(void(^)(UIBackgroundFetchResult))completionHandler
{
[RNCPushNotificationIOS DidReceiveMemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}
//registrationError事件所需。
-(无效)应用程序:(UIApplication*)应用程序未能注册RemoteNoti