mirror of
https://github.com/UrbanApps/Armchair.git
synced 2026-01-12 05:20:25 +01:00
Compare commits
66 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b92da20460 | ||
|
|
c54a35059c | ||
|
|
fedb19b8a7 | ||
|
|
51eca2a931 | ||
|
|
b22a605285 | ||
|
|
118a777ff2 | ||
|
|
690bf6be67 | ||
|
|
1ea2201dd3 | ||
|
|
fb6e2444be | ||
|
|
ddc5a0d7ea | ||
|
|
7f05ad9ef6 | ||
|
|
94817f1715 | ||
|
|
abeb3eb4b1 | ||
|
|
3d9c47bf60 | ||
|
|
fcd99c015a | ||
|
|
66fb9abb8d | ||
|
|
d5ba63a0a4 | ||
|
|
44b930169c | ||
|
|
f7ed2b2063 | ||
|
|
de6e53da44 | ||
|
|
ead9ec4656 | ||
|
|
ffd05b16a5 | ||
|
|
a8c1dfdae5 | ||
|
|
b3bd6ecc16 | ||
|
|
773c9c9ddd | ||
|
|
90ce675259 | ||
|
|
f53bf4637d | ||
|
|
804141486d | ||
|
|
86bb26031d | ||
|
|
74ae451630 | ||
|
|
c70e28dd42 | ||
|
|
04208a6f75 | ||
|
|
5c963bda6a | ||
|
|
04cb290dc1 | ||
|
|
a4f97f92c3 | ||
|
|
dfb230dcd2 | ||
|
|
87d68ec2a7 | ||
|
|
3c95c3df2d | ||
|
|
eaebe860da | ||
|
|
2bdd30f9ed | ||
|
|
adc0a0d580 | ||
|
|
dddaa62c25 | ||
|
|
ea3ab5ed28 | ||
|
|
068c4b92c1 | ||
|
|
ee3d999eb3 | ||
|
|
cc623a0157 | ||
|
|
0db2bb6fb0 | ||
|
|
6163929275 | ||
|
|
1949d8f07e | ||
|
|
7299a7067a | ||
|
|
f9736d6273 | ||
|
|
14c89be4b9 | ||
|
|
2389058301 | ||
|
|
8f0888670a | ||
|
|
10695e5df6 | ||
|
|
bf8c97e92b | ||
|
|
1807313d35 | ||
|
|
ef24da44d5 | ||
|
|
b9b50559aa | ||
|
|
8384be5c1e | ||
|
|
61f124d82c | ||
|
|
24b4f4ab8f | ||
|
|
a717880f55 | ||
|
|
d57ed6802a | ||
|
|
44b876e0a5 | ||
|
|
96f70c8bdf |
@@ -1 +1 @@
|
||||
3.0
|
||||
5.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
s.name = "Armchair"
|
||||
s.version = "0.1.1"
|
||||
s.version = "0.3.7"
|
||||
s.summary = "A simple yet powerful App Review Manager for iOS and OSX in Swift"
|
||||
s.description = <<-DESC
|
||||
A simple yet powerful App Review Manager for iOS and OSX in Swift.
|
||||
@@ -22,11 +22,12 @@ Pod::Spec.new do |s|
|
||||
s.source = { :git => 'https://github.com/UrbanApps/Armchair.git', :tag => s.version }
|
||||
|
||||
s.license = { :type => "MIT", :file => "LICENSE" }
|
||||
|
||||
|
||||
s.source_files = "Source/*.{h,swift}"
|
||||
s.resources = "Localization/*.lproj"
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.osx.deployment_target = '10.10'
|
||||
s.requires_arc = true
|
||||
|
||||
s.swift_version = '5.0'
|
||||
|
||||
end
|
||||
|
||||
@@ -318,24 +318,29 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 0800;
|
||||
LastUpgradeCheck = 1100;
|
||||
ORGANIZATIONNAME = Armchair;
|
||||
TargetAttributes = {
|
||||
E6A0AF6419C9CFF400C3A7DC = {
|
||||
CreatedOnToolsVersion = 6.0;
|
||||
ProvisioningStyle = Manual;
|
||||
};
|
||||
E6D8B8EF19C756A4001AD043 = {
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
F8111E3219A95C8B0040E7D1 = {
|
||||
CreatedOnToolsVersion = 6.0;
|
||||
LastSwiftMigration = 0800;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = F8111E2D19A95C8B0040E7D1 /* Build configuration list for PBXProject "Armchair" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = F8111E2919A95C8B0040E7D1;
|
||||
productRefGroup = F8111E2919A95C8B0040E7D1;
|
||||
@@ -483,6 +488,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
@@ -504,6 +510,7 @@
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = "Source/Info-Localizable.plist";
|
||||
INSTALL_PATH = "";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
@@ -538,7 +545,8 @@
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -563,7 +571,8 @@
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -610,18 +619,27 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@@ -652,6 +670,7 @@
|
||||
OTHER_SWIFT_FLAGS = "-DDebug";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
@@ -662,18 +681,27 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@@ -695,6 +723,7 @@
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
@@ -708,6 +737,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
@@ -720,7 +750,7 @@
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -730,6 +760,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
@@ -741,7 +772,7 @@
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
LastUpgradeVersion = "1100"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -27,6 +27,15 @@
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F8111E3219A95C8B0040E7D1"
|
||||
BuildableName = "Armchair.framework"
|
||||
BlueprintName = "Armchair"
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
@@ -39,17 +48,6 @@
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F8111E3219A95C8B0040E7D1"
|
||||
BuildableName = "Armchair.framework"
|
||||
BlueprintName = "Armchair"
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -70,8 +68,6 @@
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
LastUpgradeVersion = "1100"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -29,8 +29,6 @@
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -51,8 +49,6 @@
|
||||
ReferencedContainer = "container:Armchair.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -28,12 +28,13 @@
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
|
||||
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
||||
AppDelegate.setupArmchair()
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
let Pages = "361309726" // Pages iOS
|
||||
let appID = "361309726" // Pages iOS
|
||||
|
||||
#elseif os(OSX)
|
||||
|
||||
@@ -43,9 +44,12 @@
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
@IBOutlet weak var window: NSWindow!
|
||||
|
||||
override init() {
|
||||
AppDelegate.setupArmchair()
|
||||
}
|
||||
}
|
||||
|
||||
let Pages = "409201541" // Pages Mac
|
||||
let appID = "409201541" // Pages Mac
|
||||
|
||||
#else
|
||||
#endif
|
||||
@@ -54,10 +58,6 @@ import Armchair
|
||||
|
||||
extension AppDelegate {
|
||||
|
||||
override class func initialize() {
|
||||
AppDelegate.setupArmchair()
|
||||
}
|
||||
|
||||
class func setupArmchair() {
|
||||
// Normally, all the setup would be here.
|
||||
// But, because we are presenting a few different setups in the example,
|
||||
@@ -68,7 +68,7 @@ extension AppDelegate {
|
||||
// because it needs to receive application life-cycle notifications
|
||||
//
|
||||
// NOTE: The appID call always has to go before any other Armchair calls
|
||||
Armchair.appID(Pages)
|
||||
Armchair.appID(appID)
|
||||
Armchair.debugEnabled(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
@@ -30,6 +40,16 @@
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
@@ -59,6 +79,16 @@
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "83.5x83.5",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
||||
@@ -55,12 +55,12 @@ extension ViewController {
|
||||
|
||||
// Only set it if we are using Armchair localizations
|
||||
if !Armchair.useMainAppBundleForLocalizations() {
|
||||
let currentLocalization: NSString = NSBundle.mainBundle().preferredLocalizations[0] as NSString
|
||||
let currentLocalization: NSString = Bundle.main.preferredLocalizations[0] as NSString
|
||||
// Only set it if we are using a different language than this apps development language
|
||||
if let developmentLocalization = NSBundle.mainBundle().developmentLocalization {
|
||||
if currentLocalization != developmentLocalization {
|
||||
if let developmentLocalization = Bundle.main.developmentLocalization {
|
||||
if currentLocalization as String != developmentLocalization {
|
||||
languageLabelText = currentLocalization as String
|
||||
if let displayName = NSLocale(localeIdentifier: currentLocalization as String).displayNameForKey(NSLocaleIdentifier, value:currentLocalization) {
|
||||
if let displayName = (Locale(identifier: currentLocalization as String) as NSLocale).displayName(forKey: NSLocale.Key.identifier, value:currentLocalization) {
|
||||
languageLabelText = "\(displayName): \(currentLocalization)"
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ extension ViewController {
|
||||
resetAppReviewManager()
|
||||
|
||||
// The AppID is the only required setup
|
||||
Armchair.appID(Pages)
|
||||
Armchair.appID(appID)
|
||||
|
||||
// Debug means that it will popup on the next available change
|
||||
Armchair.debugEnabled(true)
|
||||
@@ -96,7 +96,7 @@ extension ViewController {
|
||||
resetAppReviewManager()
|
||||
|
||||
// The AppID is the only required setup
|
||||
Armchair.appID(Pages)
|
||||
Armchair.appID(appID)
|
||||
|
||||
// Debug means that it will popup on the next available change
|
||||
Armchair.debugEnabled(true)
|
||||
@@ -143,7 +143,7 @@ extension ViewController {
|
||||
Armchair.opensInStoreKit(false)
|
||||
|
||||
// This sets a custom tint color (applies only to UIAlertController).
|
||||
Armchair.tintColor(UIColor.brownColor())
|
||||
Armchair.tintColor(tintColor: UIColor.brown)
|
||||
#endif
|
||||
|
||||
// This sets the Affiliate code you want to use, but is not required.
|
||||
@@ -193,7 +193,7 @@ extension ViewController {
|
||||
resetAppReviewManager()
|
||||
|
||||
// The AppID is the only required setup
|
||||
Armchair.appID(Pages)
|
||||
Armchair.appID(appID)
|
||||
|
||||
// Debug means that it will popup on the next available change
|
||||
Armchair.debugEnabled(true)
|
||||
@@ -216,11 +216,11 @@ extension ViewController {
|
||||
}
|
||||
|
||||
@IBAction func openUrbanApps(_: AnyObject) {
|
||||
if let url = NSURL(string: "http://urbanapps.com") {
|
||||
if let url = URL(string: "http://urbanapps.com") {
|
||||
#if os(iOS)
|
||||
UIApplication.sharedApplication().openURL(url)
|
||||
UIApplication.shared.openURL(url)
|
||||
#elseif os(OSX)
|
||||
NSWorkspace.sharedWorkspace().openURL(url)
|
||||
NSWorkspace.shared.open(url)
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"If you enjoy using %@, would you mind taking a moment to rate it? It won't take more than a minute. Thanks for your support!" = "Cảm ơn bạn đã sử dụng ứng dụng %@ trong thời gian qua, bạn có thể dành chút thời gian để đánh giá ứng dụng trong AppStore không? Sẽ không mất quá 1 phút nhưng chúng tôi rất trân trọng điều đó!"
|
||||
"If you enjoy using %@, would you mind taking a moment to rate it? It won't take more than a minute. Thanks for your support!" = "Cảm ơn bạn đã sử dụng ứng dụng %@ trong thời gian qua, bạn có thể dành chút thời gian để đánh giá ứng dụng trong AppStore không? Sẽ không mất quá 1 phút nhưng chúng tôi rất trân trọng điều đó!";
|
||||
"Rate %@" = "Đánh giá %@";
|
||||
"No, Thanks" = "Không, xin cảm ơn";
|
||||
"Remind me later" = "Hãy nhắc nhở tôi sau";
|
||||
|
||||
@@ -33,13 +33,6 @@
|
||||
remoteGlobalIDString = E6D8B8F919C756A4001AD043;
|
||||
remoteInfo = ArmchairMac;
|
||||
};
|
||||
E60FA80119C90D3500179D70 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = E60FA7F719C90D3500179D70 /* Armchair.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = E6D8B92819C880A9001AD043;
|
||||
remoteInfo = ArmchairTests;
|
||||
};
|
||||
E60FA80319C90D7100179D70 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = E60FA7F719C90D3500179D70 /* Armchair.xcodeproj */;
|
||||
@@ -135,7 +128,6 @@
|
||||
E60FA80019C90D3500179D70 /* Armchair.framework */,
|
||||
E6F6156919C9FE8900C0B51C /* Armchair.bundle */,
|
||||
E6F6159819CA003600C0B51C /* Armchair.bundle */,
|
||||
E60FA80219C90D3500179D70 /* ArmchairTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -169,17 +161,18 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 0700;
|
||||
LastUpgradeCheck = 1100;
|
||||
ORGANIZATIONNAME = Armchair;
|
||||
TargetAttributes = {
|
||||
E60FA7B919C908FE00179D70 = {
|
||||
CreatedOnToolsVersion = 6.1;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = E60FA7B519C908FE00179D70 /* Build configuration list for PBXProject "Mac Example" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
@@ -216,13 +209,6 @@
|
||||
remoteRef = E60FA7FF19C90D3500179D70 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
E60FA80219C90D3500179D70 /* ArmchairTests.xctest */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.cfbundle;
|
||||
path = ArmchairTests.xctest;
|
||||
remoteRef = E60FA80119C90D3500179D70 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
E6F6156919C9FE8900C0B51C /* Armchair.bundle */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.cfbundle;
|
||||
@@ -296,17 +282,28 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
@@ -315,6 +312,7 @@
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
@@ -332,6 +330,7 @@
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -339,17 +338,28 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
@@ -358,6 +368,7 @@
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
@@ -367,6 +378,8 @@
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -374,11 +387,13 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
INFOPLIST_FILE = "Example/Info-Mac.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -386,11 +401,13 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
INFOPLIST_FILE = "Example/Info-Mac.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
25
README.md
25
README.md
@@ -93,7 +93,22 @@ platform :ios, '8.0'
|
||||
platform :osx, '10.10'
|
||||
use_frameworks!
|
||||
|
||||
pod 'Armchair', '>= 0.1'
|
||||
pod 'Armchair', '>= 0.3'
|
||||
|
||||
#Add the following in order to automatically set debug flags for armchair in debug builds
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
if target.name == 'Armchair'
|
||||
target.build_configurations.each do |config|
|
||||
if config.name == 'Debug'
|
||||
config.build_settings['OTHER_SWIFT_FLAGS'] = '-DDebug'
|
||||
else
|
||||
config.build_settings['OTHER_SWIFT_FLAGS'] = ''
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
Then, run the following command:
|
||||
@@ -269,6 +284,14 @@ Armchair.shouldPromptIfRated() -> Bool
|
||||
Armchair.shouldPromptIfRated(shouldPromptIfRated: Bool)
|
||||
```
|
||||
|
||||
The `useStoreKitReviewPrompt` configuration determines wether or not to try showing the SKStoreReviewController's requestReview() prompt instead of the default prompt. This setting has some effects only on iOS version >= 10.3. It's default value is `false`.
|
||||
```swift
|
||||
// GETTER
|
||||
Armchair.useStoreKitReviewPrompt() -> Bool
|
||||
// SETTER
|
||||
Armchair.useStoreKitReviewPrompt(useStoreKitReviewPrompt: Bool)
|
||||
```
|
||||
|
||||
The `useMainAppBundleForLocalizations` configuration is a way to tell Armchair that you are providing your own translations for the review prompt popup strings. This may be because you are just customizing them, or that you have set your own text for the popup. If set to `true`, the main bundle will always be used to load localized strings. You have to include the translations either in a file called `ArmchairLocalizable.strings` or the standard `Localizable.strings`. If set to `false` Armchair will look in its own translation bundle for the translating strings. It's default value is `false`.
|
||||
|
||||
```swift
|
||||
|
||||
@@ -243,6 +243,13 @@ public func shouldPromptIfRated(_ shouldPromptIfRated: Bool) {
|
||||
Manager.defaultManager.shouldPromptIfRated = shouldPromptIfRated
|
||||
}
|
||||
|
||||
/*
|
||||
* Return whether Armchair will try and present the Storekit review prompt (useful for custom dialog modification)
|
||||
*/
|
||||
public var shouldTryStoreKitReviewPrompt : Bool {
|
||||
return Manager.defaultManager.shouldTryStoreKitReviewPrompt
|
||||
}
|
||||
|
||||
/*
|
||||
* If set to true, the main bundle will always be used to load localized strings.
|
||||
* Set this to true if you have provided your own custom localizations in
|
||||
@@ -270,7 +277,7 @@ public func affiliateCode(_ affiliateCode: String) {
|
||||
}
|
||||
|
||||
/*
|
||||
* If you are an Apple Affiliate, enter your campaign code here.
|
||||
* If you are an Apple Affiliate, enter your campaign code here. (DEPRECATED)
|
||||
* Default => "Armchair-<appID>"
|
||||
*/
|
||||
public func affiliateCampaignCode() -> String {
|
||||
@@ -280,6 +287,18 @@ public func affiliateCampaignCode(_ affiliateCampaignCode: String) {
|
||||
Manager.defaultManager.affiliateCampaignCode = affiliateCampaignCode
|
||||
}
|
||||
|
||||
/*
|
||||
* If set to true, use SKStoreReviewController's requestReview() prompt instead of the default prompt.
|
||||
* If not on iOS 10.3+ or macOS 10.4+, resort to the default prompt.
|
||||
* Default => false.
|
||||
*/
|
||||
public func useStoreKitReviewPrompt() -> Bool {
|
||||
return Manager.defaultManager.useStoreKitReviewPrompt
|
||||
}
|
||||
public func useStoreKitReviewPrompt(_ useStoreKitReviewPrompt: Bool) {
|
||||
Manager.defaultManager.useStoreKitReviewPrompt = useStoreKitReviewPrompt
|
||||
}
|
||||
|
||||
/*
|
||||
* 'true' will show the Armchair alert everytime. Useful for testing
|
||||
* how your message looks and making sure the link to your app's review page works.
|
||||
@@ -356,6 +375,8 @@ public func resetDefaults() {
|
||||
Manager.defaultManager.didDisplayAlertClosure = nil
|
||||
Manager.defaultManager.didOptToRateClosure = nil
|
||||
Manager.defaultManager.didOptToRemindLaterClosure = nil
|
||||
|
||||
Manager.defaultManager.customAlertClosure = nil
|
||||
|
||||
#if os(iOS)
|
||||
Manager.defaultManager.usesAnimation = true
|
||||
@@ -562,6 +583,7 @@ public func rateApp() {
|
||||
*/
|
||||
|
||||
public typealias ArmchairClosure = () -> ()
|
||||
public typealias ArmchairClosureCustomAlert = (_ rateAppClosure: @escaping ArmchairClosure, _ remindLaterClosure: @escaping ArmchairClosure, _ noThanksClosure: @escaping ArmchairClosure) -> ()
|
||||
public typealias ArmchairAnimateClosure = (Bool) -> ()
|
||||
public typealias ArmchairShouldPromptClosure = (ArmchairTrackingInfo) -> Bool
|
||||
public typealias ArmchairShouldIncrementClosure = () -> Bool
|
||||
@@ -569,6 +591,9 @@ public typealias ArmchairShouldIncrementClosure = () -> Bool
|
||||
public func onDidDisplayAlert(_ didDisplayAlertClosure: ArmchairClosure?) {
|
||||
Manager.defaultManager.didDisplayAlertClosure = didDisplayAlertClosure
|
||||
}
|
||||
public func customAlertClosure(_ customAlertClosure: ArmchairClosureCustomAlert?) {
|
||||
Manager.defaultManager.customAlertClosure = customAlertClosure
|
||||
}
|
||||
public func onDidDeclineToRate(_ didDeclineToRateClosure: ArmchairClosure?) {
|
||||
Manager.defaultManager.didDeclineToRateClosure = didDeclineToRateClosure
|
||||
}
|
||||
@@ -690,7 +715,7 @@ public enum ArmchairKey: String, CustomStringConvertible {
|
||||
}
|
||||
|
||||
open class ArmchairTrackingInfo: CustomStringConvertible {
|
||||
open let info: Dictionary<ArmchairKey, AnyObject>
|
||||
public let info: Dictionary<ArmchairKey, AnyObject>
|
||||
|
||||
init(info: Dictionary<ArmchairKey, AnyObject>) {
|
||||
self.info = info
|
||||
@@ -722,7 +747,7 @@ public struct AppiraterKey {
|
||||
// MARK: PRIVATE Interface
|
||||
|
||||
#if os(iOS)
|
||||
open class ArmchairManager : NSObject, UIAlertViewDelegate, SKStoreProductViewControllerDelegate { }
|
||||
open class ArmchairManager : NSObject, SKStoreProductViewControllerDelegate { }
|
||||
#elseif os(OSX)
|
||||
open class ArmchairManager : NSObject, NSAlertDelegate { }
|
||||
#else
|
||||
@@ -742,11 +767,12 @@ open class Manager : ArmchairManager {
|
||||
// MARK: Review Alert & Properties
|
||||
|
||||
#if os(iOS)
|
||||
fileprivate var ratingAlert: UIAlertView? = nil
|
||||
fileprivate let reviewURLTemplate = "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=APP_ID&at=AFFILIATE_CODE&ct=AFFILIATE_CAMPAIGN_CODE"
|
||||
fileprivate var ratingAlert: UIAlertController? = nil
|
||||
fileprivate let reviewURLTemplate = "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=APP_ID&at=AFFILIATE_CODE&ct=AFFILIATE_CAMPAIGN_CODE&action=write-review"
|
||||
fileprivate let reviewURLTemplateiOS11 = "https://itunes.apple.com/us/app/idAPP_ID?ls=1&mt=8&at=AFFILIATE_CODE&action=write-review"
|
||||
#elseif os(OSX)
|
||||
private var ratingAlert: NSAlert? = nil
|
||||
private let reviewURLTemplate = "macappstore://itunes.apple.com/us/app/idAPP_ID?ls=1&mt=12&at=AFFILIATE_CODE&ct=AFFILIATE_CAMPAIGN_CODE"
|
||||
private let reviewURLTemplate = "macappstore://itunes.apple.com/us/app/idAPP_ID?ls=1&mt=12&at=AFFILIATE_CODE"
|
||||
#else
|
||||
#endif
|
||||
|
||||
@@ -858,6 +884,7 @@ open class Manager : ArmchairManager {
|
||||
// It is my affiliate code. It is better that somebody's code is used rather than nobody's.
|
||||
fileprivate var affiliateCode: String = "11l7j9"
|
||||
fileprivate var affiliateCampaignCode: String = "Armchair"
|
||||
fileprivate var useStoreKitReviewPrompt: Bool = false
|
||||
|
||||
#if os(iOS)
|
||||
fileprivate var usesAnimation: Bool = true
|
||||
@@ -920,6 +947,8 @@ open class Manager : ArmchairManager {
|
||||
var didOptToRateClosure: ArmchairClosure?
|
||||
var didOptToRemindLaterClosure: ArmchairClosure?
|
||||
|
||||
var customAlertClosure: ArmchairClosureCustomAlert?
|
||||
|
||||
#if os(iOS)
|
||||
var willPresentModalViewClosure: ArmchairAnimateClosure?
|
||||
var didDismissModalViewClosure: ArmchairAnimateClosure?
|
||||
@@ -1030,7 +1059,7 @@ open class Manager : ArmchairManager {
|
||||
userDefaultsObject?.setInteger(incrementKeyCount, forKey:incrementKey)
|
||||
|
||||
debugLog("Incremented \(incrementKeyType): \(incrementKeyCount)")
|
||||
|
||||
|
||||
} else if tracksNewVersions {
|
||||
// it's a new version of the app, so restart tracking
|
||||
resetAllCounters()
|
||||
@@ -1183,103 +1212,122 @@ open class Manager : ArmchairManager {
|
||||
return (daysBeforeReminding > 0 && remindButtonTitle != nil)
|
||||
}
|
||||
|
||||
fileprivate func showRatingAlert() {
|
||||
public var shouldTryStoreKitReviewPrompt : Bool {
|
||||
#if os(iOS)
|
||||
if (operatingSystemVersion >= 8 && usesAlertController) || operatingSystemVersion >= 9 {
|
||||
/* iOS 8 uses new UIAlertController API*/
|
||||
let alertView : UIAlertController = UIAlertController(title: reviewTitle, message: reviewMessage, preferredStyle: UIAlertControllerStyle.alert)
|
||||
alertView.addAction(UIAlertAction(title: cancelButtonTitle, style:UIAlertActionStyle.cancel, handler: {
|
||||
if #available(iOS 10.3, *), useStoreKitReviewPrompt {
|
||||
return true
|
||||
}
|
||||
#endif
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
fileprivate func requestStoreKitReviewPrompt() -> Bool {
|
||||
if #available(iOS 10.3, OSX 10.14, *), useStoreKitReviewPrompt {
|
||||
SKStoreReviewController.requestReview()
|
||||
// Assume this version is rated. There is no API to tell if the user actaully rated.
|
||||
userDefaultsObject?.setBool(true, forKey: keyForArmchairKeyType(ArmchairKey.RatedCurrentVersion))
|
||||
userDefaultsObject?.setBool(true, forKey: keyForArmchairKeyType(ArmchairKey.RatedAnyVersion))
|
||||
userDefaultsObject?.synchronize()
|
||||
|
||||
#if os(iOS)
|
||||
closeModalPanel()
|
||||
#endif
|
||||
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
fileprivate func showRatingAlert() {
|
||||
if let customClosure = customAlertClosure {
|
||||
customClosure({[weak self] in
|
||||
if let result = self?.requestStoreKitReviewPrompt(), result {
|
||||
///Showed storekit prompt, all done
|
||||
} else {
|
||||
/// Didn't show storekit prompt, present app store manually
|
||||
self?._rateApp()
|
||||
}
|
||||
|
||||
}, {[weak self] in self?.remindMeLater()}, {[weak self] in self?.dontRate()})
|
||||
if let closure = self.didDisplayAlertClosure {
|
||||
closure()
|
||||
}
|
||||
} else {
|
||||
if requestStoreKitReviewPrompt() {
|
||||
///Showed storekit prompt, all done
|
||||
return
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
/// Didn't show storekit prompt, present app store manually
|
||||
let alertView : UIAlertController = UIAlertController(title: reviewTitle, message: reviewMessage, preferredStyle: .alert)
|
||||
alertView.addAction(UIAlertAction(title: rateButtonTitle, style: .default, handler: {
|
||||
(alert: UIAlertAction!) in
|
||||
self.dontRate()
|
||||
self._rateApp()
|
||||
}))
|
||||
if (showsRemindButton()) {
|
||||
alertView.addAction(UIAlertAction(title: remindButtonTitle!, style:UIAlertActionStyle.default, handler: {
|
||||
alertView.addAction(UIAlertAction(title: remindButtonTitle!, style: .default, handler: {
|
||||
(alert: UIAlertAction!) in
|
||||
self.remindMeLater()
|
||||
}))
|
||||
}
|
||||
alertView.addAction(UIAlertAction(title: rateButtonTitle, style:UIAlertActionStyle.default, handler: {
|
||||
alertView.addAction(UIAlertAction(title: cancelButtonTitle, style: .cancel, handler: {
|
||||
(alert: UIAlertAction!) in
|
||||
self._rateApp()
|
||||
self.dontRate()
|
||||
}))
|
||||
|
||||
|
||||
ratingAlert = alertView
|
||||
|
||||
// get the top most controller (= the StoreKit Controller) and dismiss it
|
||||
if let presentingController = UIApplication.shared.keyWindow?.rootViewController {
|
||||
if let topController = topMostViewController(presentingController) {
|
||||
topController.present(alertView, animated: usesAnimation) {
|
||||
if let topController = Manager.topMostViewController(presentingController) {
|
||||
topController.present(alertView, animated: usesAnimation) { [weak self] in
|
||||
if let closure = self?.didDisplayAlertClosure {
|
||||
closure()
|
||||
}
|
||||
print("presentViewController() completed")
|
||||
}
|
||||
}
|
||||
// note that tint color has to be set after the controller is presented in order to take effect (last checked in iOS 9.3)
|
||||
alertView.view.tintColor = tintColor
|
||||
}
|
||||
|
||||
#elseif os(OSX)
|
||||
|
||||
} else {
|
||||
/* Otherwise we use UIAlertView still */
|
||||
var alertView: UIAlertView
|
||||
if (showsRemindButton()) {
|
||||
alertView = UIAlertView(title: reviewTitle, message: reviewMessage, delegate: self, cancelButtonTitle: cancelButtonTitle, otherButtonTitles: remindButtonTitle!, rateButtonTitle)
|
||||
} else {
|
||||
alertView = UIAlertView(title: reviewTitle, message: reviewMessage, delegate: self, cancelButtonTitle: cancelButtonTitle, otherButtonTitles: rateButtonTitle)
|
||||
let alert: NSAlert = NSAlert()
|
||||
alert.messageText = reviewTitle
|
||||
alert.informativeText = reviewMessage
|
||||
alert.addButton(withTitle: rateButtonTitle)
|
||||
if showsRemindButton() {
|
||||
alert.addButton(withTitle: remindButtonTitle!)
|
||||
}
|
||||
// If we have a remind button, show it first. Otherwise show the rate button
|
||||
// If we have a remind button, show the rate button next. Otherwise stop adding buttons.
|
||||
alert.addButton(withTitle: cancelButtonTitle)
|
||||
ratingAlert = alert
|
||||
|
||||
alertView.cancelButtonIndex = -1
|
||||
ratingAlert = alertView
|
||||
alertView.show()
|
||||
if let window = NSApplication.shared.keyWindow {
|
||||
alert.beginSheetModal(for: window) {
|
||||
(response: NSApplication.ModalResponse) in
|
||||
self.handleNSAlertResponse(response)
|
||||
}
|
||||
} else {
|
||||
let response = alert.runModal()
|
||||
handleNSAlertResponse(response)
|
||||
}
|
||||
|
||||
if let closure = didDisplayAlertClosure {
|
||||
if let closure = self.didDisplayAlertClosure {
|
||||
closure()
|
||||
}
|
||||
}
|
||||
|
||||
#elseif os(OSX)
|
||||
|
||||
let alert: NSAlert = NSAlert()
|
||||
alert.messageText = reviewTitle
|
||||
alert.informativeText = reviewMessage
|
||||
alert.addButton(withTitle: rateButtonTitle)
|
||||
if showsRemindButton() {
|
||||
alert.addButton(withTitle: remindButtonTitle!)
|
||||
}
|
||||
alert.addButton(withTitle: cancelButtonTitle)
|
||||
ratingAlert = alert
|
||||
|
||||
if let window = NSApplication.shared().keyWindow {
|
||||
alert.beginSheetModal(for: window) {
|
||||
(response: NSModalResponse) in
|
||||
self.handleNSAlert(returnCode: response)
|
||||
}
|
||||
} else {
|
||||
let returnCode = alert.runModal()
|
||||
handleNSAlert(returnCode:returnCode)
|
||||
}
|
||||
|
||||
if let closure = self.didDisplayAlertClosure {
|
||||
closure()
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: -
|
||||
// MARK: PRIVATE Alert View / StoreKit Delegate Methods
|
||||
|
||||
#if os(iOS)
|
||||
open func alertView(_ alertView: UIAlertView, didDismissWithButtonIndex buttonIndex: Int) {
|
||||
// cancelButtonIndex is set to -1 to show the cancel button up top, but a tap on it ends up here with index 0
|
||||
if (alertView.cancelButtonIndex == buttonIndex || 0 == buttonIndex) {
|
||||
// they don't want to rate it
|
||||
dontRate()
|
||||
} else if (showsRemindButton() && 1 == buttonIndex) {
|
||||
// remind them later
|
||||
remindMeLater()
|
||||
} else {
|
||||
// they want to rate it
|
||||
_rateApp()
|
||||
}
|
||||
}
|
||||
|
||||
//Delegate call from the StoreKit view.
|
||||
open func productViewControllerDidFinish(_ viewController: SKStoreProductViewController!) {
|
||||
@@ -1288,45 +1336,45 @@ open class Manager : ArmchairManager {
|
||||
|
||||
//Close the in-app rating (StoreKit) view and restore the previous status bar style.
|
||||
fileprivate func closeModalPanel() {
|
||||
let usedAnimation = usesAnimation
|
||||
if modalPanelOpen {
|
||||
UIApplication.shared.setStatusBarStyle(currentStatusBarStyle, animated:usesAnimation)
|
||||
let usedAnimation = usesAnimation
|
||||
|
||||
modalPanelOpen = false
|
||||
|
||||
// get the top most controller (= the StoreKit Controller) and dismiss it
|
||||
if let presentingController = UIApplication.shared.keyWindow?.rootViewController {
|
||||
if let topController = topMostViewController(presentingController) {
|
||||
topController.dismiss(animated: usesAnimation) {
|
||||
if let closure = self.didDismissModalViewClosure {
|
||||
closure(usedAnimation)
|
||||
}
|
||||
}
|
||||
if let topController = Manager.topMostViewController(presentingController) {
|
||||
topController.dismiss(animated: usesAnimation) {}
|
||||
currentStatusBarStyle = UIStatusBarStyle.default
|
||||
}
|
||||
}
|
||||
}
|
||||
if let closure = self.didDismissModalViewClosure {
|
||||
closure(usedAnimation)
|
||||
}
|
||||
}
|
||||
|
||||
#elseif os(OSX)
|
||||
|
||||
private func handleNSAlert(returnCode: NSInteger) {
|
||||
switch (returnCode) {
|
||||
case NSAlertFirstButtonReturn:
|
||||
// they want to rate it
|
||||
_rateApp()
|
||||
case NSAlertSecondButtonReturn:
|
||||
// remind them later or cancel
|
||||
if showsRemindButton() {
|
||||
remindMeLater()
|
||||
} else {
|
||||
dontRate()
|
||||
}
|
||||
case NSAlertThirdButtonReturn:
|
||||
// they don't want to rate it
|
||||
dontRate()
|
||||
private func handleNSAlertResponse(_ response: NSApplication.ModalResponse) {
|
||||
switch (response) {
|
||||
case .alertFirstButtonReturn:
|
||||
// they want to rate it
|
||||
_rateApp()
|
||||
case .alertSecondButtonReturn:
|
||||
// remind them later or cancel
|
||||
if showsRemindButton() {
|
||||
remindMeLater()
|
||||
} else {
|
||||
dontRate()
|
||||
}
|
||||
case .alertThirdButtonReturn:
|
||||
// they don't want to rate it
|
||||
dontRate()
|
||||
default:
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
@@ -1382,7 +1430,7 @@ open class Manager : ArmchairManager {
|
||||
}
|
||||
|
||||
|
||||
if let rootController = getRootViewController() {
|
||||
if let rootController = Manager.getRootViewController() {
|
||||
rootController.present(storeViewController, animated: usesAnimation) {
|
||||
self.modalPanelOpen = true
|
||||
|
||||
@@ -1397,10 +1445,9 @@ open class Manager : ArmchairManager {
|
||||
if let url = URL(string: reviewURLString()) {
|
||||
UIApplication.shared.openURL(url)
|
||||
}
|
||||
}
|
||||
|
||||
// Check for iOS simulator
|
||||
#if (arch(i386) || arch(x86_64)) && os(iOS)
|
||||
}
|
||||
|
||||
#if targetEnvironment(simulator)
|
||||
debugLog("iTunes App Store is not supported on the iOS simulator.")
|
||||
debugLog(" - We would have went to \(reviewURLString()).")
|
||||
debugLog(" - Try running on a test-device")
|
||||
@@ -1410,20 +1457,25 @@ open class Manager : ArmchairManager {
|
||||
|
||||
#elseif os(OSX)
|
||||
if let url = URL(string: reviewURLString()) {
|
||||
let opened = NSWorkspace.shared().open(url)
|
||||
let opened = NSWorkspace.shared.open(url)
|
||||
if !opened {
|
||||
debugLog("Failed to open \(url)")
|
||||
}
|
||||
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
|
||||
fileprivate func reviewURLString() -> String {
|
||||
let template = reviewURLTemplate
|
||||
#if os(iOS)
|
||||
let template = operatingSystemVersion >= 11 ? reviewURLTemplateiOS11 : reviewURLTemplate
|
||||
#elseif os(OSX)
|
||||
let template = reviewURLTemplate
|
||||
#else
|
||||
#endif
|
||||
var reviewURL = template.replacingOccurrences(of: "APP_ID", with: "\(appID)")
|
||||
reviewURL = reviewURL.replacingOccurrences(of: "AFFILIATE_CODE", with: "\(affiliateCode)")
|
||||
reviewURL = reviewURL.replacingOccurrences(of: "AFFILIATE_CAMPAIGN_CODE", with: "\(affiliateCampaignCode)")
|
||||
return reviewURL
|
||||
}
|
||||
|
||||
@@ -1649,7 +1701,7 @@ open class Manager : ArmchairManager {
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
private func topMostViewController(_ controller: UIViewController?) -> UIViewController? {
|
||||
private static func topMostViewController(_ controller: UIViewController?) -> UIViewController? {
|
||||
var isPresenting: Bool = false
|
||||
var topController: UIViewController? = controller
|
||||
repeat {
|
||||
@@ -1667,14 +1719,14 @@ open class Manager : ArmchairManager {
|
||||
return topController
|
||||
}
|
||||
|
||||
private func getRootViewController() -> UIViewController? {
|
||||
private static func getRootViewController() -> UIViewController? {
|
||||
if var window = UIApplication.shared.keyWindow {
|
||||
|
||||
if window.windowLevel != UIWindowLevelNormal {
|
||||
if window.windowLevel != UIWindow.Level.normal {
|
||||
let windows: NSArray = UIApplication.shared.windows as NSArray
|
||||
for candidateWindow in windows {
|
||||
if let candidateWindow = candidateWindow as? UIWindow {
|
||||
if candidateWindow.windowLevel == UIWindowLevelNormal {
|
||||
if candidateWindow.windowLevel == UIWindow.Level.normal {
|
||||
window = candidateWindow
|
||||
break
|
||||
}
|
||||
@@ -1682,34 +1734,47 @@ open class Manager : ArmchairManager {
|
||||
}
|
||||
}
|
||||
|
||||
for subView in window.subviews {
|
||||
if let responder = subView.next {
|
||||
if responder.isKind(of: UIViewController.self) {
|
||||
return topMostViewController(responder as? UIViewController)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return iterateSubViewsForViewController(window)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
private static func iterateSubViewsForViewController(_ parentView: UIView) -> UIViewController? {
|
||||
for subView in parentView.subviews {
|
||||
if let responder = subView.next {
|
||||
if responder.isKind(of: UIViewController.self) {
|
||||
return topMostViewController(responder as? UIViewController)
|
||||
}
|
||||
}
|
||||
|
||||
if let found = iterateSubViewsForViewController(subView) {
|
||||
return found
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
private func hideRatingAlert() {
|
||||
if let alert = ratingAlert {
|
||||
debugLog("Hiding Alert")
|
||||
#if os(iOS)
|
||||
if alert.isVisible {
|
||||
alert.dismiss(withClickedButtonIndex: alert.cancelButtonIndex, animated: false)
|
||||
let isAlertVisible = alert.isViewLoaded && alert.view.window != nil
|
||||
if isAlertVisible {
|
||||
alert.dismiss(animated: false, completion: {
|
||||
self.dontRate()
|
||||
})
|
||||
}
|
||||
#elseif os(OSX)
|
||||
if let window = NSApplication.shared().keyWindow {
|
||||
if let window = NSApplication.shared.keyWindow {
|
||||
if let parent = window.sheetParent {
|
||||
parent.endSheet(window)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
#endif
|
||||
ratingAlert = nil
|
||||
@@ -1727,12 +1792,12 @@ open class Manager : ArmchairManager {
|
||||
// MARK: -
|
||||
// MARK: Notification Handlers
|
||||
|
||||
public func appWillResignActive(_ notification: Notification) {
|
||||
@objc public func appWillResignActive(_ notification: Notification) {
|
||||
debugLog("appWillResignActive:")
|
||||
hideRatingAlert()
|
||||
}
|
||||
|
||||
public func applicationDidFinishLaunching(_ notification: Notification) {
|
||||
@objc public func applicationDidFinishLaunching(_ notification: Notification) {
|
||||
DispatchQueue.global(qos: .background).async {
|
||||
self.debugLog("applicationDidFinishLaunching:")
|
||||
self.migrateKeysIfNecessary()
|
||||
@@ -1740,7 +1805,7 @@ open class Manager : ArmchairManager {
|
||||
}
|
||||
}
|
||||
|
||||
public func applicationWillEnterForeground(_ notification: Notification) {
|
||||
@objc public func applicationWillEnterForeground(_ notification: Notification) {
|
||||
DispatchQueue.global(qos: .background).async {
|
||||
self.debugLog("applicationWillEnterForeground:")
|
||||
self.migrateKeysIfNecessary()
|
||||
@@ -1767,15 +1832,16 @@ open class Manager : ArmchairManager {
|
||||
|
||||
fileprivate func setupNotifications() {
|
||||
#if os(iOS)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(Manager.appWillResignActive(_:)), name: NSNotification.Name.UIApplicationWillResignActive, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(UIApplicationDelegate.applicationDidFinishLaunching(_:)), name: NSNotification.Name.UIApplicationDidFinishLaunching, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(UIApplicationDelegate.applicationWillEnterForeground(_:)), name: NSNotification.Name.UIApplicationWillEnterForeground, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(Manager.appWillResignActive(_:)), name: UIApplication.willResignActiveNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(Manager.applicationDidFinishLaunching(_:)), name: UIApplication.didFinishLaunchingNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(Manager.applicationWillEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
|
||||
#elseif os(OSX)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(Manager.appWillResignActive(_:)), name: NSNotification.Name.NSApplicationWillResignActive, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(NSApplicationDelegate.applicationDidFinishLaunching(_:)), name: NSNotification.Name.NSApplicationDidFinishLaunching, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(Manager.applicationWillEnterForeground(_:)), name: NSNotification.Name.NSApplicationWillBecomeActive, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(Manager.appWillResignActive(_:)), name: NSApplication.willResignActiveNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(Manager.applicationDidFinishLaunching(_:)), name: NSApplication.didFinishLaunchingNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(Manager.applicationWillEnterForeground(_:)), name: NSApplication.willBecomeActiveNotification, object: nil)
|
||||
#else
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// MARK: -
|
||||
@@ -1800,6 +1866,7 @@ open class Manager : ArmchairManager {
|
||||
}
|
||||
fileprivate func debugLog(_ log: String, file: StaticString = #file, function: StaticString = #function, line: UInt = #line) {
|
||||
logger(self, log, file, function, line)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -63,13 +63,6 @@
|
||||
remoteGlobalIDString = E6D8B8B519C7274F001AD043;
|
||||
remoteInfo = Armchair;
|
||||
};
|
||||
E6D8B8BC19C7382B001AD043 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F8111E4E19A95D7C0040E7D1 /* Armchair.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = E6D8B8B619C7274F001AD043;
|
||||
remoteInfo = ArmchairTests;
|
||||
};
|
||||
E6E5F4C019C8E156008A6C1B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F8111E4E19A95D7C0040E7D1 /* Armchair.xcodeproj */;
|
||||
@@ -94,9 +87,9 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
939461E32333725B00C8A00E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
939461E42333725B00C8A00E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
E60FA81719C9219600179D70 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
|
||||
E66F854919D0A7C600AD80EC /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
E6A0AF5D19C9C89E00C3A7DC /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
E6C49DC519C23C91006A4544 /* iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E6E5F4C219C8E18E008A6C1B /* armchair.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = armchair.jpg; sourceTree = "<group>"; };
|
||||
E6E5F4CC19C8E388008A6C1B /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
|
||||
@@ -126,7 +119,6 @@
|
||||
E6E5F4C119C8E156008A6C1B /* Armchair.framework */,
|
||||
E6A0AFB319C9D24000C3A7DC /* Armchair.bundle */,
|
||||
E6D06B5619CB412500DE5D11 /* Armchair.bundle */,
|
||||
E6D8B8BD19C7382B001AD043 /* ArmchairTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -196,21 +188,23 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 0700;
|
||||
LastUpgradeCheck = 1100;
|
||||
ORGANIZATIONNAME = Armchair;
|
||||
TargetAttributes = {
|
||||
F8111E0419A951050040E7D1 = {
|
||||
CreatedOnToolsVersion = 6.0;
|
||||
DevelopmentTeam = 9H3S97RP4K;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = F8111E0019A951050040E7D1 /* Build configuration list for PBXProject "iOS Example" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = F8111DFC19A951050040E7D1;
|
||||
productRefGroup = F8111DFC19A951050040E7D1;
|
||||
@@ -250,13 +244,6 @@
|
||||
remoteRef = E6D8B8BA19C7382B001AD043 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
E6D8B8BD19C7382B001AD043 /* ArmchairTests.xctest */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.cfbundle;
|
||||
path = ArmchairTests.xctest;
|
||||
remoteRef = E6D8B8BC19C7382B001AD043 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
E6E5F4C119C8E156008A6C1B /* Armchair.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
@@ -317,7 +304,7 @@
|
||||
E66F854819D0A7C600AD80EC /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
E66F854919D0A7C600AD80EC /* en */,
|
||||
939461E42333725B00C8A00E /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
@@ -325,7 +312,7 @@
|
||||
F8111E1019A951050040E7D1 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
E6A0AF5D19C9C89E00C3A7DC /* en */,
|
||||
939461E32333725B00C8A00E /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
@@ -337,17 +324,28 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
@@ -356,6 +354,7 @@
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
@@ -368,11 +367,12 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -381,17 +381,28 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
@@ -399,15 +410,18 @@
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
@@ -416,11 +430,10 @@
|
||||
F8111E2419A951050040E7D1 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Example/Info-iOS.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -429,23 +442,24 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "iOS Example";
|
||||
PROVISIONING_PROFILE = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
F8111E2519A951050040E7D1 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Example/Info-iOS.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "iOS Example";
|
||||
PROVISIONING_PROFILE = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user