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 articleseries 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.
2
Answers
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.
Can try. Target > Build Settings > Architectures > Excluded Architectures > Debug > add "arm64"