-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSX Mojave warnings... #75
Comments
I'm getting the following warnings
|
I am getting the same warnings as @raunaqrox.
EDIT: I will add that I am using the latest master 26d5b92 |
@artheus Could you show your code, I had similar issue but that was due to me using nil values when onReady was not done. For reference I'm using systray here https://github.com/promignis/cwitch. |
We are getting the same issues as @raunaqrox where I was able to get it to work on Mojave by forking, and commenting out lines |
I may have solved this with the following wrapper code to replace lines
I will be submit a pull request with this code. |
I was getting this error building on Mac OS X 10.12: $ pwd <$GOPATH>/src/github.com/getlantern/systray/example $ go run . # github.com/getlantern/systray systray_darwin.m:132:22: error: use of undeclared identifier 'NSControlStateValueOn' systray_darwin.m:134:22: error: use of undeclared identifier 'NSControlStateValueOff' The `NSControlStateValueOn` and `NSControlStateValueOff` were not defined because Mac OS versions prior to 10.14 don't define `__MAC_10_14`. From `/usr/include/Availability.h`: > It is also possible to use the *_VERSION_MIN_REQUIRED in source code to make one > source base that can be compiled to target a range of OS versions. It is best > to not use the _MAC_* and __IPHONE_* macros for comparisons, but rather their values. > That is because you might get compiled on an old OS that does not define a later > OS version macro, and in the C preprocessor undefined values evaluate to zero > in expresssions, which could cause the #if expression to evaluate in an unexpected > way. > > #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED > // code only compiled when targeting Mac OS X and not iPhone > // note use of 1050 instead of __MAC_10_5 > #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1050 > // code in here might run on pre-Leopard OS > #else > // code here can assume Leopard or later > #endif > #endif See getlantern#75, getlantern#92.
I was getting this error building on Mac OS X 10.12: $ pwd <$GOPATH>/src/github.com/getlantern/systray/example $ go run . # github.com/getlantern/systray systray_darwin.m:132:22: error: use of undeclared identifier 'NSControlStateValueOn' systray_darwin.m:134:22: error: use of undeclared identifier 'NSControlStateValueOff' The `NSControlStateValueOn` and `NSControlStateValueOff` were not defined because Mac OS versions prior to 10.14 don't define `__MAC_10_14`. From `/usr/include/Availability.h`: > It is also possible to use the *_VERSION_MIN_REQUIRED in source code to make one > source base that can be compiled to target a range of OS versions. It is best > to not use the _MAC_* and __IPHONE_* macros for comparisons, but rather their values. > That is because you might get compiled on an old OS that does not define a later > OS version macro, and in the C preprocessor undefined values evaluate to zero > in expresssions, which could cause the #if expression to evaluate in an unexpected > way. > > #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED > // code only compiled when targeting Mac OS X and not iPhone > // note use of 1050 instead of __MAC_10_5 > #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1050 > // code in here might run on pre-Leopard OS > #else > // code here can assume Leopard or later > #endif > #endif See getlantern#75, getlantern#92.
Upgraded my laptop to Mojave and I am getting the following warnings:
vendor/github.com/getlantern/systray
systray_darwin.m:67:15: warning: 'setImage:' is deprecated: first deprecated in macOS 10.14 - Use the receiver's button.image instead [-Wdeprecated-declarations]
/System/Library/Frameworks/AppKit.framework/Headers/NSStatusItem.h:85:39: note: property 'image' is declared deprecated here
/System/Library/Frameworks/AppKit.framework/Headers/NSStatusItem.h:85:39: note: 'setImage:' has been explicitly marked deprecated here
systray_darwin.m:71:15: warning: 'setTitle:' is deprecated: first deprecated in macOS 10.14 - Use the receiver's button.title instead [-Wdeprecated-declarations]
/System/Library/Frameworks/AppKit.framework/Headers/NSStatusItem.h:83:38: note: property 'title' is declared deprecated here
/System/Library/Frameworks/AppKit.framework/Headers/NSStatusItem.h:83:38: note: 'setTitle:' has been explicitly marked deprecated here
systray_darwin.m:75:15: warning: 'setToolTip:' is deprecated: first deprecated in macOS 10.14 - Use the receiver's button.toolTip instead [-Wdeprecated-declarations]
/System/Library/Frameworks/AppKit.framework/Headers/NSStatusItem.h:89:38: note: property 'toolTip' is declared deprecated here
/System/Library/Frameworks/AppKit.framework/Headers/NSStatusItem.h:89:38: note: 'setToolTip:' has been explicitly marked deprecated here
systray_darwin.m:105:24: warning: 'NSOnState' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
/System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:80:34: note: 'NSOnState' has been explicitly marked deprecated here
systray_darwin.m:107:24: warning: 'NSOffState' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
/System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:79:34: note: 'NSOffState' has been explicitly marked deprecated here
The text was updated successfully, but these errors were encountered: