-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundle ID validation doesn't work in my share extension #5126
Comments
It's weird to see log from both the Firebase and Fabric Crashlytics. Are they both in the app?
|
Good point! Looks like I forgot to stop linking Fabric Crashlytics. Fixed it but I'm still getting a similar error:
|
Did you download the same GoogleService-Info.plist file from the main app to your share extension target? |
Just double checked and I downloaded a separate Google config file for my share extension. |
Ahh that's the issue then - the expectation is you're using the same app in the console and the same Can you try with that and see if it works for you? Also, if you had a particular reason to set up a separate app in the Firebase console for your extension it'd be helpful to know what kind of use-cases that folks need. Thanks! (Good call @chliangGoogle) |
Ohh, I didn't know that! The reason for splitting the extension from the main app is that the #1 crash in the main app happens roughly 100x more often the #1 crash in the extension. And it's the same with active users, the main app has hundreds times more users than the extension. |
That's correct, yes. cc @TKBurner for any potential solutions from the Crashlytics side - what's the best way to filter crashes from extensions? That's very helpful feedback and something we'll need to consider moving forward, thank you! |
It looks like the original issue is still valid - we should be able to match exact bundleIDs for extensions in this sort of setup. |
Part of reason we enforce the same config file is so that users can have unified identity as one app, e.g. you will only have to log in once with Auth. I also wonder if crashlytics support customized events so you can specify the difference there. |
@chliangGoogle I don't fully understand the second part of your comment - is there a way to filter by the target in Firebase console? Ideally we'd like to be able to separate crashes in the main app from crashes in extensions because of a big difference in their volumes. |
@morganchen12 but this brings us back to this issue - we currently have it set up as a separate project but the SDK does not start correctly because it complains about an incorrect bundle ID. |
I see. I'm not sure if there's a clever way to make this workflow happen given the existing constraints of the console. I'll file a feature request for filtering by target in Crashlytics console, but it will be a while before the workflow you're describing is properly supported. |
@morganchen12 thank you! 😊 Do you think it's also worth updating the code in the Firebase SDK in the way I suggested in the description of this issue to be able to use the SDK for extensions set up as separate projects? |
In principle we should make the adding an app extension workflow just work automatically. Changing the bundle ID validation may not be the best way to do that, but if it is, then yes. There's a lot of complexity in supporting non-iOS Apple platforms because Firebase has historically been very tightly coupled to iOS and there's a substantial cost to undoing that. We've paid part of that cost in the community-supported macOS/tvOS distributions, but we still have a ways to go. |
It all does make sense to me. But I'm just a user of the library, I'm not aware of all the constraints and I have no idea what's the best way of addressing the problem. |
Any updates on this? |
@mdzwonek Thank you for your detailed explanation of the issue and a fix suggestion. We decided to apply the fix suggested by you. Appreciate your contribution. |
Thank you! |
Step 0: Are you in the right place?
file a Github issue.
with the
firebase
tag.google group.
of the above categories, reach out to
Firebase Support.
this repository, please delete this section.
[REQUIRED] Step 1: Describe your environment
Zip file
[REQUIRED] Step 2: Describe the problem
Bundle ID validation doesn't work in my share extension.
Steps to reproduce:
What happened? How can we make the problem occur?
I'm getting the following error:
Bundle ID of the main app is
com.mycompany.myapp
, bundle ID of the extension iscom.mycompany.myapp.ShareExtension
. Calling[NSBundle mainBundle]
returnscom.mycompany.myapp.ShareExtension
but it looks like the SDK is expecting it to returncom.mycompany.myapp
because the validation in+hasBundleIdentifierPrefix:inBundles:
fromFIRBundleUtil
fails.Relevant Code:
Should it look more like this:
?
The text was updated successfully, but these errors were encountered: