FIRAppIndexingViewController in Firebase iOS SDK causes crash.

60 views
Skip to first unread message

takashi...@mrk.co

unread,
Oct 21, 2016, 12:30:09 AM10/21/16
to Firebase Google Group
Hi,

I'm quite new to Firebase App Indexing.

My iOS app uses Universal Links for iOS, and is now trying to introduce Firebase iOS SDK.
Then some codes in my app started to crash with the SDK.
It seems that FIRAppIndexingViewController instance is implicitly added in view controller hierarchy.

What I want to know are:

1. What does FIRAppIndexingViewController instatance do?
2. How does FIRAppIndexingViewController instatance behave in app lifecycle?
(when to appear/disappear and where in hierarchy, etc.)
3. Can I make Firebase work with FIRAppIndexingViewController instance out of view controller hierarchy?

Thanks in advance,

Takashi Morioka

Kato Richardson

unread,
Oct 25, 2016, 10:44:33 AM10/25/16
to Firebase Google Group
Hi Takashi,

I wouldn't expect to see errors around that class, unless you are using it somewhere.

Can you create a minimal repro (less than 100 lines of code that runs and reproduces the error, version info, sample data, security rules, and steps to reproduce) we can use to verify and troubleshoot? If you're not on the latest version, could you try upgrading?

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/c00dfbc4-4ec0-427a-a3bb-7b7e3bf5b8a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

takashi...@mrk.co

unread,
Oct 27, 2016, 12:20:56 AM10/27/16
to Firebase Google Group
Hi Kato,

Thank you for your reply!

Can you create a minimal repro (less than 100 lines of code that runs and reproduces the error, version info, sample data, security rules, and steps to reproduce) we can use to verify and troubleshoot?
This seems difficult, because crash is caused in app lifecycle and in various situation.
Let me explain some more detail about the error.

The exact error is, for example, like below. (though not only)
-[FIRAppIndexingViewController headerNavigationItem]: unrecognized selector sent to instance 0x15fe59550

My app uses a custom ContainerViewController (UIViewController subclass with same methods as UINavigationViewController) as root, and all child view controller inherits custom UIViewController subclass named ContentViewController.
The method [ContentViewController headerNavigationItem] is called by container, but we found sometimes FIRAppIndexingViewController instance can be in child view controllers of container. So above error occured.

Of course I can check instance class before call and avoid this and related errors.
But I do not know whether the existence of FIRAppIndexingViewController itself is OK or where they can appear or even what it does.
I cannot decide my fix is appropriate, that is why I want to know more detail of this class.

If you're not on the latest version, could you try upgrading?
I tried with Firebase/AppIndexing (3.5.2), latest in CocoaPods.

Regards,

Takashi


2016年10月25日火曜日 23時44分33秒 UTC+9 Kato Richardson:
Hi Takashi,

I wouldn't expect to see errors around that class, unless you are using it somewhere.

Can you create a minimal repro (less than 100 lines of code that runs and reproduces the error, version info, sample data, security rules, and steps to reproduce) we can use to verify and troubleshoot? If you're not on the latest version, could you try upgrading?

☼, Kato
On Thu, Oct 20, 2016 at 7:50 PM, <takashi...@mrk.co> wrote:
Hi,

I'm quite new to Firebase App Indexing.

My iOS app uses Universal Links for iOS, and is now trying to introduce Firebase iOS SDK.
Then some codes in my app started to crash with the SDK.
It seems that FIRAppIndexingViewController instance is implicitly added in view controller hierarchy.

What I want to know are:

1. What does FIRAppIndexingViewController instatance do?
2. How does FIRAppIndexingViewController instatance behave in app lifecycle?
(when to appear/disappear and where in hierarchy, etc.)
3. Can I make Firebase work with FIRAppIndexingViewController instance out of view controller hierarchy?

Thanks in advance,

Takashi Morioka

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/c00dfbc4-4ec0-427a-a3bb-7b7e3bf5b8a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ian Barber

unread,
Oct 27, 2016, 3:43:00 PM10/27/16
to Firebase Google Group

Hi Takashi, 

First off - I think you can probably just upgrade to the latest 3.8.0 SDK - we've actually dropped the SDK part of AppIndexing on iOS as (for iOS 9 on) we rely on Universal Links primarily! The updated docs describe the process, but there's a good chance you're already good to go and just need to remove the Firebase/AppIndexing subspec. 

That said, with regards to the issue I couldn't find any reference to headerNavigationItem in our code - that class is a subclass of SFSafariViewController, and I couldn't find it on there either. Does headerNavigationItem appear anywhere within your code or a library? I am wondering if something is adding a category that our controller is not respecting. 

Ian 

takashi...@mrk.co

unread,
Nov 1, 2016, 4:11:16 AM11/1/16
to Firebase Google Group
Hi Ian,

First off - I think you can probably just upgrade to the latest 3.8.0 SDK - we've actually dropped the SDK part of AppIndexing on iOS as (for iOS 9 on) we rely on Universal Links primarily! The updated docs describe the process, but there's a good chance you're already good to go and just need to remove the Firebase/AppIndexing subspec. 
So we only need to set up Universal Links to just index app contents, without SDK? Sounds great.

That said, with regards to the issue I couldn't find any reference to headerNavigationItem in our code - that class is a subclass of SFSafariViewController, and I couldn't find it on there either. Does headerNavigationItem appear anywhere within your code or a library? I am wondering if something is adding a category that our controller is not respecting. 
Yes, headerNavigationItem is defined in our code.

I think the AppIndexing SDK push FIRAppIndexingViewController instance to our container view controller, but it require its all child view controllers to implement headerNavigationItem method.
Of course we can check with respondsToSelector: or isKindOfClass: and avoid such calls, but I just want to know how FIRAppIndexingViewController works with app lifecycle to avoid future problems.

Anyway It doesn't matter if we can go without the SDK.

Thank you for your reply!

Takashi

2016年10月28日金曜日 4時43分00秒 UTC+9 Ian Barber:
Reply all
Reply to author
Forward
0 new messages