Google Maps not displaying - Failed to decode tile - ios

I'm having a hard time trying to display a GMSMapView. I'm seeing a blank map as shown below.
I've seen plenty of answers indicating API Key was not valid or Maps iOS SDK not enable in Google console. But in my case, key works on sample projects. I even created a basic project and had no issues displaying the map.
This is what I see in the console:
2018-09-28 10:54:37.946703+0200 XXXXX[53857:723015] ((null)) was false:
GMSStyledVectorMapTileService failed to decode tile [4,2,5], +[GMSx_GMPCClientVectorTileExtensionsRoot indoorBuildingMetadata]: unrecognized selector sent to class 0x10a9af638
2018-09-28 10:54:38.063481+0200 XXXXX[53857:723015] +[GMSx_GMPCClientVectorTileExtensionsRoot indoorBuildingMetadata]: unrecognized selector sent to class 0x10a9af638
2018-09-28 10:54:38.063666+0200 XXXXX[53857:723015] ((null)) was false: GMSStyledVectorMapTileService failed to decode tile [3,1,3], +[GMSx_GMPCClientVectorTileExtensionsRoot indoorBuildingMetadata]: unrecognized selector sent to class 0x10a9af638
Please help, I'm dying here

Ok so it's was kind of specific to my project. Google maps pod was shared among several target of my workspace project. It looks like the key wasn't shared among targets. Now maps pod is only used on main target and it's working fine.

This is either linkage problem or the Google Maps resources bundle is misplaced.
Make sure you are linking the 3 GoogleMaps frameworks correctly and only once. In our case, the problem was only reproducible in release mode and the reason was that we were linking GoogleMapsUtils with GoogleMaps frameworks AND linking the app again with GoogleMaps frameworks.
Also we had moved the GoogleMaps.bundle out of the framework and into our own framework, which was also probably a mistake.
Hope it helps.

I handled it by integrating google maps manually. I still didn't find a fix by using cocoapods.

Related

How to Fix Unity IOS Facebook Error on App Launch

I am integrating Facebook Login & Sharing into a game for IOS using Unity. But as soon as app launches i am getting this error
-> applicationWillResignActive()
2019-03-11 16:39:07.405809+0500[828:197716] +[NSError fbErrorWithCode:userInfo:message:underlyingError:]: unrecognized selector sent to class 0x1d2710f80
2019-03-11 16:39:07.466234+0500 [828:197716] Uncaught exception: NSInvalidArgumentException: +[NSError fbErrorWithCode:userInfo:message:underlyingError:]: unrecognized selector sent to class 0x1d2710f80
Actually I got almost same error codes in my project on Swift. So is not problem Unity, is problem connection Facebook SDK to project.
In my case, this error happened, when I try use VPN application Luna. Is seem have conflict VPN with Facebook SDK if is connected to project not correct. When VPN disabled, application and analytics worked without any problem.
For fix my problem, in "Project->Build Settings" need have parameter "Other Linker Flags" value "-ObjC".
Also I used bridge ".h" file for connect Facebook SDK to my Swift project. I had line "#import <FBSDKCoreKit/FBSDKCoreKit.h>", so I delete it from bridge. And manual added in every Swift class, what used Facebook SDK this line:
import FBSDKCoreKit
I did not have the "FBSDKCoreKit" parameter in "Other Linked Flags". Adding the package, then cleaning the build was a fix for me

Using React Native within an iOS share extension

Jumping off of this facebook/react-native#1626 GitHub issue, I had a question about setting up a React Native view within an iOS share extension
I posted an example GitHub repo that demonstrates the problem, summarized below.
So far the proof-of-concept setup is pretty straightforward, but I feel like I'm missing something very simple.
In my react-native init scaffolded Xcode project I created a new Share Extension target, and within it linked the appropriate React Native static libraries (libReact.a, libRCTWebSocket.a, etc.). This gets our project compiling for a very simple ShareViewController that's a plain ‘ol UIViewController.
Upon activating my Share Extension from another app, my ShareViewController is initialized but immediately crashes with the following log messages:
2015-11-29 12:44:34.721 [warn][tid:com.facebook.React.JavaScript][RCTContextExecutor.m:129] 'undefined is not an object (evaluating \'RCTWebSocketModule.connect\')'
2015-11-29 12:44:34.726 ShareExtension[66473:2179009] -[RCTBatchedBridge redBox]: unrecognized selector sent to instance 0x7fb59d8ab200
2015-11-29 12:53:47.160 [warn][tid:com.facebook.React.JavaScript][RCTContextExecutor.m:129] 'Requiring module "InitializeJavaScriptAppEngine" which threw an exception'
2015-11-29 12:53:47.160 ShareExtension[66473:2179009] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RCTBatchedBridge redBox]: unrecognized selector sent to instance 0x7fb59d8ab200'
The line 'Requiring module "InitializeJavaScriptAppEngine" which threw an exception' looks particularly suspicious, and leads me to believe that I'm missing some basic JavaScriptCore setup within the share extension. Curious to know if there are any obvious areas to investigate, or if anyone else has solved this problem. Thanks!
I had the same error and fixed it by adding "-ObjC" in my app extension target build settings (Other linker flags)

Facebook and Parse integration unrecognized selector

I'm trying to integrate a Facebook login with my Parse backend. Upon running the app, I receive
[PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:]: unrecognized selector sent to class xxxxxx
on the line
PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(nil)
or
PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions)
I have tried the solution here: https://developers.facebook.com/docs/ios/troubleshooting#unrecognizedselector
(adding the -ObjC flag), and have cleared Derived Data, to no avail.
I'm using Parse SDK 1.7.2, Facebook SDK 4.0.1, and the PFFacebookUtilesV4 framework.
The full error is as follows:
2015-05-03 14:22:25.742 hotPotato[49116:1453068] +[PFFacebookUtils
initializeFacebookWithApplicationLaunchOptions:]: unrecognized
selector sent to class 0x10f524048 2015-05-03 14:22:25.810
hotPotato[49116:1453068] *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '+[PFFacebookUtils
initializeFacebookWithApplicationLaunchOptions:]: unrecognized
selector sent to class 0x10f524048'
I faced same issue.
My mistake was that I also added ParseFacebookUtils.framework in the project.
Just remove it and everything will be fine :)
Make sure that you have imported the correct frameworks into your bridging header:
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <ParseFacebookUtilsV4/PFFacebookUtils.h>
Also check that the needed frameworks are included in the Linked Frameworks and Libraries list under your target's General tab.
If you've added the frameworks manually, go to the Build Settings tab, and make sure that Search Paths contains the paths to the Parse and Facebook frameworks.
Mine looks something like this:
$(inherited)
$(PROJECT_DIR)/Vendor/Facebook
$(PROJECT_DIR)/Vendor/Parse
The PFFacebookUtils initialization call in the application(application:, didFinishLaunchingWithOptions:) delegate method should follow the Parse initialization method:
Parse.setApplicationId("<APP_ID>", clientKey:"<CLIENT_KEY>")
PFFacebookUtils.initializeFacebookWithLaunchOptions(launchOptions)
If you haven't done this already, I suggest that you consult Parse's own guide:
https://parse.com/docs/ios_guide#fbusers-setup/iOS
My problem was solved by making all my frameworks including my Parse ones referenced instead of copied.
Probably a little late but I solved this by using the Bolts.framework from the Facebook SDK as opposed to the Parse SDK.

How to add momd(managed object model) into ios framework?

I am trying to convert my ios app(XYZ) into framework(XYZ.framework) so that it can be included in other ios applications. Went through below links and able to develop a framework.
LINK1:LINK1
LINK2:LINK2
But when i include my framework in other apps and try to compile for first time , xcode is throwing error "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A fetch request must have an entity.". I followed below steps and get rid of this error.
STEP1: Added XYZ.framework in other app and compiled for first time, but xcode gave error mentioned above.
STEP2: Added XYZ.momd(by drag and drop) along with XYZ.framework in other application. Compiled it and Xcode didn't throw any error.
STEP3: Removed XYZ.momd from other application and compiled it. Xcode didn't throw any error!!!!
Should i give XYZ.momd along with XYZ.framework while distributing XYZ.framework, so that XYZ.momd can be included in other applications? I googled, but didn't get how to add momd inside framework and include it in other applications.

Urban Airship crashes when calling takeoff

Upgrading to UrbanAirship 3.0.0 with Xcode 5.0, I'm getting an error when calling this code:
[UAirship takeOff:config];
The error is
+[NSJSONSerialization stringWithObject:]: unrecognized selector sent to class 0x3b2ca9fc
2013-09-19 15:02:31.981 [178:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSJSONSerialization stringWithObject:]: unrecognized selector sent to class 0x3b2ca9fc'
This doesn't seem to appear when setting the key "inProduction" to "YES" in the AirshipConfig.plist, which makes sense as calling takeOff: populates the instance of UAirShip.
It seems to be due to the category NSJSONSerialization+UAAdditions.
Any help on this one?
Thanks
To fix this issue, you must include "-ObjC" flag in "Other Linker Flags" found in your projects build settings.
UAirship library 3.x now makes use of Objective-C categories so this flag must be set to avoid the runtime exception.
Details on the issue can be found here:
https://developer.apple.com/library/mac/qa/qa1490/_index.html
Updated the docs:
http://docs.urbanairship.com/build/ios.html#build-settings
http://docs.urbanairship.com/topic_guides/ios_migration.html#linker-flags
Doesn't seam to be happening with the source: https://github.com/urbanairship/ios-library
You must have included both the libraries:
libUAirship-3.0.0.a
libUAirship-iOS5-3.0.0.a
You have to use either of the library for respective iOS
After looking at different solutions, it turns out that this fixes the issue:
• Download sources from https://github.com/urbanairship/ios-library directly into your App folder (don't take .zip given on their website)
• Drag & drop the Airship folder in your Project (do not use the AirshipLib one)
• Don't link any of the libUAirship-3.0.0.a or libUAirship-iOS5-3.0.0.a
• Boom. It's working.
Hope it'll help some others out there looking to fix this for ages.
Just to add, my problem was that I added -ObjC flag to the project, and it should be added to the target settings.
Also, if that does not compile, there is another option
-Wl,-force_load,<PathToYourLib>/libUAirship-4.0.0.a
Also should be added to the target. Fill the real path to your lib instead of <PathToYourLib>.

Resources