This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
#import " CodePush.h"
2
+ #import < UIKit/UIKit.h>
2
3
3
4
@implementation CodePushDownloadHandler {
4
5
// Header chars used to determine if the file is a zip.
@@ -27,9 +28,15 @@ -(void)download:(NSString*)url {
27
28
NSURLConnection *connection = [[NSURLConnection alloc ] initWithRequest: request
28
29
delegate: self
29
30
startImmediately: NO ];
30
- NSOperationQueue *delegateQueue = [NSOperationQueue new ];
31
- delegateQueue.underlyingQueue = self.operationQueue ;
32
- [connection setDelegateQueue: delegateQueue];
31
+ if ([NSOperationQueue respondsToSelector: @selector (setUnderlyingQueue: )]) {
32
+ NSOperationQueue *delegateQueue = [NSOperationQueue new ];
33
+ delegateQueue.underlyingQueue = self.operationQueue ;
34
+ [connection setDelegateQueue: delegateQueue];
35
+ } else {
36
+ [connection scheduleInRunLoop: [NSRunLoop mainRunLoop ]
37
+ forMode: NSDefaultRunLoopMode ];
38
+ }
39
+
33
40
[connection start ];
34
41
}
35
42
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ + (NSString *)getVersionLabelFromStatusReportIdentifier:(NSString *)statusReport
114
114
115
115
+ (BOOL )isStatusReportIdentifierCodePushLabel : (NSString *)statusReportIdentifier
116
116
{
117
- return statusReportIdentifier != nil && [statusReportIdentifier containsString :@" :" ];
117
+ return statusReportIdentifier != nil && [statusReportIdentifier rangeOfString :@" :" ]. location != NSNotFound ;
118
118
}
119
119
120
120
+ (void )recordDeploymentStatusReported : (NSString *)appVersionOrPackageIdentifier
You can’t perform that action at this time.
0 commit comments