Answered

Intercom is crashing in our app when a user tries to send an image attachment after selecting a photo from their album.

  • 12 February 2021
  • 5 replies
  • 114 views

Intercom allows the user to select an image but just after tapping Send the app crashes. GIFs are text messages are sent without any trouble.

 

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

 

icon

Best answer by Anonymous 16 February 2021, 17:06

View original

5 replies

Hey @owen s​. To help us look into this, could you let me know if this is happening on any particular version of iOS and which version of the iOS SDK you're seeing the problem with, please?

We are using POD version 5.2.1 on iOS 14.4. I can try and build against iOS 13 and run on the simulator if that helps. This test was done on an iPhone 11.

Got it. It sounds like upgrading to the latest version of the iOS SDK will fix this for you. The version you're using was released in early 2019, so won't have the latest updates for iOS 14. Version 8.0.0 added support for iOS 14, including updates to the image picker, and the latest version is v9.3.1.

Thanks so much Mathew. Are the API versions drop in replacements or are we looking at some refactoring to get the new versions working?

That's a very good question, and I should have mentioned it in my earlier reply. I'm glad you asked 😃

 

Seeing as you're going from v5.2.1 to the latest, there's a couple of things to keep in mind. There will be a small amount of refactoring required (but nothing scary!). We have notes in our developer docs here to guide you. The key things to note are:

 

  • The iOS SDK now has a minimum iOS version of 10.
  • You may need to use a more up to date push notification handler if you aren't already.
  • You may need to use a more up to date URL handler as well.

 

Other than that, it should be a quick upgrade! You'll also get access to a tonne of new features that weren't available in v5. Mobile Carousels are a particular favourite of mine 😉

Reply