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

Commit 3ba181a

Browse files
committed
Merge pull request #332 from Microsoft/fix-ios7
Fix for iOS7
2 parents 3d96100 + b93e973 commit 3ba181a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

ios/CodePush/CodePushDownloadHandler.m

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@ -(void)download:(NSString*)url {
2727
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request
2828
delegate:self
2929
startImmediately:NO];
30-
NSOperationQueue *delegateQueue = [NSOperationQueue new];
31-
delegateQueue.underlyingQueue = self.operationQueue;
32-
[connection setDelegateQueue:delegateQueue];
30+
if ([NSOperationQueue instancesRespondToSelector:@selector(setUnderlyingQueue:)]) {
31+
NSOperationQueue *delegateQueue = [NSOperationQueue new];
32+
delegateQueue.underlyingQueue = self.operationQueue;
33+
[connection setDelegateQueue:delegateQueue];
34+
} else {
35+
[connection scheduleInRunLoop:[NSRunLoop mainRunLoop]
36+
forMode:NSDefaultRunLoopMode];
37+
}
38+
3339
[connection start];
3440
}
3541

ios/CodePush/CodePushTelemetryManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ + (NSString *)getVersionLabelFromStatusReportIdentifier:(NSString *)statusReport
114114

115115
+ (BOOL)isStatusReportIdentifierCodePushLabel:(NSString *)statusReportIdentifier
116116
{
117-
return statusReportIdentifier != nil && [statusReportIdentifier containsString:@":"];
117+
return statusReportIdentifier != nil && [statusReportIdentifier rangeOfString:@":"].location != NSNotFound;
118118
}
119119

120120
+ (void)recordDeploymentStatusReported:(NSString *)appVersionOrPackageIdentifier

0 commit comments

Comments
 (0)