Adding rating code

We’ve noticed that most people went to the App Store to leave really
bad reviews of the app and it is severely affecting our discoverability.
We will ask for a rating if we see you’ve been using the app for some
time. If you rate the app or decline to rate, that’s fine. We will
never bug you again!
pull/1/head
Frederic Jacobs 9 years ago
parent 2d5d8db721
commit 0090030f3d

@ -14,6 +14,7 @@ pod 'Mantle', '~> 2.0.4'
pod 'FFCircularProgressView', '~> 0.5'
pod 'SCWaveformView', '~> 1.0'
pod 'YapDatabase/SQLCipher', '~> 2.7'
pod 'iRate', '~> 1.11'
pod 'SSKeychain'
pod 'DJWActionSheet'

@ -37,6 +37,7 @@ PODS:
- DJWActionSheet (1.0.4)
- FFCircularProgressView (0.5)
- HKDFKit (0.0.3)
- iRate (1.11.4)
- JSQMessagesViewController (7.1.0):
- JSQSystemSoundPlayer (~> 2.0.1)
- JSQSystemSoundPlayer (2.0.1)
@ -68,6 +69,7 @@ DEPENDENCIES:
- AxolotlKit (~> 0.7)
- DJWActionSheet
- FFCircularProgressView (~> 0.5)
- iRate (~> 1.11)
- JSQMessagesViewController (from `https://github.com/WhisperSystems/JSQMessagesViewController`,
commit `e5582fef8a6b3e35f8070361ef37237222da712b`)
- libPhoneNumber-iOS (~> 0.8.7)
@ -112,6 +114,7 @@ SPEC CHECKSUMS:
DJWActionSheet: 2fe54b1298a7f0fe44462233752c76a530e0cd80
FFCircularProgressView: 683a4ab1e1bd613246a3dffa61503ffdebcde8d8
HKDFKit: c058305d6f64b84f28c50bd7aa89574625bcb62a
iRate: 599ed07c854e0695f3c605d1b2a64c67d912acb7
JSQMessagesViewController: ca11f86fa68ca70835f05e169df9244147c1dc40
JSQSystemSoundPlayer: c5850e77a4363ffd374cd851154b9af93264ed8d
libPhoneNumber-iOS: 1bccd3288375d954b0b904e26061cecaa0fb83d6

@ -1 +1 @@
Subproject commit c43d25e93c1b3d25a866e618ff1b45f3a940f332
Subproject commit 1101c9b712ac694978812826833de1177e71a7a4

@ -400,6 +400,7 @@
B6C6AE551A305ED1006BAF8F /* redphone.cer in Resources */ = {isa = PBXBuildFile; fileRef = B6C6AE531A305ED1006BAF8F /* redphone.cer */; };
B6C6AE561A305ED1006BAF8F /* textsecure.cer in Resources */ = {isa = PBXBuildFile; fileRef = B6C6AE541A305ED1006BAF8F /* textsecure.cer */; };
B6C93C4E199567AD00EDF894 /* DebugLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = B6C93C4D199567AD00EDF894 /* DebugLogger.m */; };
B6DA6B071B8A2F9A00CA6F98 /* AppStoreRating.m in Sources */ = {isa = PBXBuildFile; fileRef = B6DA6B061B8A2F9A00CA6F98 /* AppStoreRating.m */; };
B6E314C91A38FAAF00A41AFB /* TSFingerprintGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = B6E314C81A38FAAF00A41AFB /* TSFingerprintGenerator.m */; };
B6F509971AA53F760068F56A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B6F509951AA53F760068F56A /* Localizable.strings */; };
B6FAAAE81A41BC6C007FEC1D /* TSAttachmentPointer.m in Sources */ = {isa = PBXBuildFile; fileRef = B6FAAAE71A41BC6C007FEC1D /* TSAttachmentPointer.m */; };
@ -1080,6 +1081,8 @@
B6C6AE541A305ED1006BAF8F /* textsecure.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = textsecure.cer; sourceTree = "<group>"; };
B6C93C4C199567AD00EDF894 /* DebugLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebugLogger.h; sourceTree = "<group>"; };
B6C93C4D199567AD00EDF894 /* DebugLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DebugLogger.m; sourceTree = "<group>"; };
B6DA6B051B8A2F9A00CA6F98 /* AppStoreRating.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppStoreRating.h; sourceTree = "<group>"; };
B6DA6B061B8A2F9A00CA6F98 /* AppStoreRating.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppStoreRating.m; sourceTree = "<group>"; };
B6E314C71A38FAAF00A41AFB /* TSFingerprintGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSFingerprintGenerator.h; sourceTree = "<group>"; };
B6E314C81A38FAAF00A41AFB /* TSFingerprintGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSFingerprintGenerator.m; sourceTree = "<group>"; };
B6F509961AA53F760068F56A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = translations/en.lproj/Localizable.strings; sourceTree = "<group>"; };
@ -1753,6 +1756,8 @@
76EB04C818170B33006006FC /* util */ = {
isa = PBXGroup;
children = (
B6DA6B051B8A2F9A00CA6F98 /* AppStoreRating.h */,
B6DA6B061B8A2F9A00CA6F98 /* AppStoreRating.m */,
B6FE7EB81ADD63AE00A6D22F /* NSData+ows_StripToken.h */,
B6FE7EB91ADD63AE00A6D22F /* NSData+ows_StripToken.m */,
A59E6D701A79E5D100D98E2E /* MIMETypeUtil.h */,
@ -2982,6 +2987,7 @@
76EB05BA18170B33006006FC /* CommitPacket.m in Sources */,
76EB060218170B33006006FC /* InitiatorSessionDescriptor.m in Sources */,
76EB05FC18170B33006006FC /* CallConnectUtil_Server.m in Sources */,
B6DA6B071B8A2F9A00CA6F98 /* AppStoreRating.m in Sources */,
76EB062418170B33006006FC /* PriorityQueue.m in Sources */,
B6BADBE71B88D1AC0086A80D /* LockInteractionController.m in Sources */,
76EB061A18170B33006006FC /* DiscardingLog.m in Sources */,

@ -1,4 +1,5 @@
#import "AppDelegate.h"
#import "AppStoreRating.h"
#import "CategorizingLogger.h"
#import "ContactsManager.h"
#import "DebugLogger.h"
@ -29,6 +30,10 @@ static NSString * const kURLHostVerifyPrefix = @"verify";
#pragma mark Detect updates - perform migrations
+ (void)initialize{
[AppStoreRating setupRatingLibrary];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self setupAppearance];
[[PushManager sharedManager] registerPushKitNotificationFuture];

@ -0,0 +1,15 @@
//
// AppStoreRating.h
// Signal
//
// Created by Frederic Jacobs on 23/08/15.
// Copyright (c) 2015 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface AppStoreRating : NSObject
+ (void)setupRatingLibrary;
@end

@ -0,0 +1,28 @@
//
// AppStoreRating.m
// Signal
//
// Created by Frederic Jacobs on 23/08/15.
// Copyright (c) 2015 Open Whisper Systems. All rights reserved.
//
#import "AppStoreRating.h"
#import <iRate/iRate.h>
@implementation AppStoreRating
+ (void)setupRatingLibrary
{
iRate *rate = [iRate sharedInstance];
rate.appStoreID = 874139669;
rate.daysUntilPrompt = 15;
rate.usesUntilPrompt = 10;
rate.remindPeriod = 20;
rate.onlyPromptIfLatestVersion = YES;
rate.promptForNewVersionIfUserRated = NO;
rate.messageTitle = NSLocalizedString(@"RATING_TITLE", nil);
rate.message = NSLocalizedString(@"RATING_MSG", nil);
rate.rateButtonLabel = NSLocalizedString(@"RATING_RATE", nil);
}
@end
Loading…
Cancel
Save