Skip to content

Commit

Permalink
- update app version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-Alhasani committed Jan 5, 2021
1 parent 078672c commit 1017553
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions iOSApp/Uni Saar.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = MP8ZWZ7G58;
INFOPLIST_FILE = "Uni Saar/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
Expand Down Expand Up @@ -1428,7 +1428,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = MP8ZWZ7G58;
INFOPLIST_FILE = "Uni Saar/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
Expand Down Expand Up @@ -1518,7 +1518,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = MP8ZWZ7G58;
INFOPLIST_FILE = "Uni Saar/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import StoreKit

enum AppStoreReviewManager {
static let minimumReviewWorthyActionCount = 5
static let appVersion = "1.2.1"
static let appVersion = "2.1"

static func requestReviewIfAppropriate(presentedView: UIViewController) {

Expand Down Expand Up @@ -44,11 +44,8 @@ enum AppStoreReviewManager {
return
}

let alert = ratingDialogHandler { (_ YESAlertAction) in
let alert = ratingDialogHandler { _ in
SKStoreReviewController.requestReview()

} cancelHandler: { (_) in
presentedView.motionEnded(.motionShake, with: nil)
}

presentedView.present(alert, animated: true)
Expand All @@ -58,10 +55,10 @@ enum AppStoreReviewManager {

}

static func ratingDialogHandler(_ succesHandler: @escaping (UIAlertAction) -> Void, cancelHandler: @escaping (UIAlertAction) -> Void) -> UIAlertController {
static func ratingDialogHandler(_ succesHandler: @escaping (UIAlertAction) -> Void) -> UIAlertController {
let alert = UIAlertController(title: NSLocalizedString("RateTitle", comment: ""), message: NSLocalizedString("EnjoyingAPP", comment: ""), preferredStyle: .alert)
alert.addAction(UIAlertAction(title: NSLocalizedString("RateYesActionTitle", comment: ""), style: .default, handler: succesHandler))
alert.addAction(UIAlertAction(title: NSLocalizedString("RateNoActionTitle", comment: ""), style: .cancel, handler: cancelHandler))
alert.addAction(UIAlertAction(title: NSLocalizedString("RateNoActionTitle", comment: ""), style: .cancel, handler: nil))
return alert
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ class MoreLinksViewController: UITableViewController {
bindViewModel()
moreLinksViewModel.loadGetMoreLinks()
setRefreshControl()

// Do any additional setup after loading the view.
}

func bindViewModel() {
moreLinksViewModel.linksCells.bind { [weak self] _ in
if let `self` = self {
self.tableView.reloadData()
self.requestReview()
}
}
moreLinksViewModel.onShowError = { [weak self] alert in
Expand All @@ -41,6 +43,9 @@ class MoreLinksViewController: UITableViewController {
@objc private func refershLoad() {
moreLinksViewModel.loadGetMoreLinks()
}
func requestReview() {
AppStoreReviewManager.requestReviewIfAppropriate(presentedView: self)
}
// MARK: - Navigation
internal struct SegueIdentifiers {
static let toLinkDetails = "toLinkDetails"
Expand All @@ -52,8 +57,8 @@ class MoreLinksViewController: UITableViewController {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
if segue.identifier == SegueIdentifiers.toLinkDetails,
let destinationViewController = segue.destination as? MoreLinksDetailsViewController,
let viewModel = sender as? MoreLinksCellViewModel {
let destinationViewController = segue.destination as? MoreLinksDetailsViewController,
let viewModel = sender as? MoreLinksCellViewModel {
destinationViewController.linkItem = viewModel
}
}
Expand Down

0 comments on commit 1017553

Please sign in to comment.