2

I'm trying to build an iOS app using Google Cast SDK 2.5.0 and am able to build on an iPhone 5 device, but when I try to build on an iPhone 6 device, I get the following build error:

ld: warning: ignoring file ./GoogleCast.framework/GoogleCast, missing required architecture arm64 in file ./GoogleCast.framework/GoogleCast (3 slices)

I noticed a post about a similar issue here: Google Cast SDK 2.3.0 for iOS doesn't support 64-bit

And so I tried this: ranlib GoogleCast.framework/Versions/A/GoogleCast

But I'm still missing arm 64. Has anyone had a similar issue?

Community
  • 1
  • 1
charmingToad
  • 1,597
  • 11
  • 18
  • 2
    download again at https://developers.google.com/cast/docs/downloads. I run lipo -info to show supported architect. lipo -info Versions/A/GoogleCast Architectures in the fat file: Versions/A/GoogleCast are: arm64 armv7 armv7s i386 x86_64 – larva Dec 12 '14 at 04:13
  • 2
    Thanks! Turns out I had two versions of the framework and Xcode was not using the one I thought it was. Running lipo -info revealed it was the wrong one. – charmingToad Dec 12 '14 at 18:56
  • any update on this, I'm getting an error while running the app on simulator Pods/google-cast-sdk/GoogleCastSDK-ios-4.7.0_static/GoogleCast.framework/GoogleCast(GCKCastContext+UI.o), building for iOS Simulator, but linking in object file built for iOS, file '~/Pods/google-cast-sdk/GoogleCastSDK-ios-4.7.0_static/GoogleCast.framework/GoogleCast' for architecture arm64 (M1) – Neha Jan 03 '23 at 13:12

1 Answers1

0

As charmingToad mentioned in the comments, I had two versions of the Cast SDK being linked in my application. Removing the older version fixed the linking errors.

If you are using Cocoapods, all you need is a pod update to update your version of the Cast SDK.

If after upgrade Xcode is complaining about linker issues, adding -all_load as a compiler flag worked for me.

JAL
  • 41,701
  • 23
  • 172
  • 300