You could download third-party keyboards on the iPhone that supported the feature, but most of them were just... not quite as good as the native keyboard, so swipe typing was widely perceived to be kind of missing on iPhones.
And now, with iOS 13, swipe typing is coming to the native keyboard app. Finally!
Apple calls the features QuickPath Typing and says that it has used on-device machine learning to make this possible:
This is great news, especially considering that iPhones as early as the iPhone 6s will get iOS 13, which brings the new feature.
Meanwhile, if you don't want to wait until the fall to get the iOS 13 update on your iPhone, you can try third-party keyboards like SwiftKey that supports swipe typing on iPhones right now.