User_Agent_iOS

main

Easy to create the User Agent in your device
YogeshJethava/User_Agent_iOS

UserAgent an library written in Swift.

Platforms Swift Swift Package Manager

Features

  • DarwinVersion
  • CFNetworkVersion
  • deviceVersion
  • deviceName
  • appNameAndVersion
  • UAString

Installation

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Once you have your Swift package set up, adding User_Agent_iOS as a dependency is as easy as adding it to the dependencies value of your Package.swift or the Package list in Xcode.

dependencies: [
    .package(url: "https://github.com/YogeshJethava/User_Agent_iOS.git", .upToNextMajor(from: "1.0.0"))
]

Normally you'll want to depend on the User_Agent_iOS target:

.product(name: "UserAgent", package: "User_Agent_iOS")

Example

let darwinVersion = UserAgentManager.shared.DarwinVersion()  //eg. Darwin/16.3.0
let cfNetworkVersion = UserAgentManager.shared.CFNetworkVersion()  //eg. CFNetwork/808.3
let deviceVersion = UserAgentManager.shared.deviceVersion()  //eg. iOS/10_1
let deviceName = UserAgentManager.shared.deviceName()  //eg. iPhone/15_Pro_Max
let appNameAndVersion = UserAgentManager.shared.appNameAndVersion()  //eg. MyApp/1
let uaString = UserAgentManager.shared.UAString()  //eg.  CFNetwork/808.3 Darwin/16.3.0 (iPhone/15_Pro_Max iOS/10_1)

Description

  • Swift Tools 5.4.0
View More Packages from this Author

Dependencies

  • None
Last updated: Tue Oct 22 2024 18:11:30 GMT-0900 (Hawaii-Aleutian Daylight Time)