dji-sdk / Mobile-SDK-iOS

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

Build for Apple Silicon M1 (xcframework) #446

Open mauron85 opened 3 years ago

mauron85 commented 3 years ago

Dear DJI,

I'm using Apple Silicon M1 and cannot run my app in Simulator, because SDK doesn't support it.

tldr; Apple Silicon M1 is same arch64 as iPhone, so current SDK doesn't work in Simulator, you'll get

building for iOS Simulator, but linking in object file built for iOS

There is no workaround that can be applied to fix this issue.

The only fix would be DJI issuing SDK in new xcframework format as described in The Anatomy of a (XC)Framework.

Example.xcframework/
|-- Info.plist
|-- ios-arm64/
|   +-- Example.framework/
+-- ios-arm64_x86_64-simulator/
    +-- Example.framework/

Where ios-arm64_x86_64-simulator platform can contain framework with fat binary for both arch: arm64 and x86_64 built against Simulator SDK.

dji-dev commented 3 years ago

Agent comment from Luce Luo in Zendesk ticket #45020:

Dear Customer,

Thank you for contacting DJI. The SDK doesn't support running on a MI Mac device directly, should select an iPhone or iPad device.

Thanks,

Luce Luo DJI Developer Support

mauron85 commented 3 years ago

Thanks Luce,

can you please, give some estimate, when can we expect M1 support for DJI SDK?

mauron85 commented 3 years ago

So for anybody interested in running DJISDK in Simulator on M1. I've successfully converted it using tutorial https://bogo.wtf/arm64-to-sim-dylibs.html

dji-dev commented 3 years ago

Agent comment from Luce Luo in Zendesk ticket #45020:

Dear Customer,

Thank you for contacting DJI. Sorry, there is no exact date to support the M1, please attention to the SDK Roadmap if any news in the future. https://developer.dji.com/user/roadmap/#msdk

Thanks,

Luce Luo DJI Developer Support

schlingding commented 2 years ago

Is there any update? The roadmap seems to still not mention M1 MacBooks.

yosun commented 6 months ago

ANY UPDATE? IT IS 2024 HOW THE F CAN YOU NOT SUPPORT M1+ MACS???

PLEASE UPDATE YOUR APP SO THAT IT WORKS ON VISIONOS.

tmc commented 6 months ago

So for anybody interested in running DJISDK in Simulator on M1. I've successfully converted it using tutorial https://bogo.wtf/arm64-to-sim-dylibs.html

@mauron85 can you provide instructions on how you adapted this to run on apple silicon?