Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MrFusion

macrumors 6502a
Original poster
Jun 8, 2005
613
0
West-Europe
Dear Xcode gurus

Is it possible for an app client to provide options to a framework?

This is the situation I am faced with. The functionality of the framework is the same for each app, but the data it handles can not be shared between each app. That same data can also be copied and pasted, so I use a custom pasteboard identifier in the framework. Just a string that is defined in the .m file.
Code:
#define myPasteboardType com.domain.framework
I now want to use a custom "myPasteboardType" for each type of data/set of apps. Is it possible to force the client to provide this at start up?

Or, now that I think of it, should I just use a static class variable that can be changed by the client?

Thanks for the advice!
 
IIUC all you would need to do is make the string a member variable of some class in your framework and make the client of the framework set it before using any of the facilities of your framework - either through a setter or a general initialisation call?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.