Error in IOS build after updating to SDK 43

Please provide the following:

  1. SDK Version: 43
  2. Platforms(Android/iOS/web/all): IOS

I have recently updated my bare RN project (I used expo init and then expo eject when in SDK 41) to Expo SDK 43. As mentioned in the documentation I have updated to 43, then removed IOS and Android folders and regenerated those folders again with “expo prebuild” and then pod install. The android build is working fine without any issues but the IOS build is raising an error - "Unknown attribute ‘ViewManagerDefinitionBuilder’ ". Location of the error is at - Pods → Development Pods → ExpoModulesCore → Swift → Modules → ModuleDefinitionComponents.swift (line 195). I tried to search and fix the issue but I am a web developer and recently moved into mobile app development so I didn’t wanted to mess up the code even more. I have also deleted the pod folder and reinstalled but it didn’t work. Could you please help me with a solution for this ASAP?

Hey @shubhamjain0, can you share your package.json as well as what version of Xcode your local environment is using?

Cheers,
Adam

Same error here, getting

DESCRIPTION

An unknown error occurred

after running expo client:ios.

Already fixed all the dependencies problems that I got initially after migrating to SDK43, but the build keeps failing. Could this be something from the expo servers side?

Sure. I am using Xcode 12.4 and the following is my package.json.

{

“scripts”: {

"start": "react-native start",

"android": "react-native run-android",

"ios": "react-native run-ios",

"web": "expo start --web",

"eject": "expo eject"

},

“dependencies”: {

"@expo/vector-icons": "^12.0.5",

"@react-native-async-storage/async-storage": "~1.15.9",

"@react-native-community/netinfo": "6.0.2",

"@react-native-community/slider": "4.1.10",

"@react-native-masked-view/masked-view": "0.2.6",

"@react-navigation/bottom-tabs": "^6.0.9",

"@react-navigation/native": "^6.0.6",

"@react-navigation/stack": "^6.0.11",

"@types/react-native-snap-carousel": "^3.8.5",

"core-js": "^3.18.3",

"expo": "^43.0.0",

"expo-app-loading": "~1.2.1",

"expo-clipboard": "~2.0.3",

"expo-font": "~10.0.3",

"expo-image-picker": "~11.0.3",

"expo-linear-gradient": "~10.0.3",

"expo-location": "~13.0.4",

"expo-notifications": "~0.13.3",

"expo-secure-store": "~11.0.3",

"expo-splash-screen": "~0.13.3",

"expo-status-bar": "~1.1.0",

"expo-updates": "~0.10.5",

"lottie-react-native": "4.1.3",

"react": "17.0.1",

"react-dom": "17.0.1",

"react-native": "0.64.2",

"react-native-app-intro-slider": "^4.0.4",

"react-native-copilot": "^2.5.1",

"react-native-draggable": "^3.3.0",

"react-native-dropdown-picker": "^5.1.28",

"react-native-flash-message": "^0.2.0",

"react-native-flip-card": "^3.5.6",

"react-native-gesture-handler": "~1.10.3",

"react-native-linear-gradient": "^2.5.6",

"react-native-maps": "0.29.3",

"react-native-modal": "^13.0.0",

"react-native-modal-dropdown": "^1.0.2",

"react-native-razorpay": "^2.2.8",

"react-native-reanimated": "~2.2.3",

"react-native-responsive-screen": "^1.4.2",

"react-native-safe-area-context": "3.3.2",

"react-native-screens": "~3.8.0",

"react-native-skeleton-placeholder": "^5.0.0",

"react-native-snap-carousel": "^3.9.1",

"react-native-step-indicator": "^1.0.3",

"react-native-svg": "12.1.1",

"react-native-web": "0.17.5",

"react-native-webview": "11.14.1",

"victory-native": "^35.5.5"

},

“devDependencies”: {

"@babel/core": "^7.15.8"

},

“private”: true,

“name”: “Name”,

“version”: “1.0.0”

}

I am also getting the same error after upgrading to SDK 43 and running expo run:ios.
Here are logs:

› Skipping dev server
› Planning build
› Compiling Pods/FBSDKCoreKit » FBSDKAppEvents.m
› Compiling Pods/FBSDKCoreKit » FBSDKAccessToken.m
› Compiling Pods/FBSDKCoreKit » FBSDKAppEventsAtePublisher.m
› Preparing Pods/EXUpdates-EXUpdates » ResourceBundle-EXUpdates-EXUpdates-Info.plist
› Signing   Pods/EXUpdates-EXUpdates » EXUpdates.bundle
› Preparing Pods/EXConstants-EXConstants » ResourceBundle-EXConstants-EXConstants-Info.plist
› Signing   Pods/EXConstants-EXConstants » EXConstants.bundle
› Compiling expo-modules-core Pods/ExpoModulesCore » AnyModule.swift
› Compiling expo-modules-core Pods/ExpoModulesCore » AppContext.swift
› Compiling expo-modules-core Pods/ExpoModulesCore » ConcreteMethod.swift
› Compiling expo-modules-core Pods/ExpoModulesCore » ConcreteViewProp.swift

❌  (node_modules/expo-modules-core/ios/Swift/Views/ConcreteViewProp.swift:26:53)

  24 |     }
  25 |     guard let value = value as? PropType else {
> 26 |       fatalError("Given value `\(String(describing: value))` cannot be casted to `\(String(describing: PropType.self))`")
     |                                                     ^ variable declared in 'guard' condition is not usable in its body
  27 |     }
  28 |     setter(view, value)
  29 |   }

› Compiling expo-modules-core Pods/ExpoModulesCore » Module.swift
› Compiling expo-modules-core Pods/ExpoModulesCore » ModuleDefinitionComponents.swift

❌  (node_modules/expo-modules-core/ios/Swift/Modules/ModuleDefinitionComponents.swift:196:25)

  194 |  Creates the view manager definition that scopes other view-related definitions.
  195 |  */
> 196 | public func viewManager(@ViewManagerDefinitionBuilder _ closure: @escaping () -> ViewManagerDefinition) -> AnyDefinition {
      |                         ^ unknown attribute 'ViewManagerDefinitionBuilder'
  197 |   return closure()
  198 | }
  199 | 

› Compiling expo-modules-core Pods/ExpoModulesCore » ModuleHolder.swift
› Compiling expo-modules-core Pods/ExpoModulesCore » ModuleRegistry.swift
› Compiling expo-modules-core Pods/ExpoModulesCore » ModulesProvider.swift
› Compiling expo-modules-core Pods/ExpoModulesCore » SwiftInteropBridge.swift
› Compiling expo-modules-core Pods/ExpoModulesCore » ViewModuleWrapper.swift
› Packaging Pods/FirebaseCoreDiagnostics » libFirebaseCoreDiagnostics.a
› Preparing Pods/expo-dev-launcher-EXDevLauncher » ResourceBundle-EXDevLauncher-expo-dev-launcher-Info.plist
› Signing   Pods/expo-dev-launcher-EXDevLauncher » EXDevLauncher.bundle
› Compiling expo-dev-menu Pods/expo-dev-menu » expo-dev-menu-dummy.m
› Compiling expo-dev-menu Pods/expo-dev-menu » RCTConvert+DevMenuREATransition.m
› Compiling expo-dev-menu Pods/expo-dev-menu » DevMenuVendoredModulesUtils.m
› Compiling expo-dev-menu Pods/expo-dev-menu » DevMenuRootView.m
› Compiling expo-dev-menu Pods/expo-dev-menu » DevMenuRNTapHandler.m
› Compiling expo-dev-menu Pods/expo-dev-menu » DevMenuRNRotationHandler.m
› Compiling expo-dev-menu Pods/expo-dev-menu » DevMenuRNRootViewGestureRecognizer.m

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

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

Yes, these are the two exact errors I am facing too. I didn’t mentioned about the first one because I kind of solved it by changing the variable “let value” to something like “let value1”. I know it is not a clean solution but that is what I have done.

@adamjnav Any solutions for us at the moment ?

Upgrading XCode to the latest (which also meant upgrading Mac OS to the latest) fixed it for me.

1 Like

According to the following issue, you need to upgrade Xcode to 12.5 or later:

1 Like

@wodin the upgrade to Xcode 13.1 (latest) fixed it.
Not more build error.

1 Like

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