ISHITOYA Kentaro
ISHITOYA Kentaro

Reputation: 347

How to implement plugin feature in Objective-C (iOS5)

I'm developing a library for iOS, named PhotoSubmitter, to facilitate the development of photo upload application.

PhotoSubmitter

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

Answers (1)

fbernardo
fbernardo

Reputation: 10104

I think this post will be incredible helpful. (Mac OS X)

For iOS you can't dynamically load code on a AppStore app.

Upvotes: 1

Related Questions