├── RateMyApp
├── RateMyApp.xcodeproj
│ ├── xcuserdata
│ │ ├── nikosma.xcuserdatad
│ │ │ ├── xcdebugger
│ │ │ │ └── Breakpoints_v2.xcbkptlist
│ │ │ └── xcschemes
│ │ │ │ ├── xcschememanagement.plist
│ │ │ │ └── RateMyApp.xcscheme
│ │ └── jimmy.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── RateMyApp.xcscheme
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcuserdata
│ │ │ └── jimmy.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcshareddata
│ │ │ └── RateMyApp.xccheckout
│ └── project.pbxproj
├── RateMyApp
│ ├── Images.xcassets
│ │ ├── LaunchImage.launchimage
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── ViewController.swift
│ ├── Info.plist
│ ├── Base.lproj
│ │ └── Main.storyboard
│ └── AppDelegate.swift
└── RateMyAppTests
│ ├── Info.plist
│ └── RateMyAppTests.swift
├── .gitignore
├── LICENSE
├── README.md
└── RateMyApp.swift
/RateMyApp/RateMyApp.xcodeproj/xcuserdata/nikosma.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp.xcodeproj/project.xcworkspace/xcuserdata/jimmy.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jimmyjose-dev/RateMyApp/HEAD/RateMyApp/RateMyApp.xcodeproj/project.xcworkspace/xcuserdata/jimmy.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | RateMyApp/RateMyApp.xcodeproj/project.xcworkspace/xcuserdata/nikosma.xcuserdatad/UserInterfaceState.xcuserstate
3 | RateMyApp/RateMyApp.xcodeproj/xcuserdata/nikosmaounis.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
4 | RateMyApp/RateMyApp.xcodeproj/project.xcworkspace/xcuserdata/nikosmaounis.xcuserdatad/UserInterfaceState.xcuserstate
5 | RateMyApp/RateMyApp.xcodeproj/xcuserdata/nikosmaounis.xcuserdatad/xcschemes/xcschememanagement.plist
6 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp.xcodeproj/xcuserdata/jimmy.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RateMyApp.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | BF5D184F19BD939D00FA08CD
16 |
17 | primary
18 |
19 |
20 | BF5D186119BD939E00FA08CD
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp.xcodeproj/xcuserdata/nikosma.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RateMyApp.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | BF5D184F19BD939D00FA08CD
16 |
17 | primary
18 |
19 |
20 | BF5D186119BD939E00FA08CD
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyAppTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // RateMyApp
4 | //
5 | // Created by Jimmy Jose on 08/09/14.
6 | // Copyright (c) 2014 Varshyl Mobile Pvt. Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 |
17 | let rate = RateMyApp.sharedInstance
18 | rate.debug = true
19 | rate.appID = "857846130"
20 |
21 | DispatchQueue.main.async(execute: { () -> Void in
22 | rate.trackAppUsage()
23 | })
24 |
25 |
26 | }
27 |
28 | override func didReceiveMemoryWarning() {
29 | super.didReceiveMemoryWarning()
30 | // Dispose of any resources that can be recreated.
31 | }
32 |
33 |
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyAppTests/RateMyAppTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RateMyAppTests.swift
3 | // RateMyAppTests
4 | //
5 | // Created by Jimmy Jose on 08/09/14.
6 | // Copyright (c) 2014 Varshyl Mobile Pvt. Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class RateMyAppTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measure() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "size" : "1024x1024",
46 | "scale" : "1x"
47 | }
48 | ],
49 | "info" : {
50 | "version" : 1,
51 | "author" : "xcode"
52 | }
53 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Varshyl Mobile Pvt. Ltd.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp.xcodeproj/project.xcworkspace/xcshareddata/RateMyApp.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 64C82B11-E14C-447C-B244-69815F4D3014
9 | IDESourceControlProjectName
10 | RateMyApp
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | C183659CD4B57AF29ECF67303719DCC4848E996A
14 | https://github.com/varshylmobile/RateMyApp.git
15 |
16 | IDESourceControlProjectPath
17 | RateMyApp/RateMyApp.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | C183659CD4B57AF29ECF67303719DCC4848E996A
21 | ../../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/varshylmobile/RateMyApp.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | C183659CD4B57AF29ECF67303719DCC4848E996A
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | C183659CD4B57AF29ECF67303719DCC4848E996A
36 | IDESourceControlWCCName
37 | RateMyApp
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // RateMyApp
4 | //
5 | // Created by Jimmy Jose on 08/09/14.
6 | // Copyright (c) 2014 Varshyl Mobile Pvt. Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
17 | // Override point for customization after application launch.
18 | return true
19 | }
20 |
21 | func applicationWillResignActive(_ application: UIApplication) {
22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
24 | }
25 |
26 | func applicationDidEnterBackground(_ application: UIApplication) {
27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 | }
30 |
31 | func applicationWillEnterForeground(_ application: UIApplication) {
32 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
33 | }
34 |
35 | func applicationDidBecomeActive(_ application: UIApplication) {
36 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
37 | }
38 |
39 | func applicationWillTerminate(_ application: UIApplication) {
40 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
41 | }
42 |
43 |
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | RateMyApp
2 | =====================
3 |
4 | RateMyApp is a class to provide gentle reminders for app user to rate your app, written completely in swift
5 | ----------------------------------
6 | **Features:**
7 | > 1) Easy setup
8 | >
9 | > 2) Supports iOS 9.0.1 and Swift 2.0
10 |
11 | Screenshot
12 | ==========
13 |
14 | 
15 |
16 | ----------
17 |
18 |
19 | Sample code
20 | -----------
21 |
22 | **Three lines and you are done**
23 |
24 | var rate = RateMyApp.sharedInstance
25 | rate.appID = "123456"
26 | rate.trackAppUsage()
27 |
28 | ----------
29 |
30 | Contributors
31 | ---------------
32 | ***All contributors will receive virtual high fives from me and for the heck of it lets forget you are a south paw***
33 |
34 | 
35 |
36 | Please see commit log for changes they provided
37 | - [Plopix](https://github.com/Plopix) -> Fixes and enhancement for iOS8.
38 |
39 | Roadmap
40 | ---------------
41 |
42 | - Add customisation options
43 |
44 | ----------
45 |
46 | Other Repos you might like
47 | --------------------------
48 |
49 | 1) https://github.com/varshylmobile/LocationManager
50 |
51 | > CLLocationManager wrapper in Swift, performs location update,
52 | > geocoding and reverse geocoding using Apple and Google service
53 | >
54 |
55 | 2) https://github.com/varshylmobile/MapManager
56 |
57 | > Map manager is a MapKit wrapper in Swift to provide route direction
58 | > drawing
59 |
60 | 3) https://github.com/varshylmobile/VMXMLParser
61 |
62 | > NSXMLParser wrapper in Swift
63 |
64 | 4) https://github.com/varshylmobile/TableViewCellFlip
65 |
66 | > Vertical and Horizontal flip animation for table view cell
67 |
68 | Contact Us
69 | ---------------
70 |
71 | Have any questions or suggestions feel free to write at jimmy@varshyl.com (Jimmy Jose)
72 | http://www.varshylmobile.com/
73 |
74 | ----------
75 | ## License
76 |
77 | The MIT License (MIT)
78 |
79 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
80 |
81 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
82 |
83 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
84 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
85 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp.xcodeproj/xcuserdata/jimmy.xcuserdatad/xcschemes/RateMyApp.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
94 |
100 |
101 |
102 |
103 |
105 |
106 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp.xcodeproj/xcuserdata/nikosma.xcuserdatad/xcschemes/RateMyApp.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
67 |
68 |
78 |
80 |
86 |
87 |
88 |
89 |
90 |
91 |
97 |
99 |
105 |
106 |
107 |
108 |
110 |
111 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/RateMyApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RateMyApp.swift
3 | // RateMyApp
4 | //
5 | // Created by Jimmy Jose on 08/09/14.
6 | //
7 | // Permission is hereby granted, free of charge, to any person obtaining a copy
8 | // of this software and associated documentation files (the "Software"), to deal
9 | // in the Software without restriction, including without limitation the rights
10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | // copies of the Software, and to permit persons to whom the Software is
12 | // furnished to do so, subject to the following conditions:
13 | //
14 | // The above copyright notice and this permission notice shall be included in
15 | // all copies or substantial portions of the Software.
16 | //
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | // THE SOFTWARE.
24 |
25 | import UIKit
26 |
27 |
28 | class RateMyApp : UIViewController,UIAlertViewDelegate{
29 |
30 | fileprivate let kTrackingAppVersion = "kRateMyApp_TrackingAppVersion"
31 | fileprivate let kFirstUseDate = "kRateMyApp_FirstUseDate"
32 | fileprivate let kAppUseCount = "kRateMyApp_AppUseCount"
33 | fileprivate let kSpecialEventCount = "kRateMyApp_SpecialEventCount"
34 | fileprivate let kDidRateVersion = "kRateMyApp_DidRateVersion"
35 | fileprivate let kDeclinedToRate = "kRateMyApp_DeclinedToRate"
36 | fileprivate let kRemindLater = "kRateMyApp_RemindLater"
37 | fileprivate let kRemindLaterPressedDate = "kRateMyApp_RemindLaterPressedDate"
38 |
39 | fileprivate var reviewURL = "itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id="
40 | fileprivate var reviewURLiOS7 = "itms-apps://itunes.apple.com/app/id"
41 |
42 |
43 | var promptAfterDays:Double = 30
44 | var promptAfterUses = 10
45 | var promptAfterCustomEventsCount = 10
46 | var daysBeforeReminding:Double = 1
47 |
48 | var alertTitle = NSLocalizedString("Rate the app", comment: "RateMyApp")
49 | var alertMessage = ""
50 | var alertOKTitle = NSLocalizedString("Rate it now", comment: "RateMyApp")
51 | var alertCancelTitle = NSLocalizedString("Don't bother me again", comment: "RateMyApp")
52 | var alertRemindLaterTitle = NSLocalizedString("Remind me later", comment: "RateMyApp")
53 | var appID = ""
54 |
55 | var debug = false
56 |
57 | class var sharedInstance : RateMyApp {
58 | struct Static {
59 | static let instance : RateMyApp = RateMyApp()
60 | }
61 | return Static.instance
62 | }
63 |
64 |
65 | // private override init(){
66 | //
67 | // super.init()
68 | //
69 | // }
70 |
71 | internal required init?(coder aDecoder: NSCoder) {
72 | super.init(coder: aDecoder)
73 | }
74 |
75 | fileprivate override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
76 | super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
77 |
78 | }
79 |
80 | fileprivate func initAllSettings(){
81 |
82 | let prefs = UserDefaults.standard
83 |
84 | prefs.set(getCurrentAppVersion(), forKey: kTrackingAppVersion)
85 | prefs.set(Date(), forKey: kFirstUseDate)
86 | prefs.set(1, forKey: kAppUseCount)
87 | prefs.set(0, forKey: kSpecialEventCount)
88 | prefs.set(false, forKey: kDidRateVersion)
89 | prefs.set(false, forKey: kDeclinedToRate)
90 | prefs.set(false, forKey: kRemindLater)
91 |
92 | }
93 |
94 | func trackEventUsage(){
95 |
96 | incrementValueForKey(name: kSpecialEventCount)
97 |
98 | }
99 |
100 | func trackAppUsage(){
101 |
102 | incrementValueForKey(name: kAppUseCount)
103 |
104 | }
105 |
106 | fileprivate func isFirstTime()->Bool{
107 |
108 | let prefs = UserDefaults.standard
109 |
110 | let trackingAppVersion = prefs.object(forKey: kTrackingAppVersion) as? NSString
111 |
112 | if((trackingAppVersion == nil) || !(getCurrentAppVersion().isEqual(to: trackingAppVersion! as String)))
113 | {
114 | return true
115 | }
116 |
117 | return false
118 |
119 | }
120 |
121 | fileprivate func incrementValueForKey(name:String){
122 |
123 | if(appID.count == 0)
124 | {
125 | fatalError("Set iTunes connect appID to proceed, you may enter some random string for testing purpose. See line number 59")
126 | }
127 |
128 | if(isFirstTime())
129 | {
130 | initAllSettings()
131 |
132 | }
133 | else
134 | {
135 | let prefs = UserDefaults.standard
136 | let currentCount = prefs.integer(forKey: name)
137 | prefs.set(currentCount+1, forKey: name)
138 |
139 | }
140 |
141 | if(shouldShowAlert())
142 | {
143 | showRatingAlert()
144 | }
145 |
146 | }
147 |
148 | fileprivate func shouldShowAlert() -> Bool{
149 |
150 | if debug {
151 | return true
152 | }
153 |
154 | let prefs = UserDefaults.standard
155 |
156 | let usageCount = prefs.integer(forKey: kAppUseCount)
157 | let eventsCount = prefs.integer(forKey: kSpecialEventCount)
158 |
159 | let firstUse = prefs.object(forKey: kFirstUseDate) as! Date
160 |
161 | let timeInterval = Date().timeIntervalSince(firstUse)
162 |
163 | let daysCount = ((timeInterval / 3600) / 24)
164 |
165 | let hasRatedCurrentVersion = prefs.bool(forKey: kDidRateVersion)
166 |
167 | let hasDeclinedToRate = prefs.bool(forKey: kDeclinedToRate)
168 |
169 | let hasChosenRemindLater = prefs.bool(forKey: kRemindLater)
170 |
171 | if(hasDeclinedToRate)
172 | {
173 | return false
174 | }
175 |
176 | if(hasRatedCurrentVersion)
177 | {
178 | return false
179 | }
180 |
181 | if(hasChosenRemindLater)
182 | {
183 | let remindLaterDate = prefs.object(forKey: kRemindLaterPressedDate) as! Date
184 |
185 | let timeInterval = Date().timeIntervalSince(remindLaterDate)
186 |
187 | let remindLaterDaysCount = ((timeInterval / 3600) / 24)
188 |
189 | return (remindLaterDaysCount >= daysBeforeReminding)
190 | }
191 |
192 | if(usageCount >= promptAfterUses)
193 | {
194 | return true
195 | }
196 |
197 | if(daysCount >= promptAfterDays)
198 | {
199 | return true
200 | }
201 |
202 | if(eventsCount >= promptAfterCustomEventsCount)
203 | {
204 | return true
205 | }
206 |
207 | return false
208 |
209 | }
210 |
211 |
212 | fileprivate func showRatingAlert(){
213 |
214 | let infoDocs : NSDictionary = Bundle.main.infoDictionary! as NSDictionary
215 | let appname : NSString = infoDocs.object(forKey: "CFBundleName") as! NSString
216 |
217 | var message = NSLocalizedString("If you found %@ useful, please take a moment to rate it", comment: "RateMyApp")
218 | message = String(format:message, appname)
219 |
220 | if(alertMessage.count == 0)
221 | {
222 | alertMessage = message
223 | }
224 |
225 |
226 | if #available(iOS 8.0, *) {
227 | let alert = UIAlertController(title: alertTitle, message: alertMessage, preferredStyle: UIAlertControllerStyle.alert)
228 |
229 |
230 | alert.addAction(UIAlertAction(title: alertOKTitle, style:.destructive, handler: { alertAction in
231 | self.okButtonPressed()
232 | alert.dismiss(animated: true, completion: nil)
233 | }))
234 |
235 | alert.addAction(UIAlertAction(title: alertCancelTitle, style:.cancel, handler:{ alertAction in
236 | self.cancelButtonPressed()
237 | alert.dismiss(animated: true, completion: nil)
238 | }))
239 |
240 | alert.addAction(UIAlertAction(title: alertRemindLaterTitle, style:.default, handler: { alertAction in
241 | self.remindLaterButtonPressed()
242 | alert.dismiss(animated: true, completion: nil)
243 | }))
244 |
245 | let appDelegate = UIApplication.shared.delegate as! AppDelegate
246 | let controller = appDelegate.window?.rootViewController
247 |
248 | controller?.present(alert, animated: true, completion: nil)
249 | } else {
250 | let alert = UIAlertView()
251 | alert.title = alertTitle
252 | alert.message = alertMessage
253 | alert.addButton(withTitle: alertCancelTitle)
254 | alert.addButton(withTitle: alertRemindLaterTitle)
255 | alert.addButton(withTitle: alertOKTitle)
256 | alert.delegate = self
257 | alert.show()
258 | }
259 |
260 |
261 | }
262 |
263 | internal func alertView(_ alertView: UIAlertView, clickedButtonAt buttonIndex: Int){
264 |
265 | if(buttonIndex == 0)
266 | {
267 | cancelButtonPressed()
268 | }
269 | else if(buttonIndex == 1)
270 | {
271 | remindLaterButtonPressed()
272 | }
273 | else if(buttonIndex == 2)
274 | {
275 | okButtonPressed()
276 | }
277 |
278 | alertView.dismiss(withClickedButtonIndex: buttonIndex, animated: true)
279 |
280 | }
281 |
282 | fileprivate func deviceOSVersion() -> Float{
283 |
284 | let device : UIDevice = UIDevice.current;
285 | let systemVersion = device.systemVersion;
286 | let iOSVerion : Float = (systemVersion as NSString).floatValue
287 |
288 | return iOSVerion
289 | }
290 |
291 | fileprivate func hasOS8()->Bool{
292 |
293 | if(deviceOSVersion() < 8.0)
294 | {
295 | return false
296 | }
297 |
298 | return true
299 |
300 | }
301 |
302 | fileprivate func okButtonPressed(){
303 |
304 | UserDefaults.standard.set(true, forKey: kDidRateVersion)
305 | let appStoreURL = URL(string:reviewURLiOS7+appID)
306 | UIApplication.shared.openURL(appStoreURL!)
307 |
308 | }
309 |
310 | fileprivate func cancelButtonPressed(){
311 |
312 | UserDefaults.standard.set(true, forKey: kDeclinedToRate)
313 |
314 | }
315 |
316 | fileprivate func remindLaterButtonPressed(){
317 |
318 | UserDefaults.standard.set(true, forKey: kRemindLater)
319 | UserDefaults.standard.set(Date(), forKey: kRemindLaterPressedDate)
320 |
321 | }
322 |
323 | fileprivate func getCurrentAppVersion()->NSString{
324 |
325 | return (Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! NSString)
326 |
327 | }
328 |
329 |
330 |
331 | }
332 |
--------------------------------------------------------------------------------
/RateMyApp/RateMyApp.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | BF5D185619BD939D00FA08CD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5D185519BD939D00FA08CD /* AppDelegate.swift */; };
11 | BF5D185819BD939D00FA08CD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5D185719BD939D00FA08CD /* ViewController.swift */; };
12 | BF5D185B19BD939D00FA08CD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BF5D185919BD939D00FA08CD /* Main.storyboard */; };
13 | BF5D185D19BD939D00FA08CD /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BF5D185C19BD939D00FA08CD /* Images.xcassets */; };
14 | BF5D186919BD939E00FA08CD /* RateMyAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5D186819BD939E00FA08CD /* RateMyAppTests.swift */; };
15 | BF5D187519BE455D00FA08CD /* RateMyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5D187419BE455D00FA08CD /* RateMyApp.swift */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXContainerItemProxy section */
19 | BF5D186319BD939E00FA08CD /* PBXContainerItemProxy */ = {
20 | isa = PBXContainerItemProxy;
21 | containerPortal = BF5D184819BD939C00FA08CD /* Project object */;
22 | proxyType = 1;
23 | remoteGlobalIDString = BF5D184F19BD939D00FA08CD;
24 | remoteInfo = RateMyApp;
25 | };
26 | /* End PBXContainerItemProxy section */
27 |
28 | /* Begin PBXFileReference section */
29 | BF5D185019BD939D00FA08CD /* RateMyApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RateMyApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
30 | BF5D185419BD939D00FA08CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
31 | BF5D185519BD939D00FA08CD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
32 | BF5D185719BD939D00FA08CD /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
33 | BF5D185A19BD939D00FA08CD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
34 | BF5D185C19BD939D00FA08CD /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
35 | BF5D186219BD939E00FA08CD /* RateMyAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RateMyAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
36 | BF5D186719BD939E00FA08CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
37 | BF5D186819BD939E00FA08CD /* RateMyAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RateMyAppTests.swift; sourceTree = ""; };
38 | BF5D187419BE455D00FA08CD /* RateMyApp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RateMyApp.swift; path = ../../RateMyApp.swift; sourceTree = ""; };
39 | /* End PBXFileReference section */
40 |
41 | /* Begin PBXFrameworksBuildPhase section */
42 | BF5D184D19BD939D00FA08CD /* Frameworks */ = {
43 | isa = PBXFrameworksBuildPhase;
44 | buildActionMask = 2147483647;
45 | files = (
46 | );
47 | runOnlyForDeploymentPostprocessing = 0;
48 | };
49 | BF5D185F19BD939E00FA08CD /* Frameworks */ = {
50 | isa = PBXFrameworksBuildPhase;
51 | buildActionMask = 2147483647;
52 | files = (
53 | );
54 | runOnlyForDeploymentPostprocessing = 0;
55 | };
56 | /* End PBXFrameworksBuildPhase section */
57 |
58 | /* Begin PBXGroup section */
59 | BF5D184719BD939C00FA08CD = {
60 | isa = PBXGroup;
61 | children = (
62 | BF5D185219BD939D00FA08CD /* RateMyApp */,
63 | BF5D186519BD939E00FA08CD /* RateMyAppTests */,
64 | BF5D185119BD939D00FA08CD /* Products */,
65 | );
66 | sourceTree = "";
67 | };
68 | BF5D185119BD939D00FA08CD /* Products */ = {
69 | isa = PBXGroup;
70 | children = (
71 | BF5D185019BD939D00FA08CD /* RateMyApp.app */,
72 | BF5D186219BD939E00FA08CD /* RateMyAppTests.xctest */,
73 | );
74 | name = Products;
75 | sourceTree = "";
76 | };
77 | BF5D185219BD939D00FA08CD /* RateMyApp */ = {
78 | isa = PBXGroup;
79 | children = (
80 | BF5D187419BE455D00FA08CD /* RateMyApp.swift */,
81 | BF5D185519BD939D00FA08CD /* AppDelegate.swift */,
82 | BF5D185719BD939D00FA08CD /* ViewController.swift */,
83 | BF5D185919BD939D00FA08CD /* Main.storyboard */,
84 | BF5D185C19BD939D00FA08CD /* Images.xcassets */,
85 | BF5D185319BD939D00FA08CD /* Supporting Files */,
86 | );
87 | path = RateMyApp;
88 | sourceTree = "";
89 | };
90 | BF5D185319BD939D00FA08CD /* Supporting Files */ = {
91 | isa = PBXGroup;
92 | children = (
93 | BF5D185419BD939D00FA08CD /* Info.plist */,
94 | );
95 | name = "Supporting Files";
96 | sourceTree = "";
97 | };
98 | BF5D186519BD939E00FA08CD /* RateMyAppTests */ = {
99 | isa = PBXGroup;
100 | children = (
101 | BF5D186819BD939E00FA08CD /* RateMyAppTests.swift */,
102 | BF5D186619BD939E00FA08CD /* Supporting Files */,
103 | );
104 | path = RateMyAppTests;
105 | sourceTree = "";
106 | };
107 | BF5D186619BD939E00FA08CD /* Supporting Files */ = {
108 | isa = PBXGroup;
109 | children = (
110 | BF5D186719BD939E00FA08CD /* Info.plist */,
111 | );
112 | name = "Supporting Files";
113 | sourceTree = "";
114 | };
115 | /* End PBXGroup section */
116 |
117 | /* Begin PBXNativeTarget section */
118 | BF5D184F19BD939D00FA08CD /* RateMyApp */ = {
119 | isa = PBXNativeTarget;
120 | buildConfigurationList = BF5D186C19BD939E00FA08CD /* Build configuration list for PBXNativeTarget "RateMyApp" */;
121 | buildPhases = (
122 | BF5D184C19BD939D00FA08CD /* Sources */,
123 | BF5D184D19BD939D00FA08CD /* Frameworks */,
124 | BF5D184E19BD939D00FA08CD /* Resources */,
125 | );
126 | buildRules = (
127 | );
128 | dependencies = (
129 | );
130 | name = RateMyApp;
131 | productName = RateMyApp;
132 | productReference = BF5D185019BD939D00FA08CD /* RateMyApp.app */;
133 | productType = "com.apple.product-type.application";
134 | };
135 | BF5D186119BD939E00FA08CD /* RateMyAppTests */ = {
136 | isa = PBXNativeTarget;
137 | buildConfigurationList = BF5D186F19BD939E00FA08CD /* Build configuration list for PBXNativeTarget "RateMyAppTests" */;
138 | buildPhases = (
139 | BF5D185E19BD939E00FA08CD /* Sources */,
140 | BF5D185F19BD939E00FA08CD /* Frameworks */,
141 | BF5D186019BD939E00FA08CD /* Resources */,
142 | );
143 | buildRules = (
144 | );
145 | dependencies = (
146 | BF5D186419BD939E00FA08CD /* PBXTargetDependency */,
147 | );
148 | name = RateMyAppTests;
149 | productName = RateMyAppTests;
150 | productReference = BF5D186219BD939E00FA08CD /* RateMyAppTests.xctest */;
151 | productType = "com.apple.product-type.bundle.unit-test";
152 | };
153 | /* End PBXNativeTarget section */
154 |
155 | /* Begin PBXProject section */
156 | BF5D184819BD939C00FA08CD /* Project object */ = {
157 | isa = PBXProject;
158 | attributes = {
159 | LastSwiftMigration = 0700;
160 | LastSwiftUpdateCheck = 0700;
161 | LastUpgradeCheck = 0920;
162 | ORGANIZATIONNAME = "Varshyl Mobile Pvt. Ltd.";
163 | TargetAttributes = {
164 | BF5D184F19BD939D00FA08CD = {
165 | CreatedOnToolsVersion = 6.0;
166 | LastSwiftMigration = 0920;
167 | };
168 | BF5D186119BD939E00FA08CD = {
169 | CreatedOnToolsVersion = 6.0;
170 | LastSwiftMigration = 0920;
171 | TestTargetID = BF5D184F19BD939D00FA08CD;
172 | };
173 | };
174 | };
175 | buildConfigurationList = BF5D184B19BD939C00FA08CD /* Build configuration list for PBXProject "RateMyApp" */;
176 | compatibilityVersion = "Xcode 3.2";
177 | developmentRegion = English;
178 | hasScannedForEncodings = 0;
179 | knownRegions = (
180 | en,
181 | Base,
182 | );
183 | mainGroup = BF5D184719BD939C00FA08CD;
184 | productRefGroup = BF5D185119BD939D00FA08CD /* Products */;
185 | projectDirPath = "";
186 | projectRoot = "";
187 | targets = (
188 | BF5D184F19BD939D00FA08CD /* RateMyApp */,
189 | BF5D186119BD939E00FA08CD /* RateMyAppTests */,
190 | );
191 | };
192 | /* End PBXProject section */
193 |
194 | /* Begin PBXResourcesBuildPhase section */
195 | BF5D184E19BD939D00FA08CD /* Resources */ = {
196 | isa = PBXResourcesBuildPhase;
197 | buildActionMask = 2147483647;
198 | files = (
199 | BF5D185B19BD939D00FA08CD /* Main.storyboard in Resources */,
200 | BF5D185D19BD939D00FA08CD /* Images.xcassets in Resources */,
201 | );
202 | runOnlyForDeploymentPostprocessing = 0;
203 | };
204 | BF5D186019BD939E00FA08CD /* Resources */ = {
205 | isa = PBXResourcesBuildPhase;
206 | buildActionMask = 2147483647;
207 | files = (
208 | );
209 | runOnlyForDeploymentPostprocessing = 0;
210 | };
211 | /* End PBXResourcesBuildPhase section */
212 |
213 | /* Begin PBXSourcesBuildPhase section */
214 | BF5D184C19BD939D00FA08CD /* Sources */ = {
215 | isa = PBXSourcesBuildPhase;
216 | buildActionMask = 2147483647;
217 | files = (
218 | BF5D185819BD939D00FA08CD /* ViewController.swift in Sources */,
219 | BF5D187519BE455D00FA08CD /* RateMyApp.swift in Sources */,
220 | BF5D185619BD939D00FA08CD /* AppDelegate.swift in Sources */,
221 | );
222 | runOnlyForDeploymentPostprocessing = 0;
223 | };
224 | BF5D185E19BD939E00FA08CD /* Sources */ = {
225 | isa = PBXSourcesBuildPhase;
226 | buildActionMask = 2147483647;
227 | files = (
228 | BF5D186919BD939E00FA08CD /* RateMyAppTests.swift in Sources */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXSourcesBuildPhase section */
233 |
234 | /* Begin PBXTargetDependency section */
235 | BF5D186419BD939E00FA08CD /* PBXTargetDependency */ = {
236 | isa = PBXTargetDependency;
237 | target = BF5D184F19BD939D00FA08CD /* RateMyApp */;
238 | targetProxy = BF5D186319BD939E00FA08CD /* PBXContainerItemProxy */;
239 | };
240 | /* End PBXTargetDependency section */
241 |
242 | /* Begin PBXVariantGroup section */
243 | BF5D185919BD939D00FA08CD /* Main.storyboard */ = {
244 | isa = PBXVariantGroup;
245 | children = (
246 | BF5D185A19BD939D00FA08CD /* Base */,
247 | );
248 | name = Main.storyboard;
249 | sourceTree = "";
250 | };
251 | /* End PBXVariantGroup section */
252 |
253 | /* Begin XCBuildConfiguration section */
254 | BF5D186A19BD939E00FA08CD /* Debug */ = {
255 | isa = XCBuildConfiguration;
256 | buildSettings = {
257 | ALWAYS_SEARCH_USER_PATHS = NO;
258 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
259 | CLANG_CXX_LIBRARY = "libc++";
260 | CLANG_ENABLE_MODULES = YES;
261 | CLANG_ENABLE_OBJC_ARC = YES;
262 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
263 | CLANG_WARN_BOOL_CONVERSION = YES;
264 | CLANG_WARN_COMMA = YES;
265 | CLANG_WARN_CONSTANT_CONVERSION = YES;
266 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
267 | CLANG_WARN_EMPTY_BODY = YES;
268 | CLANG_WARN_ENUM_CONVERSION = YES;
269 | CLANG_WARN_INFINITE_RECURSION = YES;
270 | CLANG_WARN_INT_CONVERSION = YES;
271 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
272 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
273 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
274 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
275 | CLANG_WARN_STRICT_PROTOTYPES = YES;
276 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
277 | CLANG_WARN_UNREACHABLE_CODE = YES;
278 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
279 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
280 | COPY_PHASE_STRIP = NO;
281 | ENABLE_STRICT_OBJC_MSGSEND = YES;
282 | ENABLE_TESTABILITY = YES;
283 | GCC_C_LANGUAGE_STANDARD = gnu99;
284 | GCC_DYNAMIC_NO_PIC = NO;
285 | GCC_NO_COMMON_BLOCKS = YES;
286 | GCC_OPTIMIZATION_LEVEL = 0;
287 | GCC_PREPROCESSOR_DEFINITIONS = (
288 | "DEBUG=1",
289 | "$(inherited)",
290 | );
291 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
292 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
293 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
294 | GCC_WARN_UNDECLARED_SELECTOR = YES;
295 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
296 | GCC_WARN_UNUSED_FUNCTION = YES;
297 | GCC_WARN_UNUSED_VARIABLE = YES;
298 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
299 | MTL_ENABLE_DEBUG_INFO = YES;
300 | ONLY_ACTIVE_ARCH = YES;
301 | SDKROOT = iphoneos;
302 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
303 | };
304 | name = Debug;
305 | };
306 | BF5D186B19BD939E00FA08CD /* Release */ = {
307 | isa = XCBuildConfiguration;
308 | buildSettings = {
309 | ALWAYS_SEARCH_USER_PATHS = NO;
310 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
311 | CLANG_CXX_LIBRARY = "libc++";
312 | CLANG_ENABLE_MODULES = YES;
313 | CLANG_ENABLE_OBJC_ARC = YES;
314 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
315 | CLANG_WARN_BOOL_CONVERSION = YES;
316 | CLANG_WARN_COMMA = YES;
317 | CLANG_WARN_CONSTANT_CONVERSION = YES;
318 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
319 | CLANG_WARN_EMPTY_BODY = YES;
320 | CLANG_WARN_ENUM_CONVERSION = YES;
321 | CLANG_WARN_INFINITE_RECURSION = YES;
322 | CLANG_WARN_INT_CONVERSION = YES;
323 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
324 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
325 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
326 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
327 | CLANG_WARN_STRICT_PROTOTYPES = YES;
328 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
329 | CLANG_WARN_UNREACHABLE_CODE = YES;
330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
331 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
332 | COPY_PHASE_STRIP = YES;
333 | ENABLE_NS_ASSERTIONS = NO;
334 | ENABLE_STRICT_OBJC_MSGSEND = YES;
335 | GCC_C_LANGUAGE_STANDARD = gnu99;
336 | GCC_NO_COMMON_BLOCKS = YES;
337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
339 | GCC_WARN_UNDECLARED_SELECTOR = YES;
340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
341 | GCC_WARN_UNUSED_FUNCTION = YES;
342 | GCC_WARN_UNUSED_VARIABLE = YES;
343 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
344 | MTL_ENABLE_DEBUG_INFO = NO;
345 | SDKROOT = iphoneos;
346 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
347 | VALIDATE_PRODUCT = YES;
348 | };
349 | name = Release;
350 | };
351 | BF5D186D19BD939E00FA08CD /* Debug */ = {
352 | isa = XCBuildConfiguration;
353 | buildSettings = {
354 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
355 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
356 | INFOPLIST_FILE = RateMyApp/Info.plist;
357 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
358 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
359 | PRODUCT_BUNDLE_IDENTIFIER = "com.varshylmobile.$(PRODUCT_NAME:rfc1034identifier)";
360 | PRODUCT_NAME = "$(TARGET_NAME)";
361 | SWIFT_SWIFT3_OBJC_INFERENCE = Default;
362 | SWIFT_VERSION = 4.0;
363 | };
364 | name = Debug;
365 | };
366 | BF5D186E19BD939E00FA08CD /* Release */ = {
367 | isa = XCBuildConfiguration;
368 | buildSettings = {
369 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
370 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
371 | INFOPLIST_FILE = RateMyApp/Info.plist;
372 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
373 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
374 | PRODUCT_BUNDLE_IDENTIFIER = "com.varshylmobile.$(PRODUCT_NAME:rfc1034identifier)";
375 | PRODUCT_NAME = "$(TARGET_NAME)";
376 | SWIFT_SWIFT3_OBJC_INFERENCE = Default;
377 | SWIFT_VERSION = 4.0;
378 | };
379 | name = Release;
380 | };
381 | BF5D187019BD939E00FA08CD /* Debug */ = {
382 | isa = XCBuildConfiguration;
383 | buildSettings = {
384 | BUNDLE_LOADER = "$(TEST_HOST)";
385 | FRAMEWORK_SEARCH_PATHS = (
386 | "$(SDKROOT)/Developer/Library/Frameworks",
387 | "$(inherited)",
388 | );
389 | GCC_PREPROCESSOR_DEFINITIONS = (
390 | "DEBUG=1",
391 | "$(inherited)",
392 | );
393 | INFOPLIST_FILE = RateMyAppTests/Info.plist;
394 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
395 | PRODUCT_BUNDLE_IDENTIFIER = "com.varshylmobile.$(PRODUCT_NAME:rfc1034identifier)";
396 | PRODUCT_NAME = "$(TARGET_NAME)";
397 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
398 | SWIFT_VERSION = 4.0;
399 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RateMyApp.app/RateMyApp";
400 | };
401 | name = Debug;
402 | };
403 | BF5D187119BD939E00FA08CD /* Release */ = {
404 | isa = XCBuildConfiguration;
405 | buildSettings = {
406 | BUNDLE_LOADER = "$(TEST_HOST)";
407 | FRAMEWORK_SEARCH_PATHS = (
408 | "$(SDKROOT)/Developer/Library/Frameworks",
409 | "$(inherited)",
410 | );
411 | INFOPLIST_FILE = RateMyAppTests/Info.plist;
412 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
413 | PRODUCT_BUNDLE_IDENTIFIER = "com.varshylmobile.$(PRODUCT_NAME:rfc1034identifier)";
414 | PRODUCT_NAME = "$(TARGET_NAME)";
415 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
416 | SWIFT_VERSION = 4.0;
417 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RateMyApp.app/RateMyApp";
418 | };
419 | name = Release;
420 | };
421 | /* End XCBuildConfiguration section */
422 |
423 | /* Begin XCConfigurationList section */
424 | BF5D184B19BD939C00FA08CD /* Build configuration list for PBXProject "RateMyApp" */ = {
425 | isa = XCConfigurationList;
426 | buildConfigurations = (
427 | BF5D186A19BD939E00FA08CD /* Debug */,
428 | BF5D186B19BD939E00FA08CD /* Release */,
429 | );
430 | defaultConfigurationIsVisible = 0;
431 | defaultConfigurationName = Release;
432 | };
433 | BF5D186C19BD939E00FA08CD /* Build configuration list for PBXNativeTarget "RateMyApp" */ = {
434 | isa = XCConfigurationList;
435 | buildConfigurations = (
436 | BF5D186D19BD939E00FA08CD /* Debug */,
437 | BF5D186E19BD939E00FA08CD /* Release */,
438 | );
439 | defaultConfigurationIsVisible = 0;
440 | defaultConfigurationName = Release;
441 | };
442 | BF5D186F19BD939E00FA08CD /* Build configuration list for PBXNativeTarget "RateMyAppTests" */ = {
443 | isa = XCConfigurationList;
444 | buildConfigurations = (
445 | BF5D187019BD939E00FA08CD /* Debug */,
446 | BF5D187119BD939E00FA08CD /* Release */,
447 | );
448 | defaultConfigurationIsVisible = 0;
449 | defaultConfigurationName = Release;
450 | };
451 | /* End XCConfigurationList section */
452 | };
453 | rootObject = BF5D184819BD939C00FA08CD /* Project object */;
454 | }
455 |
--------------------------------------------------------------------------------