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
  • 74,809
  • 18
  • 177
  • 265
cheznead
  • 2,289
  • 7
  • 26
  • 44

1 Answers1

2

Use String interpolation.

pushMessage = "\(user.name) has briefed: \"\(note)\" and will attend conference\(conference) if approved."
Lope
  • 5,125
  • 4
  • 28
  • 40
Dávid Pásztor
  • 45,571
  • 9
  • 73
  • 100