Google cast SDK not working in Apple M1 Pro chipset
Asked Answered
C

4

6

enter image description here

I am trying to integrate Google cast SDK but not working in Apple M1 Pro chipset.

pod 'google-cast-sdk'

I am tried with every possibilities but not worked well and it's throwing as error like attached image. Any idea to get rid of this error.

Any help more appreciated.

Thanks in Advance

Cockcrow answered 4/1, 2022 at 4:20 Comment(0)
L
4

The Google Cast SDK you integrate with CocoaPods contains a binary framework which currently does not contain the arm64 simulator binaries, thus the linker error you experience when building the project for the arm64 simulator.

arm64 simulator binaries are namely different from arm64 device binaries, as this excellent article series explains in great detail. An XCFramework is needed instead so that both the arm64 device and simulator slices can coexist in the same package, thus addressing all possible build scenarios.

Google engineers are currently working on this known issue and a proper XCFramework should be delivered early January 2022 for version 4.7 of the Google Cast SDK. Though this is not mentioned explicitly I hope they will update the pod accordingly at the same time.

At the time of this writing (early January 2022) this XCFramework should be around the corner, so I would recommend working with the x64 simulator or an arm64 device in the meantime if you can.

If you cannot afford this compromise you can transform arm64 device binaries into arm64 simulator binaries. The article series listed above describes how this can be achived both for static as well as dynamic binaries, as Google Cast provides its SDK in both flavors.

Lawson answered 7/1, 2022 at 7:47 Comment(3)
Any updates on this?Fulgor
Yes! They have a beta framework that is compatible with M1 chips: developers.google.com/cast/docs/ios_sender#xcframework_betaBrainstorm
Sadly still no official SPM package is provided but it is always to do it on your own in the meantime.Lawson
E
1

Can try. Target > Build Settings > Architectures > Excluded Architectures > Debug > add "arm64"

Enedina answered 17/6, 2022 at 1:26 Comment(0)
G
0

Since July 20, 2023, Google released Google Cast SDK iOS Sender 4.8.0 (see Release Notes) that include an XCFramework release (available through Cocoapods)

Gestapo answered 24/7, 2023 at 10:36 Comment(9)
Does it builds for you under m1/m2 for a non-rosetta destination?Dieppe
for those who are still confused, like I was, use pods 'google-cast-sdk-xcframework' and 'google-cast-sdk-no-bluetooth-xcframework'Dieppe
Unfortunately the 4.8.0 SDK breaks the cast button, so it's entirely uselessGet
@ClausJørgensen I have this problem also. Did you found a solution?Gastritis
@PatrickKoning Google is ignoring the issue issuetracker.google.com/issues/298066142Get
Helps downgrading tot 4.7?Gastritis
@ClausJørgensen did you use de xcframework?Gastritis
@RomanKozak I don't have a M1/M2. Just intel.Gastritis
Downgrading to 4.7.0 helped me out.Gastritis
D
0

For those, who are still confused why your google cast pod doesn't build for m1 simulator, use "google-cast-sdk-xcframework" and "google-cast-sdk-no-bluetooth-xcframework".

Dieppe answered 5/9, 2023 at 13:11 Comment(1)
Doesn't work for me. I've an Intel processor.Gastritis

© 2022 - 2024 — McMap. All rights reserved.