Skip to content

Commit

Permalink
Update to Spezi Views 0.4.0 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
PSchmiedmayer authored Aug 10, 2023
1 parent 03034b8 commit c2a5f51
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ only_rules:
- implicitly_unwrapped_optional
# Identifiers should use inclusive language that avoids discrimination against groups of people based on race, gender, or socioeconomic status
- inclusive_language
# If defer is at the end of its parent scope, it will be executed right where it is anyway.
- inert_defer
# Prefer using Set.isDisjoint(with:) over Set.intersection(_:).isEmpty.
- is_disjoint
# Discouraged explicit usage of the default separator.
Expand Down Expand Up @@ -329,8 +327,6 @@ only_rules:
- unowned_variable_capture
# Catch statements should not declare error variables without type casting.
- untyped_error_in_catch
# Unused reference in a capture list should be removed.
- unused_capture_list
# Unused parameter in a closure should be replaced with _.
- unused_closure_parameter
# Unused control flow label should be removed.
Expand Down Expand Up @@ -371,13 +367,18 @@ only_rules:
# The variable should be placed on the left, the constant on the right of a comparison operator.
- yoda_condition

attributes:
attributes_with_arguments_always_on_line_above: false

deployment_target: # Availability checks or attributes shouldn’t be using older versions that are satisfied by the deployment target.
iOSApplicationExtension_deployment_target: 16.0
iOS_deployment_target: 16.0

excluded: # paths to ignore during linting. Takes precedence over `included`.
- .build
- .swiftpm
- .derivedData
- Tests/UITests/.derivedData

closure_body_length: # Closure bodies should not span too many lines.
- 35 # warning - default: 20
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let package = Package(
.library(name: "SpeziContact", targets: ["SpeziContact"])
],
dependencies: [
.package(url: "https://github.com/StanfordSpezi/SpeziViews", .upToNextMinor(from: "0.3.0"))
.package(url: "https://github.com/StanfordSpezi/SpeziViews", .upToNextMinor(from: "0.4.0"))
],
targets: [
.target(
Expand Down
3 changes: 1 addition & 2 deletions Sources/SpeziContact/Contact Views/ContactView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ public struct ContactView: View {
}
}

@ViewBuilder
private var addressButton: some View {
@ViewBuilder private var addressButton: some View {
if let address = contact.address {
Button(action: openMaps) {
ZStack {
Expand Down
6 changes: 3 additions & 3 deletions Tests/UITests/TestAppUITests/SpeziContactsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ final class ContactsTests: XCTestCase {

XCTAssertEqual(app.buttons.matching(identifier: "Text").count, 2)
app.buttons.matching(identifier: "Text").element(boundBy: 0).tap()
if #available(iOS 17.0, *) {
if app.alerts["Text"].scrollViews.otherElements.buttons["Ok"].waitForExistence(timeout: 5) {
app.alerts["Text"].scrollViews.otherElements.buttons["Ok"].tap()
} else {
let messages = XCUIApplication(bundleIdentifier: "com.apple.MobileSMS")
XCTAssert(messages.wait(for: .runningForeground, timeout: 2))
app.activate()
XCTAssert(app.wait(for: .runningForeground, timeout: 2))
} else {
app.alerts["Text"].scrollViews.otherElements.buttons["Ok"].tap()
}

sleep(2)
Expand Down

0 comments on commit c2a5f51

Please sign in to comment.