I'm a web developer who really likes the look of Swift-- I would love to be writing code in it.
My concern is that it's only used by a narrow range of products -- Android has taken something like 90% market share in mobile phones and I worry that in the long run Swift and the Apple frameworks aren't a good investment as a developer.
What are your thoughts?
You raise a good question about whether the investment is worthwhile, but if you earn money from targeting Apple platforms then it's a no-brainer.
When I was in the game industry, pretty much everyone I knew had the attitude that you had to be an expert in one language, C++, and it was career suicide to take a job working in a different language. But I've always felt that there's nothing wrong with using multiple languages. Over the course of my career I've had to use many different languages, at this point it doesn't seem like a big deal pick up another one. When I had to do a Unity game, it seemed like it took less than a month to get ramped up on C#. Just this year I've jumped back and forth extensively between Swift, Typescript, Elm, Elixir, Python, and Golang, while also doing some small projects in Agda, Haskell, and a few others. Yes, I do get the syntax mixed up, particularly right after a transition, and sure, I'd probably be more hireable if I honed my skill in a single language, but really learning a language is not such a big investment once you get the hang of it.
The Apple frameworks are a different story -- that's a bigger time investment, but it's incremental. You don't have to learn all of them to make an app, or to be productive in Swift.
[edit: fix typo]