Skip to content

Commit 2ede9b5

Browse files
committed
Update
1 parent 7c9e398 commit 2ede9b5

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

.github/workflows/github-actions-ci.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,41 @@ jobs:
1515
- name: Set Xcode Version 13.2.1
1616
run: sudo xcode-select -s /Applications/Xcode_13.2.1.app
1717

18-
# - name: Build PinLayout-iOS
19-
# run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty
18+
- name: Build PinLayout-iOS
19+
run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty
2020

21-
# - name: Build PinLayout-tvOS
22-
# run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-tvOS -sdk appletvsimulator15.2 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=15.2' | xcpretty
21+
- name: Build PinLayout-tvOS
22+
run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-tvOS -sdk appletvsimulator15.2 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=15.2' | xcpretty
2323

24-
# - name: Build PinLayout-macOS
25-
# run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-macOS -sdk macosx12.1 | xcpretty
24+
- name: Build PinLayout-macOS
25+
run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-macOS -sdk macosx12.1 | xcpretty
2626

2727
- name: Build PinLayoutSample - iOS 15.2
2828
run: set -o pipefail && xcodebuild build -workspace PinLayout.xcworkspace -scheme PinLayoutSample -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty
2929

30-
# - name: iOS unit tests
31-
# run: set -o pipefail && xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty
30+
- name: iOS unit tests
31+
run: set -o pipefail && xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty
3232

3333
# # - name: tvOS unit tests
3434
# # run: set -o pipefail && xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-tvOS -sdk appletvos15.2 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=15.2' | xcpretty
3535

3636
# # - name: macOS unit tests
3737
# # run: set -o pipefail && xcodebuild test -workspace PinLayout.xcworkspace -scheme PinLayout-macOS -sdk macosx12.1 -destination 'platform=macOS,name=Any Mac' | xcpretty
3838

39-
# - name: Cocoapods - iOS Empty project
40-
# run: set -o pipefail && cd TestProjects/cocoapods/ios && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-iOS.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty && cd ../../..
39+
- name: Cocoapods - iOS Empty project
40+
run: set -o pipefail && cd TestProjects/cocoapods/ios && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-iOS.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty && cd ../../..
4141

4242
# - name: Cocoapods - macOS Empty project
4343
# run: set -o pipefail && cd TestProjects/cocoapods/macos && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-macOS.xcworkspace -scheme PinLayout-macOS -sdk macosx12.1 | xcpretty && cd ../../..
4444

4545
# - name: Cocoapods - tvOS Empty project
4646
# run: set -o pipefail && cd TestProjects/cocoapods/tvos && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-tvOS.xcworkspace -scheme PinLayout-tvOS -sdk appletvsimulator15.2 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=15.2' | xcpretty && cd ../../..
4747

48-
# # - name: Carthage - iOS Empty project
49-
# # run: set -o pipefail && cd TestProjects/carthage/ios && rm Cartfile && echo "git \"file:///$BASEDIR\"" > Cartfile && carthage update --use-ssh --platform iOS --use-xcframeworks && xcodebuild build -project PinLayout-Carthage-iOS.xcodeproj -scheme PinLayout-Carthage-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty && rm Cartfile.resolved && cd ../../..
48+
# - name: Carthage - iOS Empty project
49+
# run: set -o pipefail && cd TestProjects/carthage/ios && rm Cartfile && echo "git \"file:///$BASEDIR\"" > Cartfile && carthage update --use-ssh --platform iOS --use-xcframeworks && xcodebuild build -project PinLayout-Carthage-iOS.xcodeproj -scheme PinLayout-Carthage-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty && rm Cartfile.resolved && cd ../../..
5050

51-
# - name: Swift Package Manager - iOS Empty project
52-
# run: set -o pipefail && cd TestProjects/swift-package-manager/ios && rm -rf .build && xcodebuild build -project PinLayout-SPM-iOS.xcodeproj -scheme PinLayout-SPM-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty && cd ../../..
51+
- name: Swift Package Manager - iOS Empty project
52+
run: set -o pipefail && cd TestProjects/swift-package-manager/ios && rm -rf .build && xcodebuild build -project PinLayout-SPM-iOS.xcodeproj -scheme PinLayout-SPM-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty && cd ../../..
5353

5454
- name: Set XCode Version 12.5.1 (iOS 14)
5555
run: sudo xcode-select -s /Applications/Xcode_12.5.1.app
@@ -61,7 +61,6 @@ jobs:
6161
- name: Build PinLayoutSample - iOS 13.7
6262
run: set -o pipefail && xcodebuild clean build -workspace PinLayout.xcworkspace -scheme PinLayoutSample -sdk iphonesimulator13.7 -destination 'platform=iOS Simulator,name=iPhone 8,OS=13.7' | xcpretty
6363

64-
6564
- name: Pod lib lint
6665
run: set -o pipefail && bundle exec pod lib lint --allow-warnings
6766

Example/PinLayoutSample/UI/Menu/MenuView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extension MenuView: UITableViewDelegate {
8181
extension MenuView {
8282
private func validation() {
8383
// Compilation validation
84-
#if compiler(>=5.5)
84+
#if compiler(>=5.5) // Xcode 13+
8585
// iOS 15+
8686
_ = tableView.pin.keyboardMargins
8787
#endif

Sources/PinLayout.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,8 @@ public class PinLayout<View: Layoutable> {
115115
}
116116
#endif
117117

118-
#if os(iOS) && compiler(>=5.5)
118+
#if os(iOS) && compiler(>=5.5) // Xcode 13+
119119
public var keyboardMargins: PEdgeInsets {
120-
121120
guard #available(iOS 15.0, *) else { return .zero }
122121
guard let view = view as? UIView else { return .zero }
123122

0 commit comments

Comments
 (0)