Update Readme, Fix custom alerts, update review URL

Update version in podspec to 0.3.0 (Swift 3)
Update readme to match podfile
Make custom alert closure parameters escaping
Review URL: auto-open to write review page
This commit is contained in:
whitepixelstudios
2017-02-17 12:54:25 +10:00
committed by whitepixelstudios
parent b9b50559aa
commit bf8c97e92b
3 changed files with 21 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "Armchair"
s.version = "0.1.1"
s.version = "0.3.0"
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.
@@ -28,5 +28,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.requires_arc = true
end

View File

@@ -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:

View File

@@ -564,7 +564,7 @@ public func rateApp() {
*/
public typealias ArmchairClosure = () -> ()
public typealias ArmchairClosureCustomAlert = (_ rateAppClosure: ArmchairClosure, _ remindLaterClosure: ArmchairClosure, _ noThanksClosure: 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
@@ -749,7 +749,7 @@ open class Manager : ArmchairManager {
#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 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"
#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"