Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit a975d13

Browse files
author
Felix Sammet
committed
fix(ios): update deprecated method call
1 parent d3a5e84 commit a975d13

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

ios/CodePush/CodePush.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
#import "RCTEventEmitter.h"
12
#import <Foundation/Foundation.h>
23

3-
@interface CodePush : NSObject
4+
@interface CodePush : RCTEventEmitter
45

56
+ (NSURL *)binaryBundleURL;
67
/*

ios/CodePush/CodePush.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,15 @@ - (void)dealloc
269269
[[NSNotificationCenter defaultCenter] removeObserver:self];
270270
}
271271

272-
- (void)dispatchDownloadProgressEvent
273-
{
274-
// Notify the script-side about the progress
275-
[self.bridge.eventDispatcher
276-
sendDeviceEventWithName:@"CodePushDownloadProgress"
277-
body:@{
278-
@"totalBytes":[NSNumber numberWithLongLong:_latestExpectedContentLength],
279-
@"receivedBytes":[NSNumber numberWithLongLong:_latestReceivedConentLength]
280-
}];
272+
- (void)dispatchDownloadProgressEvent {
273+
// Notify the script-side about the progress
274+
[self sendEventWithName:@"CodePushDownloadProgress"
275+
body:@{
276+
@"totalBytes" : [NSNumber
277+
numberWithLongLong:_latestExpectedContentLength],
278+
@"receivedBytes" : [NSNumber
279+
numberWithLongLong:_latestReceivedConentLength]
280+
}];
281281
}
282282

283283
/*

0 commit comments

Comments
 (0)