Skip to content

Commit e51dae8

Browse files
authored
Merge branch 'react:main' into fix/percentage-border-radius-view-managers
2 parents a443286 + 2660348 commit e51dae8

3 files changed

Lines changed: 30 additions & 29 deletions

File tree

‎packages/react-native/Libraries/Image/RCTImageStoreManager.mm‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,20 @@ - (void)storeImage:(UIImage *)image withBlock:(void (^)(NSString *imageTag))bloc
9595
});
9696
}
9797

98-
RCT_EXPORT_METHOD(removeImageForTag : (NSString *)imageTag)
98+
- (void)removeImageForTag:(NSString *)imageTag
9999
{
100100
[_store removeObjectForKey:imageTag];
101101
}
102102

103-
RCT_EXPORT_METHOD(hasImageForTag : (NSString *)imageTag callback : (RCTResponseSenderBlock)callback)
103+
- (void)hasImageForTag:(NSString *)imageTag callback:(RCTResponseSenderBlock)callback
104104
{
105105
callback(@[ @(_store[imageTag] != nil) ]);
106106
}
107107

108108
// TODO (#5906496): Name could be more explicit - something like getBase64EncodedDataForTag:?
109-
RCT_EXPORT_METHOD(
110-
getBase64ForTag : (NSString *)imageTag successCallback : (RCTResponseSenderBlock)
111-
successCallback errorCallback : (RCTResponseSenderBlock)errorCallback)
109+
- (void)getBase64ForTag:(NSString *)imageTag
110+
successCallback:(RCTResponseSenderBlock)successCallback
111+
errorCallback:(RCTResponseSenderBlock)errorCallback
112112
{
113113
NSData *imageData = _store[imageTag];
114114
if (imageData == nullptr) {
@@ -122,9 +122,9 @@ - (void)storeImage:(UIImage *)image withBlock:(void (^)(NSString *imageTag))bloc
122122
});
123123
}
124124

125-
RCT_EXPORT_METHOD(
126-
addImageFromBase64 : (NSString *)base64String successCallback : (RCTResponseSenderBlock)
127-
successCallback errorCallback : (RCTResponseSenderBlock)errorCallback)
125+
- (void)addImageFromBase64:(NSString *)base64String
126+
successCallback:(RCTResponseSenderBlock)successCallback
127+
errorCallback:(RCTResponseSenderBlock)errorCallback
128128

129129
{
130130
// Dispatching to a background thread to perform base64 decoding

‎packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm‎

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
305305
[self sendEventWithName:@"remoteNotificationRegistrationError" body:errorDetails];
306306
}
307307

308-
RCT_EXPORT_METHOD(onFinishRemoteNotification : (NSString *)notificationId fetchResult : (NSString *)fetchResult)
308+
- (void)onFinishRemoteNotification:(NSString *)notificationId fetchResult:(NSString *)fetchResult
309309
{
310310
UIBackgroundFetchResult result = [RCTConvert UIBackgroundFetchResult:fetchResult];
311311
RCTRemoteNotificationCallback completionHandler = self.remoteNotificationCallbacks[notificationId];
@@ -320,7 +320,7 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
320320
/**
321321
* Update the application icon badge number on the home screen
322322
*/
323-
RCT_EXPORT_METHOD(setApplicationIconBadgeNumber : (double)number)
323+
- (void)setApplicationIconBadgeNumber:(double)number
324324
{
325325
NSInteger badgeCount = (NSInteger)lround(number);
326326
if (@available(iOS 16.0, *)) {
@@ -339,14 +339,14 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
339339
/**
340340
* Get the current application icon badge number on the home screen
341341
*/
342-
RCT_EXPORT_METHOD(getApplicationIconBadgeNumber : (RCTResponseSenderBlock)callback)
342+
- (void)getApplicationIconBadgeNumber:(RCTResponseSenderBlock)callback
343343
{
344344
callback(@[ @(RCTSharedApplication().applicationIconBadgeNumber) ]);
345345
}
346346

347-
RCT_EXPORT_METHOD(
348-
requestPermissions : (JS::NativePushNotificationManagerIOS::SpecRequestPermissionsPermission &)
349-
permissions resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject)
347+
- (void)requestPermissions:(JS::NativePushNotificationManagerIOS::SpecRequestPermissionsPermission &)permissions
348+
resolve:(RCTPromiseResolveBlock)resolve
349+
reject:(RCTPromiseRejectBlock)reject
350350
{
351351
if (RCTRunningInAppExtension()) {
352352
reject(
@@ -389,12 +389,12 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
389389
}];
390390
}
391391

392-
RCT_EXPORT_METHOD(abandonPermissions)
392+
- (void)abandonPermissions
393393
{
394394
[RCTSharedApplication() unregisterForRemoteNotifications];
395395
}
396396

397-
RCT_EXPORT_METHOD(checkPermissions : (RCTResponseSenderBlock)callback)
397+
- (void)checkPermissions:(RCTResponseSenderBlock)callback
398398
{
399399
if (RCTRunningInAppExtension()) {
400400
callback(@[ RCTSettingsDictForUNNotificationSettings(NO, NO, NO, NO, NO, NO, UNAuthorizationStatusNotDetermined) ]);
@@ -444,7 +444,7 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
444444
};
445445
}
446446

447-
RCT_EXPORT_METHOD(presentLocalNotification : (JS::NativePushNotificationManagerIOS::Notification &)notification)
447+
- (void)presentLocalNotification:(JS::NativePushNotificationManagerIOS::Notification &)notification
448448
{
449449
NSDictionary<NSString *, id> *notificationDict = [RCTConvert NSDictionaryForNotification:notification];
450450
UNNotificationContent *content = [RCTConvert UNNotificationContent:notificationDict];
@@ -458,7 +458,7 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
458458
[center addNotificationRequest:request withCompletionHandler:nil];
459459
}
460460

461-
RCT_EXPORT_METHOD(scheduleLocalNotification : (JS::NativePushNotificationManagerIOS::Notification &)notification)
461+
- (void)scheduleLocalNotification:(JS::NativePushNotificationManagerIOS::Notification &)notification
462462
{
463463
NSDictionary<NSString *, id> *notificationDict = [RCTConvert NSDictionaryForNotification:notification];
464464
UNNotificationContent *content = [RCTConvert UNNotificationContent:notificationDict];
@@ -486,7 +486,7 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
486486
[center addNotificationRequest:request withCompletionHandler:nil];
487487
}
488488

489-
RCT_EXPORT_METHOD(cancelAllLocalNotifications)
489+
- (void)cancelAllLocalNotifications
490490
{
491491
[[UNUserNotificationCenter currentNotificationCenter]
492492
getPendingNotificationRequestsWithCompletionHandler:^(NSArray<UNNotificationRequest *> *requests) {
@@ -499,9 +499,10 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
499499
}];
500500
}
501501

502-
RCT_EXPORT_METHOD(cancelLocalNotifications : (NSDictionary<NSString *, id> *)userInfo)
502+
- (void)cancelLocalNotifications:(NSDictionary *)userInfoRaw
503503
{
504504
#if !TARGET_OS_TV
505+
NSDictionary<NSString *, id> *userInfo = [RCTConvert NSDictionary:userInfoRaw];
505506
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
506507
[center getPendingNotificationRequestsWithCompletionHandler:^(NSArray<UNNotificationRequest *> *_Nonnull requests) {
507508
NSMutableArray<NSString *> *notificationIdentifiersToCancel = [NSMutableArray new];
@@ -529,8 +530,7 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
529530
#endif
530531
}
531532

532-
RCT_EXPORT_METHOD(
533-
getInitialNotification : (RCTPromiseResolveBlock)resolve reject : (__unused RCTPromiseRejectBlock)reject)
533+
- (void)getInitialNotification:(RCTPromiseResolveBlock)resolve reject:(__unused RCTPromiseRejectBlock)reject
534534
{
535535
// The user actioned a local or remote notification to launch the app. Notification is represented by UNNotification.
536536
// Set this property in the implementation of
@@ -553,7 +553,7 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
553553
resolve((id)kCFNull);
554554
}
555555

556-
RCT_EXPORT_METHOD(getScheduledLocalNotifications : (RCTResponseSenderBlock)callback)
556+
- (void)getScheduledLocalNotifications:(RCTResponseSenderBlock)callback
557557
{
558558
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
559559
[center getPendingNotificationRequestsWithCompletionHandler:^(NSArray<UNNotificationRequest *> *_Nonnull requests) {
@@ -565,23 +565,24 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
565565
}];
566566
}
567567

568-
RCT_EXPORT_METHOD(removeAllDeliveredNotifications)
568+
- (void)removeAllDeliveredNotifications
569569
{
570570
#if !TARGET_OS_TV
571571
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
572572
[center removeAllDeliveredNotifications];
573573
#endif
574574
}
575575

576-
RCT_EXPORT_METHOD(removeDeliveredNotifications : (NSArray<NSString *> *)identifiers)
576+
- (void)removeDeliveredNotifications:(NSArray *)identifiersRaw
577577
{
578578
#if !TARGET_OS_TV
579+
NSArray<NSString *> *identifiers = [RCTConvert NSStringArray:identifiersRaw];
579580
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
580581
[center removeDeliveredNotificationsWithIdentifiers:identifiers];
581582
#endif
582583
}
583584

584-
RCT_EXPORT_METHOD(getDeliveredNotifications : (RCTResponseSenderBlock)callback)
585+
- (void)getDeliveredNotifications:(RCTResponseSenderBlock)callback
585586
{
586587
#if !TARGET_OS_TV
587588
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
@@ -598,7 +599,7 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
598599
#endif
599600
}
600601

601-
RCT_EXPORT_METHOD(getAuthorizationStatus : (RCTResponseSenderBlock)callback)
602+
- (void)getAuthorizationStatus:(RCTResponseSenderBlock)callback
602603
{
603604
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
604605
[center getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings *_Nonnull settings) {

‎packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public constructor(
141141

142142
@Deprecated(
143143
"Retained only for binary/source compatibility; the defaultSource prop is now delivered " +
144-
"through the Dynamic overload."
144+
"through the Dynamic overload.",
145145
)
146146
public fun setDefaultSource(view: ReactImageView, source: String?) {
147147
view.setDefaultSource(source)
@@ -155,7 +155,7 @@ public constructor(
155155

156156
@Deprecated(
157157
"Retained only for binary/source compatibility; the loadingIndicatorSrc prop is now " +
158-
"delivered through the Dynamic overload."
158+
"delivered through the Dynamic overload.",
159159
)
160160
public fun setLoadingIndicatorSource(view: ReactImageView, source: String?) {
161161
view.setLoadingIndicatorSource(source)

0 commit comments

Comments
 (0)