Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Trying to keep up with forked one #1

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a49d5bf
Remove the fatal error in sheet presentation when optional view is no…
nataliq-pp Jun 5, 2020
4b3064c
Add fallback with center of source view
nataliq-pp Jun 10, 2020
b644762
Bump patch version, new version is 1.13.1
nataliq-pp Jun 11, 2020
013d54c
Merge pull request #69 from iZettle/fix-sheet-presentation
nataliq-pp Jun 11, 2020
65c0836
Fix swiftlint
moglistree Sep 11, 2020
f5ef0e1
* Replaced iZettle AB strings with PayPal equivalents
PhilippOtto89 Sep 18, 2020
19c97fa
Update for Xcode 12
moglistree Sep 21, 2020
94d02ba
Resolve warnings for Xcode 12.2
nataliq-pp Dec 29, 2020
5241e20
Fix deprecation warnings for test target
nataliq-pp Jan 7, 2021
e957fc3
Bump version to 1.13.2
nataliq-pp Jan 7, 2021
ab9d83e
Merge pull request #73 from iZettle/resolve-warnings
nataliq-pp Jan 7, 2021
697c11f
Make sure to present immediately if the root is a UINavigationController
CJEkman Jan 8, 2021
cb9b00a
Fix dismiss button bug
CJEkman Jan 8, 2021
d883894
Update Presentation/UIViewController+Presentation.swift
CJEkman Jan 11, 2021
a330469
Update Presentation/PresentationStyle.swift
CJEkman Jan 11, 2021
10c1352
Update Presentation/PresentationStyle.swift
nataliq-pp Jan 11, 2021
8d8caf2
Add UI test in example project covering the dismiss button's function
CJEkman Jan 12, 2021
be07087
Update changelog
CJEkman Jan 12, 2021
c8547f8
Bump version to 1.13.3
CJEkman Jan 12, 2021
6f05074
Merge pull request #74 from iZettle/fix-navigation-controller-root-bug
CJEkman Jan 13, 2021
b9ed14c
Fix `modalPresentationDismissalSetup` installing dismiss on the same…
nataliq-pp Jan 18, 2021
1003020
Add some tests for modal presentation dismissal setup
nataliq-pp Jan 18, 2021
1952668
Bump version to 1.13.4
nataliq-pp Jan 18, 2021
f31dbfe
Update PresentationStyle.swift
nataliq-pp Jan 18, 2021
f29a1df
Update docs for modalPresentationDismissalSetup
nataliq-pp Jan 18, 2021
39d09ba
Merge pull request #75 from iZettle/fix-double-dismiss-item-setup
nataliq-pp Jan 18, 2021
2412789
- Bump to 1.14.0
Mar 4, 2021
ff9752c
Bump CircleCI runner
Mar 5, 2021
4aeee13
Use the latest version of Flow framework
Mar 8, 2021
3af918b
[APP-1953] Xcode 12.5 support (#77)
moglistree Jul 27, 2021
01dcb1d
[APP-1962] Xcode 13 compatibility (#78)
moglistree Aug 11, 2021
86a6d7c
Move to xcframeworks
moglistree Aug 17, 2021
05409c8
Ops
moglistree Aug 17, 2021
68c19b0
Merge pull request #79 from iZettle/move-to-xcframework
shchukin-alex Aug 17, 2021
c7e25b9
Bump version to 1.15.1
shchukin-alex Aug 17, 2021
aa4d029
Merge pull request #80 from iZettle/release-1.15.1
shchukin-alex Aug 17, 2021
dbbbb8b
Rollback xcframework support
moglistree Oct 8, 2021
6d42e2d
CI running on Xcode 13.2 (#82)
moglistree Mar 8, 2022
834d210
Bump package.resolved (#83)
moglistree Mar 29, 2022
5f33f71
Replace `Carthage` with `SPM` to fetch dependencies
bartszczepaniak May 11, 2022
2f1c8b7
Merge pull request #84 from iZettle/use-spm-to-fetch-and-build-depend…
bartszczepaniak May 20, 2022
1123508
Update project version to `1.15.2`
bartszczepaniak May 20, 2022
491735c
Merge pull request #85 from iZettle/bump-project-version
bartszczepaniak May 23, 2022
bb995ad
Update readme and runners (#93)
moglistree Nov 20, 2023
16f7eaa
Bump version
shchukin-alex Jan 3, 2024
8f7ed70
Update Flow
shchukin-alex Jan 3, 2024
5c2348b
Revert "Update Flow"
shchukin-alex Jan 4, 2024
ebd1e68
Merge pull request #95 from iZettle/Update-version
shchukin-alex Jan 4, 2024
0ef9f76
Fix iOS 17 crash related to SplitViewController (#96)
moglistree Jan 29, 2024
7a3a72e
Save `json` files with `UIViewController` memory leak name
bartszczepaniak Feb 21, 2024
b6da883
Update `CHANGELOG.md` for release bump
bartszczepaniak Feb 21, 2024
83608f2
Merge pull request #98 from iZettle/experiment-saving-vc-memory-leaks…
bartszczepaniak Feb 22, 2024
6e231aa
Xcode 16 (#99)
astenvall Sep 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 86 additions & 45 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,56 @@
version: 2.1

anchors:
- &test_device "iPhone Xs"
- &test_device "iPhone 16"
- &test_device_os "18.0"
- &clean_before_build true
- &test_output_folder test_output
- &default_executor
macos:
xcode: "11.4.0"
xcode: "16.0.0"

env:
global:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8

commands:
fetch-pod-specs:
steps:
- run:
name: Fetch CocoaPods Specs
command: |
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf

pod-install:
parameters:
path:
type: string
steps:
- fetch-pod-specs # Fetch the podspec repo changes first to be sure to always get the latest pods
- run:
command: |
cd <<parameters.path>>
pod install --verbose

carthage-update:
steps:
- run: carthage update Flow --cache-builds

test_main_project:
parameters:
simulator:
type: string
default: *test_device
os_version:
type: string
default: *test_device_os
steps:
- checkout
- carthage-update
- test_project_and_store_results:
project: "Presentation.xcodeproj"
scheme: "Presentation"
simulator: <<parameters.simulator>>
os_version: <<parameters.os_version>>

test_example_project:
parameters:
path: # We need to pass a path here because the example projects are in a sub folder of the project
type: string
simulator:
type: string
default: *test_device
os_version:
type: string
default: *test_device_os
steps:
- checkout
- pod-install:
Expand All @@ -60,6 +63,8 @@ commands:
scheme: "Example"
path: <<parameters.path>>
test_output_folder: *test_output_folder
simulator: <<parameters.simulator>>
os_version: <<parameters.os_version>>

# 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 All @@ -70,14 +75,21 @@ commands:
type: string
scheme:
type: string
simulator:
type: string
default: *test_device
os_version:
type: string
default: *test_device_os
steps:
- run:
command: fastlane scan
environment:
SCAN_PROJECT: <<parameters.project>>
SCAN_SCHEME: <<parameters.scheme>>
SCAN_DEVICE: *test_device
SCAN_CLEAN: *clean_before_build
name: Run tests on iOS <<parameters.os_version>>
command: |
xcodebuild -scheme <<parameters.scheme>> \
-project <<parameters.project>> \
-destination "platform=iOS Simulator,OS=<<parameters.os_version>>,name=<<parameters.simulator>>" \
clean build test \
| xcpretty --report junit --output 'test_output/report.junit'
- store_artifacts: # This will by default store an html and junit file as artifacts (See "Artifacts" tab in CircleCI report)
path: *test_output_folder # test_output is the default temporary folder for fastlane scan output
destination: *test_output_folder # This will create a sub structure in the artifacts section in CircleCI
Expand All @@ -95,66 +107,95 @@ commands:
type: string
test_output_folder:
type: string
simulator:
type: string
default: *test_device
os_version:
type: string
default: *test_device_os
steps:
- run:
command: |
name: Run tests on iOS <<parameters.os_version>>
command: |
cd <<parameters.path>>
fastlane scan
environment:
SCAN_WORKSPACE: <<parameters.workspace>>
SCAN_SCHEME: <<parameters.scheme>>
SCAN_DEVICE: *test_device
SCAN_CLEAN: *clean_before_build
xcodebuild -scheme <<parameters.scheme>> \
-workspace <<parameters.workspace>> \
-destination "platform=iOS Simulator,OS=<<parameters.os_version>>,name=<<parameters.simulator>>" \
clean build test \
| xcpretty --report junit --output '<<parameters.path>>/<<parameters.test_output_folder>>/report.junit'
- 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
destination: <<parameters.test_output_folder>> # This will create a sub structure in the artifacts section in CircleCI
- store_test_results: # This will store the test results so you can then see them in the "Test Summary" tab in CircleCI report
path: <<parameters.path>>/<<parameters.test_output_folder>>

jobs:
swiftlint: # This is a job and not a command to be able to add it as a work flow step
swiftlint:
parameters:
version:
type: string
<<: *default_executor
steps:
- attach_workspace:
at: .
- checkout
- run:
name: Install swiftlint(0.35.0)
name: Install SwiftLint(<< parameters.version >>)
command: |
curl -L -k -o /Users/distiller/Downloads/SwiftLint.pkg https://github.com/realm/SwiftLint/releases/download/<< parameters.version >>/SwiftLint.pkg
sudo installer -pkg /Users/distiller/Downloads/SwiftLint.pkg -target /
# Run SwiftLint.
- run:
name: Lint Codebase
command: |
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/ab64b13d26a3f8617689e3bc7e73a209d11f1bc8/Formula/swiftlint.rb
- run: swiftlint version && swiftlint --strict --reporter html > swiftlint.html
swiftlint version && swiftlint --strict --reporter html > swiftlint.html
- store_artifacts:
path: swiftlint.html
destination: swiftlint.html
- store_test_results:
path: swiftlint.html

test-xcode10-ios12:
macos:
xcode: "10.3.0"
steps:
- test_main_project

test-xcode11-ios13:
test-xcode16-ios18:
<<: *default_executor
steps:
- test_main_project

test-xcode15-ios17:
macos:
xcode: "15.4.0"
steps:
- test_main_project:
simulator: "iPhone 15"
os_version: "17.5"

test-example-messages:
<<: *default_executor
macos:
xcode: "16.0.0"
steps:
- test_example_project:
path: Examples/Messages
simulator: "iPhone 16"
os_version: "18.0"

test-example-styles-and-options:
<<: *default_executor
macos:
xcode: "16.0.0"
steps:
- test_example_project:
path: Examples/StylesAndOptions
simulator: "iPhone 16"
os_version: "18.0"

workflows:
version: 2.1
build-and-test:
jobs:
- swiftlint
- test-xcode10-ios12
- test-xcode11-ios13
- swiftlint:
version: 0.52.2
- test-xcode16-ios18
- 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
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
# 1.18.0
- Support `Xcode 16`

# 1.17.0
- Save `json` files with `UIViewController` memory leak name

# 1.16.0
- Fix split view crash for iOS 17

# 1.15.3
- Support Xcode 15

# 1.15.2
- Xcode 13.2 compatibility
- [Change] Replace `Carthage` with `SPM`

# 1.15.1
- Move to xcframeworks

# 1.15.0

- Xcode 13.0 compatibility

# 1.14.0

- Xcode 12.4 compatibility

# 1.13.4
- [Bug fix] Fix bug introduced in 1.13.3 where a view controller might be configured with dismiss twice when passed to `modalPresentationDismissalSetup`.

# 1.13.3
- [Bug fix] Fix bug related to presenting a `UINavigationController` modally without an explicit root `UIViewController`, resulting in unexpected behaviour of `UITextField` input cursors.

# 1.13.2
- Update project settings for Xcode 12 and fix some deprecation warnings

# 1.13.1
- [Bug fix] Prevent a crash in sheet presentation style when a source view is not provided.

# 1.13.0
- [Change] Move to Flow version 1.8.4
- [Bugfix] Fix compile time error in `public extension SignalProvider where Value: Collection {` for swift 5.2
Expand Down
1 change: 0 additions & 1 deletion Cartfile

This file was deleted.

1 change: 0 additions & 1 deletion Cartfile.resolved

This file was deleted.

2 changes: 1 addition & 1 deletion Examples/Messages/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
attributes = {
LastSwiftUpdateCheck = 0930;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = iZettle;
ORGANIZATIONNAME = "PayPal Inc.";
TargetAttributes = {
722481CA20D161C20038787C = {
CreatedOnToolsVersion = 9.3;
Expand Down
2 changes: 1 addition & 1 deletion Examples/Messages/Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Messages
//
// Created by Måns Bernhardt on 2018-04-17.
// Copyright © 2018 iZettle. All rights reserved.
// Copyright © 2018 PayPal Inc. All rights reserved.
//

import UIKit
Expand Down
2 changes: 1 addition & 1 deletion Examples/Messages/Example/ComposeMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Messages
//
// Created by Måns Bernhardt on 2018-04-19.
// Copyright © 2018 iZettle. All rights reserved.
// Copyright © 2018 PayPal Inc. All rights reserved.
//

import UIKit
Expand Down
2 changes: 1 addition & 1 deletion Examples/Messages/Example/MessageDetails.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Messages
//
// Created by Måns Bernhardt on 2018-04-19.
// Copyright © 2018 iZettle. All rights reserved.
// Copyright © 2018 PayPal Inc. All rights reserved.
//

import UIKit
Expand Down
2 changes: 1 addition & 1 deletion Examples/Messages/Example/Messages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Messages
//
// Created by Måns Bernhardt on 2018-04-19.
// Copyright © 2018 iZettle. All rights reserved.
// Copyright © 2018 PayPal Inc. All rights reserved.
//

import UIKit
Expand Down
2 changes: 1 addition & 1 deletion Examples/Messages/ExampleUITests/ExampleUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// ExampleUITests
//
// Created by Nataliya Patsovska on 2018-06-13.
// Copyright © 2018 iZettle. All rights reserved.
// Copyright © 2018 PayPal Inc. All rights reserved.
//

import XCTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
attributes = {
LastSwiftUpdateCheck = 0930;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = iZettle;
ORGANIZATIONNAME = "PayPal Inc.";
TargetAttributes = {
7224818B20D14EB60038787C = {
CreatedOnToolsVersion = 9.3;
Expand Down
2 changes: 1 addition & 1 deletion Examples/StylesAndOptions/Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Example
//
// Created by Nataliya Patsovska on 2018-06-05.
// Copyright © 2018 iZettle. All rights reserved.
// Copyright © 2018 PayPal Inc. All rights reserved.
//

import UIKit
Expand Down
6 changes: 5 additions & 1 deletion Examples/StylesAndOptions/Example/AppFlow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Example
//
// Created by Nataliya Patsovska on 2018-06-05.
// Copyright © 2018 iZettle. All rights reserved.
// Copyright © 2018 PayPal Inc. All rights reserved.
//

import UIKit
Expand Down Expand Up @@ -63,6 +63,10 @@ extension AppFlow: Presentable {
return containerController.present(Presentation(TestNavigationBarHiding(), style: .modal)).toVoid()
}

if options.contains(.modalNavigationControllerFlow) {
return containerController.present(Presentation(TestNavigationControllerFlow(), style: .modal, configure: withDismiss))
}

if options.contains(.allowSwipeDismissAlways) {
struct NavigationStack: Presentable {
func materialize() -> (UIViewController, Disposable) {
Expand Down
Loading