dji-sdk / Mobile-SDK-iOS

DJI Mobile SDK for iOS: http://developer.dji.com/mobile-sdk/
Other
579 stars 253 forks source link

Latest XCode version: Library not found for -lDJIWidget Linker command failed with exit code 1 (use -v to see invocation) #550

Open Sigil-Wen opened 1 year ago

Sigil-Wen commented 1 year ago

Trying to run both ObjectiveC and Swift Projects in XCode Version 14.3 (14E222b)

I put my app key in the plist as listed in the steps and when I click run I get this error. It happens for both Objective C and Swift.

Does anyone have a solution?

dji-dev commented 1 year ago

Agent comment from yating.liao in Zendesk ticket #81677:

Could you tell me what error occurred?

°°°

Sigil-Wen commented 1 year ago

When I try to build the app in XCode, both Objective C and Swift projects show this same error. Library not found for |DJIWidget

I've properly installed the podfile

Screenshot 2023-04-21 at 7 45 08 PM

dji-dev commented 1 year ago

Agent comment from yating.liao in Zendesk ticket #81677:

Did you run pod install before running the project and it resulted in success?Like this
image.png

°°°

Sigil-Wen commented 1 year ago

Yes I did

dji-dev commented 1 year ago

Agent comment from yating.liao in Zendesk ticket #81677:

Are you running .xcworkspace? If you are still experiencing this problem, perhaps you can consider importing DJIWIDGET:https://github.com/dji-sdk/DJIWidget

°°°

hungeric commented 1 year ago

@Sigil-Wen I ran into this issue yesterday, and had the exactly same issue, but i resolved it by just creating these missing libs again. and it works for me

so what you have to do is this

  1. followed all the instruction from DJI
  2. open the work space
  3. in the scheme picker menu, you will want to create a new scheme, but choose the DJIWidget library
  4. run it by hit run in xcode, and it should build that library
  5. now switch scheme back to DJISDKSwiftDemo scheme, and you should be able to run without that error.

this is what i have done to make it work for me, good luck

Screenshot 2023-05-03 at 2 56 05 PM