Skip to content

Commit

Permalink
Update readme and runners (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
moglistree authored Nov 20, 2023
1 parent 491735c commit bb995ad
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 15 deletions.
32 changes: 20 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
version: 2.1

anchors:
- &test_device "iPhone Xs"
- &test_device "iPhone 15"
- &clean_before_build true
- &test_output_folder test_output
- &default_executor
macos:
xcode: "13.2.0"
xcode: "15.0.0"

env:
global:
Expand Down Expand Up @@ -47,6 +47,7 @@ commands:
scheme: "Example"
path: <<parameters.path>>
test_output_folder: *test_output_folder
simulator: "iPhone 14"

# We introduced two separate commands for projects and workspaces because we didnt find a generic and non-confusing way to introduce
# a condition to only pass either the project or the workspace environment argument to the fastlane scan
Expand Down Expand Up @@ -82,6 +83,9 @@ commands:
type: string
test_output_folder:
type: string
simulator:
type: string
default: *test_device
steps:
- run:
command: |
Expand All @@ -90,7 +94,7 @@ commands:
environment:
SCAN_WORKSPACE: <<parameters.workspace>>
SCAN_SCHEME: <<parameters.scheme>>
SCAN_DEVICE: *test_device
SCAN_DEVICE: <<parameters.simulator>>
SCAN_CLEAN: *clean_before_build
- store_artifacts: # This will by default store an html and junit file as artifacts (See "Artifacts" tab in CircleCI report)
path: <<parameters.path>>/<<parameters.test_output_folder>> # test_output is the default temporary folder for fastlane scan output
Expand Down Expand Up @@ -124,25 +128,27 @@ jobs:
- store_test_results:
path: swiftlint.html

test-xcode12-ios14:
test-xcode14-ios16:
macos:
xcode: "12.5.0"
xcode: "14.0.0"
steps:
- test_main_project

test-xcode13-ios15:
test-xcode15-ios17:
<<: *default_executor
steps:
- test_main_project

test-example-messages:
<<: *default_executor
macos:
xcode: "14.0.0"
steps:
- test_example_project:
path: Examples/Messages

test-example-styles-and-options:
<<: *default_executor
macos:
xcode: "14.0.0"
steps:
- test_example_project:
path: Examples/StylesAndOptions
Expand All @@ -152,9 +158,11 @@ workflows:
build-and-test:
jobs:
- swiftlint:
version: 0.39.2
- test-xcode12-ios14
- test-xcode13-ios15
version: 0.52.2
- test-xcode14-ios16
- test-xcode15-ios17
- test-example-messages
- test-example-styles-and-options
# Temporary disabled need to be addressed, there are issues in Flow that might fix this thouh example failiure bellow
# https://app.circleci.com/pipelines/github/iZettle/Presentation/312/workflows/f408abd8-d1ec-46d9-af4d-63f2eb794869/jobs/1195
# - test-example-styles-and-options

2 changes: 2 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ disabled_rules:
- vertical_whitespace
- identifier_name

- inclusive_language

included:
- Presentation
- PresentationTests
Expand Down
4 changes: 4 additions & 0 deletions Presentation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/iOS";
INFOPLIST_FILE = Presentation/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -491,6 +492,7 @@
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/iOS";
INFOPLIST_FILE = Presentation/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -517,6 +519,7 @@
"$(inherited)",
);
INFOPLIST_FILE = PresentationTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -538,6 +541,7 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
INFOPLIST_FILE = PresentationTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
2 changes: 2 additions & 0 deletions Presentation/CustomAdaptivePresentationDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ public final class CustomAdaptivePresentationDelegate: NSObject, UIAdaptivePrese
private let didAttemptToDismissCallbacker = Callbacker<UIPresentationController>()
private let didDismissCallbacker = Callbacker<UIPresentationController>()

// swiftlint:disable large_tuple
public typealias WillPresentAdaptivelyInput = (UIPresentationController, UIModalPresentationStyle, UIViewControllerTransitionCoordinator?)
// swiftlint:enable large_tuple

public var willPresentSignal: Signal<WillPresentAdaptivelyInput> {
return Signal(callbacker: willPresentCallbacker)
Expand Down
4 changes: 2 additions & 2 deletions Presentation/UINavigationController+Presenting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ private extension UINavigationController {
pushPoper.vc.navigationItem.popCallbacker.callAll(with: ())
pushPoper.onComplete(.success)
}
pushPoper.bag += willPopViewControllerSignal.filter { $0 == pushPoper.vc }.onFirstValue { vc in
guard self.viewControllers.count > 1 else { return } //return because there is no previous PushPoper
pushPoper.bag += willPopViewControllerSignal.filter { $0 == pushPoper.vc }.onFirstValue { _ in
guard self.viewControllers.count > 1 else { return } // return because there is no previous PushPoper

let previousPushPoper = self.popSignalPushPopers.compactMap { popSignalPushPoper -> PushPoper? in
guard let pushPoper = popSignalPushPoper.value, pushPoper.vc == self.viewControllers.last else {
Expand Down
1 change: 1 addition & 0 deletions PresentationTests/KeepSelectionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Presentation
import Flow

class KeepSelectionTests: XCTestCase {

func testExample() {
let items = ReadWriteSignal([1, 2, 3])
let selection = KeepSelection(elements: items.readOnly(), isSame: ==)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,4 +392,4 @@ Presentation was developed, evolved and field-tested over the course of several

## Collaborate

You can collaborate with us on our Slack workspace. Ask questions, share ideas or maybe just participate in ongoing discussions. To get an invitation, write to us at [ios-oss@izettle.com](mailto:ios-oss@izettle.com)
You can collaborate with us on our Slack workspace. Ask questions, share ideas or maybe just participate in ongoing discussions. To get an invitation, write to us at [iz-apps-platform-ios@paypal.com](mailto:iz-apps-platform-ios@paypal.com)

0 comments on commit bb995ad

Please sign in to comment.