amirrajan / rubymotion-applied

RubyMotion documentation provided by the community. Submit a pull request to the docs for a free one year indie subscription.
Apache License 2.0
49 stars 9 forks source link

Incorrect value for NSAppKitVersionNumber on macOS High Sierra... #59

Closed digitalmoksha closed 6 years ago

digitalmoksha commented 6 years ago

You can use NSAppKitVersionNumber to get the version of the AppKit you're running on (macOS), as well as compare it against constants for various appkit versions, such as NSAppKitVersionNumber10_12_2

On macOS 10.13.0, NSAppKitVersionNumber should equal 1561.0 - this is what is shown when running a sample app built with XCode.

RM 5.3 and 5.4 show NSAppKitVersionNumber as 577.0, which is equal to NSAppKitVersionNumber10_0, OS X 10.0

Here is a screen shot of printing those values with RM:

screen shot 2017-11-06 at 1 34 13 pm

I have a sample project showing the issue, for both RM and XCode/Cocoa. https://github.com/digitalmoksha/rm_osx_test

amirrajan commented 6 years ago

Making an update to BridgeSupport to explicitly wire up this constant correctly (it's a rare API collision).

I'll make sure that both 10.12 and 10.13 work using your sample project and get a release out.

digitalmoksha commented 6 years ago

ah cool, thank you...

amirrajan commented 6 years ago

Building now, expect a release tonight (November 8th).

Edit: November 9th. Running full regression first (messaged you on Slack).

digitalmoksha commented 6 years ago

Fixed in RM 5.5. I verified the correct value is generated on 10.13, 10.12, and 10.11. Thanks Amir!