Firebase crashes unity iOS app at startup

1,725 views
Skip to first unread message

christop...@fourstorycreative.com

unread,
Mar 23, 2017, 12:26:23 PM3/23/17
to Firebase Google Group
Using Firebase 3.0.1 Unity SDK and Unity 5.1.1p3

We built out fine to Android and were about to get it working on Android for Dynamic links.

However, on iOS once it's built out, the game crashes pretty much when we tap the icon. We can't seem to get crash reporting to work, not sure if it's because it's happening in startup. Are we missing something? We tried to follow the Unity iOS setup steps, but can't get an app going on iOS that has Firebase in it. We even tried an empty project with only a single scene and a text field in it. It also crashes at startup.

Appreciate any help offered.

christop...@fourstorycreative.com

unread,
Mar 23, 2017, 12:58:03 PM3/23/17
to Firebase Google Group
Finally found where you could get crash reports on the devices. 

It gives the following. Dyid Error Message:
Library not loaded: /System/Library/Frameworks/UserNotifiations.frameowrk/UserNotifications
Referenced from...
Reason: Image not found
Dyid version: 353.12

Anthony Maurice

unread,
Mar 23, 2017, 1:53:56 PM3/23/17
to fireba...@googlegroups.com
Hi there.  What version of Xcode are you using, and what iOS version?

While we haven't experienced this issue ourselves, I did find someone with a similar issue on stackoverflow, which provided a workaround in the form of http://stackoverflow.com/a/40419080
This isn't great for Unity though, as it generates the xcode project, so we will see if we can find a better workaround, but in the meantime, that might be able to help.

--
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/a338d710-cd78-40ac-a7f6-4f826cd5a983%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

christop...@fourstorycreative.com

unread,
Mar 23, 2017, 2:31:52 PM3/23/17
to Firebase Google Group
iOS 9.3.5 and iOS 8.5.

We just upgraded Xcode from version 7 something to version 8.2.1 because we saw the note about requiring at least Xcode 8.


On Thursday, March 23, 2017 at 12:53:56 PM UTC-5, Anthony Maurice wrote:
Hi there.  What version of Xcode are you using, and what iOS version?

While we haven't experienced this issue ourselves, I did find someone with a similar issue on stackoverflow, which provided a workaround in the form of http://stackoverflow.com/a/40419080
This isn't great for Unity though, as it generates the xcode project, so we will see if we can find a better workaround, but in the meantime, that might be able to help.
On Thu, Mar 23, 2017 at 9:57 AM, <christop...@fourstorycreative.com> wrote:
Finally found where you could get crash reports on the devices. 

It gives the following. Dyid Error Message:
Library not loaded: /System/Library/Frameworks/UserNotifiations.frameowrk/UserNotifications
Referenced from...
Reason: Image not found
Dyid version: 353.12

On Thursday, March 23, 2017 at 11:26:23 AM UTC-5, christop...@fourstorycreative.com wrote:
Using Firebase 3.0.1 Unity SDK and Unity 5.1.1p3

We built out fine to Android and were about to get it working on Android for Dynamic links.

However, on iOS once it's built out, the game crashes pretty much when we tap the icon. We can't seem to get crash reporting to work, not sure if it's because it's happening in startup. Are we missing something? We tried to follow the Unity iOS setup steps, but can't get an app going on iOS that has Firebase in it. We even tried an empty project with only a single scene and a text field in it. It also crashes at startup.

Appreciate any help offered.

--
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.

christop...@fourstorycreative.com

unread,
Mar 23, 2017, 4:09:36 PM3/23/17
to Firebase Google Group
We did the change to optional and it actually did seem to work. But only on iOS 8. On iOS 9 of our tablet it now seems to stop when trying to log into Facebook. The Facebook dialog box comes up and it does say we have already verified the game, but then the dialog box appears to get stuck. We can close the dialog box, But there is a message printing out in the console logs with "Fetch Pending Invites" which I think is from the Firebase invite/dynamic link sdk. 
Message has been deleted

Anthony Maurice

unread,
Mar 23, 2017, 5:02:16 PM3/23/17
to fireba...@googlegroups.com
Hmm, that is worrying.  Do you mind sending a full log, it might help us track down what is happening.

On Thu, Mar 23, 2017 at 12:00 PM, <christop...@fourstorycreative.com> wrote:
We tried changing it to optional and the app loads...sortof. It starts up and gets stuck where the dialog box pops up to log into Facebook. The dialog box allows us to enter our log in info and then it says we've already verified the app. Clicking ok, the dialog box seems to stay up.

We can hit done on the dialog box, which does close it, and we have a plugin that lets us see console printouts and it shows "fetch pending invites" printing out several times, which I assume is something from the Firebase invite/dynamic link sdk. Look at where it's getting stuck, it seems to happen at the Facebook login. I'm uncertain if making the notification framework optional created an issue or not.



On Thursday, March 23, 2017 at 1:31:52 PM UTC-5, christop...@fourstorycreative.com wrote:
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.

christop...@fourstorycreative.com

unread,
Mar 23, 2017, 7:37:03 PM3/23/17
to Firebase Google Group
Since this is on iOS, I'm not super familiar with it's setup. Our iOS guy is also still learning. I apologize, I'm not sure how we get the log off iOS, but I'll see what I can look into.

We also tested this on iOS 10 and it does the same thing as iOS 9 with getting stuck and printing out fetch pending invites.

I then tried to update the Facebook sdk to 7.9.4 and suddenly Android was getting the "fetch pending invites" repeatedly. (Facebook sdk 7.8 had no issues on android with Firebase). I can do a logcat for that version with Android as I'm more familiar with creating those, and perhaps it will help with iOS.

Stewart Miles

unread,
Mar 29, 2017, 11:47:41 AM3/29/17
to fireba...@googlegroups.com
You can pull the logs from iOS following something like this https://support.kaspersky.com/12419

Yes, if you're seeing issues on Android as well logcat logs would be great. 

If you can't share the logs publicly via this mailing list open up a private support request and we'll continue debugging in there. 

Cheers,
Stewart

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.

christop...@fourstorycreative.com

unread,
Apr 12, 2017, 9:50:56 AM4/12/17
to Firebase Google Group
Thank you. We had to get a build out quickly, so we opted to remove Firebase for that build and try again for our next update. With Unity releasing 5.6, we also decided to wait for it's release, which came out at the end of March.

Setup

Unity 5.6
Firebase 3.0.1 unity sdk
Facebook 7.9.4 unity sdk
iOS various devices using iOS 8,9,10
xCode 8


I actually submitted a log to your help directly. But just in case we can get a quicker response, I'll explain a bit here what we seemed to discover. Android is working great without issues. iOS is still a struggle. We currently have two issues that appear once Firebase is added to the project. When logging into Facebook, Facebook brings up a dialog box that allows us to approve the game. Once we tap ok, the dialog box doesn't vanish. There is a done button, but hitting it just returns us to the login scene where it seems stuck.

If we try to login by not using Facebook, we can get into the game, but then Unity Ads seems to break. We have an ad button to view video ads, but ads are never ready.

Both of these issues only appear on iOS when Firebase is in the project and no issues appear on Android.

Stewart Miles

unread,
Apr 21, 2017, 9:29:41 PM4/21/17
to Firebase Google Group
We found the issue today.  It turns out that Unity's AppDelegate doesn't implement the new openURL selector but we swizzle it in (add it to the app delegate) on initialization.  This results in the URL being handled by our method which doesn't call Unity's legacy openURL selector and hence notify the Facebook SDK that a sign-in in complete.  We'll cook up a workaround.  In the meantime you can fix this by adding the following to UnityAppController.mm:

- (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  NSString *sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey];
  id annotation = options[UIApplicationOpenURLOptionsAnnotationKey];
  return [self application:app openURL:url sourceApplication:sourceApplication annotation:annotation];
}

Cheers,
Stewart

Stewart Miles

unread,
May 9, 2017, 8:06:14 PM5/9/17
to Firebase Google Group
Reply all
Reply to author
Forward
0 new messages