2 * Copyright 2017 Google
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #import <Foundation/Foundation.h>
20 * This class provides utilities for accessing resources in bundles.
22 @interface FIRBundleUtil : NSObject
25 * Finds all relevant bundles, starting with [NSBundle mainBundle].
27 + (NSArray *)relevantBundles;
30 * Reads the options dictionary from one of the provided bundles.
32 * @param resourceName The resource name, e.g. @"GoogleService-Info".
33 * @param fileType The file type (extension), e.g. @"plist".
34 * @param bundles The bundles to expect, in priority order. See also
35 * +[FIRBundleUtil relevantBundles].
37 + (NSString *)optionsDictionaryPathWithResourceName:(NSString *)resourceName
38 andFileType:(NSString *)fileType
39 inBundles:(NSArray *)bundles;
42 * Finds URL schemes defined in all relevant bundles, starting with those from
43 * [NSBundle mainBundle].
45 + (NSArray *)relevantURLSchemes;
48 * Checks if the bundle identifier exists in the given bundles.
50 + (BOOL)hasBundleIdentifier:(NSString *)bundleIdentifier inBundles:(NSArray *)bundles;