diff --git a/Sparkle/SPUDownloader.h b/Sparkle/SPUDownloader.h index 6f7434d8..5eee9bd5 100755 --- a/Sparkle/SPUDownloader.h +++ b/Sparkle/SPUDownloader.h @@ -6,7 +6,11 @@ // Copyright © 2016 Sparkle Project. All rights reserved. // +#if __has_feature(modules) +@import Foundation; +#else #import +#endif #import "SPUDownloaderProtocol.h" @protocol SPUDownloaderDelegate; diff --git a/Sparkle/SPUDownloaderDelegate.h b/Sparkle/SPUDownloaderDelegate.h index 760db6c3..76e7e750 100755 --- a/Sparkle/SPUDownloaderDelegate.h +++ b/Sparkle/SPUDownloaderDelegate.h @@ -6,7 +6,11 @@ // Copyright © 2016 Sparkle Project. All rights reserved. // +#if __has_feature(modules) +@import Foundation; +#else #import +#endif NS_ASSUME_NONNULL_BEGIN diff --git a/Sparkle/SPUDownloaderProtocol.h b/Sparkle/SPUDownloaderProtocol.h index 36f41fd4..ebe477fe 100755 --- a/Sparkle/SPUDownloaderProtocol.h +++ b/Sparkle/SPUDownloaderProtocol.h @@ -6,7 +6,11 @@ // Copyright © 2016 Sparkle Project. All rights reserved. // +#if __has_feature(modules) +@import Foundation; +#else #import +#endif NS_ASSUME_NONNULL_BEGIN diff --git a/Sparkle/SPUDownloaderSession.h b/Sparkle/SPUDownloaderSession.h index 3ca1754e..4bde75aa 100644 --- a/Sparkle/SPUDownloaderSession.h +++ b/Sparkle/SPUDownloaderSession.h @@ -6,10 +6,15 @@ // Copyright © 2017 Sparkle Project. All rights reserved. // +#if __has_feature(modules) +@import Foundation; +#else #import +#endif #import "SPUDownloader.h" #import "SPUDownloaderProtocol.h" +NS_CLASS_AVAILABLE(NSURLSESSION_AVAILABLE, 7_0) @interface SPUDownloaderSession : SPUDownloader @end diff --git a/Sparkle/SPUURLRequest.h b/Sparkle/SPUURLRequest.h index 62a4a70b..69496147 100755 --- a/Sparkle/SPUURLRequest.h +++ b/Sparkle/SPUURLRequest.h @@ -6,7 +6,11 @@ // Copyright © 2016 Sparkle Project. All rights reserved. // +#if __has_feature(modules) +@import Foundation; +#else #import +#endif NS_ASSUME_NONNULL_BEGIN diff --git a/Sparkle/SUAppcast.m b/Sparkle/SUAppcast.m index 357c82a9..d63a023c 100644 --- a/Sparkle/SUAppcast.m +++ b/Sparkle/SUAppcast.m @@ -87,7 +87,10 @@ if ([SUOperatingSystem isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10, 9, 0}]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunguarded-availability" self.download = [[SPUDownloaderSession alloc] initWithDelegate:self]; +#pragma clang diagnostic pop } else { self.download = [[SPUDownloaderDeprecated alloc] initWithDelegate:self]; diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index e62721c7..9c8dac8c 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -284,7 +284,10 @@ } if ([SUOperatingSystem isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10, 9, 0}]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunguarded-availability" self.download = [[SPUDownloaderSession alloc] initWithDelegate:self]; +#pragma clang diagnostic pop } else { self.download = [[SPUDownloaderDeprecated alloc] initWithDelegate:self]; diff --git a/Sparkle/SUErrors.h b/Sparkle/SUErrors.h index 8557d7fb..7d2e73ae 100644 --- a/Sparkle/SUErrors.h +++ b/Sparkle/SUErrors.h @@ -21,6 +21,8 @@ */ SU_EXPORT extern NSString *const SUSparkleErrorDomain; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc++98-compat" typedef NS_ENUM(OSStatus, SUError) { // Appcast phase errors. SUAppcastParseError = 1000, @@ -49,5 +51,6 @@ typedef NS_ENUM(OSStatus, SUError) { // System phase errors SUSystemPowerOffError = 5000 }; +#pragma clang diagnostic pop #endif