Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7205

why my iOS app is getting crashed on launching

$
0
0

i have built and run an iOS app and it crashed as soon as it got launched with this error in AppDelegate.swift:

Thread 1: Exception: "*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil

Following is the screenshot of code for reference.

enter image description here

i am not able to identify that error is present in which part of code so that i can debug it further by applying breakpoint.Need help in fixing this.

adding segment of code where objects are inserted into the array for reference.

+ (NSArray *)relevantURLSchemes {  NSMutableArray *result = [[NSMutableArray alloc] init];  for (NSBundle *bundle in [[self class] relevantBundles]) {    NSArray *urlTypes = [bundle objectForInfoDictionaryKey:@"CFBundleURLTypes"];    for (NSDictionary *urlType in urlTypes) {      [result addObjectsFromArray:urlType[@"CFBundleURLSchemes"]];    }  }  return result;}

Viewing all articles
Browse latest Browse all 7205

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>