StackOverflow Questions for Tag: swift-optionals

Ser Pounce
Ser Pounce

Reputation: 14527

SwiftUI / SwiftData / CloudKit: how to make custom binding for dynamically changing setter value

Score: 0

Views: 54

Answers: 0

Read More
Oscar
Oscar

Reputation: 2315

How can we have "one source of truth" when SwiftUI doesn't support optionals?

Score: 1

Views: 322

Answers: 2

Read More
oneWayTicket
oneWayTicket

Reputation: 101

Any? incorect semantics

Score: 2

Views: 78

Answers: 3

Read More
SebastianH
SebastianH

Reputation: 1

Code works on iOS simulator (iPhone 13mini) chrashes on real iPhone 13mini: Fatal error: Unexpectedly found nil while unwrapping an Optional value

Score: 0

Views: 38

Answers: 1

Read More
Russ
Russ

Reputation: 119

Default value for optional type 'URL?'

Score: 6

Views: 9071

Answers: 2

Read More
Ayaan Grover
Ayaan Grover

Reputation: 11

Firebase login setup failure: "Initializer for conditional binding must have Optional type, not 'String'"

Score: 1

Views: 58

Answers: 1

Read More
Fattie
Fattie

Reputation: 12582

Extracting a String from a [String: Any?] by key

Score: 0

Views: 73

Answers: 1

Read More
esbenr
esbenr

Reputation: 1524

Checking if Optional<Int> is nil

Score: -1

Views: 72

Answers: 1

Read More
Ser Pounce
Ser Pounce

Reputation: 14527

What is the correct way to declare, instantiate and unwrap an optional closure?

Score: -1

Views: 51

Answers: 1

Read More
grep
grep

Reputation: 593

Getting a compiler error trying to write a complicated Predicate - Scenario 2

Score: 1

Views: 134

Answers: 1

Read More
grep
grep

Reputation: 593

Getting a compiler error trying to write a complicated Predicate

Score: 2

Views: 322

Answers: 1

Read More
Manuel Zompetta
Manuel Zompetta

Reputation: 414

Swift struct with tuples does not conform to Codable

Score: 1

Views: 351

Answers: 1

Read More
user2343632
user2343632

Reputation: 310

Avoid repeated views when checking optionals in SwiftUI

Score: 1

Views: 43

Answers: 1

Read More
Anton Tropashko
Anton Tropashko

Reputation: 5806

Is there a way to embed an assertionFailure into '??' expression?

Score: 0

Views: 93

Answers: 2

Read More
Doghound
Doghound

Reputation: 139

Getting error with previously supported Optional type requirements on a function declaration (same-type, error in Swift 6)

Score: 1

Views: 87

Answers: 1

Read More
lvyachen
lvyachen

Reputation: 33

Why the Picker is not working? Can't select option when I set the @State is optional

Score: 0

Views: 382

Answers: 1

Read More
Josiah
Josiah

Reputation: 1137

Swift WKwebView.evaluateJavaScript Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

Score: 0

Views: 716

Answers: 2

Read More
Eduardo Airton
Eduardo Airton

Reputation: 47

Split String with varied amount of input data

Score: 1

Views: 46

Answers: 1

Read More
Rohit
Rohit

Reputation: 2326

Getting nil from Enum Swift

Score: 0

Views: 118

Answers: 1

Read More
Heber Neto
Heber Neto

Reputation: 13

How can I compare two different types of data (String and Int) using readLine() on Swift?

Score: 1

Views: 799

Answers: 3

Read More
PreviousPage 1Next