React Native Zoom Video SDK + Expo Arm64 Simulator

Hey Zoom Team et al,

We’re running the Video SDK in our React Native + Expo environment and are having great success on physical devices. However we’re encountering an issue when we attempt to build for the simulator on arm64 mac’s.

I noticed support for arm64 was added to the video sdk around version 1.9 and we are presently running 1.13.xx in our solution but are seeing an error relating to the arm64 vs x86_64 architecture.

Is there an easy fix on our side or was this simply an oversight when bringing the video sdk updates into the react native wrapper?

Please note the text below is from the react native sample app provided by the Zoom team.

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

   6 |  */
   7 | 
>  8 | import ExpoModulesCore
     |        ^ could not find module 'ExpoModulesCore' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator, at: /Users/redacted-smile/Library/Developer/Xcode/DerivedData/zoomexpo-bqkrcyvixbmxxeglsdufbacwgbtf/Build/Products/Debug-iphonesimulator/ExpoModulesCore/ExpoModulesCore.swiftmodule
   9 | import Expo
  10 | import ExpoAsset
  11 | import ExpoBlur


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

Try adding this snippet to the postinstall action of your Podfile:

...
  post_install do |installer|

    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
      end
    end
...

Hey thanks for the reply! I’ve added the above code to the podfile and attempted to rebuild using the npx expo run:ios --no-build-cache command.

Unfortunately the error is persisting in both the react native sample app and our application as well. For reference here is the podfile in case we have incorrectly implemented the change:

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'
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'] || '15.1'
install! 'cocoapods',
  :deterministic_uuids => false

prepare_react_native_project!

target 'zoomexpo' do
  use_expo_modules!

  if ENV['EXPO_USE_COMMUNITY_AUTOLINKING'] == '1'
    config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"];
  else
    config_command = [
      'node',
      '--no-warnings',
      '--eval',
      'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))',
      'react-native-config',
      '--json',
      '--platform',
      'ios'
    ]
  end

  config = use_native_modules!(config_command)

  use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
  use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/..",
    :privacy_file_aggregation_enabled => podfile_properties['apple.privacyManifestAggregationEnabled'] != 'false',
  )

  post_install do |installer|
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false,
      :ccache_enabled => podfile_properties['apple.ccacheEnabled'] == 'true',
    )

    # This is necessary for Xcode 14, because it signs resource bundles by default
    # when building for devices.
    installer.target_installation_results.pod_target_installation_results
      .each do |pod_name, target_installation_result|
      target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
        resource_bundle_target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
        end
      end
    end

    # Apply ONLY_ACTIVE_ARCH setting
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
      end
    end
  end
end

Hi @GSDev, sorry about missing this in the quickstart. I just updated the repo with this commit: fix: pod install · zoom/videosdk-reactnative-quickstart@4fc4dd7 · GitHub. It works fine for me, can you pull the latest changes and try again please?

Yep the quick start is now working correctly for me as well now that I pulled latest. I try and look into the differences in my solution. Thanks for your help.

1 Like