Skip to content

Commit

Permalink
More changes and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaspik committed Oct 14, 2024
1 parent 9377446 commit 35f21c5
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 24 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
- Master:
- Nothing yet
- 7.0.0
- [#274](https://github.com/nathantannar4/InputBarAccessoryView/pull/276) Migrate to Swift 6 with full async/Await Swift 6 concurrency support
- Drop iOS 13 support
- 6.5.0
- Bump Swift version to 5.10
- [#274](https://github.com/nathantannar4/InputBarAccessoryView/pull/274) Perform layout changes on main thread
Expand Down
11 changes: 7 additions & 4 deletions Example/Example.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 @@ -226,8 +226,9 @@
383B83911F47897800027965 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 1230;
LastUpgradeCheck = 1600;
ORGANIZATIONNAME = "Nathan Tannar";
TargetAttributes = {
383B83981F47897800027965 = {
Expand Down Expand Up @@ -355,7 +356,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -410,7 +411,7 @@
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand All @@ -422,6 +423,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = JH5XJ55XGZ;
INFOPLIST_FILE = Resources/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -438,6 +440,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = JH5XJ55XGZ;
INFOPLIST_FILE = Resources/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class AdditionalBottomSpaceExampleViewController: CommonTableViewControlle

keyboardManager.additionalInputViewBottomConstraintConstant = {
var safeBottomInset: CGFloat = self.view.safeAreaInsets.bottom
if let windowBottomInset = UIApplication.shared.windows.first?.safeAreaInsets.bottom,
if let windowBottomInset = UIWindowScene.activeScene?.windows.first?.safeAreaInsets.bottom,
safeBottomInset != windowBottomInset {
safeBottomInset = windowBottomInset
}
Expand All @@ -65,3 +65,14 @@ final class AdditionalBottomSpaceExampleViewController: CommonTableViewControlle
self.inputBar.inputTextView.becomeFirstResponder()
}
}

private extension UIWindowScene {
static var activeScene: UIWindowScene? {
let connectedScenes = UIApplication.shared.connectedScenes
if connectedScenes.count > 1 {
return connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene
} else {
return connectedScenes.first as? UIWindowScene
}
}
}
11 changes: 4 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
// swift-tools-version:5.10
// swift-tools-version:6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "InputBarAccessoryView",
platforms: [.iOS(.v13)],
platforms: [.iOS(.v14)],
products: [
.library(name: "InputBarAccessoryView", targets: ["InputBarAccessoryView"]),
],
targets: [
.target(
name: "InputBarAccessoryView",
path: "Sources",
exclude: ["Supporting/Info.plist"],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
exclude: ["Supporting/Info.plist"]
)
],
swiftLanguageVersions: [.v5]
swiftLanguageModes: [.v6]
)
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ https://github.com/nathantannar4/InputBarAccessoryView.git

### Requirements

iOS 13.0+
Swift 5.5
iOS 14.0+
Swift 6

> The latest iOS 13 release is v6.5.0
> The latest iOS 12 release is v5.5.0
Expand Down Expand Up @@ -74,6 +76,21 @@ Add your app to the list of apps using this library and make a pull request.
iMessage style [TypingIndicator](https://github.com/nathantannar4/TypingIndicator) for chat apps

## Latest Releases
7.0.0
- **Breaking change**: Drop iOS 13 support
- **Breaking change**: Move to Swift 6, fully support Swift concurrency

6.5.0
- Bump Swift version to 5.10
- Perform layout changes on main thread

6.4.0
- Fixed bottom gap calculations for embedded controllers

6.3.0
- Fixed the gap between keyboard and input bar when used on pagesheet/formsheet on iPad
- Fixed crash after adding image attachment

6.2.0
- Remove `canBecomeFirstResponder` on `InputTextView` to fix `UITextViewDelegate` methods not being called

Expand All @@ -88,16 +105,6 @@ iMessage style [TypingIndicator](https://github.com/nathantannar4/TypingIndicato
- **Breaking change**: Drop CocoaPods support & RxSwift extension (it was available only via CocoaPods)
- KeyboardManager will not update position of inputAccessoryView from interactive dismiss panGesture when the keyboard is floating
- Update docs

5.5.0
- Update SPM tools to Swift 5.5
- Added new optional delegate method for custom attachments size
- Added new animations for left/right stack view constraints

5.4.0
- Make sure framework is ready for Xcode 13
- Fix availability in AppExtensions
- Fix Package.swift to support iOS 12+ only

See [CHANGELOG](./CHANGELOG.md) for more details and older releases.

Expand Down

0 comments on commit 35f21c5

Please sign in to comment.