When trying change url on button press I get the error : unexpectedly found nil while unwrapping an Optional value

Levi S

Im using XCODE and Swift 3.

I have an app which allows the user to change what site they are viewing, and which button they press then updates the webview with the new url.

I seem to constantly get this error : "unexpectedly found nil while unwrapping an Optional value"

I am new to Xcode and Swift, this is my first app build. So trying to debug it is proving difficult. I can see that the URL i am using does have a "?" after it. Is there a way I can make the url a non optional value? And when I do, would the webview update accordingly with the new url

enter image description here

unixb0y

Just for debugging, try:

let bleh = URL(string: "www.wikipedia.org")

Pretty sure your address has an issue where bleh is nil.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Unexpectedly found nil while unwrapping an Optional value, when trying to change a label's text, triggered by a notification

From Dev

Swift - While playing sound I get error "fatal error: unexpectedly found nil while unwrapping an Optional value"

From Dev

Swift - "fatal error: unexpectedly found nil while unwrapping an Optional value" when trying to retrieve coordinates from Firebase

From Dev

when coding, I get Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value any solutions

From Dev

fatal error: unexpectedly found nil while unwrapping an Optional value swift

From Dev

Fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)

From Dev

fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)

From Dev

.reloadData() fatal error: unexpectedly found nil while unwrapping an Optional value

From Dev

Swift - Error: unexpectedly found nil while unwrapping an optional value

From Dev

fatal error: unexpectedly found nil while unwrapping an Optional value

From Dev

swift fatal error: unexpectedly found nil while unwrapping an Optional value

From Dev

reloadData() fatal error: unexpectedly found nil while unwrapping an Optional value

From Dev

Swift error: unexpectedly found nil while unwrapping an Optional value

From Dev

Swift - Error: unexpectedly found nil while unwrapping an optional value

From Dev

fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)

From Dev

fatal error: unexpectedly found nil while unwrapping an Optional value swift

From Dev

Weird "fatal error: unexpectedly found nil while unwrapping an Optional value"

From Dev

fatal error: unexpectedly found nil while unwrapping an Optional value Computation

From Dev

fatal error: unexpectedly found nil while unwrapping an Optional value (Swift)

From Dev

CLLocationManager - fatal error: unexpectedly found nil while unwrapping an Optional value

From Dev

fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)

From Dev

Error with prepareForSegue “”unexpectedly found nil while unwrapping an Optional value“”

From Dev

NSDictionary: error Unexpectedly found nil while unwrapping an Optional value

From Dev

fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)

From Dev

fatal error: unexpectedly found nil while unwrapping an Optional value in didDeselectRowAt

From Dev

fatal error: unexpectedly found nil while unwrapping an Optional value - delegate

From Dev

Ios unexpectedly found nil while unwrapping an Optional value error

From Dev

Unexpectedly found nil while unwrapping an Optional value when configuring UITableView

From Dev

Unexpectedly found nil while unwrapping an optional value when loading tableView

Related Related

  1. 1

    Unexpectedly found nil while unwrapping an Optional value, when trying to change a label's text, triggered by a notification

  2. 2

    Swift - While playing sound I get error "fatal error: unexpectedly found nil while unwrapping an Optional value"

  3. 3

    Swift - "fatal error: unexpectedly found nil while unwrapping an Optional value" when trying to retrieve coordinates from Firebase

  4. 4

    when coding, I get Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value any solutions

  5. 5

    fatal error: unexpectedly found nil while unwrapping an Optional value swift

  6. 6

    Fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)

  7. 7

    fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)

  8. 8

    .reloadData() fatal error: unexpectedly found nil while unwrapping an Optional value

  9. 9

    Swift - Error: unexpectedly found nil while unwrapping an optional value

  10. 10

    fatal error: unexpectedly found nil while unwrapping an Optional value

  11. 11

    swift fatal error: unexpectedly found nil while unwrapping an Optional value

  12. 12

    reloadData() fatal error: unexpectedly found nil while unwrapping an Optional value

  13. 13

    Swift error: unexpectedly found nil while unwrapping an Optional value

  14. 14

    Swift - Error: unexpectedly found nil while unwrapping an optional value

  15. 15

    fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)

  16. 16

    fatal error: unexpectedly found nil while unwrapping an Optional value swift

  17. 17

    Weird "fatal error: unexpectedly found nil while unwrapping an Optional value"

  18. 18

    fatal error: unexpectedly found nil while unwrapping an Optional value Computation

  19. 19

    fatal error: unexpectedly found nil while unwrapping an Optional value (Swift)

  20. 20

    CLLocationManager - fatal error: unexpectedly found nil while unwrapping an Optional value

  21. 21

    fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)

  22. 22

    Error with prepareForSegue “”unexpectedly found nil while unwrapping an Optional value“”

  23. 23

    NSDictionary: error Unexpectedly found nil while unwrapping an Optional value

  24. 24

    fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)

  25. 25

    fatal error: unexpectedly found nil while unwrapping an Optional value in didDeselectRowAt

  26. 26

    fatal error: unexpectedly found nil while unwrapping an Optional value - delegate

  27. 27

    Ios unexpectedly found nil while unwrapping an Optional value error

  28. 28

    Unexpectedly found nil while unwrapping an Optional value when configuring UITableView

  29. 29

    Unexpectedly found nil while unwrapping an optional value when loading tableView

HotTag

Archive