question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0.61.5 -> 0.62.2 - Build error with watchOS

See original GitHub issue

Environment

System:
    OS: macOS 10.15.4
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 2.02 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.7.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
  IDEs:
    Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
  npmPackages:
    react: 16.11.0 => 16.11.0
    react-native: 0.62.2 => 0.62.2
  npmGlobalPackages:
    react-native-create-library: 3.1.2

Upgrading version

0.61.5 -> 0.62.2

Description

Error building watchOS app after upgrading from React Native 61.5:

Undefined symbols for architecture i386:
  "_swift_getOpaqueTypeConformance", referenced from:
      associated type witness table accessor for SwiftUI.View.Body : SwiftUI.View in AwesomeProject_Watch_Extension.ContentView : SwiftUI.View in AwesomeProject_Watch_Extension in ContentView.o
      associated type witness table accessor for SwiftUI.PreviewProvider.Previews : SwiftUI.View in AwesomeProject_Watch_Extension.ContentView_Previews : SwiftUI.PreviewProvider in AwesomeProject_Watch_Extension in ContentView.o
      associated type witness table accessor for SwiftUI.View.Body : SwiftUI.View in AwesomeProject_Watch_Extension.NotificationView : SwiftUI.View in AwesomeProject_Watch_Extension in NotificationView.o
      associated type witness table accessor for SwiftUI.PreviewProvider.Previews : SwiftUI.View in AwesomeProject_Watch_Extension.NotificationView_Previews : SwiftUI.PreviewProvider in AwesomeProject_Watch_Extension in NotificationView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Reproducible demo

npx react-native init AwesomeProject

Add Watch App for iOS App Target Screen Shot 2020-04-20 at 10 06 20 AM

Accept Defaults Screen Shot 2020-04-20 at 10 06 40 AM

Error building AwesomeProject for iPhone 11 Simulator Screen Shot 2020-04-20 at 10 07 21 AM

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:18

github_iconTop GitHub Comments

126reactions
iyegoroffcommented, May 2, 2020

I fixed similar error in my iOS app by removing "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", line from LIBRARY_SEARCH_PATHS in project.pbxproj file.

31reactions
Menardicommented, Aug 6, 2020

I ran in to a similar issue when trying to create a home screen widget in Xcode 12 for iOS 14. The fix mentioned above didn’t work for me, but it set me on the right path. I’m posting my fix here in case others may find it useful!

For me, there were two steps to fixing this issue:

  1. Removed all entries from LIBRARY_SEARCH_PATHS in the Project configuration
  2. Add a new Swift file to the project (File > New > File > Swift), and call it whatever you want
Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to run react native on iOS after upgrading Xcode 12.5
It's not just you, this is an open issue. Below are links to the issue thread and a troubleshooting guide: react-native run-ios build...
Read more >
Error trying to build watchOS 2 ap… | Apple Developer Forums
You will see your project icon. Click there(set active scheme). This error can be caused by number of issues. In my case, they...
Read more >
Apple Watch Won't Update? Here's How to Fix It. (watchOS 8)
Why won't my Apple Watch update? It's a frustrating problem to have, but luckily Apple Watch troubleshooting is pretty simple.
Read more >
How to fix “pod install” error in React Native on Mac M1
Picture this: you've finally found the time and motivation to build the next billion-dollar app with React Native on your brand-new Macbook Pro, ......
Read more >
Can't upgrade from 0.62.2 to 0.63.3 after Xcode update that ...
Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0. Android SDK: Not Found ... When building the app, I immediately get...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found