Skip to content

Commit

Permalink
Added useStoreKit flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rwbutler committed Jun 15, 2021
1 parent d1ba67b commit 8db7fc6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.1] - 2021-06-15
### Added
- Added `useStoreKit` flag.

## [1.3.0] - 2021-02-23
### Added
- Added notification mode `.withoutAvailableUpdate` which notifies on every invocation of `checkForUpdates` even where no update is available. Can be used for testing purposes.
Expand Down
4 changes: 2 additions & 2 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Example/Updates.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Updates/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.3.1;
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = com.rwbutler.updates;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -508,6 +509,7 @@
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Updates/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.3.1;
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = com.rwbutler.updates;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion Example/Updates/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Updates.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Updates'
s.version = '1.3.0'
s.version = '1.3.1'
s.swift_version = '5.0'
s.summary = 'Updates is a framework for automatically detecting app updates and seamlessly prompting users to update.'
s.description = <<-DESC
Expand Down
3 changes: 3 additions & 0 deletions Updates/Classes/Core/Updates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class Updates {
public static var countryCode: String? = {
let currentBundle = Bundle(for: Updates.self)
if #available(iOS 13.0, macCatalyst 13.0, *),
useStoreKit,
let iso3166Alpha3CountryCode = SKPaymentQueue.default().storefront?.countryCode,
!iso3166Alpha3CountryCode.isEmpty,
let iso3166Mapping = currentBundle.infoDictionary?["ISO3166Map"] as? [String: String],
Expand All @@ -89,6 +90,8 @@ public class Updates {

public static var updatingMode: UpdatingMode = .automatically

public static var useStoreKit = true

public static var versionString: String? = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String

public static func checkForUpdates(currentOSVersion: String, completion: @escaping (UpdatesResult) -> Void) {
Expand Down

0 comments on commit 8db7fc6

Please sign in to comment.