Fork me on GitHub
#cljsrn
<
2021-05-01
>
hkjels12:05:36

@dnolen One has to make a few changes to the Podfile for the iOS part to run on M1 mac’s.

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '14.3'

target 'App' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  target 'AppTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  # use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
      config.build_settings["IPHONEOS_DEPLOYMENT_TARGET"] = "iOS 10.0"
    end
  end

end
But it might be just as fine to have a wiki-page about it

hkjels12:05:26

it’s not krell, but a react-native thing

hkjels12:05:59

With a Podfile like that, all of the instructions from the Krell README work as you’d expect

hkjels12:05:36

One also has to use yarn as you’ve mentioned

hkjels12:05:28

Come to think of it, I also made some minor changes to the AppDelegate in order to remove some warnings

dnolen12:05:57

Hrm I did this on M1 without any changes

naomarik17:05:05

I had an extremely hard time trying to get a new RN app running on iOS simulator on M1 without Rosetta. Found the solution here: https://github.com/react-native-community/discussions-and-proposals/issues/295#issuecomment-826159476

naomarik17:05:05

This is just straight pulling a new RN app and trying to run on simulator, no cljs involved.

hkjels18:05:12

@dnolen so, it worked even with use_flipper!()?

naomarik19:05:05

@hkjels I also had to replace that with this use_flipper!({ 'Flipper' => '0.85.0' })