Skip to content

Commit

Permalink
chore: update minimum support version to iOS 14 (RMCCX-7398)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoumenRautray authored Sep 29, 2024
1 parent ff1caae commit f03158e
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let package = Package(
name: "RInAppMessaging",
defaultLocalization: "en",
platforms: [
.iOS(.v12)
.iOS(.v14)
],
products: [
.library(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

In-App Messaging (IAM) module allows app developers to easily configure and display notifications within their app.

This module supports iOS 12.0 and above. It has been tested with iOS 12.5 and above.
This module supports iOS 14.0 and above. It has been tested with iOS 14 and above.

### This page covers:
* [Requirements](#requirements)
Expand Down
2 changes: 1 addition & 1 deletion RInAppMessaging.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Pod::Spec.new do |s|
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.authors = 'Rakuten Ecosystem Mobile'
s.source = { :git => "https://github.com/rakutentech/ios-inappmessaging.git", :tag => s.version.to_s }
s.ios.deployment_target = '12.0'
s.ios.deployment_target = '14.0'
s.swift_versions = ['5.7.1']
s.resources = ['Sources/RInAppMessaging/Resources/PrivacyInfo.xcprivacy']
s.dependency 'RSDKUtils', '~> 4.0'
Expand Down
6 changes: 3 additions & 3 deletions RInAppMessaging.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1249,7 +1249,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1298,7 +1298,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
4 changes: 2 additions & 2 deletions Sample/AppStarterViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class AppStarterViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
guard #available(iOS 13, *) else {
guard #available(iOS 14, *) else {
swiftUIButton.isEnabled = false
return
}
Expand All @@ -21,7 +21,7 @@ class AppStarterViewController: UIViewController {
view.window?.rootViewController = uiKitTabBarController
}

@available(iOS 13.0, *)
@available(iOS 14.0, *)
@IBAction func swiftUiDidTap(_ sender: Any) {
let swiftUITabBarController = UIHostingController(rootView: TabBarView())
view.window?.rootViewController = swiftUITabBarController
Expand Down
2 changes: 1 addition & 1 deletion Sample/Shared/Helpers/View+Extension.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SwiftUI

#if canImport(UIKit)
@available(iOS 13.0, *)
@available(iOS 14.0, *)
extension View {
func hideKeyboard() {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
Expand Down
4 changes: 2 additions & 2 deletions Sample/SwiftUI/CustomEventView.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SwiftUI
import RInAppMessaging

@available(iOS 13.0, *)
@available(iOS 14.0, *)
struct CustomEventView: View {

@State private var isAlertPresented = false
Expand Down Expand Up @@ -108,7 +108,7 @@ struct CustomEventView: View {
}
}

@available(iOS 13.0, *)
@available(iOS 14.0, *)
struct CustomEventView_Previews: PreviewProvider {
static var previews: some View {
CustomEventView()
Expand Down
4 changes: 2 additions & 2 deletions Sample/SwiftUI/MainView.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SwiftUI
@testable import RInAppMessaging

@available(iOS 13.0, *)
@available(iOS 14.0, *)
struct MainView: View {

@State private var isErrorAlertPresented = false
Expand Down Expand Up @@ -77,7 +77,7 @@ struct MainView: View {
}
}

@available(iOS 13.0, *)
@available(iOS 14.0, *)
struct MainView_Previews: PreviewProvider {
static var previews: some View {
MainView()
Expand Down
4 changes: 2 additions & 2 deletions Sample/SwiftUI/SecondView.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SwiftUI
import RInAppMessaging

@available(iOS 13.0, *)
@available(iOS 14.0, *)
struct SecondView: View {

@Environment(\.presentationMode) var presentationMode
Expand Down Expand Up @@ -42,7 +42,7 @@ struct SecondView: View {
}
}

@available(iOS 13.0, *)
@available(iOS 14.0, *)
struct SecondView_Previews: PreviewProvider {
static var previews: some View {
SecondView()
Expand Down
6 changes: 3 additions & 3 deletions Sample/SwiftUI/TabBarView.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import SwiftUI

@available(iOS 13.0, *)
@available(iOS 14.0, *)
struct TabBarView: View {
var body: some View {
VStack {
Expand Down Expand Up @@ -30,14 +30,14 @@ struct TabBarView: View {
}
}

@available(iOS 13.0, *)
@available(iOS 14.0, *)
struct TabView_Previews: PreviewProvider {
static var previews: some View {
TabBarView()
}
}

@available(iOS 13.0, *)
@available(iOS 14.0, *)
extension View {
func canHaveTooltipIfAvailable(identifier: String) -> some View {
if #available(iOS 15.0, *) {
Expand Down
4 changes: 2 additions & 2 deletions Sample/SwiftUI/UserInfoView.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SwiftUI
import RInAppMessaging

@available(iOS 13.0, *)
@available(iOS 14.0, *)
struct UserInfoView: View {

@State private var userIDText: String = ""
Expand Down Expand Up @@ -87,7 +87,7 @@ struct UserInfoView: View {
}
}

@available(iOS 13.0, *)
@available(iOS 14.0, *)
struct UserInfoView_Previews: PreviewProvider {
static var previews: some View {
UserInfoView()
Expand Down
14 changes: 7 additions & 7 deletions SampleSPM/SampleSPM.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -1106,7 +1106,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand All @@ -1124,7 +1124,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 575EYS6ZJA;
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1323,7 +1323,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1373,7 +1373,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
Expand All @@ -1392,7 +1392,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 575EYS6ZJA;
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -1416,7 +1416,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 575EYS6ZJA;
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
4 changes: 2 additions & 2 deletions Sources/RInAppMessaging/Extensions/UIApplication+IAM.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extension UIApplication {

func getKeyWindow() -> UIWindow? {
var keySceneWindow: UIWindow?
if #available(iOS 13.0, *) {
if #available(iOS 14.0, *) {
keySceneWindow = connectedScenes
.filter({ $0.activationState == .foregroundActive })
.compactMap({ $0 as? UIWindowScene })
Expand All @@ -16,7 +16,7 @@ extension UIApplication {
}

func getCurrentStatusBarStyle() -> UIStatusBarStyle? {
if #available(iOS 13.0, *),
if #available(iOS 14.0, *),
let keyScene = connectedScenes
.filter({ $0.activationState != .unattached })
.compactMap({ $0 as? UIWindowScene })
Expand Down
2 changes: 1 addition & 1 deletion Sources/RInAppMessaging/Extensions/View+IAM.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import SwiftUI

@available(iOS 13.0, *)
@available(iOS 14.0, *)
internal extension View {
/// Hide or show the view based on a boolean value.
///
Expand Down
2 changes: 1 addition & 1 deletion Tests/Tests/RouterSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import class RSDKUtilsMain.TypedDependencyManager

@testable import RInAppMessaging

@available(iOS 13.0, *) // Because of UIImage(named:in:with:)
@available(iOS 14.0, *) // Because of UIImage(named:in:with:)
class RouterSpec: QuickSpec {
// swiftlint:disable:previous type_body_length

Expand Down
4 changes: 2 additions & 2 deletions Tests/Tests/UIApplicationExtensionSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class UIApplicationExtensionsSpec: QuickSpec {
}

// Tests below will run only on iOS 13+
guard #available(iOS 13.0, *) else {
guard #available(iOS 14.0, *) else {
return
}

Expand Down Expand Up @@ -54,7 +54,7 @@ class UIApplicationExtensionsSpec: QuickSpec {
context("when calling getCurrentStatusBarStyle method") {

it("will not return nil on iOS 13+") {
if #available(iOS 13.0, *) {
if #available(iOS 14.0, *) {
expect(application.statusBarStyle).toNot(beNil())
} else {
expect(application.statusBarStyle).to(beNil())
Expand Down
2 changes: 1 addition & 1 deletion Tests/Tests/ViewPresenterSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ class ViewPresenterSpec: QuickSpec {
expect(view.wasSetupCalled).to(beTrue())
}

if #available(iOS 13.0, *) {
if #available(iOS 14.0, *) {
it("will call initializeView on the view object with expected model") {
presenter.associatedImage = UIImage(named: "test-image", in: .unitTests, with: nil)
presenter.viewDidInitialize()
Expand Down

0 comments on commit f03158e

Please sign in to comment.