Sunday, 15 July 2012

objective c - Bridge to objc, how can it knows arguments types? -


I am writing a bridge with a language that I am developing and the ObjC objective is a good introspection C function in the runtime And I'm able to retrieve the logic type for ways to use method_getTypeEncoding.

The main problem is with object arguments, which are returned in the form of an ID (encoded @), but will I need the actual objection class name like NSSTing or NSNumber.

Is there any way to solve this problem without parsing this file?

"Text">

Add another layer where you can dynamically verify assumptions by using things.

You want to be like careful hardcoding things, "Oh, this is a string that looks for __NCFF string" - because you have no way to know that you have __NFFF string Or an example of another type. NSString is a class cluster - you can get any custom implementation while using one.

The actual type of objects for Objective-C runtime is not important, so you have to add your layer. You can get some useful information by using the CLAG / LLVM as a tool.


No comments:

Post a Comment