Skip to content

Commit

Permalink
[FIXED] Fixed casting to NSString of CFStringRef constants.
Browse files Browse the repository at this point in the history
In ARC we should cast `CFStringRefs` using `(__bridge NSString *)`. Otherwise, it would generate warning when using the `-Wcast-qual` compiler flag.
  • Loading branch information
Rad Azzouz committed Mar 28, 2016
1 parent 095446f commit f8863d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OnePasswordExtension.m
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ - (void)processExtensionItem:(nullable NSExtensionItem *)extensionItem completio
}

NSItemProvider *itemProvider = extensionItem.attachments.firstObject;
if (NO == [itemProvider hasItemConformingToTypeIdentifier:(NSString *)kUTTypePropertyList]) {
if (NO == [itemProvider hasItemConformingToTypeIdentifier:(__bridge NSString *)kUTTypePropertyList]) {
NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: @"Unexpected data returned by App Extension: extension item attachment does not conform to kUTTypePropertyList type identifier" };
NSError *error = [[NSError alloc] initWithDomain:AppExtensionErrorDomain code:AppExtensionErrorCodeUnexpectedData userInfo:userInfo];
if (completion) {
Expand All @@ -482,7 +482,7 @@ - (void)processExtensionItem:(nullable NSExtensionItem *)extensionItem completio
}


[itemProvider loadItemForTypeIdentifier:(NSString *)kUTTypePropertyList options:nil completionHandler:^(NSDictionary *itemDictionary, NSError *itemProviderError) {
[itemProvider loadItemForTypeIdentifier:(__bridge NSString *)kUTTypePropertyList options:nil completionHandler:^(NSDictionary *itemDictionary, NSError *itemProviderError) {
NSError *error = nil;
if (itemDictionary.count == 0) {
NSLog(@"Failed to loadItemForTypeIdentifier: %@", itemProviderError);
Expand Down

0 comments on commit f8863d1

Please sign in to comment.