Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this library in objective-c project? #123

Closed
vasilywang opened this issue Dec 31, 2016 · 7 comments
Closed

How to use this library in objective-c project? #123

vasilywang opened this issue Dec 31, 2016 · 7 comments
Labels
answered Questions which have accepted answers. type: question

Comments

@vasilywang
Copy link

vasilywang commented Dec 31, 2016

It will be great if we can use SwiftyStoreKit in old OC project. Please consider this suggestion.

@nokai
Copy link

nokai commented Jan 5, 2017

+100

@Tibbs
Copy link

Tibbs commented Jan 20, 2017

+1

@xiaosongshu
Copy link

Any alternatives you guys are currently using for Objective-C projects?

@bizz84
Copy link
Owner

bizz84 commented Feb 3, 2017

Currently, SwiftyStoreKit cannot be used in Objective-C projects.

The main limitation is that most classes and types in the library are Swift-only.

To address this, two routes are possible:

  1. Make all public symbols in SwiftyStoreKit Objective-C compatible (for example by changing class SwiftyStoreKit to class SwiftyStoreKit: NSObject)
  2. Write an Objective-C Swift wrapper on top of SwiftyStoreKit and wrap all required types.

Any pull requests for option 1 are welcome. From a maintainer standpoint I wish for the API and code to remain as clean as possible. Any proposed changes will be reviewed with this in mind.

Option 2. may be a quick solution for clients but I would be inclined to not merge this in the main codebase.

Popular ObjC alternatives:

@bizz84
Copy link
Owner

bizz84 commented Feb 20, 2017

As outlined in the project guidelines, Objective-C support is not planned for this library.

If you want to use this library on Objective-C projects, I suggest writing an Objective-C compatible Swift wrapper for the specific functionality that you need, and import that.

I'm going to close this issue for now.

@bizz84 bizz84 closed this as completed Feb 20, 2017
@bizz84 bizz84 added the answered Questions which have accepted answers. label Feb 20, 2017
@ankitkapasi
Copy link

@bizz84 did anyone ever take up option 1? I dont have the time now, but would be willing to help down the line.

@paoloandrea
Copy link

Please support objective-c
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered Questions which have accepted answers. type: question
Projects
None yet
Development

No branches or pull requests

7 participants