cocoapods
是用ruby
写的。rubymotion
可以拿来做iOS
开发。
为什么iOS
和ruby
有那么多的渊源,为什么不是python
,不是node
?
天蓬老师2017-04-25 09:05:52
Because Mac’s operating system is OS X (now it should be called macOS).
阿神2017-04-25 09:05:52
As far as I know, the reasons for the two may be completely different.
First of all, there is a unified background. The popularity of Ruby abroad is exactly the same as that of PHP/Python. It may even be more popular in some scenarios, so the audience using Ruby is guaranteed. (For example: starting a small company) In China, it can be considered "less capable".
For the former, the "predecessor" of RubyMotion is MacRuby, a technology that was once officially supported by Apple for writing Mac programs in Ruby. But later Apple officially stopped supporting it, and it "went bankrupt." RubyMotion is the successor to MacRuby.
For the latter, cocoapods is a tool. Ruby itself is a language with strong meta-programming capabilities and is particularly good at writing tools and DSLs. Therefore, many tool programs are written in Ruby, such as fastlane, Homebrew, etc.
習慣沉默2017-04-25 09:05:52
Mac is user-friendly and Ruby is programmer-friendly, so they come together.