dji-sdk / Mobile-SDK-iOS

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

Xcode 12 issues with DJISDK #397

Open dshackelford opened 3 years ago

dshackelford commented 3 years ago

Hello,

I am trying to use a private Cocoapods repo with DJISDK, and got the following clang error when pushing the repo that I have never seen prior to Xcode 12:

ld: building for iOS Simulator, but linking in dylib built for iOS, file ‘/var/folders/pn/4dfgjvr1j7mzbnladafsdgr00000gq/T/CocoaPods-Lint-20201917-95695-1hqfaey-BaseMapOverlays/Pods/DJI-SDK-iOS/iOS_Mobile_SDK/DJISDK.framework/DJISDK’ for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I believe Xcode 12 has changed the valid build architectures in Build Settings of Xcode 12, and DJISDK 4.13.1 may not reflect that change yet?

I tried to build the current sample code in Objective C with Xcode 12, and was un-able to build (after installing the pod, and inputting the correct DJI App Key). I got the following error:

DJISDK_BuildError

I am not sure that these errors are related. But Xcode 12 does not seem to be working DJISDK 4.13.1.

Any information will be greatly appreciated.

Environment: Xcode 12

Thanks, Dylan Shackelford

dji-dev commented 3 years ago

Agent comment from Luce Luo in Zendesk ticket #39278:

Dear Customer,

Thank you for contacting DJI. I try to find some start documentation for you. Can you please follow the steps and check which step fails? https://github.com/dji-sdk/Mobile-SDK-iOS

Thanks,

Luce Luo DJI Developer Support
inline1856043421.png

hdrpano commented 3 years ago

Check in build settings Supported Platforms for your APP and Pods. Clean the build folder. Xcode 12 works for my iOS APP's

dshackelford commented 3 years ago

I was able to get the Sample Demo Application for Objective-C to build. I had to edit "VALID_ARCHS" in the "user-defined" section of Build Settings (I tried deleting the value, but it ended up adding x86_64). See attached photos for the before/after.

Before After

I believe this Valid Architecture is part of the problem when I am trying reference DJI-SDK-iOS as a spec.dependency in my private podspec. Is there any way I can make spec.dependcy in the my podspec remove that user-defined value when I install my private pod? As I believe Xcode 12 removed Valid_Archs in favor of Excluded Architectures and it is clang errors (see earlier post).

If there is any more information you need, or if there is anything that I am doing wrong, please let me know.

Environment: Xcode 12 macOs 10.15.5 CocoaPods 1.1.10

Thanks, Dylan