Skip to content

Commit

Permalink
Merge pull request noodlewerk#24 from DanielFontes/master
Browse files Browse the repository at this point in the history
Add support for WatchKit certificates
  • Loading branch information
Leonard van Driel authored Sep 19, 2016
2 parents bd5d2e8 + d0868e4 commit fc18d96
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Classes/NWSecTools.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ typedef NS_ENUM(NSInteger, NWCertType) {
kNWCertTypeWebProduction = 6,
/** VoIP Services. */
kNWCertTypeVoIPServices = 7,
/** WatchKit Services. */
kNWCertTypeWatchKitServices = 8,
/** Unknown. */
kNWCertTypeUnknown = 8,
kNWCertTypeUnknown = 9,
};


Expand Down Expand Up @@ -136,6 +138,7 @@ + (NWEnvironmentOptions)environmentOptionsForCertificate:(NWCertificateRef)certi
case kNWCertTypeSimplified:
case kNWCertTypeWebProduction:
case kNWCertTypeVoIPServices:
case kNWCertTypeWatchKitServices:
return NWEnvironmentOptionAny;
case kNWCertTypeNone:
case kNWCertTypeUnknown:
Expand All @@ -154,6 +157,7 @@ + (BOOL)isPushCertificate:(NWCertificateRef)certificate
case kNWCertTypeSimplified:
case kNWCertTypeWebProduction:
case kNWCertTypeVoIPServices:
case kNWCertTypeWatchKitServices:
return YES;
case kNWCertTypeNone:
case kNWCertTypeUnknown:
Expand All @@ -172,6 +176,7 @@ + (NSString *)prefixWithCertType:(NWCertType)type
case kNWCertTypeSimplified: return @"Apple Push Services: ";
case kNWCertTypeWebProduction: return @"Website Push ID: ";
case kNWCertTypeVoIPServices: return @"VoIP Services: ";
case kNWCertTypeWatchKitServices: return @"WatchKit Services: ";
case kNWCertTypeNone:
case kNWCertTypeUnknown:
break;
Expand Down Expand Up @@ -339,6 +344,7 @@ + (NWEnvironment)environmentForCertificate:(NWCertificateRef)certificate
case kNWCertTypeSimplified:
case kNWCertTypeWebProduction:
case kNWCertTypeVoIPServices:
case kNWCertTypeWatchKitServices:
case kNWCertTypeNone:
case kNWCertTypeUnknown:
break;
Expand Down

0 comments on commit fc18d96

Please sign in to comment.