Skip to content

Commit

Permalink
⭐️ Native - Updated podspec/project settings
Browse files Browse the repository at this point in the history
Summary: Added `swift_version` to podspec and lowered min. iOS version from 10 to 9
  • Loading branch information
dominicstop committed Oct 20, 2020
1 parent f10eba9 commit 9f823a8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ PODS:
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- React-jsinspector (0.62.2)
- react-native-ios-modal (0.1.4):
- react-native-ios-modal (0.1.5):
- React
- React-RCTActionSheet (0.62.2):
- React-Core/RCTActionSheetHeaders (= 0.62.2)
Expand Down Expand Up @@ -350,7 +350,7 @@ SPEC CHECKSUMS:
React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161
React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da
React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493
react-native-ios-modal: fd06553f6021a9c116d5f66814c3b186d26b4e9b
react-native-ios-modal: 93dbd563972ddcf19392715583ef6fc795a1c914
React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c
React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0
React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71
Expand Down
9 changes: 7 additions & 2 deletions ios/src_library/Extensions/UIBlurEffect+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ import Foundation
extension UIBlurEffect.Style: CaseIterable {
public static var availableStyles: [UIBlurEffect.Style] {
var styles: [UIBlurEffect.Style] = [
.regular,
.prominent,
.light,
.extraLight,
.dark,
];

if #available(iOS 10.0, *) {
styles.append(contentsOf: [
.regular,
.prominent,
]);
};

if #available(iOS 13.0, *) {
styles.append(contentsOf: [
.systemUltraThinMaterial,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RCTModalView: UIView {
Self.presentationStyle.stringDescription() as NSString;

static let modalBGBlurEffectStyle: UIBlurEffect.Style = {
guard #available(iOS 13.0, *) else { return .regular };
guard #available(iOS 13.0, *) else { return .light };
return .systemThinMaterial;
}();

Expand Down
21 changes: 10 additions & 11 deletions react-native-ios-modal.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@ require "json"
package = JSON.parse(File.read(File.join(__dir__, "package.json")))

Pod::Spec.new do |s|
s.name = "react-native-ios-modal"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]
s.name = "react-native-ios-modal"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]

s.platforms = { :ios => "10.0" }
s.source = { :git => "https://github.com/dominicstop/react-native-ios-modal.git", :tag => "#{s.version}" }
s.platforms = { :ios => "9.0" }
s.source = { :git => "https://github.com/dominicstop/react-native-ios-modal.git", :tag => "#{s.version}" }


s.source_files = "ios/**/*.{h,m,mm,swift}"

s.source_files = "ios/**/*.{h,m,mm,swift}"
s.swift_version = ['4.0', '4.2', '5.0']

s.dependency "React"
end

0 comments on commit 9f823a8

Please sign in to comment.