2021-11-09 Frameworks/App.framework/App: missing LC_DYLD_INFO load command

dyld: Library not loaded: @rpath/App.framework/App
Referenced from: /var/containers/Bundle/Application/5818C343-0973-4A9D-9DE6-9D03CA2A5E41/xxx.app/HouseCommercialAssistantCube
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/5818C343-0973-4A9D-9DE6-9D03CA2A5E41/xxx.app/Frameworks/App.framework/App: missing LC_DYLD_INFO load command
/private/var/containers/Bundle/Application/5818C343-0973-4A9D-9DE6-9D03CA2A5E41/xxx.app/Frameworks/App.framework/App: missing LC_DYLD_INFO load command
/private/var/containers/Bundle/Application/5818C343-0973-4A9D-9DE6-9D03CA2A5E41/xxx.app/Frameworks/App.framework/App: missing LC_DYLD_INFO load command
Message from debugger: Terminated due to signal 6

见鬼,今天又遇到了。
升级cocoapods

which -a pod                 
/usr/local/bin/pod
/opt/homebrew/bin/pod
/usr/local/bin/pod


/opt/homebrew/bin/pod --version
1.11.2


pod --version
1.10.1

所以对明确用

/opt/homebrew/bin/pod install

结果:
还是不行

6plus和一下设备
flutter产物app.framewoek
有问题。

换高级机型ok

dyld: Library not loaded: @rpath/App.framework/App
  Referenced from: /private/var/containers/Bundle/Application/AAA6BCD1-8E4C-4893-8408-DF4406CFA859/HouseCommercialCube.app/HouseCommercialCube
  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:/usr/lib/libMTLCapture.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
  • 问题定位:

工程使用了动态库。

因为 podspec用到了

  s.vendored_frameworks = 'App.framework'

在app包 里面 Frameworks目录下, 没有被拷贝进去

image.png

导致App.framework库找不到. 所以app启动找不到动态库崩溃。
但是我其他的动态库没问题。 都正常导进来了。
慌了

  • 问题分析
xcode13
cocoapods 1.10.1
xcodeproj  1.19.0  1.21.0

gem list |grep xcodeproj
xcodeproj (1.21.0, 1.19.0, 1.17.1, 1.17.0, 1.16.0, 1.13.0, 1.12.0, 0.28.2)
Pods/Target Support Files/Pods-XXXAppProject/Pods-XXXAppProject-frameworks.sh

有问题的版本:

if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${PODS_ROOT}/../magpie_sdk/ios/flutter/debug/Flutter.framework"
install_framework
fi

正常的版本

if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${PODS_ROOT}/../magpie_sdk/ios/flutter/debug/Flutter.framework"
install_framework
install_framework "${PODS_ROOT}/../magpie_sdk/ios/flutter/debug/Flutter.framework"
install_framework "${PODS_ROOT}/../../flutter_commercial/.build_ios/debug/product/App.framework"
fi

就是因为Pods/Target Support Files/Pods-XXX-frameworks.sh下面的install_framework少拷贝了一个库。

  • 解决方法

你可能感兴趣的:(2021-11-09 Frameworks/App.framework/App: missing LC_DYLD_INFO load command)