New Google maps on iOS 6 implementation crash - objective-c

I successfully implement new SDK from Google to my test project on iOS 6. When I add code from there tutorial I get such exception:
GoogleMapsBack[7306:5103] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'GMSCachedTile''
*** First throw call stack:
(0x27b0012 0x25d5e7e 0x10373e7 0x34bea 0x30c52 0x2a4f53f 0x2a61014 0x2a51418 0x2a512a6 0x2a52280 0x2a52450 0x97401e12 0x973e9cca)
libc++abi.dylib: terminate called throwing an exception
Does anyone know what is it the problem ?
https://developers.google.com/maps/documentation/ios/start

you forgot step 4:
"Drag the GoogleMaps.bundle from the Resources folder to your project. We suggest putting it in the Frameworks group. When prompted, ensure Copy items into destination group’s folder is not selected."
i encountered the same problem, and this fixed it.
regards,
Tomer

Related

Crash in the execution of a queue glmtl.telemetry

Exactly 60 seconds after launching my app it crashes with an uncaught exception:
libc++abi.dynlib: terminating app due to uncaught exception of type NSException
*** Terminating app due to uncaught exception of type 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: BundleVersion)'
The crashing thread has a random number (it is #7 in the attached screenshot) and it is always created for an unknown to me queue glmtl.telemetry.
The crash occurs only on one device (iPhone 11 Pro Max) and iOS 14.0 (it was then replicated with iOS 14.0.1).
I am not using in the project anywhere a key "BundleVersion". (There is CFBundleVersion in the info.plist, but does not seem to be related).
Can this be caused by the project sources?
This is not an explanation of the issue but the crash stopped appearing after adding a group of missing resource files to a folder (not a group but a folder) in the bundle.
Fix
I am having the same issue. In my case, I needed to add CFBundleVersion to the project's Info.plist since the exception mentions the "BundleVersion" key and because I recalled seeing XCode complain about invalid bundles when that key is missing.
My guess is that those recommended CFBundle* keys should be set for the main project's Info.plist and any embedded framework or projects with their own Info.plist. I'm just surprised XCode 12 doesn't raise that error right now at build time.
Source of the issue (?)
Do you use OpenGL in your app? I could not find what glmtl is, but it seems that the crash occurs exactly 1 minute after I instantiate a new OpenGL context. The crash will still occur after 1 minute if I delete the context before that, but it will be delayed another minute if I create a new instance in between.

Thread 1 Signal SIGABRT terminating with uncaught exception of type NSException

I am receiving the following error every single time I run my app. It goes to my main.m file and highlights in RED:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
It also says Thread 1: signal SIGABRT and in the output it says:
* Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3512.29.5/UIApplication.m:3299
2015-11-10 22:54:13.484 TaskR Pro[7964:2256505] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'
*** First throw call stack:
(0x1835e4f48 0x198197f80 0x1835e4e18 0x1844d8a1c 0x188e20414 0x188e1cf50 0x18d4037c4 0x18d403b44 0x18359c544 0x18359bfd8 0x183599cd8 0x1834c8ca0 0x188be61c8 0x188be0ffc 0x1000d6ca0 0x1989e68b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
How can I fix this?
It tells you exactly what's the problem:
Application windows are expected to have a root view controller at the end of application launch
If you use a standard storyboard based template everything is set up already for you and you go straight to Main.storyboard. However if you replaced that one you should make sure it's marked as the first storyboard and also has a initial view controller marked (I will make some screenshots for you to make it more clear).
First set up your target's Main Interface like this:
Then set up your storyboard (Main in this case) as initial view controller:
If you don't use storyboards or you want to choose which one will be used at boot (maybe you want to do something different when there's no session) you should set up code in AppDelegate to do so, for example like the answer here.

How to use Xcode output to determine source of crash?

I have the following output from my app at the moment:
2012-09-14 11:55:32.558 projectname[2172:707] -[__NSCFBoolean isEqualToString:]:
unrecognized selector sent to instance 0x3ec4ba18
2012-09-14 11:55:32.570 projectname[2172:707] *** Terminating app due to uncaught
exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean isEqualToString:]:
unrecognized selector sent to instance 0x3ec4ba18'
*** First throw call stack:
(0x3263788f 0x3468d259 0x3263aa9b 0x32639915 0x32594650 0x41e47 0x417d3 0x46af7
0x320beefb 0x320bdfd9 0x320bd763 0x32061f15 0x325961fb 0x342faaa5 0x342fa6bd
0x342fe843 0x342fe57f 0x342f64b9 0x3260bb1b 0x32609d57 0x3260a0b1 0x3258d4a5
0x3258d36d 0x316e4439 0x3208ccd5 0x17e77 0x15ca4)
terminate called throwing an exception
I can see that the problem is that I'm trying to compare a BOOL to an NSString, the comparison is on data from a web service and it's always been BOOL before now. That's besides the point in this case anyway.
What information is in that log that can actually help me find the line of code that's causing the problem? I can see which instances (e.g. 0x3ec4ba18) are causing it but the log doesn't even tell me what type they are, let alone a line number.
Add an exception breakpoint by going to the exceptions pane (in the left sidebar), clicking the + and selection "Exception breakpoint". Then when you run the debugger will pause where the exception is actually thrown rather then when it is caught (or rather uncaught) at the top level.
There are many tutorials on this, Raywinderlich has one of good tutorial for determining crash from the console log..
Here you can get them..
My App Crashed, Now What? – Part 1
My App Crashed, Now What? – Part 2
After following these, come to know the specific reason of crash then google for this, you can resolve it easily.

adding custom fonts to application

In my project, I'm using a custom font named "COMICS.TTF"... For that I added the font file named "COMICS.TTF" into resources and edited the plist to include a new field specifying
"Fonts provided by the application COMICS.TTF "
After that, I accessed the font usig UIFont's fontWithName:#"Comics" size:40.0 method...
(Comics is the font name that I got when I tried to NSLog font names)... All these worked perfectly in iPhone 4... But, when I tried to install the program in iOS3.1, it is throwing an exception as follows...
*** Assertion failure in -[UILabel setFont:], /SourceCache/UIKit/UIKit-984.38/UILabel.m:445
2011-03-07 14:24:20.271 CMB[183:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: font != nil'
2011-03-07 14:24:20.291 CMB[183:207] Stack: (
853417245,
845594132,
852966195
Also, it's not showing the font name when tried to NSLog the font name... Does anybody know, what's the problem?
adding your custom fonts became available in 3.2 and later versions so, if you are trying to use it on 3.1 it won't work

App terminates due to uncaught exception

My app was working fine until I added another tab to the tab bar controller. I got SIGABRT. Then I undid everything to try and get it working again and now get this
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
Can anyone help?
Open your xib file(s) in Interface Builder and see if there are IBOutlets that got disconnected when you deleted your tab before. It's trying to connect an outlet that probably doesn't exist anymore.
[UIRuntimeOutletConnection connect]
Are you working with a NSDictionary ?
Be sure that you're working with Mutable object. This error can happen if you're inserting into a NSDictionary (instead of a NS*Mutable*Dictionary).
If not, maybe youre tab control indirectly use Dictionary