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

Build for Apple Silicon M1 (xcframework)

Open mauron85 opened this issue 4 years ago • 7 comments

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.

mauron85 avatar Mar 15 '21 14:03 mauron85

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

dji-dev avatar Mar 16 '21 09:03 dji-dev

Thanks Luce,

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

mauron85 avatar Mar 16 '21 10:03 mauron85

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 avatar Mar 16 '21 18:03 mauron85

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

dji-dev avatar Mar 17 '21 07:03 dji-dev

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

schlingding avatar Sep 15 '21 16:09 schlingding

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

PLEASE UPDATE YOUR APP SO THAT IT WORKS ON VISIONOS.

yosun avatar Feb 24 '24 23:02 yosun

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?

tmc avatar Feb 25 '24 01:02 tmc