Mobile-SDK-iOS icon indicating copy to clipboard operation
Mobile-SDK-iOS copied to clipboard

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

Open Sigil-Wen opened this issue 2 years ago • 6 comments

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?

Sigil-Wen avatar Apr 21 '23 07:04 Sigil-Wen

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

Could you tell me what error occurred?

°°°

dji-dev avatar Apr 21 '23 12:04 dji-dev

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

Sigil-Wen avatar Apr 21 '23 23:04 Sigil-Wen

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

°°°

dji-dev avatar Apr 23 '23 08:04 dji-dev

Yes I did

Sigil-Wen avatar Apr 23 '23 19:04 Sigil-Wen

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

°°°

dji-dev avatar Apr 24 '23 12:04 dji-dev

@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

hungeric avatar May 03 '23 21:05 hungeric