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.
Because Mac’s operating system is OS X (now it should be called macOS).
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.
Mac is user-friendly and Ruby is programmer-friendly, so they come together.