didSelect not being called on iMessage extension

I added an iMessage extension to the app, then hooked it up to use views from the parent app. On launch, the message extension seems to load fine. I have didSelect method as below.


    override func didSelect(_ message: MSMessage, conversation: MSConversation) {
        print("=========== didSelect local \(conversation.localParticipantIdentifier)")
        print("=========== didSelect remote \(conversation.remoteParticipantIdentifiers)")
    }


I create a message from MSMessageTemplateLayout and send to recipient (using simulator), when I go to recipient's iMessage window and tap on received message bubble, I am observing the following:

- see only a gray screen

- only viewDidLoad and willBecomeActive is getting called

- activeConversation is null


additionally seeing the following errors in log:

2017-08-07 23:53:53.222033-0400 iMsg[46608:11935591] API error: (null) returned 0 width, assuming UIViewNoIntrinsicMetric
2017-08-07 23:54:04.314370-0400 iMsg[46608:11937080] Failed to inherit CoreMedia permissions from 46600: (null)
2017-08-07 23:54:04.367399-0400 iMsg[46608:11935591] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
2017-08-07 23:54:04.367733-0400 iMsg[46608:11935591] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction


Any pointers?

Using Xcode beta 5

Replies

Also, why is that both local and remote identifiers are the same?

From print statements in didResignActive call:

=========== didResignActive local [5B4D3F6E-CBA7-47DA-ADFF-BA49CDCE612C]
=========== didResignActive remote [5B4D3F6E-CBA7-47DA-ADFF-BA49CDCE612C]