skip to Main Content

I am trying to upgrade Expo SDK from 49 to 50, but I can’t make the ios app run. https://expo.dev/changelog/2024/01-18-sdk-50

pods install runs without errors.

When I run npx expo run:ios I get:

❌  (ios/Pods/Target Support Files/Pods-Dmaze/ExpoModulesProvider.swift:8:8)

   6 |  */
   7 | 
>  8 | import ExpoModulesCore
     |        ^ compiling for iOS 13.0, but module 'ExpoModulesCore' has a minimum deployment target of iOS 13.4: /Users/marvin/Library/Developer/Xcode/DerivedData/Dmaze-eherjphdqufazvbjufezzvmfviqj/Build/Products/Debug-iphonesimulator/ExpoModulesCore/ExpoModulesCore.swiftmodule/arm64-apple-ios-simulator.swiftmodule
   9 | import EXConstants
  10 | import ExpoFileSystem
  11 | import ExpoKeepAwake


❌  (ios/Pods/Target Support Files/Pods-Dmaze/ExpoModulesProvider.swift:8:8)

   6 |  */
   7 | 
>  8 | import ExpoModulesCore
     |        ^ compiling for iOS 13.0, but module 'ExpoModulesCore' has a minimum deployment target of iOS 13.4: /Users/marvin/Library/Developer/Xcode/DerivedData/Dmaze-eherjphdqufazvbjufezzvmfviqj/Build/Products/Debug-iphonesimulator/ExpoModulesCore/ExpoModulesCore.swiftmodule/arm64-apple-ios-simulator.swiftmodule
   9 | import EXConstants
  10 | import ExpoFileSystem
  11 | import ExpoKeepAwake


❌  (ios/Pods/Target Support Files/Pods-Dmaze/ExpoModulesProvider.swift:8:8)

   6 |  */
   7 | 
>  8 | import ExpoModulesCore
     |        ^ compiling for iOS 13.0, but module 'ExpoModulesCore' has a minimum deployment target of iOS 13.4: /Users/marvin/Library/Developer/Xcode/DerivedData/Dmaze-eherjphdqufazvbjufezzvmfviqj/Build/Products/Debug-iphonesimulator/ExpoModulesCore/ExpoModulesCore.swiftmodule/arm64-apple-ios-simulator.swiftmodule
   9 | import EXConstants
  10 | import ExpoFileSystem
  11 | import ExpoKeepAwake


› 3 error(s), and 0 warning(s)

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.

I set the target to 13.4 in the Podfile:

require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")

require 'json'
pod 'AppAuth'
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}

ENV['RCT_NEW_ARCH_ENABLED'] = podfile_properties['newArchEnabled'] == 'true' ? '1' : '0'
ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] = podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR']

platform :ios, podfile_properties['ios.deploymentTarget'] || '13.4'

Why is it compiling for iOS 13.0? How can I make it build for 13.4?

2

Answers


  1. Chosen as BEST ANSWER

    I fixed it!

    Update Deployment Target in Xcode: Besides setting the deployment target in the Podfile, you also need to ensure that the deployment target is set correctly in Xcode for your project and all its targets. Open your project in Xcode, select the project file in the navigator, then for each target (including the main app target and any test targets), go to the General tab and set the Deployment Target to iOS 13.4 or higher.


  2. I encountered a similar error with Expo 49 and expo EAS build. Is there any way I can fix it without ejecting from expo?

    ❌ (ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:73:12)

    71 | let provider = ComponentType.instance(for: StorageProvider.self,
    72 | in: app.container)

    73 | return provider.storage(for: Storage.bucket(for: app))
    | ^ value of optional type ‘?’ must be unwrapped to refer to member ‘storage’ of wrapped base type ‘any StorageProvider’
    74 | }
    75 |
    76 | /**

    ❌ (ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:88:12)

    86 | let provider = ComponentType.instance(for: StorageProvider.self,
    87 | in: app.container)

    88 | return provider.storage(for: Storage.bucket(for: app, urlString: url))
    | ^ value of optional type ‘?’ must be unwrapped to refer to member ‘storage’ of wrapped base type ‘any StorageProvider’
    89 | }
    90 |
    91 | /**

    ❌ (ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:291:39)

    289 | init(app: FirebaseApp, bucket: String) {
    290 | self.app = app

    291 | auth = ComponentType.instance(for: AuthInterop.self,
    | ^ cannot assign value of type ‘?’ to type ‘any AuthInterop’
    292 | in: app.container)
    293 | appCheck = ComponentType.instance(for: AppCheckInterop.self,
    294 | in: app.container)

    ❌ (ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:293:47)

    291 | auth = ComponentType.instance(for: AuthInterop.self,
    292 | in: app.container)

    293 | appCheck = ComponentType.instance(for: AppCheckInterop.self,
    | ^ cannot assign value of type ‘?’ to type ‘any AppCheckInterop’
    294 | in: app.container)
    295 | storageBucket = bucket
    296 | host = "firebasestorage.googleapis.com"

    If you have any suggestions, that would be much appreciated!

    Thanks.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search