FPRConfiguration.m 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #import "FirebasePerformance/Sources/FPRConfiguration.h"
  15. #import "FirebasePerformance/Sources/Common/FPRDiagnostics.h"
  16. @implementation FPRConfiguration
  17. - (instancetype)init {
  18. FPRAssert(NO, @"init called on NS_UNAVAILABLE init");
  19. return nil;
  20. }
  21. - (instancetype)initWithAppID:(NSString *)appID APIKey:(NSString *)APIKey autoPush:(BOOL)autoPush {
  22. self = [super init];
  23. if (self) {
  24. _appID = [appID copy];
  25. _APIKey = [APIKey copy];
  26. _autoPush = autoPush;
  27. }
  28. return self;
  29. }
  30. + (instancetype)configurationWithAppID:(NSString *)appID
  31. APIKey:(NSString *)APIKey
  32. autoPush:(BOOL)autoPush {
  33. return [[self alloc] initWithAppID:appID APIKey:APIKey autoPush:autoPush];
  34. }
  35. - (id)copyWithZone:(NSZone *)zone {
  36. return self; // This class is immutable
  37. }
  38. @end