Comments (7)
Facing the same issue... did you find any fix @Bradrickcruz
from cordova-plugin-apprate.
Same issue. Crashes the app on iOS 17 when choosing to rate now. "Call must be made on the main thread".
from cordova-plugin-apprate.
There haven't been updates to this plugin in over 2 years. You need to put the code into:
dispatch_async(dispatch_get_main_queue(), ^{
});
ex.. this should fix it:
- (void)launchAppStore:(NSString *) appId{
[self.commandDelegate runInBackground:^{
// Initialize Product View Controller
dispatch_async(dispatch_get_main_queue(), ^{
SKStoreProductViewController *storeProductViewController = [[SKStoreProductViewController alloc] init];
// Configure View Controller
[storeProductViewController setDelegate:self];
[storeProductViewController loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier : appId} completionBlock:^(BOOL result, NSError *error) {
if (error) {
NSLog(@"Error %@ with User Info %@.", error, [error userInfo]);
} else {
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
}
}];
[self.viewController presentViewController:storeProductViewController animated:YES completion:nil];
});
}];
}
from cordova-plugin-apprate.
@jellomaster Thanks I ll check this today
There haven't been updates to this plugin in over 2 years. You need to put the code into: dispatch_async(dispatch_get_main_queue(), ^{ });
ex.. this should fix it:
- (void)launchAppStore:(NSString *) appId{ [self.commandDelegate runInBackground:^{ // Initialize Product View Controller dispatch_async(dispatch_get_main_queue(), ^{ SKStoreProductViewController *storeProductViewController = [[SKStoreProductViewController alloc] init]; // Configure View Controller [storeProductViewController setDelegate:self]; [storeProductViewController loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier : appId} completionBlock:^(BOOL result, NSError *error) { if (error) { NSLog(@"Error %@ with User Info %@.", error, [error userInfo]); } else { [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; } }]; [self.viewController presentViewController:storeProductViewController animated:YES completion:nil]; }); }]; }
from cordova-plugin-apprate.
There haven't been updates to this plugin in over 2 years. You need to put the code into: dispatch_async(dispatch_get_main_queue(), ^{ });
ex.. this should fix it:
- (void)launchAppStore:(NSString *) appId{ [self.commandDelegate runInBackground:^{ // Initialize Product View Controller dispatch_async(dispatch_get_main_queue(), ^{ SKStoreProductViewController *storeProductViewController = [[SKStoreProductViewController alloc] init]; // Configure View Controller [storeProductViewController setDelegate:self]; [storeProductViewController loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier : appId} completionBlock:^(BOOL result, NSError *error) { if (error) { NSLog(@"Error %@ with User Info %@.", error, [error userInfo]); } else { [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; } }]; [self.viewController presentViewController:storeProductViewController animated:YES completion:nil]; }); }]; }
This worked for me! Thanks @jellomaster
from cordova-plugin-apprate.
@jellomaster it would be really nice if you could create a PR for this fix. We are always happy to have contributions, your time will not be wasted.
from cordova-plugin-apprate.
There haven't been updates to this plugin in over 2 years. You need to put the code into: dispatch_async(dispatch_get_main_queue(), ^{ });
ex.. this should fix it:
- (void)launchAppStore:(NSString *) appId{ [self.commandDelegate runInBackground:^{ // Initialize Product View Controller dispatch_async(dispatch_get_main_queue(), ^{ SKStoreProductViewController *storeProductViewController = [[SKStoreProductViewController alloc] init]; // Configure View Controller [storeProductViewController setDelegate:self]; [storeProductViewController loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier : appId} completionBlock:^(BOOL result, NSError *error) { if (error) { NSLog(@"Error %@ with User Info %@.", error, [error userInfo]); } else { [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; } }]; [self.viewController presentViewController:storeProductViewController animated:YES completion:nil]; }); }]; }
Worked for me as well thanks @jellomaster
from cordova-plugin-apprate.
Related Issues (20)
- [Android] Asking users whether they like the app before prompting
- Opening file:///android_asset/www/null
- NegativeFeedback iOS MailTo doesnt work HOT 1
- Is it possible to get rid of Would you mind rating xxx App? Dialog HOT 1
- App fails to open app store HOT 3
- Detect if app is already rated HOT 1
- Package Not Working
- Error in reviewType HOT 1
- Preferences always null HOT 2
- callback(1)- immediate click on rate now does not work HOT 6
- Change buttons position HOT 1
- iOS- InAppReview popup for rating is taking device language.
- Android Rating alert is showing some asci value
- usesUntilPrompt not showing each 3rd time in AppRate Plugin
- Line 3195 - Msg: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'confirm') if InAppReview or showPromptForInAppReview is true
- Erro no reviewType
- App Gallery HOT 1
- iOS displays blank rating form
- BSF Cordova Ecosystem Crowdfunding Plan
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-apprate.