Skip to content

Commit

Permalink
Updated min version to 13. Added tvos support
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtSabintsev committed Jan 17, 2021
1 parent 380f790 commit f10f692
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 66 deletions.
8 changes: 4 additions & 4 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -552,7 +552,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
Expand All @@ -568,7 +568,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = HT94948NDD;
INFOPLIST_FILE = "$(SRCROOT)/Example/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.Facebook;
PRODUCT_NAME = Example;
Expand All @@ -585,7 +585,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = HT94948NDD;
INFOPLIST_FILE = "$(SRCROOT)/Example/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.Facebook;
PRODUCT_NAME = Example;
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Siren (5.7.1)
- Siren (5.8.0)

DEPENDENCIES:
- Siren (from `../`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
Siren: 76ac728f4f2f4a3576c322272e94a0e37955664f
Siren: 07f3b6f1bd7b729e3ef11c5a3b01e85cdfdb2b98

PODFILE CHECKSUM: d209d935a01eba61b70c991ab419cca0ce2264cc

Expand Down
7 changes: 4 additions & 3 deletions Example/Pods/Local Podspecs/Siren.podspec.json

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

4 changes: 2 additions & 2 deletions Example/Pods/Manifest.lock

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

66 changes: 33 additions & 33 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: 1 addition & 1 deletion Example/Pods/Target Support Files/Siren/Siren-Info.plist

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

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PackageDescription

let package = Package(
name: "Siren",
platforms: [.iOS(.v11), .tvOS(.v11)],
platforms: [.iOS(.v13), .tvOS(.v13)],
products: [.library(name: "Siren", targets: ["Siren"])],
targets: [.target(name: "Siren", path: "Sources", resources: [.copy("Siren.bundle")])],
swiftLanguageVersions: [.v5]
Expand Down
13 changes: 7 additions & 6 deletions Siren.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
# Version
s.version = "5.7.1"
s.version = "5.8.0"
s.swift_version = "5.3"

# Meta
Expand All @@ -14,9 +14,10 @@ Pod::Spec.new do |s|
DESC

# Compatibility & Sources
s.platform = :ios, "11.0"
s.source = { :git => "https://github.com/ArtSabintsev/Siren.git", :tag => s.version.to_s }
s.source_files = 'Sources/**/*.swift'
s.resources = 'Sources/Siren.bundle'
s.requires_arc = true
s.ios.deployment_target = '13.0'
s.tvos.deployment_target = '13.0'
s.source = { :git => "https://github.com/ArtSabintsev/Siren.git", :tag => s.version.to_s }
s.source_files = 'Sources/**/*.swift'
s.resources = 'Sources/Siren.bundle'
s.requires_arc = true
end
2 changes: 1 addition & 1 deletion Sources/Managers/APIManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ extension APIManager {
let tvOSQueryItem = URLQueryItem(name: Constants.entity, value: Constants.tvSoftware)
items.append(tvOSQueryItem)
#endif

if let countryCode = country.code {
let item = URLQueryItem(name: Constants.country, value: countryCode)
items.append(item)
Expand Down
11 changes: 3 additions & 8 deletions Sources/Managers/PresentationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -226,20 +226,15 @@ private extension PresentationManager {

private extension PresentationManager {
private func createWindow() -> UIWindow? {
var window = UIWindow()
if #available(iOS 13.0, tvOS 13.0, *) {
guard let windowScene = getFirstForegroundScene() else { return nil }
window = UIWindow(windowScene: windowScene)
} else {
window = UIWindow(frame: UIScreen.main.bounds)
}
guard let windowScene = getFirstForegroundScene() else { return nil }

let window = UIWindow(windowScene: windowScene)
window.windowLevel = UIWindow.Level.alert + 1

let viewController = SirenViewController()
viewController.retainedWindow = window

window.rootViewController = viewController

return window
}

Expand Down
6 changes: 1 addition & 5 deletions Sources/Siren.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,7 @@ public extension Siren {
}

DispatchQueue.main.async {
if #available(iOS 10.0, *) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
} else {
UIApplication.shared.openURL(url)
}
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
}
Expand Down

0 comments on commit f10f692

Please sign in to comment.