ExpoCore - Minimum supported platform versions should stay in sync with RN's min support

Expo SDK 47 increased the minimum iOS version to iOS13. However, currently, React-Native 0.70 supports a minimum iOS version of iOS12.4.

I’ve had a brief discussion on the Discord server about this - but I think it’s worth creating a structured discussion about the philosophy here.

Currently, according to the discord discussion, the decision was made to increase the min iOS version, in order for Expo to only have to support current - 3 versions of iOS. Furthermore, the decision is also based on the fact that iOS12 usage is “negligible”.

However, I think there are some misconceptions here around the purpose and the usage of the minimum platform version (and this goes for both Android and iOS).

  • Firstly, as a practical counter-point, at my company, around 1.5% of our iOS signups still come from iOS12. This is not a negligible amount and thus limits us in terms of a clean upgrade path while using Expo.

  • Secondly, there should not be a disconnect between the minimum platform versions supported by RN and Expo Core. Expo as a purpose is meant to complement RN. By overriding a minimum supported platform, Expo is now dictating how and in which contexts RN is to be used.

  • Lastly, it should be up to the individual expo module to determine whether it’s using features that have only been introduced at a certain platform API level. As a practical example here, I’m able to patch all of the expo modules that we use in our codebase to build for iOS 12.4, without running into any compile time errors. This makes it clear that none of these modules are actually reliant on the minimum platform level as they themselves define. (for transparency, these packages are: "expo", "expo-apple-authentication", "expo-cellular", "expo-constants", "expo-file-system", "expo-gl", "expo-keep-awake", "expo-secure-store", all of which are now on the latest version.)

In short, it is my opinion that Expo should stay in sync with the supported platform as dictated by React-Native, and that it should be up to the consumer of a certain module to decide whether they are willing to detach from the minimum platform defined by RN by making use of some expo module that makes use of features only available at a higher API level.

Keen to hear your thoughts and have a further discussion about this.

Hey Frikkie,

Just to clarify for anyone reading this, it was me that said iOS 12 usage is negligible, but I am not part of the Expo team. This was just me speculating on reasons for raising the minimum target :sweat_smile:

1 Like

Ah, right! Thanks for the clarification!

Then I’m hoping we also get some official response on the decision making process. :crossed_fingers:

For anyone looking to override the Expo deployment targets without having to patch each package, you can simply add the following to your Podfile (top level function):

def set_expo_deployment_targets(installer)
  prefixesToFix = ["Expo", "EX"];
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      if target.name.start_with? *prefixesToFix
        puts "Setting deployment target for #{target.name} to 12.4"
        target.build_configurations.each do |config|
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4'
        end
      end
    end
  end
end

then add to the post_install:

set_expo_deployment_targets(installer)
1 Like

@frikkiehsnyman can this be adapted to the managed workflow?

You’d have to write a config plugin to make those changes to the Podfile

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.