Sticker Kit problem

Home 4 Forums iOS / tvOS Starter Kits The Sticker Kit Sticker Kit problem

This topic contains 1 reply, has 1 voice, and was last updated by  John Lotshaw 2 years ago.

  • October 9, 2017 at 1:46 am #174618

    I’m having a problem with the Sticker Kit. The kit compiles fine, but it throws an error every time.

    The error occurs at line 682 of MessagesViewController.swift. Here’s the error it comes back with:

    `fatal error: unexpectedly found nil while unwrapping an Optional value
    2017-10-09 02:42:50.124021-0400 MessagesExtension[10849:1068348] fatal error: unexpectedly found nil while unwrapping an Optional value

    I’m sure I’m doing <em>something</em> wrong here… but what?

  • October 9, 2017 at 1:34 pm #174635

    Okay… I figured it out.

    Turns out that copying the new sticker PNGs into the project by dragging and dropping (and letting Xcode do the copying) is not enough. The images have to have their “Target Membership” set manually in the File Inspector to “MessagesExtension”. Once I did that, they were visible to code and everything worked.

    Is this a change to Xcode’s behavior since the video was made?

You must be logged in to reply to this topic.

Become part of the CartoonSmart Team with our Affiliate Program

Make recurring money when you refer a subscriber. 30 day tracking. Commissions 33%-50%!

Uh oh, missing your affiliate ID. Create one real quick