Revision: 16505
http://sourceforge.net/p/skim-app/code/16505
Author: hofman
Date: 2026-09-20 10:35:20 +0000 (Sun, 20 Sep 2026)
Log Message:
-----------
use @available only when developing for 10.13+
Modified Paths:
--------------
trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.m 2026-09-20 10:21:20 UTC
(rev 16504)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.m 2026-09-20 10:35:20 UTC
(rev 16505)
@@ -948,6 +948,7 @@
static char SKNStringKey;
- (NSString *)string {
+#if defined(PDFKIT_PLATFORM_IOS) || (defined(MAC_OS_X_VERSION_10_13) &&
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_13)
if (@available(macOS 27.0, iOS 27.0, *)) {
static NSSet *markupTypes = nil;
if (markupTypes == nil)
@@ -956,6 +957,7 @@
return objc_getAssociatedObject(self, &SKNStringKey);
}
}
+#endif
if ([[self type] isEqualToString:SKNWidgetString] == NO) {
return [self contents];
} else if ([self respondsToSelector:@selector(valueForAnnotationKey:)]) {
@@ -980,6 +982,7 @@
}
- (void)setString:(NSString *)string {
+#if defined(PDFKIT_PLATFORM_IOS) || (defined(MAC_OS_X_VERSION_10_13) &&
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_13)
if (@available(macOS 27.0, iOS 27.0, *)) {
static NSSet *markupTypes = nil;
if (markupTypes == nil)
@@ -989,6 +992,7 @@
return;
}
}
+#endif
if ([[self type] isEqualToString:SKNWidgetString] == NO) {
[self setContents:string];
} else if ([self
respondsToSelector:@selector(setValue:forAnnotationKey:)]) {
@@ -1414,16 +1418,20 @@
}
- (NSString *)string {
+#if defined(MAC_OS_X_VERSION_10_13) && MAC_OS_X_VERSION_MIN_REQUIRED >=
MAC_OS_X_VERSION_10_13
if (@available(macOS 27.0, iOS 27.0, *))
return objc_getAssociatedObject(self, &SKNStringKey);
else
+#endif
return [self contents];
}
- (void)setString:(NSString *)string {
+#if defined(MAC_OS_X_VERSION_10_13) && MAC_OS_X_VERSION_MIN_REQUIRED >=
MAC_OS_X_VERSION_10_13
if (@available(macOS 27.0, iOS 27.0, *))
objc_setAssociatedObject(self, &SKNStringKey, string,
OBJC_ASSOCIATION_RETAIN);
else
+#endif
[self setContents:string];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit