Troubleshooting
React Native Plugin 3.x > Troubleshooting
iPhone simulator with Apple silicon (M1/M2)
Problem
In some cases, when running the iPhone simulator with an Apple silicon (M1/M2) machine, Xcode throws the following error:
building for iOS Simulator, but linking in dylib built for iOS, file '../TaboolaSDK.framework/TaboolaSDK' for architecture arm64
This issue affects the simulator only - not real devices.
Resolution
To work around this problem, add arm64
to the excluded architectures for both your project and your Podfile.
Step 1: Update your project settings
Using Xcode:
- Select the project within the project navigator (top, left).
- Select the
Build Settings
tab (right). Make sure that theAll
tab (just below) is also selected. - Under
Architectures
, locate theExcluded Architectures
node. - Next to the
Debug
orRelease
node, click on the+
icon to add a new exclusion:- For the key, select
Any iOS Simulator SDK
. - For the value, type in
arm64
.
- For the key, select
Depending on your needs, add an exclusion under Debug or Release - or both.
- Scroll down to the
Build Options
section, and locate theValidate Workspace
node.- Set the value to
Yes
.
- Set the value to
Depending on your needs, set the value for Debug or Release - or both.
Step 2: Update your Podfile
Navigate to your project's ios
directory, and edit your Podfile to include the following:
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
Additional steps
If the above steps do not resolve the problem, you may need to update your existing pods (a sample script is provided below) - and thenclean
and rebuild
your project.
rm -rf ~/Library/Developer/Xcode/DerivedData/
pod deintegrate
pod update
The sample script
- Removes all build cache from Xcode.
- Updates all pods across your project.
Updated 6 months ago