Skip to content

Deprecation warnings when compiling #256

@luckman212

Description

@luckman212

With the syncthing 2.0.0 release here at last, I wanted to mention a few compiler warnings that are appearing when building the macOS wrapper. These are produced on a macOS 15.6 system with Xcode 16.4.16F6.

These are very old deprecations (from macOS 10.11 circa 2015!)

No idea if or when they will stop working (macOS 26?) but they should be fixed at some point.

13 warnings in STLoginItem.m

STLoginItem.m:19:35: warning: 'LSSharedFileListCreate' is deprecated: first deprecated in macOS 10.11 - No longer supported
      [-Wdeprecated-declarations]
   19 |         LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
      |                                          ^
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:368:1: note:
      'LSSharedFileListCreate' has been explicitly marked deprecated here
  368 | LSSharedFileListCreate(
      | ^

STLoginItem.m:19:64: warning: 'kLSSharedFileListSessionLoginItems' is deprecated: first deprecated in macOS 10.11
      [-Wdeprecated-declarations]
   19 |         LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
      |                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                       Use a LaunchAgent, XPCService or the ServiceManagement APIs instead.
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:129:20: note:
      'kLSSharedFileListSessionLoginItems' has been explicitly marked deprecated here
  129 | extern CFStringRef kLSSharedFileListSessionLoginItems                API_DEPRECATED_WITH_REPLACEMENT("Use a LaunchAgent, XPCService or the ServiceManagement APIs instead.", macos(10.5, 10.11)) API...
      |                    ^

STLoginItem.m:22:34: warning: 'LSSharedFileListInsertItemURL' is deprecated: first deprecated in macOS 10.11 - No longer supported
      [-Wdeprecated-declarations]
   22 |                 LSSharedFileListItemRef item = LSSharedFileListInsertItemURL(loginItems,
      |                                                ^
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:683:1: note:
      'LSSharedFileListInsertItemURL' has been explicitly marked deprecated here
  683 | LSSharedFileListInsertItemURL(
      | ^

STLoginItem.m:23:70: warning: 'kLSSharedFileListItemLast' is deprecated: first deprecated in macOS 10.11 - No longer supported
      [-Wdeprecated-declarations]
   23 |                                                                      kLSSharedFileListItemLast, NULL, NULL,
      |                                                                      ^
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:237:32: note:
      'kLSSharedFileListItemLast' has been explicitly marked deprecated here
  237 | extern LSSharedFileListItemRef kLSSharedFileListItemLast             API_DEPRECATED("No longer supported", macos(10.5, 10.11)) API_UNAVAILABLE(ios, tvos, watchos);
      |                                ^

STLoginItem.m:36:35: warning: 'LSSharedFileListCreate' is deprecated: first deprecated in macOS 10.11 - No longer supported
      [-Wdeprecated-declarations]
   36 |         LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
      |                                          ^
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:368:1: note:
      'LSSharedFileListCreate' has been explicitly marked deprecated here
  368 | LSSharedFileListCreate(
      | ^

STLoginItem.m:36:64: warning: 'kLSSharedFileListSessionLoginItems' is deprecated: first deprecated in macOS 10.11
      [-Wdeprecated-declarations]
   36 |         LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
      |                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                       Use a LaunchAgent, XPCService or the ServiceManagement APIs instead.
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:129:20: note:
      'kLSSharedFileListSessionLoginItems' has been explicitly marked deprecated here
  129 | extern CFStringRef kLSSharedFileListSessionLoginItems                API_DEPRECATED_WITH_REPLACEMENT("Use a LaunchAgent, XPCService or the ServiceManagement APIs instead.", macos(10.5, 10.11)) API...
      |                    ^

STLoginItem.m:45:38: warning: 'LSSharedFileListCopySnapshot' is deprecated: first deprecated in macOS 10.11 - No longer supported
      [-Wdeprecated-declarations]
   45 |         CFArrayRef loginItemsArray = LSSharedFileListCopySnapshot(loginItems, &seedValue);
      |                                      ^
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:626:1: note:
      'LSSharedFileListCopySnapshot' has been explicitly marked deprecated here
  626 | LSSharedFileListCopySnapshot(
      | ^

STLoginItem.m:50:19: warning: 'LSSharedFileListItemCopyResolvedURL' is deprecated: first deprecated in macOS 10.11 - No longer
      supported [-Wdeprecated-declarations]
   50 |             url = LSSharedFileListItemCopyResolvedURL(itemRef, 0, &err);
      |                   ^
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:993:1: note:
      'LSSharedFileListItemCopyResolvedURL' has been explicitly marked deprecated here
  993 | LSSharedFileListItemCopyResolvedURL(
      | ^

STLoginItem.m:69:35: warning: 'LSSharedFileListCreate' is deprecated: first deprecated in macOS 10.11 - No longer supported
      [-Wdeprecated-declarations]
   69 |         LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
      |                                          ^
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:368:1: note:
      'LSSharedFileListCreate' has been explicitly marked deprecated here
  368 | LSSharedFileListCreate(
      | ^

STLoginItem.m:69:64: warning: 'kLSSharedFileListSessionLoginItems' is deprecated: first deprecated in macOS 10.11
      [-Wdeprecated-declarations]
   69 |         LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
      |                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                       Use a LaunchAgent, XPCService or the ServiceManagement APIs instead.
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:129:20: note:
      'kLSSharedFileListSessionLoginItems' has been explicitly marked deprecated here
  129 | extern CFStringRef kLSSharedFileListSessionLoginItems                API_DEPRECATED_WITH_REPLACEMENT("Use a LaunchAgent, XPCService or the ServiceManagement APIs instead.", macos(10.5, 10.11)) API...
      |                    ^

STLoginItem.m:73:32: warning: 'LSSharedFileListCopySnapshot' is deprecated: first deprecated in macOS 10.11 - No longer supported
      [-Wdeprecated-declarations]
   73 |                 CFArrayRef loginItemsArray = LSSharedFileListCopySnapshot(loginItems, &seedValue);
      |                                              ^
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:626:1: note:
      'LSSharedFileListCopySnapshot' has been explicitly marked deprecated here
  626 | LSSharedFileListCopySnapshot(
      | ^

STLoginItem.m:77:19: warning: 'LSSharedFileListItemCopyResolvedURL' is deprecated: first deprecated in macOS 10.11 - No longer
      supported [-Wdeprecated-declarations]
   77 |             url = LSSharedFileListItemCopyResolvedURL(itemRef, 0, &err);
      |                   ^
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:993:1: note:
      'LSSharedFileListItemCopyResolvedURL' has been explicitly marked deprecated here
  993 | LSSharedFileListItemCopyResolvedURL(
      | ^

STLoginItem.m:81:6: warning: 'LSSharedFileListItemRemove' is deprecated: first deprecated in macOS 10.11 - No longer supported
      [-Wdeprecated-declarations]
   81 |                                         LSSharedFileListItemRemove(loginItems, itemRef);
      |                                         ^
In module 'Foundation' imported from STLoginItem.h:12:
In module 'CoreServices' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/SharedFileList.framework/Headers/LSSharedFileList.h:821:1: note:
      'LSSharedFileListItemRemove' has been explicitly marked deprecated here
  821 | LSSharedFileListItemRemove(
      | ^

1 warning in STApplication.m

STApplication.m:262:18: warning: 'setToolTip:' is deprecated: first deprecated in macOS 10.14 - Use the receiver's button.toolTip
      instead [-Wdeprecated-declarations]
  262 |     [_statusItem setToolTip:@""];
      |                  ^
In module 'Cocoa' imported from STApplication.h:9:
In module 'AppKit' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStatusItem.h:79:38: note:
      property 'toolTip' is declared deprecated here
   79 | @property (nullable, copy) NSString *toolTip API_DEPRECATED("Use the receiver's button.toolTip instead", macos(10.0,10.14));
      |                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStatusItem.h:79:38: note:
      'setToolTip:' has been explicitly marked deprecated here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions