From e12b630dfbedb4dc3ca1cb12e1a191e434fefddf Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sat, 11 Dec 2021 07:29:30 +1100 Subject: [PATCH] [mac] Attempt to fix 10.14 compilation issue --- v2/internal/frontend/desktop/darwin/WailsContext.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v2/internal/frontend/desktop/darwin/WailsContext.m b/v2/internal/frontend/desktop/darwin/WailsContext.m index 3124c59a1..c98be86c0 100644 --- a/v2/internal/frontend/desktop/darwin/WailsContext.m +++ b/v2/internal/frontend/desktop/darwin/WailsContext.m @@ -497,16 +497,16 @@ filters = [filters stringByReplacingOccurrencesOfString:@"*." withString:@""]; filters = [filters stringByReplacingOccurrencesOfString:@" " withString:@""]; NSArray *filterList = [filters componentsSeparatedByString:@";"]; - if (@available(macOS 10.16, *)) { +#ifdef USE_NEW_FILTERS NSMutableArray *contentTypes = [[NSMutableArray new] autorelease]; for (NSString *filter in filterList) { UTType *t = [UTType typeWithFilenameExtension:filter]; [contentTypes addObject:t]; } [dialog setAllowedContentTypes:contentTypes]; - } else { +#else [dialog setAllowedFileTypes:filterList]; - } +#endif } else { [dialog setAllowsOtherFileTypes:true]; }