Skip to content

Commit

Permalink
Fix detection on macOS Catalina (#19)
Browse files Browse the repository at this point in the history
Fixes #16.
  • Loading branch information
saifulwebid authored Mar 18, 2023
1 parent d2860c0 commit c72bae3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#import <ApplicationServices/ApplicationServices.h>

NSString* app_name_from_bundle_id(NSString *app_bundle_id) {
return [[app_bundle_id componentsSeparatedByString:@"."] lastObject];
return [[[app_bundle_id componentsSeparatedByString:@"."] lastObject] lowercaseString];
}

NSMutableDictionary* get_http_handlers() {
Expand All @@ -20,7 +20,7 @@

for (int i = 0; i < [handlers count]; i++) {
NSString *handler = [handlers objectAtIndex:i];
dict[[app_name_from_bundle_id(handler) lowercaseString]] = handler;
dict[app_name_from_bundle_id(handler)] = handler;
}

return dict;
Expand Down

0 comments on commit c72bae3

Please sign in to comment.