My app keeps crashing, doesn't show any errors in the code but crashes when I run simulator.
That's a compiler crash. If you expand the build log output in Xcode, it may tell you what lines in your code it's having trouble on. Bug reports once you figure out are appreciated.
And that error is exactly what's wrong. You cannot declare an extension inside of another declaration (class, struct, protocol, extension, etc).
Think about it logically. You cannot extend a type that you haven't finished declaring yet. You need to finish declaring the
LocationManager class (by adding a closing bracket before line 34) before you can create an extension of the class.