"Undefined Symbol: Protocol Descriptor for Swift.Expressiblebyfloatliteral" Issue While Installing React Native on MACos Big Sur

Symbol(s) not found for architecture arm64 - XCode

For react-native 0.67+: After a lot of research, I found the next solution from Vegaro:

SOLUTION LINK

First step is to upgrade the react-native-purchases by Revenuecat package to the latest version.

Clean your pods:
REFERENCE LINK TO PROPERLY CLEAN PODS

Declare a pods post install process:
Add the next to your Podfile:

 post_install do |installer|
react_native_post_install(installer)
fix_library_search_paths(installer)
end
end

def fix_library_search_paths(installer)
def fix_config(config)
lib_search_paths = config.build_settings["LIBRARY_SEARCH_PATHS"]
if lib_search_paths
if lib_search_paths.include?("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)") || lib_search_paths.include?("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"")
# $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) causes problem with Xcode 12.5 + arm64 (Apple M1)
# since the libraries there are only built for x86_64 and i386.
lib_search_paths.delete("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)")
lib_search_paths.delete("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"")
if !(lib_search_paths.include?("$(SDKROOT)/usr/lib/swift") || lib_search_paths.include?("\"$(SDKROOT)/usr/lib/swift\""))
# however, $(SDKROOT)/usr/lib/swift is required, at least if user is not running CocoaPods 1.11
lib_search_paths.insert(0, "$(SDKROOT)/usr/lib/swift")
end
end
end
end

projects = installer.aggregate_targets
.map{ |t| t.user_project }
.uniq{ |p| p.path }
.push(installer.pods_project)

projects.each do |project|
project.build_configurations.each do |config|
fix_config(config)
end
project.native_targets.each do |target|
target.build_configurations.each do |config|
fix_config(config)
end
end
project.save()
end
end

React Native on Apple Silicon M1 - The linked library 'libPods-ProjectName.a' is missing one or more architectures required by this target: x86_64

I had the same issue and finally, I fixed it. There are 2 main reasons for the errors:

  1. arm64 architecture support & and Xcode 12 compatible version have not been provided by many popular third party libraries yet (like Firebase, AFNetworking, etc). Xcode 11 used to automatically translate building for arm64 for the simulator into building for x86_64, but now that arm64 is a valid simulator architecture (it’s the Apple Silicon architecture), that translation no longer occurs.

  2. Because the Valid Architectures build setting has been removed from Xcode 12, the Project file, opened in Xcode 12, will auto-generate a VALID_ARCHS macro in User-Defines, and this macro will make the build fail.

I follow all steps in this post: https://medium.com/@khushwanttanwar/xcode-12-compilation-errors-while-running-with-ios-14-simulators-5731c91326e9

Final step was updating all pods by running below command inside the project folder:

pod deintegrate
pod update

Then I exclude the arm64 for the Simulator architecture, both from main project and the Pod project.

Xcode build settings

Clean the project ( + + k) then run.

Widget Extension UnitTest Error: Undefined Symbol: nominal type descriptor for [...].

I've found a solution, which feels like a workaround, but does the job:

  • Define MyStruct as well in the main app target with target membership MyApp
  • In the UnitTest use @testable import MyApp in order to be able to use MyStruct from the app target

Now the compiler does not complain anymore.

The linked framework 'Pods_Runner.framework' is missing one or more architectures required by this target: x86_64

I had the same issue on my M1 Mac and here is what I did to fix this:

  1. sudo arch -x86_64 gem install ffi
  2. add this code at the end of the pod file which is inside ios folder:
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
end

  1. cd ios/ && arch -x86_64 pod install.

  2. run Xcode with Rosetta.

    Sample Image.

    You can install Rosetta by running: softwareupdate --install-rosetta

  3. exclude architecture arm64.
    Sample Image

  4. clean build - open xcode then press Command + Shift + K




  1. If you're using nvm try to replace NODE_BINARY=node with the actual result of the which node command, which in my case looks something like this:Sample Image

    Sample Image

Shoutout to these answers:
one two three

Remove all div tags from string php regex?

No. You do NOT ever parse/manipulate HTML with regexes.

Regexes cannot be bargained with. They can't be reasoned with. They don't understand html, they don't grok xml. And they absolute will NOT stop until your DOM tree is dead.

You use htmlpurifier and/or DOM to manipulate the tree.

How can I get the name of the listbox that a stackpanel is in?

Updated (working) answer

You need to walk up the visual tree with VisualTreeHelper.GetParent on the StackPanel, and if necessary recurse over further parents, until you find the ListBox (use the as or is operator to detect that you have found it).

For added convenience, or if you need to traverse the tree in other directions (which is a bit more involved), you can use a wrapper that exposes the traversal in a LINQy format such as this one.

All this said, you might also want to take a look at How can I find WPF controls by name or type?.



Related Topics



Leave a reply



Submit