Reputation: 347
I'm developing a library for iOS, named PhotoSubmitter, to facilitate the development of photo upload application.
This library can upload photo to Social Network Services and Cloud Services, there are lots of Services to support remaining. And I want to the library to be plaggable.
I wish to know how to implement plaggable feature in Objective-C.
Plaggable means, when third-party service implementation for PhotoSubmitter is placed in the appropriate directory, like under plugins
, the library automatically detect it.
If FacebookPhotoSubmitter.h/m placed in the plugins
directory, code will be like,
[[PhotoSubmitterFactory sharedInstance] enableService:@"Facebook"];
And this code to be work properly with out including header "FacebookPhotoSubmitter.h" in both Client code and PhotoSubmitter library code.
If you know any of the similar implementation, please point the repository. Any helps appreciated.
Thanks.
Upvotes: 0
Views: 726