Objective-C runtime reflection (objc_msgSend): does it violate the iPhone Developer License Agreemen

Posted by GamingHorror on Stack Overflow See other posts from Stack Overflow or by GamingHorror
Published on 2010-06-14T09:27:40Z Indexed on 2010/06/14 9:32 UTC
Read the original article Hit count: 678

Does code like this (potentially) violate the iPhone Developer License Agreement?

Class clazz = NSClassFromString(@"WNEntity");
id entity = [clazz entityWithImage:@"Icon.png"];
SEL setPositionSelector = NSSelectorFromString(@"setPosition:");
objc_msgSend(entity, setPositionSelector, CGPointMake(200, 100));

I'm working on code that dynamically allocates classes from XML and calls methods on them via objc_msgSend. It's just very convenient constructing my objects that way but it worries me because i have no idea whether this is ok or violates the License by dynamically executing code or maybe even calling private (?) API functions. They wouldn't be documented if they were private, right?

Can someone shed some light on this? Have you had an App approved or rejected using code similar to the above?

I'm pretty sure that this is ok but i wan't to hear it from someone else! :)

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c