leon 1 yıl önce
ebeveyn
işleme
4b600ddc00

+ 0 - 1
ios/AppDelegate.mm

@@ -44,7 +44,6 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
   // APNS
   //  BOOL isLocation = [CLLocationManager locationServicesEnabled];
   UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
-  [center removeAllPendingNotificationRequests];
   self.rnLoaded = NO;
   NSDate *date = [NSDate date];
   //zone为当前时区信息  在我的程序中打印的是@"Asia/Shanghai"

+ 0 - 15
ios/NativeBridge.m

@@ -149,21 +149,6 @@ RCT_EXPORT_METHOD(clearNotification){
   });
 }
 
-RCT_EXPORT_METHOD(addSunPushzzz:(id)array){
-  dispatch_async(dispatch_get_main_queue(), ^{
-    UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
-    //    [center removeAllPendingNotificationRequests];
-    [center getPendingNotificationRequestsWithCompletionHandler:^(NSArray<UNNotificationRequest *> * _Nonnull requests) {
-      NSLog(@"%d",requests.count);
-    }];
-    //    [center removeAllPendingNotificationRequests];
-    [center removePendingNotificationRequestsWithIdentifiers:@[
-      @"REMINDER_SUN_RISE",
-      @"REMINDER_SUN_SET",
-      @"REMINDER_SUN_SOLAR_NOON"
-    ]];
-  });
-}
 
 RCT_EXPORT_METHOD(addSunPush:(id)array){
   dispatch_async(dispatch_get_main_queue(), ^{

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
ios/main.jsbundle


+ 4 - 0
src/features/daynight/DayNightSwiper.tsx

@@ -134,7 +134,11 @@ export default function DayNightSwiper(props: { count: number, schedule: any, ho
         }
         if (process.env.TARO_ENV == 'rn') {
             var Jto = require('react-native').NativeModules.NativeBridge;
+            if (list.length==0){
+                return
+            }
             if (kIsIOS) {
+                
                 Jto.addSunPush(list)
             }
             else {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor