Skip to content

Conversation

bstpierr
Copy link
Contributor

This allows iOS Extensions that have a Bundle ID of the format com.google.appName.extension

This allows iOS Extensions that have a Bundle ID of the format `com.google.appName.extension`
for (NSBundle *bundle in bundles) {
if ([bundle.bundleIdentifier isEqualToString:bundleIdentifier]) {
// This allows app extensions that have the app's bundle as their prefix to pass this test.
if ([bundleIdentifier hasPrefix:bundle.bundleIdentifier]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to be a bit more careful here I think - this would match on things like com.firebase.foobar or com.firebase.foo.staging where it should only match on com.firebase.foo.

We could change the method call to matchesBundleIdentifier:inBundles: which could do an exact string match if it's not an extension, but if it is, compare to ensure it's the entire bundleID + a period + an extension identifier.

There's an existing isAppExtension call in GoogleUtilities I believe we could use, and if that's true, separate by ., drop the last one, and re-assemble to verify that it's identical.

@paulb777
Copy link
Member

Closed in favor of #2515

@paulb777 paulb777 closed this Mar 12, 2019
@paulb777 paulb777 deleted the bs-bundleprefix branch October 2, 2019 19:20
@firebase firebase locked and limited conversation to collaborators Oct 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants