groue / GRMustache.swift

Flexible Mustache templates for Swift
http://mustache.github.com/
MIT License
594 stars 155 forks source link

fix boxed NSObjects when using as Swift package #87

Closed herrernst closed 1 year ago

herrernst commented 1 year ago

Add a separate ObjC target with GRMustacheKeyAccess.m and depend on it

fumito-ito commented 1 year ago

@herrernst Thanks for your contribution ! Could you tell me how to reproduce the problems that will be fixed by this PR ?

E.g. install GRMustach.swift with cocoapods in Obj-C project.

fumito-ito commented 1 year ago

Maybe reference https://github.com/groue/GRMustache.swift/issues/28

herrernst commented 1 year ago

Sorry for the late reply. Yes, #28 basically explains it. I've made a simple demo project which shows the behavior: https://github.com/herrernst/GRMustacheSwiftTest

Basically I want to use an NSObject subclass as context for the renderer. This doesn't not work with current release (4.x.x). If you switch the branch to this pull request pull/87/head in my example project, it will work

Screen Shot 2023-01-12 at 12 15 54

herrernst commented 1 year ago

Thank you very much!