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! :)