1

I'm trying to use google cast sdk in my project, for some reason it crashes without giving a proper error:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]' terminating with uncaught exception of type NSException

#0  0x00000001a39a99d4 in __exceptionPreprocess ()
#1  0x00000001b735ab54 in objc_exception_throw ()
#2  0x00000001a3a13d98 in _CFThrowFormattedException ()
#3  0x00000001a3a1f1f4 in -[__NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.4 ()
#4  0x00000001a38a4898 in -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] ()
#5  0x00000001a3897bf4 in +[NSDictionary dictionaryWithObjects:forKeys:count:] ()
#6  0x0000000104a8cf7c in -[UIBarItem(GCKAdditions) gck_applyStyleAttributes:] at /googlemac/iPhone/Chromecast/SDK/Framework/Release/UI/Classes/UIBarItem+GCKAdditions.m:13
#7  0x0000000104a757b0 in -[GCKUIDeviceConnectionViewController applyStyleAttributes] at /googlemac/iPhone/Chromecast/SDK/Framework/Release/UI/Classes/GCKUIDeviceConnectionViewController.m:852
#8  0x0000000104a72658 in -[GCKUIDeviceConnectionViewController viewDidLoad] at /googlemac/iPhone/Chromecast/SDK/Framework/Release/UI/Classes/GCKUIDeviceConnectionViewController.m:212
5

1 Answer 1

0

I see one possible change done in that time was related to the Podspec which included the cast SDK. Some of those lines were not there before and it caused the Google Cast Resources to be missing in the bundle and crash (below is the partial podspec):

Pod::Spec.new do |s|
  s.dependency 'google-cast-sdk-no-bluetooth', '= 4.5.0'
  s.xcconfig =  {
      'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
      'OTHER_LDFLAGS' => '-objc -ObjC -lc++ -framework "GoogleCast"',
      'GCC_SYMBOLS_PRIVATE_EXTERN' => 'YES'
  }

Not the answer you're looking for? Browse other questions tagged or ask your own question.