react-native-community / upgrade-support

A central community-backed place to request and give help when upgrading your app.
MIT License
261 stars 2 forks source link

Upgrading 0.61.4 to 0.62.3 on M1 works on iOS simulator but not on device #187

Closed chetstone closed 2 years ago

chetstone commented 2 years ago

Environment

info Fetching system and libraries information... System: OS: macOS 11.6.1 CPU: (8) arm64 Apple M1 Memory: 214.31 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.13.1 - ~/.nodenv/versions/16.13.1/bin/node Yarn: 1.22.17 - /opt/homebrew/bin/yarn npm: 8.1.2 - ~/.nodenv/versions/16.13.1/bin/npm Watchman: 2021.05.31.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /Users/chet/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 29, 30 Build Tools: 29.0.2, 29.0.3, 30.0.3 System Images: android-29 | Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 4.2 AI-202.7660.26.42.7486908 Xcode: 13.1/13A1030d - /usr/bin/xcodebuild Languages: Java: 1.8.0_102 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.3 => 0.62.3 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Things I’ve done to figure out my issue

Upgrading version

0.62.3

Description

I used upgrade-helper except for the pbxproj file, as suggested by @pvinis in Issue #13. ( I assume when he says, "Upgrade all other files except the .xcodeproj file" he means the `.xcodeproj/project.pbxproj` file)

At this stage, the app still worked on the simulator (iPad or iPhone with iOS 14.5 or 15.0) but not on an iPad running 14.8.1 or on "My Mac (Designed for iPad)". This all worked on RN 0.61.4 with this setup (M1, XCode 13.1).

The error when running on the iPad was

This copy of libswiftCore.dylib requires an OS version prior to 12.2.0.

The final error was the same running on My Mac, except it was preceded by many messages like:

objc[68768]: Class _TtC10FoundationP33_5692656F4C05BA2A580AE9322E9FB0A614__PlistDecoder is implemented in both /usr/lib/swift/libswiftFoundation.dylib and /private/var/folders/f6/r_grczxr8xjdp2006s7h6x580000gp/X/2BC81853-B5D9-543A-B520-3DB704462A07/d/Wrapper/MalaMode.app/Frameworks/libswiftFoundation.dylib. One of the two will be used. Which one is undefined.

Rather than follow @pvinis convoluted instructions, I thought I would try Mike Hardy's podfile postinstall hook instead.

This is my Podfile at that stage

platform :ios, '10.0'
require_relative '../node_modules/react-native/scripts/autolink-ios'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'MalaMode' do
  # Pods for MalaMode
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  target 'MalaModeTests' do
    inherit! :complete
    # Pods for testing
  end

  use_native_modules!
    # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  add_flipper_pods!

  post_install do |installer|
    flipper_post_install(installer)
    # https://github.com/facebook/react-native/issues/31480
    # use_flipper!({'Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1'})

    #https://github.com/facebook/react-native/issues/31941
    installer.aggregate_targets.each do |aggregate_target|
      aggregate_target.user_project.native_targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings['LIBRARY_SEARCH_PATHS'] = ['$(SDKROOT)/usr/lib/swift', '$(inherited)']
        end
      end
      aggregate_target.user_project.save
    end
  end
end

target 'MalaMode-tvOS' do
  # Pods for MalaMode-tvOS

  target 'MalaMode-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

(Between each step I was careful to completely clean the build and rerun pod install).

Again at this point the app worked on the simulator but on my iPad it crashed with this message:

dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /private/var/containers/Bundle/Application/BD377893-4454-4984-9125-13DF14AF5F0E/MalaMode.app/MalaMode
  Reason: image not found
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib

So then I reverted those changes and worked through the steps in Issue #13.

After each of the first three steps, I tested and got the same result -- simulator works but device fails with the above error.

Finally after the fourth step, the build failed with this error:

Showing All Errors Only
Ld /Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/MalaDebug.app/MalaDebug normal (in target 'MalaMode' from project 'MalaMode')
    cd /Users/chet/prj/malas/ios/ios
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios9.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/Base64 -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/BugsnagReactNative -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/CocoaAsyncSocket -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/CodePush -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/DoubleConversion -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/FBReactNativeSpec -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/Flipper -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/Flipper-DoubleConversion -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/Flipper-Folly -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/Flipper-Glog -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/Flipper-PeerTalk -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/Flipper-RSocket -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/FlipperKit -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/Folly -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/JWT -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/RCTTypeSafety -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/RNCPushNotificationIOS -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/RNDateTimePicker -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/RNDeviceInfo -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/RNGestureHandler -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/RNIap -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/RNReanimated -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/RNSound -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/RNTableView -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/RNVectorIcons -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-Core -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-CoreModules -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-RCTAnimation -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-RCTBlob -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-RCTImage -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-RCTLinking -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-RCTNetwork -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-RCTSettings -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-RCTText -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-RCTVibration -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-cxxreact -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-jsi -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-jsiexecutor -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/React-jsinspector -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/ReactCommon -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/SSZipArchive -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/Yoga -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/YogaKit -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/glog -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/libevent -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/react-native-idle-timer -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/react-native-image-picker -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/react-native-mail -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/react-native-netinfo -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/react-native-orientation -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/react-native-palette -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/react-native-safe-area-context -L/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/react-native-webview -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk/usr/lib/swift -F/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator -F/Users/chet/prj/malas/ios/ios/Pods/OpenSSL-Universal/Frameworks -F/Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/XCFrameworkIntermediates/OpenSSL-Universal -filelist /Users/chet/prj/malas/ios/ios/build/MalaMode.build/Debug-iphonesimulator/MalaMode.build/Objects-normal/arm64/MalaDebug.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -object_path_lto -Xlinker /Users/chet/prj/malas/ios/ios/build/MalaMode.build/Debug-iphonesimulator/MalaMode.build/Objects-normal/arm64/MalaDebug_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lBase64 -lBugsnagReactNative -lCocoaAsyncSocket -lCodePush -lDoubleConversion -lFBReactNativeSpec -lFlipper -lFlipper-DoubleConversion -lFlipper-Folly -lFlipper-Glog -lFlipper-PeerTalk -lFlipper-RSocket -lFlipperKit -lFolly -lJWT -lRCTTypeSafety -lRNCPushNotificationIOS -lRNDateTimePicker -lRNDeviceInfo -lRNGestureHandler -lRNIap -lRNReanimated -lRNSound -lRNTableView -lRNVectorIcons -lReact-Core -lReact-CoreModules -lReact-RCTAnimation -lReact-RCTBlob -lReact-RCTImage -lReact-RCTLinking -lReact-RCTNetwork -lReact-RCTSettings -lReact-RCTText -lReact-RCTVibration -lReact-cxxreact -lReact-jsi -lReact-jsiexecutor -lReact-jsinspector -lReactCommon -lSSZipArchive -lYoga -lYogaKit -lc++ -lglog -liconv -llibevent -lreact-native-idle-timer -lreact-native-image-picker -lreact-native-mail -lreact-native-netinfo -lreact-native-orientation -lreact-native-palette -lreact-native-safe-area-context -lreact-native-webview -lstdc++ -lz -framework AudioToolbox -framework CFNetwork -framework JavaScriptCore -framework MessageUI -framework MobileCoreServices -framework OpenSSL -framework Security -framework SystemConfiguration -framework UIKit -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/chet/prj/malas/ios/ios/build/MalaMode.build/Debug-iphonesimulator/MalaMode.build/MalaDebug.app-Simulated.xcent -lPods-MalaMode -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/chet/prj/malas/ios/ios/build/MalaMode.build/Debug-iphonesimulator/MalaMode.build/Objects-normal/arm64/MalaDebug_dependency_info.dat -o /Users/chet/prj/malas/ios/ios/build/Debug-iphonesimulator/MalaDebug.app/MalaDebug

ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
ld: warning: Could not find or use auto-linked library 'swiftQuartzCore'
ld: warning: Could not find or use auto-linked library 'swiftCore'
ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
ld: warning: Could not find or use auto-linked library 'swiftDispatch'
ld: warning: Could not find or use auto-linked library 'swiftUIKit'
ld: warning: Could not find or use auto-linked library 'swiftDarwin'
ld: warning: Could not find or use auto-linked library 'swiftMetal'
ld: warning: Could not find or use auto-linked library 'swiftFoundation'
ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
ld: warning: Could not find or use auto-linked library 'swiftCoreImage'
ld: warning: Could not find or use auto-linked library 'swiftSwiftOnoneSupport'
Undefined symbols for architecture arm64:
  "associated type descriptor for Swift.ExpressibleByFloatLiteral.FloatLiteralType", referenced from:
      l_got.$s16FloatLiteralTypes013ExpressibleByaB0PTl in libYogaKit.a(YGLayoutExtensions.o)
  "associated type descriptor for Swift.ExpressibleByIntegerLiteral.IntegerLiteralType", referenced from:
      l_got.$s18IntegerLiteralTypes013ExpressibleByaB0PTl in libYogaKit.a(YGLayoutExtensions.o)
  "value witness table for Builtin.Int32", referenced from:
      full type metadata for __C.YGUnit in libYogaKit.a(YGLayoutExtensions.o)
  "protocol witness table for Swift.Float : Swift._ExpressibleByBuiltinFloatLiteral in Swift", referenced from:
      associated type witness table accessor for Swift.ExpressibleByFloatLiteral.FloatLiteralType : Swift._ExpressibleByBuiltinFloatLiteral in __C.YGValue : Swift.ExpressibleByFloatLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o)
  "Swift.Float.init(Swift.Double) -> Swift.Float", referenced from:
      static (extension in YogaKit):CoreGraphics.CGFloat.% postfix(CoreGraphics.CGFloat) -> __C.YGValue in libYogaKit.a(YGLayoutExtensions.o)
      (extension in YogaKit):__C.YGValue.init(CoreGraphics.CGFloat) -> __C.YGValue in libYogaKit.a(YGLayoutExtensions.o)
  "protocol witness table for Swift.Int : Swift._ExpressibleByBuiltinIntegerLiteral in Swift", referenced from:
      associated type witness table accessor for Swift.ExpressibleByIntegerLiteral.IntegerLiteralType : Swift._ExpressibleByBuiltinIntegerLiteral in __C.YGValue : Swift.ExpressibleByIntegerLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o)
  "protocol descriptor for Swift.ExpressibleByFloatLiteral", referenced from:
      l_got.$ss25ExpressibleByFloatLiteralMp in libYogaKit.a(YGLayoutExtensions.o)
  "method descriptor for Swift.ExpressibleByFloatLiteral.init(floatLiteral: A.FloatLiteralType) -> A", referenced from:
      l_got.$ss25ExpressibleByFloatLiteralP05floatD0x0cD4TypeQz_tcfCTq in libYogaKit.a(YGLayoutExtensions.o)
  "associated conformance descriptor for Swift.ExpressibleByFloatLiteral.Swift.ExpressibleByFloatLiteral.FloatLiteralType: Swift._ExpressibleByBuiltinFloatLiteral", referenced from:
      l_got.$ss25ExpressibleByFloatLiteralP0cD4TypeAB_s01_ab7BuiltincD0Tn in libYogaKit.a(YGLayoutExtensions.o)
  "protocol descriptor for Swift.ExpressibleByIntegerLiteral", referenced from:
      l_got.$ss27ExpressibleByIntegerLiteralMp in libYogaKit.a(YGLayoutExtensions.o)
  "method descriptor for Swift.ExpressibleByIntegerLiteral.init(integerLiteral: A.IntegerLiteralType) -> A", referenced from:
      l_got.$ss27ExpressibleByIntegerLiteralP07integerD0x0cD4TypeQz_tcfCTq in libYogaKit.a(YGLayoutExtensions.o)
  "associated conformance descriptor for Swift.ExpressibleByIntegerLiteral.Swift.ExpressibleByIntegerLiteral.IntegerLiteralType: Swift._ExpressibleByBuiltinIntegerLiteral", referenced from:
      l_got.$ss27ExpressibleByIntegerLiteralP0cD4TypeAB_s01_ab7BuiltincD0Tn in libYogaKit.a(YGLayoutExtensions.o)
  "__swift_FORCE_LOAD_$_swiftCoreFoundation", referenced from:
      __swift_FORCE_LOAD_$_swiftCoreFoundation_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreFoundation_$_YogaKit)
  "__swift_FORCE_LOAD_$_swiftCoreGraphics", referenced from:
      __swift_FORCE_LOAD_$_swiftCoreGraphics_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreGraphics_$_YogaKit)
  "__swift_FORCE_LOAD_$_swiftCoreImage", referenced from:
      __swift_FORCE_LOAD_$_swiftCoreImage_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreImage_$_YogaKit)
  "__swift_FORCE_LOAD_$_swiftDarwin", referenced from:
      __swift_FORCE_LOAD_$_swiftDarwin_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftDarwin_$_YogaKit)
  "__swift_FORCE_LOAD_$_swiftDispatch", referenced from:
      __swift_FORCE_LOAD_$_swiftDispatch_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftDispatch_$_YogaKit)
  "__swift_FORCE_LOAD_$_swiftFoundation", referenced from:
      __swift_FORCE_LOAD_$_swiftFoundation_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftFoundation_$_YogaKit)
  "__swift_FORCE_LOAD_$_swiftMetal", referenced from:
      __swift_FORCE_LOAD_$_swiftMetal_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftMetal_$_YogaKit)
  "__swift_FORCE_LOAD_$_swiftObjectiveC", referenced from:
      __swift_FORCE_LOAD_$_swiftObjectiveC_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftObjectiveC_$_YogaKit)
  "__swift_FORCE_LOAD_$_swiftQuartzCore", referenced from:
      __swift_FORCE_LOAD_$_swiftQuartzCore_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftQuartzCore_$_YogaKit)
  "__swift_FORCE_LOAD_$_swiftUIKit", referenced from:
      __swift_FORCE_LOAD_$_swiftUIKit_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftUIKit_$_YogaKit)
  "_swift_getForeignTypeMetadata", referenced from:
      type metadata accessor for __C.YGValue in libYogaKit.a(YGLayoutExtensions.o)
      type metadata accessor for __C.YGUnit in libYogaKit.a(YGLayoutExtensions.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I also had these warnings when running pod install:

[!] The `MalaMode [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-MalaMode/Pods-MalaMode.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `MalaMode [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-MalaMode/Pods-MalaMode.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `MalaMode [Staging]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-MalaMode/Pods-MalaMode.staging.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

I tried building on an Intel machine with XCode 12.5.1, using the Mike Hardy podfile postinstall step and not even the simulator works:

dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /Users/chet/Library/Developer/CoreSimulator/Devices/D8A49E99-6B0E-44F9-82B5-798922EF2401/data/Containers/Bundle/Application/2E121D89-5D38-49CD-9D3F-C0E3C87C0671/MalaMode.app/MalaMode
  Reason: image not found
dyld: launch, loading dependent libraries
DYLD_FRAMEWORK_PATH=/Users/maint/prj/malas/ios/ios/build/Release-iphonesimulator
DYLD_FALLBACK_LIBRARY_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib
DYLD_ROOT_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.2.simruntime/Contents/Resources/RuntimeRoot
DYLD_FALLBACK_FRAMEWORK_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks
DYLD_INSERT_LIBRARIES=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.2.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
DY
chetstone commented 2 years ago

Finally got it. In step 4 of Issue #13, I had to add $(SDKROOT)/usr/lib/swift at the beginning of LIBRARY_SEARCH_PATHS. This got it to build, but it was still crashing on the device.

Then, adding Runpath Search Path finally got it to run on the device