amirrajan / rubymotion-applied

RubyMotion documentation provided by the community. Submit a pull request to the docs for a free one year indie subscription.
Apache License 2.0
49 stars 10 forks source link

Building RubyMotion apps on Mojave that target iOS SDK 10.0. #125

Open amirrajan opened 5 years ago

amirrajan commented 5 years ago

First verify that motion version is the latest version (at the time of writing this it was 6.1):

motion --version

After that, install the 5.15 cached version of RubyMotion:

sudo motion update --cache-version=5.15

Mojave's version of Ruby is broken because of aggressive dylib caching (which affected BridgeSupport). Because of this you have to stage the newest BridgeSupport binaries in the cached directory. You can read about the dylib issue within motion changelog under = RubyMotion 5.17 = header.

rm -rf /Library/RubyMotion5.9/lib/BridgeSupport
rm -rf /Library/RubyMotion5.9/lib/BridgeSupport2
cp -R /Library/RubyMotion/lib/BridgeSupport /Library/RubyMotion5.9/lib/BridgeSupport
cp -R /Library/RubyMotion/lib/BridgeSupport2 /Library/RubyMotion5.9/lib/BridgeSupport2

After the cached version is patched, you'll need to update your Rakefile:

# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion5.9/lib")
require 'motion/project/template/ios'

Now that RubyMotion is patched for Mojave, you'll need to download Xcode 9.4.1 from http://developer.apple.com/download/more and move it into the Applications directory as Xcode.app (just temporarily rename the currently install Xcode before copying over).

Once Xcode 9.4.1 is copied over, open it at least once to accept and EULAs.

After that reset xcode-select

sudo xcode-select --reset

Clean your project, install pods (if applicable) and build:

rake clean:all
rake pod:install
rake default
Lax commented 5 years ago

✗ ERROR ITMS-90725: \"SDK Version Issue. This app was built with the iOS 11.4 SDK. All iOS apps submitted to the App Store must be built with the iOS 11 SDK or later, included in Xcode 9 or later. Further, starting March 2019, all iOS apps submitted to the App Store must be built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later.\"

So this method won't work for an AppStore release.

amirrajan commented 5 years ago

~It looks like 10.0 has been completely deprecated.~

Correction, I see what you are saying. Building against SDK 11.4 toolchain has been deprecated (not SDK 10.0). Let me get the correct cache-version.

RubyMotion 5.15 contains SDK 10.0 compiled against SDK 12.1 toolchain.