0

The Swift compiler is giving me an error on this line and says "Expression too complex to be solved in reasonable time"

pushMessage = user.name + " has briefed: " + "\"" + note + "\" and will attend conference" + conference + " if approved."

I need to break it down but don't know how to adapt this to satisfy the compiler.

Hamish
  • 78,605
  • 19
  • 187
  • 280
cheznead
  • 2,589
  • 7
  • 29
  • 50

1 Answers1

2

Use String interpolation.

pushMessage = "\(user.name) has briefed: \"\(note)\" and will attend conference\(conference) if approved."
Lope
  • 5,388
  • 4
  • 30
  • 40
Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116