Create a struct with associated values to convert properties declared inside a class extension

Description

When there are properties present and the new Swift class is an extension (i.e. won’t allow properties from Objective-C), I believe the correct workaround is to create a struct with Associative keys to use in the new Swift extension class. Now, I am at my limits on Objective-C and Swift here, but Swiftify doesn’t do anything other than copy the Property declaration from the .h file and place it inside of the new Swift class. The compiler immediately flags it as an error.

Newbies will have a hard time trying to figure out what went wrong but Stack Overflow talks a lot about using a struct with Associative keys to convert Objective-C properties. Hopefully, a future version of Swiftify can autogenerate a struct with Associative keys to simulate the Properties. In the Big Nerd Ranch Objective-C book, it list Properties in the Advanced Objective-C Chapter, which I haven’t reached yet

See
https://oleb.net/blog/2011/05/faking-ivars-in-objc-categories-with-associative-references/

Related project attached.

Environment

None

Assignee

Alex Petuschak

Reporter

Alex Petuschak

Labels

None

Git Branch Name

None

GitHub Issue

None

Components

Fix versions

Priority

Medium
Configure