1 // Copyright 2012 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef BASE_IOS_IOS_UTIL_H_ 6 #define BASE_IOS_IOS_UTIL_H_ 7 8 #include <stdint.h> 9 10 #include "base/base_export.h" 11 #include "base/files/file_path.h" 12 #include "build/ios_buildflags.h" 13 14 namespace base { 15 namespace ios { 16 17 // Returns whether the operating system is iOS 16 or later. 18 BASE_EXPORT bool IsRunningOnIOS16OrLater(); 19 20 // Returns whether the operating system is iOS 17 or later. 21 BASE_EXPORT bool IsRunningOnIOS17OrLater(); 22 23 // Returns whether the operating system is at the given version or later. 24 BASE_EXPORT bool IsRunningOnOrLater(int32_t major, 25 int32_t minor, 26 int32_t bug_fix); 27 28 // Returns whether iOS is signaling that an RTL text direction should be used 29 // regardless of the current locale. This should not return true if the current 30 // language is a "real" RTL language such as Arabic or Urdu; it should only 31 // return true in cases where the RTL text direction has been forced (for 32 // example by using the "RTL Pseudolanguage" option when launching from Xcode). 33 BASE_EXPORT bool IsInForcedRTL(); 34 35 // Stores the |path| of the ICU dat file in a global to be referenced later by 36 // FilePathOfICUFile(). This should only be called once. 37 BASE_EXPORT void OverridePathOfEmbeddedICU(const char* path); 38 39 // Returns the overriden path set by OverridePathOfEmbeddedICU(), otherwise 40 // returns invalid FilePath. 41 BASE_EXPORT FilePath FilePathOfEmbeddedICU(); 42 43 #if !BUILDFLAG(IS_IOS_APP_EXTENSION) 44 // Returns true iff multiple windows can be opened, i.e. when the multiwindow 45 // build flag is on, the device is running on iOS 13+ and it's a compatible 46 // iPad. 47 BASE_EXPORT bool IsMultipleScenesSupported(); 48 #endif 49 50 // iOS 15 introduced pre-warming, which launches and then pauses the app, to 51 // speed up actual launch time. 52 BASE_EXPORT bool IsApplicationPreWarmed(); 53 54 } // namespace ios 55 } // namespace base 56 57 #endif // BASE_IOS_IOS_UTIL_H_ 58