FIRCLSConstants.m 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // Copyright 2019 Google
  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 "Crashlytics/Shared/FIRCLSConstants.h"
  15. #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
  16. #define STR_HELPER(x) #x
  17. #define STR(x) STR_HELPER(x)
  18. NSString* const FIRCLSDeveloperToken = @"77f0789d8e230eccdb4b99b82dccd78d47f9b604";
  19. // User Messages
  20. NSString* const FIRCLSMissingConsumerKeyMsg = @"consumer key is nil or zero length";
  21. NSString* const FIRCLSMissingConsumerSecretMsg = @"consumer secret is nil or zero length";
  22. // Exceptions
  23. NSString* const FIRCLSException = @"FIRCLSException";
  24. // Endpoints
  25. NSString* const FIRCLSSettingsEndpoint = @"https://firebase-settings.crashlytics.com";
  26. NSString* const FIRCLSConfigureEndpoint = @"https://update.crashlytics.com";
  27. NSString* const FIRCLSReportsEndpoint = @"https://reports.crashlytics.com";
  28. // Network requests
  29. NSString* const FIRCLSNetworkAccept = @"Accept";
  30. NSString* const FIRCLSNetworkAcceptCharset = @"Accept-Charset";
  31. NSString* const FIRCLSNetworkApplicationJson = @"application/json";
  32. NSString* const FIRCLSNetworkAcceptLanguage = @"Accept-Language";
  33. NSString* const FIRCLSNetworkContentLanguage = @"Content-Language";
  34. NSString* const FIRCLSNetworkCrashlyticsAPIClientDisplayVersion =
  35. @"X-Crashlytics-API-Client-Display-Version";
  36. NSString* const FIRCLSNetworkCrashlyticsAPIClientId = @"X-Crashlytics-API-Client-Id";
  37. NSString* const FIRCLSNetworkCrashlyticsDeveloperToken = @"X-Crashlytics-Developer-Token";
  38. NSString* const FIRCLSNetworkCrashlyticsGoogleAppId = @"X-Crashlytics-Google-App-Id";
  39. NSString* const FIRCLSNetworkCrashlyticsOrgId = @"X-Crashlytics-Org-Id";
  40. NSString* const FIRCLSNetworkUserAgent = @"User-Agent";
  41. NSString* const FIRCLSNetworkUTF8 = @"utf-8";
  42. NSString* FIRCLSSDKGeneratorName(void) {
  43. return [NSString stringWithFormat:@"%s/%s", STR(CLS_SDK_NAME), FIRCLSSDKVersion().UTF8String];
  44. }
  45. NSString* FIRCLSSDKVersion(void) {
  46. return FIRFirebaseVersion();
  47. }