No type named 'UIUserActivityRestoring' - build error in XCode

I’m ejecting my Expo app to Expo Kit. I did so by running expo eject , which generated the ios and android files.

When I follow this guide to run my project, I run expo start and expo will run the app on the client. However, when I try to follow step 3, I run into a problem.

I will go into my ios directory and run pod install like so:

cd ./ios
pod install

After this, I open up XCode and hit the ‘Run’ button.

After some seconds, the build fails with 3 errors. In different files for a type named UIUserActivityRestoring that appears to be missing.

Here’s what that looks like:

As you can see, all of these errors seem to be coming from a development Pod called ‘UMCore’.

I’ve tried deleting all pods and reinstalling them with pod install , as well as updating cocoapods and running again, but the issue persists.

This is what my Podfile looks like

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'

target 'gearcaster-mobile' do
  pod 'ExpoKit',
    :git => "http://github.com/expo/expo.git",
    :tag => "ios/2.11.2",
    :subspecs => [
      "Core"
    ],
    :inhibit_warnings => true

  # Install unimodules
  require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
  use_unimodules!(
    modules_paths: ['../node_modules'],
    exclude: [
      'expo-face-detector',
      'expo-payments-stripe',
    ],
  )

  pod 'React',
    :path => "../node_modules/react-native",
    :inhibit_warnings => true,
    :subspecs => [
      "Core",
      "ART",
      "RCTActionSheet",
      "RCTAnimation",
      "RCTCameraRoll",
      "RCTGeolocation",
      "RCTImage",
      "RCTNetwork",
      "RCTText",
      "RCTVibration",
      "RCTWebSocket",
      "DevSupport",
      "CxxBridge"
    ]
  pod 'yoga',
    :path => "../node_modules/react-native/ReactCommon/yoga",
    :inhibit_warnings => true
  pod 'DoubleConversion',
    :podspec => "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec",
    :inhibit_warnings => true
  pod 'Folly',
    :podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec",
    :inhibit_warnings => true
  pod 'glog',
    :podspec => "../node_modules/react-native/third-party-podspecs/glog.podspec",
    :inhibit_warnings => true


  post_install do |installer|
    installer.pods_project.main_group.tab_width = '2';
    installer.pods_project.main_group.indent_width = '2';

    installer.target_installation_results.pod_target_installation_results
      .each do |pod_name, target_installation_result|

      if pod_name == 'ExpoKit'
        target_installation_result.native_target.build_configurations.each do |config|
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'EX_DETACHED=1'

          # Enable Google Maps support
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'HAVE_GOOGLE_MAPS=1'
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'HAVE_GOOGLE_MAPS_UTILS=1'

        end
      end


      if ['Amplitude-iOS','Analytics','AppAuth','Branch','CocoaLumberjack','FBSDKCoreKit','FBSDKLoginKit','FBSDKShareKit','GPUImage','JKBigInteger2'].include? pod_name
      target_installation_result.native_target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
      end
      end

      # Can't specify this in the React podspec because we need to use those podspecs for detached
      # projects which don't reference ExponentCPP.
      if pod_name.start_with?('React')
        target_installation_result.native_target.build_configurations.each do |config|
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
          config.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)']
        end
      end

      # Build React Native with RCT_DEV enabled and RCT_ENABLE_INSPECTOR and
      # RCT_ENABLE_PACKAGER_CONNECTION disabled
      next unless pod_name == 'React'
      target_installation_result.native_target.build_configurations.each do |config|
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV=1'
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_ENABLE_INSPECTOR=0'
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'ENABLE_PACKAGER_CONNECTION=0'
      end

    end
  end
end

Tool versions:

  • Cocoapods 1.7.5
  • Expo-CLI 3.0.6
  • React-Native: 0.59.8

Package.json dependencies

"dependencies": {
    "expo": "^33.0.0",
    "expo-constants": "^5.0.1",
    "expo-font": "^5.0.1",
    "expo-linear-gradient": "^5.0.1",
    "expokit": "^33.0.4",
    "react": "16.8.3",
    "react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
    "react-native-unimodules": "^0.4.2",
    "react-navigation": "^3.11.1",
    "react-redux": "^7.1.0",
    "redux": "^4.0.4",
    "socket.io-client": "^2.1.1"
  },

Any help on this issue is appreciated!

Hey @skepdimi,

Thanks for providing all the information you did. I have one more question though, what verison of Xcode are you using?

Cheers,
Adam

1 Like

Hi @adamjnav

i have the same issue; i am using Xcode Version 9.4.1 (9F2000)

Hey @littlejmer, you need to update to Xcode 10+.

Thank you very much @adamjnav

I have already updated my Xcode to 10+ version; now i have a new issues

  • Duplicate interface definition for class ‘REAUpdateContext’
  • Duplicate interface definition for class ‘REANode’
  • Property has a previous declaration ( @property ( nonatomic , weak , nullable ) REANodesManager *nodesManager;)
  • Property has a previous declaration (REAUpdateContext *updateContext;)
  • Property has a previous declaration (REANodeID nodeID;)

i think the problem is with react-native-reanimated, it is like it was installed two times one in node_modules and other with pod install.