It can be because of some customisation made with the key bindings in Xcode settings.
you can navigate to Xcode -> Settings -> key Bindings. and check customised tab if there are any related to new line remove it.
and you're good to go.