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

[Question] Create objc classes at runtime #34

Closed
GunGraveKoga opened this issue Jun 17, 2016 · 3 comments
Closed

[Question] Create objc classes at runtime #34

GunGraveKoga opened this issue Jun 17, 2016 · 3 comments

Comments

@GunGraveKoga
Copy link

GunGraveKoga commented Jun 17, 2016

Apple ObjC runtime has ability to create classes and methods for those classes at runtime.
Does ObjFW runtime has this functionality?
If answer is No, then will be this functionality implemented in future?

@Midar
Copy link
Collaborator

Midar commented Jun 18, 2016

Yes, it is possible, but not really convenient. Might be worth making this more convenient :). So let's make this a feature request.

@GunGraveKoga
Copy link
Author

I think this opportunity would be very useful

@Midar
Copy link
Collaborator

Midar commented Jul 3, 2016

I added objc_{allocate,register}ClassPair now. Additionally, I added class_addMethod() which did not exist before as class_replaceMethod() had the same functionality.

I need to look into adding ivars at runtime - I'm not sure how useful and/or fragile that is, though.

@Midar Midar closed this as completed Jul 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants