RCNConfigSessionConfiguration.m 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright 2025 Google LLC
  3. *
  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
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  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.
  15. */
  16. #import "FirebaseRemoteConfig/Sources/RCNConfigSessionConfiguration.h"
  17. @implementation RCNConfigSessionConfiguration
  18. + (NSURLSessionConfiguration *)remoteConfigSessionConfiguration {
  19. // Check if the current operating system version meets the criteria of the affected simulators.
  20. if (@available(iOS 18.4, tvOS 100.0, watchOS 100.0, visionOS 2.4, *)) {
  21. // If the app is running on one of the affected simulator versions (or later for iOS and
  22. // visionOS), use an ephemeral session configuration. Ephemeral sessions do not persist caches,
  23. // cookies, or credential data to disk, which circumvents the known bug.
  24. return [NSURLSessionConfiguration ephemeralSessionConfiguration];
  25. }
  26. return [NSURLSessionConfiguration defaultSessionConfiguration];
  27. }
  28. @end