Google cast SDK not working in Apple M1 Pro chipset - ios

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

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"

Related

Removing i386 and x86_64 from an embedded Cocoa Touch framework when archiving

Urban Airship provides an iOS 8+ framework called AirshipKit.framework. Linking and embedding this framework works fine in both the simulator and device. However, when I go to archive the binary and validate it, iTunes Connect says the app contains code for unsupported architectures i386 and x86_64. How can I get Xcode to remove support for these architectures from the archived app?
Under Build Settings I have:
Architectures: Standard architectures (armv7, armv7s)
Build Active Architecture Only: Yes for debug, No for release
Supported Platforms: iOS
Valid Architectures: arm64 armv7 armv7s
You could use lipo to extract the arm code to a new file and submit that one, but it sounds like something is very wrong - you shouldn't need to do anything like this to submit, it might be a bug in Xcode. Which version are you using? Did any other settings in the build get changed (the text would be bold if the build setting is modified from the default)?
There is a new version of the Urban Airship SDK, 5.0.3
Are you still seeing this issue when building with the new Framework version?
I struggled with the same problem for a couple of days until I realized my own idiocy. My app is set to support 7.0+ and yet I still had the Airship.framework, which as the UA (Urban Airship) documentation strictly recommends, was only to be used for 8.0 +
I removed the framework and the validation came back success!
So if your app is inclusive of 7.0 or lower, then all you need is the libUAirship-5+ library. As #aschuman suggested, there is a new one available (libUAirship-5.0.3.a)

Recompile library in Xcode

I have two questions basically.
Scenario is that I have a(n) NMI Payment Gateway SDK
the SDK or library won't work under simulator environment. Though it is logically right since the sdk is for reading mag data I can't test other parts of my app on a simulator ( And I have limited resource on device ). Is there a way to recompile the sdk or based on my research how can I create a static library so that I can generate a i386 architecture based sdk. Or better yet is there a way that I can check if environment is i386 then don't load the sdk?
I tried creating a(n) app using the SDK mentioned above. I would like to run it using an iPhone5s device and arch (armv64, armv7 and armv7s) but it says 'undefined symbols for armv7'. Would there be a way to somehow recompile the sdk and enable it to run on newer architecture?
Any help is much appreciated. THANKS
We use different targets for simulator and for device, and in code use macro TARGET_IPHONE_SIMULATOR.
example:
#if (TARGET_IPHONE_SIMULATOR)
NSLog(#"device");
#else
NSLog(#"simulator");
#endif

iOS app won't build for iPad Air without 'armv7s' as a valid architecture

I have an iPad app that relies on the Google Maps iOS SDK. The Google Maps SDK is added as a cocoapod and it does not compile for 'armv7s' architecture, so when I first created the project, I had removed "armv7s" as a valid architecture.
Now, when I try to build the app for iPad Air, I get the following:
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7s, VALID_ARCHS=armv7).
If I set "ONLY_ACTIVE_ARCH" to 'NO', cocoapods will have massive issues (all pods will have the "undefined symbol for architecture" problem). If I add "armv7s" as a valid arch, Google Maps won't build. I know it's possible to use Google Maps on an iPad Air, but I can't figure it out. What do I have to change in my setup?
According to this closely related question, the Google Maps SDK now has support for armv7s and if you pick up the latest version (which is 1.6.1 as I type this), you should be just fine.
I would assume that with "armv7s" support in both the SDK and in your own code, you can keep "ONLY_ACTIVE_ARCH" set to "YES" going forward.

Running iOS SDK built in arm7 on arm7s

I have an SDK to achieve some special stream of video but I've got only the binary of this, I think this was built for arm7.
I have an app built with this library and it runs great on iPhone 4, 4s and iPad 2 but when building for iPad 4th generation with an arm7s xcode shows lots of errors about files being ignored.
I'm pretty sure it's the architecture cause changing the build architecture the errors appear and disappear.
Is there any way to make this work? I mean build for new architectures having only binaries files of the old one?
Unfortunately not. To build your app for armv7s all the code – which includes said library – has to be built for it. There is a hack to add armv7s support to static libraries but I would strongly recommend against using it.
That being said, for now it's not a big deal if you're building your app for armv7 only. It will still work fine on the iPhone 5.
Just go into the build settings of your Target and set "armv7" as the only architecture your app should be built for.
At one point in the future Apple will probably require that all new apps / app updates will be built for armv7s, like the did with armv7 a few years ago, but for now it's not a problem. By then the developer of the static library will hopefully have provided an update.

iOS - Integrating MGTwitter without armv7s

I'm using MGTwitterEngine in my apps and till iOS5, the app is working fine. I'm using twitter engine that as ".a" file.
But when compiling with latest XCode, its showing error that armv7s slice is not available.
I tried removing armv7s from the valid architectures and the problem solved. I'm able to build the app, run the app successfully on iPhone4, iPhone4S and also on iPhone5.
My questions is whether I'm following right way or not. Will Apple approve the apps that are not built with armv7s architecture?
There's no other go with it
Libraries are precompiled code. so they are built as per the architectures selected during compilation.
In latest iOS, its better to use Twitter/Social framework (as per iOS version)

Resources