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

Can't integrate pod in objective-c project #99

Open
punto2018 opened this issue Aug 29, 2019 · 10 comments
Open

Can't integrate pod in objective-c project #99

punto2018 opened this issue Aug 29, 2019 · 10 comments
Labels
help wanted Extra attention is needed minor bug Not critical bug

Comments

@punto2018
Copy link

Hi,
I'm integrating the pod in an objective-c project, but I'm facing several issues.

I have the following code:

SPStorkTransitioningDelegate * transitionDelegate = [[SPStorkTransitioningDelegate alloc] init];
transitionDelegate.storkDelegate = self; <---------- ERROR
transitionDelegate.confirmDelegate = dialPad;
dialPad.modalPresentationStyle = UIModalPresentationCustom;
dialPad.transitioningDelegate = transitionDelegate;

The error is:
Property 'storkDelegate' not found on object of type 'SPStorkTransitioningDelegate *'

Any advise?

@ivanvorobei
Copy link
Owner

Hi! Which pod version you use?

@punto2018
Copy link
Author

Hi,
thanks for your reply.
I'm using cocoapod 1.7.5 and SPStorkController (1.7.9)

@punto2018
Copy link
Author

I add that I'm importing the library using the following line at the beginning of the class:
#import <SPStorkController-Swift.h>
Is it correct?

@ivanvorobei
Copy link
Owner

I don't know.
I am not support objc for this project

@punto2018
Copy link
Author

Not good my friend... anyway I think it is related to the extension class.
I will try to dig in it...

@ivanvorobei
Copy link
Owner

If you solve this problem, write here.

@ivanvorobei ivanvorobei added help wanted Extra attention is needed minor bug Not critical bug labels Aug 30, 2019
@Nurka11
Copy link

Nurka11 commented Oct 4, 2019

Just create swift extension to objc class and use swift

@punto2018
Copy link
Author

punto2018 commented Oct 4, 2019 via email

@Nurka11
Copy link

Nurka11 commented Oct 4, 2019

import SPStorkController

@objc extension VCDealInformation: SPStorkControllerDelegate {

func openPayment() {
    let transitioningDelegate = SPStorkTransitioningDelegate()
    transitioningDelegate.customHeight = 245
    transitioningDelegate.storkDelegate = self
    transitioningDelegate.indicatorColor = .clear
    
    let rahmetViewController = RahmetRecommendViewController()
    rahmetViewController.modalPresentationStyle = .custom
    rahmetViewController.transitioningDelegate = transitioningDelegate
    
    self.present(rahmetViewController, animated: true, completion: nil)
}

}

Something like this, just declare extension with @objc and after that build project (because it can not work first time, just wait)

@Nurka11
Copy link

Nurka11 commented Oct 4, 2019

and this should be in separate file not in objc files (.m , .h)

@ivanvorobei you can close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed minor bug Not critical bug
Projects
None yet
Development

No branches or pull requests

3 participants