Merge pull request #500 from NewStore/fix-deprecated-Event-calls

Update deprecated iOS sendEvent method calls
This commit is contained in:
Geoffrey Goh
2016-09-06 11:11:41 -07:00
committed by GitHub
2 changed files with 11 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
#import "RCTEventEmitter.h"
#import <Foundation/Foundation.h>
@interface CodePush : NSObject
@interface CodePush : RCTEventEmitter
+ (NSURL *)binaryBundleURL;
/*

View File

@@ -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]
}];
}
/*