expo / expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
https://docs.expo.dev
MIT License
35.14k stars 5.63k forks source link

“Build Fails on iOS Simulator When Integrating Tencent Map SDK with Expo Module” #33416

Closed waynerQiu closed 13 hours ago

waynerQiu commented 13 hours ago

Do you understand that any discussions or questions opened as issues in the core Expo repository will be closed?

以下是处理成英文后的描述,可用于在 Expo 的 GitHub 上提交 Issue:

Development Environment and Issue Background

Environment: • Device: M3 Max MacBook • Architecture: iOS • Simulator: iOS Simulator

Issue Background: I encountered a build architecture error when integrating a third-party SDK into my project. Here are the detailed reproduction steps:

  1. I created a React Native module using the following command:

npx create-expo-module@latest --local

2.  The module works correctly without any issues.
3.  I attempted to integrate the Tencent Map SDK ([Tencent iOS Map SDK](https://lbs.qq.com/mobile/iOSMapSDK/mapGuide/summary)) into the module by adding the following dependencies to the Podfile:

pod 'Tencent-MapSDK', '5.1.0' pod 'Tencent-MapVisualPlugin', '3.1.0' pod 'Tencent-MapFoundation', '>=3.3.0' pod 'Tencent-MapUtils', '1.2.3'

4.  Installed the dependencies using npx pod-install. The SDKs were successfully loaded under Pods/Pods.

Issue Description

When I try to build the project in Xcode, I encounter the following errors:

  1. Compile Error:

/Users/qiu/MyGit/ReactNative/mytest/ios/Pods/Target Support Files/Pods-mytest/ExpoModulesProvider.swift:8:8 Could not find module 'ExpoModulesCore' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator, at: /Users/qiu/Library/Developer/Xcode/DerivedData/mytest-cnidjycdeuecksevivmljyxalgiw/Index.noindex/Build/Products/Debug-iphonesimulator/ExpoModulesCore/ExpoModulesCore.swiftmodule

2.  Attempted Fix:

I tried excluding the x86_64 architecture using Excluded Architectures in Xcode. However, this led to a new error:

Building for 'iOS-simulator', but linking in object file (/Users/qiu/MyGit/ReactNative/mytest/ios/Pods/Tencent-MapFoundation/QMapFoundationKit.framework/QMapFoundationKit[arm64]3) built for 'iOS'

My Challenges

As a beginner, I am not familiar with handling iOS architecture compatibility issues and I’m stuck on how to resolve this. Could someone help me with the following?

  1. How to address the architecture mismatch issue described above?
  2. Do I need to modify my project settings or is there a compatibility problem with the Tencent Map SDK?

Any advice would be greatly appreciated!

expo-bot commented 13 hours ago

Hello! Our GitHub issues are reserved for bug reports.

If you have a question about Expo or related tools, please join our Discord at https://chat.expo.dev/

Resources