ccgus / CocoaScript

JavaScript + the Cocoa frameworks, and then ObjC brackets show up to party as well.
Other
618 stars 58 forks source link

Anyway to reload a framework with Mocha? #46

Closed mludowise closed 7 years ago

mludowise commented 7 years ago

I wrote a plugin that uses Mocha to load a custom Objective-C framework. My plugin is able to self-update but the changes in my framework aren't loaded until after Sketch is restarted.

Is there anyway to dynamically reload my framework without restarting Sketch?

ccgus commented 7 years ago

Are we talking about compiled code? If yes, then I don't think there's a good way to do it (maybe that's changed in the past couple of years?)

mludowise commented 7 years ago

Yes, it's compiled code in a .framework.

ccgus commented 7 years ago

I think you're out of luck, other than restarting Sketch.

mludowise commented 7 years ago

Yeah, that's what I figured but thought I'd ask anyway ☺️

Thank you for the speedy response!