Open kylealanhale opened 8 years ago
@kylealanhale Thank you for the notice, let me have a look.
Damned, I forgot this issue for the 2.0.0 release.
@kylealanhale, @AMTourky Do you know what is needed in the podspec for the OBJC
swift flag to be automatically set?
Currently having this issue... Thought I'd have to manually override for boxed items! Any update on this?
@groue @sahandnayebaziz It's been a while, but I'm not sure that it was a problem with the podspec; if so, maybe the modification I made to my podfile in the original report will be helpful. But if I'm remembering correctly, it would be better to remove the OBJC
check and handle that scenario differently. (Also, it looks like the code in question was moved during the 2.0.0 refactor; it's now here.)
I've lost some hours debugging this when switching from the ObjC version GRMustache to GRMustache.swift for rendering of my NSObject, so I propose at least adding a note to the README with https://github.com/groue/GRMustache.swift/pull/71.
Same problem also happens when using as Swift package, probably not fixable because in a Swift package it's not possible to have Obj-C source files.
But maybe GRMustacheKeyAccess
could be rewritten in Swift now? At least the problematic example in the implementation note from here now works in Swift: https://github.com/groue/GRMustache.swift/blob/7befd1a197335af6d39bffd5662a520d7414d441/ObjC/GRMustacheKeyAccess.h#L25-L51
Unfortunately I'm not able to do it ATM.
When installing the framework via Cocoapods, NSObject subclasses aren't properly boxed, due to the compiler conditional in Box.swift.
Here's a temporary workaround hook for a project's Podfile: