File tree Expand file tree Collapse file tree
Sources/EmojiPicker/Services Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121// SOFTWARE.
2222
23- import UIKit
23+ import Foundation
2424
2525/// An abstraction over entity that provides emoji set.
2626protocol EmojiManagerProtocol {
@@ -64,8 +64,11 @@ final class EmojiManager: EmojiManagerProtocol {
6464 }
6565
6666 /// Version of operating system of a device.
67+ ///
68+ /// It takes major and minor version of a device and returns it as `15.5`.
6769 private var deviceVersion : Double {
68- return ( UIDevice . current. systemVersion as NSString ) . doubleValue
70+ let operatingSystemVersion = ProcessInfo ( ) . operatingSystemVersion
71+ return Double ( operatingSystemVersion. majorVersion) + Double( operatingSystemVersion. minorVersion) / 10
6972 }
7073
7174 // MARK: - Internal Methods
You can’t perform that action at this time.
0 commit comments