/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #import /** * @class GIDFakeMainBundle * @brief Helps fake [NSBundle mainBundle] */ @interface GIDFakeMainBundle : NSObject /** * @fn startFakingWithBundleId:clientId: * @brief Starts faking [NSBundle mainBundle] * @param bundleId The fake bundle idenfitier for the app. * @param clientId The fake client idenfitier for the app. */ - (void)startFakingWithBundleId:(NSString *)bundleId clientId:(NSString *)clientId; /** * @fn stopFaking * @brief Stops faking [NSBundle mainBundle] */ - (void)stopFaking; #pragma mark - URL Schemes /** * @fn fakeAllSchemesSupported * @brief Fakes all URL schemes in the info.plist. */ - (void)fakeAllSchemesSupported; /** * @fn fakeAllSchemesSupportedAndMerged * @brief Fakes all URL schemes in the info.plist as a single scheme definition. */ - (void)fakeAllSchemesSupportedAndMerged; /** * @fn fakeAllSchemesSupportedWithCasesMangled * @brief Fakes all URL schemes in the info.plist but flips A-Z with a-z and vice-versa. */ - (void)fakeAllSchemesSupportedWithCasesMangled; /** * @fn fakeMissingClientIdScheme * @brief Fakes a missing client ID scheme in the info.plist. */ - (void)fakeMissingClientIdScheme; /** * @fn fakeMissingAllSchemes * @brief Fakes missing the CFBundleURLTypes section of the info.plist entirely. */ - (void)fakeMissingAllSchemes; /** * @fn fakeOtherSchemes * @brief Fakes other irrelevant schemes in the info.plist. */ - (void)fakeOtherSchemes; /** * @fn fakeOtherSchemesAndAllSchemes * @brief Fakes other irrelevant schemes in the info.plist. */ - (void)fakeOtherSchemesAndAllSchemes; @end