dji-sdk / Mobile-UXSDK-iOS

DJI Mobile UXSDK is a suite of product agnostic UI objects that fast tracks the development of iOS applications using the DJI Mobile SDK.
Other
72 stars 40 forks source link

4.7.1升级到4.8.1之后运行闪崩(组件化开发) #61

Open MrHanbing opened 5 years ago

MrHanbing commented 5 years ago

dyld: Library not loaded: @rpath/DJIWidget.framework/DJIWidget Referenced from: /private/var/containers/Bundle/Application/041A9035-F827-41A7-8A06-BDB7B914367A/YZKFlyControl_DJ_Example.app/Frameworks/DJIUXSDK.framework/DJIUXSDK Reason: image not found

旧版本使用正常

dji-sdk[bot] commented 5 years ago

Hi, have you resolved your issue with the latest DJI SDK version? If not, please help to report your issues to dev@dji.com, as it's our official channel for developers to request DJI SDK support now. Thanks!

tarmopr commented 5 years ago

I have the exact same issue. I have tried DJI SDK version 4.8.1 and 4.8.2 and both have the same issue. The project builds fine but running on device the app crashes and Xcode shows error:

dyld: Library not loaded: @rpath/DJIWidget.framework/DJIWidget
  Referenced from: /private/var/containers/Bundle/Application/46FA6E50-E721-4EB4-B6A5-FDD738C82DED/FIS-iOS.app/Frameworks/DJIUXSDK.framework/DJIUXSDK
  Reason: image not found
tarmopr commented 5 years ago

Adding use_frameworks! fixed the issue. I also had to add use_modular_headers! so that other Pods also worked.

My Podfile:

use_modular_headers!
target 'ProjectName' do
    use_frameworks!
    pod 'DJI-SDK-iOS', '~> 4.8'
    pod 'DJI-UXSDK-iOS', '~> 4.8'
    pod 'DJIWidget', '~> 1.2'
    ...
end