Skip to content
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

make objc work on OSX 10.13 #5

Open
capr opened this issue Mar 29, 2018 · 10 comments
Open

make objc work on OSX 10.13 #5

capr opened this issue Mar 29, 2018 · 10 comments

Comments

@capr
Copy link
Member

capr commented Mar 29, 2018

LuaCocoa page says:

macOS 10.13 (High Sierra) introduced new bugs which broke their BridgeSupport format. They broke the format for compound structs (such as NSRect), nil terminated variadic methods & functions (e.g. NSArray arrayWithObjects), and removed the data in BridgeSupport which lists all the dependent libraries/frameworks for a given framework (which brnow will require you to explicitly LuaCocoa.import() all the frameworks you indirectly need).

I filed 3 bugs with Apple. If you depend on BridgeSupport for any of your projects, please file duplicates with Apple Radar and list these bug numbers in your bug reports. (Apple does count the number of bug reports and has influence over prioritization.)

5844688 10.13 broke BridgeSupport for compound struct definitions

35844763 10.13 broke BridgeSupport and compatibility with existing apps for variadic nil terminated methods/functions

35844832 10.13 broke BridgeSupport format for listing dependency framework information

@capr
Copy link
Member Author

capr commented Mar 29, 2018

PS: Don't bother googling for those bug id numbers... this hipster BS company keeps all bug reports private.

@stuta
Copy link

stuta commented Mar 30, 2018

Are there any Lua tools that use Swift instead of Objective-C?

@stuta
Copy link

stuta commented May 5, 2018

Any news on this?

@capr
Copy link
Member Author

capr commented Oct 29, 2018

@d4tocchini
Copy link

of the demos i tried, all err'd mostly smelling of this objc issue (using bundle downloaded from site). is there a known workaround? if this is known state of things, considering macos is moving several versions beyond 10.12 I think an appropriate WIP flag should accompany any indication of mac support on the website or repos.

Hats off on this project, was a huge blow realizing no bueno mac 10.13+. any ideas on how to squash this issue? someway to proxy the objc bridgesupport with manual ffi-native methods?

@capr
Copy link
Member Author

capr commented Aug 16, 2019

@d4tocchini In this case I think it's OSX 10.13 that should have a WIP flag :) Seriously though, unless someone has the time to implement the needed workarounds in the bridgesupport parser (which btw shou;dn't be that hard except people generally just don't want to mess in other people's code so they'd rather just wait for me to do it), just make ffi-friendly C-API wrappers in ObjC for the functions you need. A third solution would be to create a special mode in the objc binding that ignores bridgesupport files completely, it will still work albeit some type information will be missing. Note that ObjC already has a RTTI API, bridgesupport files are just a horrible kludge that augments that with more info (informal protocols, etc) that you can probably live without.

@d4tocchini
Copy link

haha, yeah ffi c wrappers FTW

@capr
Copy link
Member Author

capr commented Dec 22, 2020

I modified objc to look for luapower/*.bridgesupport files first. I published all /System/Library/.../*.bridgesupport files from an OSX 10.12.6 to /~https://github.com/luapower/bridgesupport so all you gotta do is mgit clone bridgesupport to make it work. on OSX 10.13+. That is, as much as those APIs are backwards compatible (I have no idea) you'll be fine.

@capr
Copy link
Member Author

capr commented Dec 22, 2020

For practical pusposes this issue is fixed but I'll keep it open since fixing the parser to work with broken bridgesupport files is still a better fix (no bridgesupport files to deploy or bundle).

@stuta
Copy link

stuta commented Dec 23, 2020

I can confirm that in Mojave 10.14.6 most tests seems to work. I'll test BigSur later. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants