[GMSCachedTile setVersionID:]: unrecognized selector - ios

I have integrated google maps SDK 2.7.0 in one of my iPhone application.
I made all configuration related to it and added all frameworks.
When I run application it gets crash with error -"[GMSCachedTile setVersionID:]: unrecognized selector".
I searched on internet but I didn't get any answer related to GMSCachedTile.

I have the same issue.
In the end, I found that there was two copy of GoogleMaps.bundle in my project.
One was in project source, and the other was in pods.
So I removed one of them. (I kept the pods one.)
And the crash never happened again.
Hope this helps.

When I upgrade my Xcode from 9.4.1 to 10.0 and my SE iOS from 11 to 12, my app encounters same question, I solve this by removing Google Maps integrated manually and keeping Google Maps imported by Pod. Then everything is OK again.

I had the same issue. If you have added Google Maps manually i.e added in Linked Frameworks and Libraries and also through the Pods then you should go ahead and delete the manually added one.
Since only the VersionInfo.plist was creating the problem, I deleted it from the manually added GoogleMaps.framework.
You can find the VersionInfo.plist file at this path
XCODEPROJECT/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd
It worked for me.

Related

How to use Swift Pod in Unity exported iOS App

I have reach experience in iOS native app development, My company have a unity app. Unity app developer exported the app for iOS and shared with me. I wanted to use my own created cocoa-pod library (which I have already using in my another iOS App) into Unity iOS project.
So Unity developer exported by File -> Build Settings, choose iOS and click Build, and now I am trying integrated pod (which is written in Swift 4.2) into Unity exported of iOS project.
I have taken medium post and many more reference, I have implemented the same as conclusive direction. Please look the attached screenshot below.
Reference - https://medium.com/ios-os-x-development/swift-and-objective-c-interoperability-2add8e6d6887
Please look the below screenshot for autogenerated file
Now when I am going to import this autogenerated header file to make connection between Objective C to Swift, then it is showing error as attached screenshot below
Please help me to resolve this issue. Thanks in advance.
One thing that has hung me up on this in the past is if you get an error during the initial build, then sometimes it doesn't create the -swift.h file and then subsequent builds also get an error that it's missing. Make sure you've deleted your derived data and cleaned the build folder to reset so everything gets built from the beginning.

Xcode compile error with Firebase

I just installed the Firebase framework to Xcode (not using CocoaPods due to other unsolvable issues with that). I followed the Firebase Alternative Setup instructions from here (manually dragging the FireBase 2.5 Framework to my project).
Problem is, when I compile my app I get 27 errors:
screenshot
I'm just using the sample code from the Getting Started page.
In fact, all I'm using so far is the first line, but it won't even instantiate that. (var ref = Firebase(url:"my firebase URL here")
I'm on Xcode 7.2 and Swift 2.1. My target is iOS 9.2 using the Simulator.
Please help!
Thanks.
PS.
I should also add that libicucore.dylib and libc++.dylib no longer appear to be available as linkable libraries that you mention to include from firebase.com/docs/ios/alternate-setup.html So maybe this is related? Someone mentioned libz.tbd is the one to use now? (which I'm using)
If you are targeting 9.2 then the frameworks changed to the following:
libicucore.dylib to libicucore.tbd
libc++.dylib to libc++.tbd
They are exactly the same so use them instead, you have to use them in order to get it working.
A comment by apple:
For those who are curious, the .tbd files are new "text-based stub
libraries", that provide a much more compact version of the stub
libraries for use in the SDK, and help to significantly reduce its
download size.

WatchOS 2 App fails to launch on device with dyld_fatal_error for my Framework Library not loaded: Image not found

I've just followed the apple transition guide to upgrade my ObjectiveC app to WatchOS 2
https://developer.apple.com/library/watchos/documentation/General/Conceptual/AppleWatch2TransitionGuide/ConfiguretheXcodeProject.html
With the section "Sharing Code Between an iOS App and a watchOS App" describing how to duplicate an existing iOS framework into a WatchOS framework target for use by WatchOS as follows.
"If you already have a watchOS 1 app that shares a framework with your iOS app, duplicate your iOS framework target and modify it to support watchOS 2.
To duplicate and configure your framework target for watchOS 2
Open the project editor pane of Xcode. (The pane is normally closed.)
Control-click the target to display a context menu with a Duplicate command.
Change the name of the target so that you can identify it easily later.
In Build settings, change the following values:
Change the Supported Platforms setting to watchOS.
Change the Base SDK setting to the latest watchOS.
Change the Product Name setting so that it matches the name of your iOS framework. You want both frameworks to be built with the same name.
Add the framework to your WatchKit extension’s list of linked frameworks."
I've followed these steps to clone my framework which with the iOS framework was called MyFramework, and now the new WatchOS framework is called MyFrameworkWatch. But as described above the Product Name is set to MyFramework instead of MyFrameworkWatch. I presume this naming shift is so that I can include from my framework using
#import <MyFramework/SharedUtils.h>
instead of presumably having to change it to
#import <MyFrameworkWatch/SharedUtils.h>
I wouldn't mind the latter but I'll admit its nicer keeping the framework name the same.
After a bit more work beyond the initial automatic transition I managed to get my app working perfectly well on the simulator, but now switching to device i just can't get it to launch.
Launching my app on the device causes it to spin for a few seconds and then just crash. Launching the glance just causes it to spin indefinitely. Trying to run it from Xcode and running the app causes the app to eventually launch and spin, the spinning can last indefinitely sometimes, but eventually it gets through and i get the actual error reported as follows
dyld_fatal_error - dyld: Library not loaded: #rpath/MyFramework.framework/MyFramework referenced from WatchKit Extension Reason: image not found
So this is my Watch App Extension trying to link to the Watch framework, and doing so looking for the MyFramework name, not the MyFrameworkWatch name. I wonder if this name clashing has caused it to get confused?
When I try to find the frameworks referenced under the Products folder in Xcode I can see two frameworks
MyFramework
MyFramework
they're both reference the same path
/Users/jim/Library/Developer/Xcode/DerivedData/MyApp-byegspjumgwlfpahhwjgzpmfkcdx/Build/Products/Debug-iphoneos/MyFramework.framework
though you can see the target membership is separating the two frameworks, the top MyFramework is associated with the main app, today widget and framework tests project. The lower MyFramework is just associated with my Watch extension. It doesn't feel right that these are referencing the exact same path surely?
Finally when googling for this issue I've found reference of CocoaPods having similar problems though according to their site here
https://github.com/CocoaPods/CocoaPods/issues/4180
It's been fixed since September in version 0.39.0, which is the version that pod --version reports. So I presume I have their fix. I'm tempted to remove the cocoa pods from my framework to see if it helps.
Has anyone else followed the transition guide suggestions for creating a duplicate framework and then managed to get the app and framework actually installing on their watch ok?
Is there any way to analyse the build that is done to try and see if i can see problems with the built files so i don't have to wait for the watch to fail to launch the app to debug it.
Any help is really appreciated as always! Cheers!
Edit: I think I've managed to remove cocoa pods from the offending MyFrameworkWatch target by commenting out the target section in my pod file and running pod update/pod install... it didn't seem to clean up the target very well so i had to manually remove the cocoa pod steps in the post build step. Maybe i've not removed it properly, i find it a little confusing to know what is going on under the hood with cocoa pods. Regardless the same error occurred, so either i didn't remove it properly or it has no effect on this particular problem
Ok, this was caused by the apple documentation for transitioning being wrong, or me interpreting it wrong. It says
Add the framework to your WatchKit extension’s list of linked frameworks.
Where as actually the correct fix was to add the framework to the embedded binaries section (which automatically adds an entry to the linked frameworks anyways) and correctly places the framework within the watch extension under a Frameworks directory. Which the app then loads fine! So much frustration, I lost hours to this across a few days!!

Unable to use Google Analytics for iOS

I don't know what Happens to the code or google.
I just Downloaded the Sample App for Google Analytics for Google.
I downloaded it via pod using:
pod try Google
and chooses the option for Analytics.
After downloading when I build the project I am getting Linker Error.
Fully Stuck Tried All The way available in SO.
Removed -ObjC Flag
Removed -force-load Flag
Changed Load Common Section from Yes to NO
But none of the way help me Out. What is the issue with it.
Here is the Screen shot of the Error:
Here is the Following reason of this ERROR :
*Note - Integrated GooGle Analytic without CocoaPods.
If latest GA(Google Analytics) sdk is using then better to upgrade to Xcode 7 otherwise it will give you duplicate error (even if configured properly)
Running with Xcode 6.2 or < Xcode 7 then better to download September (August) Release Sdk.
Go with Xcode and select GA folder and right click - choose show in Finder then all files should be there . If yes then check is there two different copy exists in other folder .
Thanks
It basically says that there are functions duplications in the project...
Make sure the following:
The project does not have #import for .m files by mistake
In the projects build phases there are no file names duplications
There are no initialized variables in .h files e.g "int
variableA = 5"
If none of the above works, remove in project settings Other Linker
Flags "-ObjC", that will allow to load the same functions more then
one time.

undeclared identifier 'FBAppCall' 'FBDialogs'

I'm recently trying to update the Facebook SDK on our application. I had no worries following the steps fom the Upgrade guide by Facebook.
I was able to compile without issues.
However, when I quit XCode, reopen my project and try to recompile I get an error about 'FBAppCall' (undeclared identifier). All others classes from the SDK are working except this one and 'FBDialogs'.
I am able to solve those errors by deleting the Facebook framework and adding it again. But I must do it every time I quit XCode.
I've tried to check or uncheck "Copy items into destination group's folder (if needed)" with no luck. Also tried older versions of Facebook SDK but it didn't changed anything.
Also tried to clear all the Facebook SDK references from the project.pbxproj before readding the frameworks, in vain.
Thank you for helping me with this annoying issue..
Note: Already did all the configuration Facebook SDK is requiring in the Getting Started page.
Finally found the solution.
Since I was upgrading from an older Facebook SDK, I had to delete the older FacebookSDK.framework file from $(PROJECT_DIR)/Frameworks and then re-add it in XCode.
did you add
#import <FacebookSDK/FacebookSDK.h>
in your AppDelegate.m file?

Resources