takecian / SwiftRater

A utility that reminds your iPhone app's users to review the app written in pure Swift.
MIT License
356 stars 42 forks source link

No known class method for selector 'incrementSignificantUsageCount' #11

Closed JulesMoorhouse closed 6 years ago

JulesMoorhouse commented 6 years ago

Hi,

I'm using SwiftRater with Objective C. I've just updated my pods from 0.2.1 to 1.1.0.

Now I'm getting an error.

No known class method for selector 'incrementSignificantUsageCount'

This is how I'm calling the method

[SwiftRater incrementSignificantUsageCount];

I've looked at the SwiftRater Code and I can see that, that methods is public.

I'm not that familiar with Swift, can you advise please.

Thanks.

takecian commented 6 years ago

Hi Jules, I will check it and get back to you.

JulesMoorhouse commented 6 years ago

Thanks, I had a lot of other errors to fix in my project. Once I got rid of those, everything with swiftrater was broken.

Thanks.

takecian commented 6 years ago

@Jules2010 I've update SwiftRater, could you try with ver 1.1.1?

JulesMoorhouse commented 6 years ago

@takecian better, however getting an error with the check method.

No known class method for selector 'check'

takecian commented 6 years ago

ohh, I forgot adding @objc to https://github.com/takecian/SwiftRater/blob/master/SwiftRater/SwiftRater.swift#L143.. Wait one sec.

takecian commented 6 years ago

I have updated again, please try with 1.1.2, @Jules2010 .

JulesMoorhouse commented 6 years ago

Thanks,

But still the same error, any yes I do have v1.1.2. I also deleted derived data.

takecian commented 6 years ago

Hmm, I tried with 1.1.2, I could build successfully. Could you check DemoObjc project https://github.com/takecian/SwiftRater/tree/temp/DemoObjc on temp branch?

JulesMoorhouse commented 6 years ago

Oh ok..

It's not check anymore its... also the import needs to be like this in the demo project...

#import "ViewController.h"
#import <SwiftRater/SwiftRater-swift.h>

@interface ViewController ()

@end

@implementation ViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [SwiftRater checkWithHost:self];
 }

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
takecian commented 6 years ago

Swift APIs name changes if these are used in objective-c. You can see the details in SwiftRater-swift.h.

takecian commented 6 years ago

Please reopen if you have questions.