mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-05-14 02:14:52 +08:00
Merge pull request #500 from NewStore/fix-deprecated-Event-calls
Update deprecated iOS sendEvent method calls
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#import "RCTEventEmitter.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface CodePush : NSObject
|
||||
@interface CodePush : RCTEventEmitter
|
||||
|
||||
+ (NSURL *)binaryBundleURL;
|
||||
/*
|
||||
|
||||
@@ -294,15 +294,15 @@ static NSString *bundleResourceSubdirectory = nil;
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)dispatchDownloadProgressEvent
|
||||
{
|
||||
// Notify the script-side about the progress
|
||||
[self.bridge.eventDispatcher
|
||||
sendDeviceEventWithName:@"CodePushDownloadProgress"
|
||||
body:@{
|
||||
@"totalBytes":[NSNumber numberWithLongLong:_latestExpectedContentLength],
|
||||
@"receivedBytes":[NSNumber numberWithLongLong:_latestReceivedConentLength]
|
||||
}];
|
||||
- (void)dispatchDownloadProgressEvent {
|
||||
// Notify the script-side about the progress
|
||||
[self sendEventWithName:@"CodePushDownloadProgress"
|
||||
body:@{
|
||||
@"totalBytes" : [NSNumber
|
||||
numberWithLongLong:_latestExpectedContentLength],
|
||||
@"receivedBytes" : [NSNumber
|
||||
numberWithLongLong:_latestReceivedConentLength]
|
||||
}];
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user