├── UserAgency.png ├── UserAgencyExample ├── Assets.xcassets │ ├── Contents.json │ ├── AccentColor.colorset │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── ViewController.swift ├── AppDelegate.swift ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.storyboard ├── Info.plist └── SceneDelegate.swift ├── UserAgency.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcshareddata │ └── xcschemes │ │ └── UserAgency.xcscheme └── project.pbxproj ├── UserAgency ├── UserDevice │ ├── UserDevice.swift │ ├── iPad.swift │ ├── iPhone.swift │ ├── WindowsPC.swift │ ├── Mac.swift │ ├── AndroidPad.swift │ └── AndroidPhone.swift ├── UserApp │ ├── UserApp.swift │ ├── IE.swift │ ├── Safari.swift │ ├── Chrome.swift │ ├── Firefox.swift │ └── Edge.swift ├── UserAgency.h ├── Info.plist └── UserAgency.swift ├── .travis.yml ├── Package.swift ├── UserAgencyTests ├── Info.plist ├── UserAgencySafariTests.swift └── UserAgencyBaseTests.swift ├── LICENSE ├── .gitignore ├── README.md └── UserAgency.podspec /UserAgency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TerryHuangHD/UserAgency-iOS/HEAD/UserAgency.png -------------------------------------------------------------------------------- /UserAgencyExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /UserAgency.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UserAgencyExample/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /UserAgency/UserDevice/UserDevice.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserDevice.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/22. 6 | // 7 | 8 | import Foundation 9 | 10 | public protocol UserDevice: AnyObject { 11 | func setUserApp(_ app: UserApp?) 12 | func getResultSystemInformation() -> String 13 | } 14 | -------------------------------------------------------------------------------- /UserAgency.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: swift 2 | os: osx 3 | branches: 4 | only: 5 | - main 6 | env: 7 | global: 8 | - LANG=en_US.UTF-8 9 | - LC_ALL=en_US.UTF-8 10 | jobs: 11 | include: 12 | - stage: "Builds" 13 | script: xcodebuild -scheme UserAgency SWIFT_VERSION=5.3 clean build 14 | osx_image: xcode12 15 | name: "Swift 5.3" 16 | -------------------------------------------------------------------------------- /UserAgency/UserApp/UserApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserApp.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/22. 6 | // 7 | 8 | import Foundation 9 | 10 | public protocol UserApp: AnyObject { 11 | func setUserDevice(_ device: UserDevice?) 12 | func getResultSystemInformation() -> String 13 | func getResultPlatform() -> String 14 | } 15 | -------------------------------------------------------------------------------- /UserAgency/UserAgency.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserAgency.h 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/22. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for UserAgency. 11 | FOUNDATION_EXPORT double UserAgencyVersionNumber; 12 | 13 | //! Project version string for UserAgency. 14 | FOUNDATION_EXPORT const unsigned char UserAgencyVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | 19 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "UserAgency", 6 | platforms: [ 7 | .iOS(.v9), 8 | .macOS(.v10_15) 9 | ], 10 | products: [ 11 | .library(name: "UserAgency", targets: ["UserAgency"]) 12 | ], 13 | targets: [ 14 | .target(name: "UserAgency", dependencies: [], path: "UserAgency"), 15 | .testTarget(name: "UserAgencyTests", dependencies: ["UserAgency"], path: "UserAgencyTests") 16 | ], 17 | swiftLanguageVersions: [.v5] 18 | ) 19 | -------------------------------------------------------------------------------- /UserAgency/UserDevice/iPad.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iPad.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/24. 6 | // 7 | 8 | import Foundation 9 | 10 | public class iPad: UserDevice { 11 | weak var userApp: UserApp? 12 | 13 | var osVersion = "14_3" 14 | 15 | /* 16 | // Safari / Chrome / FireFox / Edge 17 | iPad; CPU OS {$osVersion} like Mac OS X 18 | */ 19 | 20 | public init() { 21 | } 22 | 23 | public func setUserApp(_ app: UserApp?) { 24 | userApp = app 25 | } 26 | 27 | public func getResultSystemInformation() -> String { 28 | if userApp == nil { 29 | return "" 30 | } 31 | 32 | return String(format: "iPad; CPU OS %@ like Mac OS X", 33 | arguments: [osVersion]) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /UserAgencyTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /UserAgency/UserDevice/iPhone.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iPhone.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/22. 6 | // 7 | 8 | import Foundation 9 | 10 | public class iPhone: UserDevice { 11 | weak var userApp: UserApp? 12 | 13 | var osVersion = "14_3" 14 | 15 | /* 16 | // Safari / Chrome / FireFox / Edge 17 | iPhone; CPU iPhone OS {$osVersion} like Mac OS X 18 | */ 19 | 20 | public init() { 21 | } 22 | 23 | public func setUserApp(_ app: UserApp?) { 24 | userApp = app 25 | } 26 | 27 | public func getResultSystemInformation() -> String { 28 | if userApp == nil { 29 | return "" 30 | } 31 | 32 | return String(format: "iPhone; CPU iPhone OS %@ like Mac OS X", 33 | arguments: [osVersion]) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /UserAgency/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /UserAgency/UserDevice/WindowsPC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PC.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/23. 6 | // 7 | 8 | import Foundation 9 | 10 | public class WindowsPC: UserDevice { 11 | weak var userApp: UserApp? 12 | 13 | var osVersion = "10.0" 14 | 15 | /* 16 | // Chrome / FireFox / Edge / IE 17 | Windows NT {$osVersion}; Win64; x64 18 | Windows NT {$osVersion}; WOW64 19 | Windows NT {$osVersion} 20 | */ 21 | 22 | public init() { 23 | } 24 | 25 | public func setUserApp(_ app: UserApp?) { 26 | userApp = app 27 | } 28 | 29 | public func getResultSystemInformation() -> String { 30 | if userApp == nil { 31 | return "" 32 | } 33 | 34 | return String(format: "Windows NT %@; Win64; x64", 35 | arguments: [osVersion]) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /UserAgency/UserApp/IE.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IE.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/27. 6 | // 7 | 8 | import Foundation 9 | 10 | public class IE: UserApp { 11 | weak var userDevice: UserDevice? 12 | 13 | var layoutEngine = "7.0" 14 | var softwareVersion = "11.0" 15 | 16 | /* 17 | // WindowsPC 18 | ; Trident/{$layoutEngine}; rv:{$softwareVersion} 19 | like Gecko 20 | */ 21 | 22 | public init() { 23 | } 24 | 25 | public func setUserDevice(_ device: UserDevice?) { 26 | userDevice = device 27 | } 28 | 29 | public func getResultSystemInformation() -> String { 30 | return String(format: "; Trident/%@; rv:%@", 31 | arguments: [layoutEngine, 32 | softwareVersion]) 33 | } 34 | 35 | public func getResultPlatform() -> String { 36 | if userDevice == nil { 37 | return "" 38 | } 39 | 40 | return "like Gecko" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /UserAgencyExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // UserAgencyExample 4 | // 5 | // Created by Terry Huang on 2020/12/22. 6 | // 7 | 8 | import UIKit 9 | import UserAgency 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view. 16 | 17 | print(UserAgency() 18 | .setDevice(iPhone()) 19 | .setApp(Safari()) 20 | .getString()) 21 | 22 | print(UserAgency() 23 | .setDevice(Mac()) 24 | .setApp(Firefox()) 25 | .getString()) 26 | 27 | print(UserAgency() 28 | .setDevice(WindowsPC()) 29 | .setApp(Chrome()) 30 | .getString()) 31 | 32 | print(UserAgency() 33 | .setDevice(AndroidPhone()) 34 | .setApp(Chrome()) 35 | .getString()) 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /UserAgency/UserDevice/Mac.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mac.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/23. 6 | // 7 | 8 | import Foundation 9 | 10 | public class Mac: UserDevice { 11 | weak var userApp: UserApp? 12 | 13 | var osVersion = "11.1" 14 | 15 | /* 16 | // Safari / Chrome //Edge 17 | Macintosh; Intel Mac OS X {$osVersion} 18 | FireFox 19 | Macintosh; Intel Mac OS X {$osVersion} 20 | */ 21 | 22 | public init() { 23 | } 24 | 25 | public func setUserApp(_ app: UserApp?) { 26 | userApp = app 27 | } 28 | 29 | public func getResultSystemInformation() -> String { 30 | if userApp == nil { 31 | return "" 32 | } 33 | 34 | if userApp is Firefox { 35 | return String(format: "Macintosh; Intel Mac OS X %@", 36 | arguments: [osVersion]) 37 | } 38 | 39 | return String(format: "Macintosh; Intel Mac OS X %@", 40 | arguments: [osVersion.replacingOccurrences(of: ".", with: "_")]) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /UserAgency/UserAgency.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserAgency.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/22. 6 | // 7 | 8 | import Foundation 9 | 10 | public class UserAgency { 11 | 12 | var userDevice: UserDevice? 13 | var userApp: UserApp? 14 | 15 | public init() { 16 | } 17 | 18 | public func setApp(_ app: UserApp?) -> UserAgency { 19 | userApp = app 20 | return self 21 | } 22 | 23 | public func setDevice(_ device: UserDevice?) -> UserAgency { 24 | userDevice = device 25 | return self 26 | } 27 | 28 | public func getString() -> String { 29 | if userDevice == nil { userDevice = iPhone() } 30 | if userApp == nil { userApp = Safari() } 31 | 32 | userDevice!.setUserApp(userApp) 33 | userApp!.setUserDevice(userDevice) 34 | 35 | return String(format: "Mozilla/5.0 (%@%@) %@", 36 | userDevice!.getResultSystemInformation(), 37 | userApp!.getResultSystemInformation(), 38 | userApp!.getResultPlatform()) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Terry Huang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /UserAgency/UserDevice/AndroidPad.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AndroidPad.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/24. 6 | // 7 | 8 | import Foundation 9 | 10 | public class AndroidPad: UserDevice { 11 | weak var userApp: UserApp? 12 | 13 | var osVersion = "11" 14 | 15 | /* 16 | // Chrome 17 | Linux; Android {$osVersion} 18 | Linux; Android {$osVersion}; {$deviceId} 19 | // FireFox 20 | Android {$osVersion}; Tablet; 21 | Android {$osVersion}; Tablet; {$deviceId}; 22 | // Edge 23 | Linux; Android {$osVersion} 24 | Linux; Android {$osVersion}; {$deviceId} 25 | */ 26 | 27 | public init() { 28 | } 29 | 30 | public func setUserApp(_ app: UserApp?) { 31 | userApp = app 32 | } 33 | 34 | public func getResultSystemInformation() -> String { 35 | if userApp == nil { 36 | return "" 37 | } 38 | 39 | if userApp is Firefox { 40 | return String(format: "Android %@; Tablet;", 41 | arguments: [osVersion]) 42 | } 43 | 44 | return String(format: "Linux; Android %@", 45 | arguments: [osVersion]) 46 | } 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /UserAgency/UserDevice/AndroidPhone.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AndroidPhone.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/23. 6 | // 7 | 8 | import Foundation 9 | 10 | public class AndroidPhone: UserDevice { 11 | weak var userApp: UserApp? 12 | 13 | var osVersion = "11" 14 | 15 | /* 16 | // Chrome 17 | Linux; Android {$osVersion} 18 | Linux; Android {$osVersion}; {$deviceId} 19 | // FireFox 20 | Android {$osVersion}; Mobile; 21 | Android {$osVersion}; Mobile; {$deviceId}; 22 | // Edge 23 | Linux; Android {$osVersion} 24 | Linux; Android {$osVersion}; {$deviceId} 25 | */ 26 | 27 | public init() { 28 | } 29 | 30 | public func setUserApp(_ app: UserApp?) { 31 | userApp = app 32 | } 33 | 34 | public func getResultSystemInformation() -> String { 35 | if userApp == nil { 36 | return "" 37 | } 38 | 39 | if userApp is Firefox { 40 | return String(format: "Android %@; Mobile;", 41 | arguments: [osVersion]) 42 | } 43 | 44 | return String(format: "Linux; Android %@", 45 | arguments: [osVersion]) 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /UserAgencyExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // UserAgencyExample 4 | // 5 | // Created by Terry Huang on 2020/12/22. 6 | // 7 | 8 | import UIKit 9 | 10 | @main 11 | class AppDelegate: UIResponder, UIApplicationDelegate { 12 | 13 | 14 | 15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 16 | // Override point for customization after application launch. 17 | return true 18 | } 19 | 20 | // MARK: UISceneSession Lifecycle 21 | 22 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 23 | // Called when a new scene session is being created. 24 | // Use this method to select a configuration to create the new scene with. 25 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 26 | } 27 | 28 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 29 | // Called when the user discards a scene session. 30 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 31 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 32 | } 33 | 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /UserAgencyTests/UserAgencySafariTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserAgencyChromeTests.swift 3 | // UserAgencyTests 4 | // 5 | // Created by Terry Huang on 2020/12/23. 6 | // 7 | 8 | import XCTest 9 | @testable import UserAgency 10 | 11 | class UserAgencySafariTests: XCTestCase { 12 | 13 | var agent: UserAgency? 14 | var safari: UserApp? 15 | var iphone: UserDevice? 16 | var mac: UserDevice? 17 | 18 | override func setUpWithError() throws { 19 | agent = UserAgency() 20 | safari = Safari() 21 | iphone = iPhone() 22 | mac = Mac() 23 | } 24 | 25 | override func tearDownWithError() throws { 26 | } 27 | 28 | func test_iPhone() throws { 29 | agent?.setUserDevice(iphone).setApp(safari) 30 | 31 | XCTAssertTrue(agent!.getString().contains("iPhone OS")) 32 | XCTAssertTrue(agent!.getString().contains("like Mac OS X")) 33 | XCTAssertTrue(agent!.getString().contains("AppleWebKit")) 34 | XCTAssertTrue(agent!.getString().contains("Mobile")) 35 | XCTAssertTrue(agent!.getString().contains("Safari")) 36 | } 37 | 38 | func test_Mac() throws { 39 | agent?.setUserDevice(mac).setApp(safari) 40 | 41 | XCTAssertTrue(agent!.getString().contains("Macintosh")) 42 | XCTAssertTrue(agent!.getString().contains("Mac OS X")) 43 | XCTAssertTrue(agent!.getString().contains("AppleWebKit")) 44 | XCTAssertFalse(agent!.getString().contains("Mobile")) 45 | XCTAssertTrue(agent!.getString().contains("Safari")) 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /UserAgency/UserApp/Safari.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Safari.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/22. 6 | // 7 | 8 | import Foundation 9 | 10 | public class Safari: UserApp { 11 | weak var userDevice: UserDevice? 12 | 13 | var layoutEngine = "605.1.15" 14 | var softwareVersion = "14.0" 15 | var build = "15E148" 16 | 17 | /* 18 | // iPhone / iPad 19 | AppleWebKit/{$layoutEngine} (KHTML, like Gecko) Version/{softwareVersion} Mobile/{$build} Safari/{$layoutEngine} 20 | // Mac 21 | AppleWebKit/{$layoutEngine} (KHTML, like Gecko) Version/{softwareVersion} Safari/{$layoutEngine} 22 | */ 23 | 24 | public init() { 25 | } 26 | 27 | public func setUserDevice(_ device: UserDevice?) { 28 | userDevice = device 29 | } 30 | 31 | public func getResultSystemInformation() -> String { 32 | return "" 33 | } 34 | 35 | public func getResultPlatform() -> String { 36 | if userDevice == nil { 37 | return "" 38 | } 39 | 40 | if userDevice is Mac { 41 | return String(format: "AppleWebKit/%@ (KHTML, like Gecko) Version/%@ Safari/%@", 42 | arguments: [layoutEngine, 43 | softwareVersion, 44 | layoutEngine]) 45 | } 46 | 47 | return String(format: "AppleWebKit/%@ (KHTML, like Gecko) Version/%@ Mobile/%@ Safari/%@", 48 | arguments: [layoutEngine, 49 | softwareVersion, 50 | build, 51 | layoutEngine]) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /UserAgencyExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /UserAgencyExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /UserAgencyTests/UserAgencyBaseTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserAgencyTests.swift 3 | // UserAgencyTests 4 | // 5 | // Created by Terry Huang on 2020/12/22. 6 | // 7 | 8 | import XCTest 9 | @testable import UserAgency 10 | 11 | class UserAgencyTests: XCTestCase { 12 | 13 | var defaultSetting: UserAgency? 14 | var allDevice = [UserDevice]() 15 | var allApp = [UserApp]() 16 | 17 | override func setUpWithError() throws { 18 | defaultSetting = UserAgency() 19 | 20 | allDevice = [ 21 | AndroidPhone(), 22 | AndroidPad(), 23 | iPhone(), 24 | iPad(), 25 | Mac(), 26 | WindowsPC() 27 | ] 28 | 29 | allApp = [ 30 | Chrome(), 31 | Firefox(), 32 | Safari() 33 | ] 34 | } 35 | 36 | override func tearDownWithError() throws { 37 | } 38 | 39 | func test_Default() throws { 40 | // Default: iPhone, Safari 41 | XCTAssertTrue(defaultSetting!.getString().contains("iPhone OS")) 42 | XCTAssertTrue(defaultSetting!.getString().contains("like Mac OS X")) 43 | XCTAssertTrue(defaultSetting!.getString().contains("AppleWebKit")) 44 | XCTAssertTrue(defaultSetting!.getString().contains("Mobile")) 45 | XCTAssertTrue(defaultSetting!.getString().contains("Safari")) 46 | } 47 | 48 | func test_AllDevicesNotCrash() throws { 49 | for device in allDevice { 50 | XCTAssertTrue(device.getResultSystemInformation().isEmpty) 51 | } 52 | } 53 | 54 | func test_AllAppsNotCrash() throws { 55 | for app in allApp { 56 | XCTAssertTrue(app.getResultSystemInformation().isEmpty) 57 | XCTAssertTrue(app.getResultPlatform().isEmpty) 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /UserAgencyExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /UserAgency/UserApp/Chrome.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Chrome.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/23. 6 | // 7 | 8 | import Foundation 9 | 10 | public class Chrome: UserApp { 11 | weak var userDevice: UserDevice? 12 | 13 | var layoutEngine_iOS = "605.1.15" 14 | var build_iOS = "15E148" 15 | 16 | var layoutEngine = "537.36" 17 | var softwareVersion = "87.0.4280.88" 18 | 19 | /* 20 | // iPhone / iPad 21 | AppleWebKit/{$layoutEngine_iOS} (KHTML, like Gecko) CriOS/{$softwareVersion} Mobile/{$build_iOS} Safari/{$layoutEngine_iOS} 22 | // Android Phone / Tablet 23 | AppleWebKit/{$layoutEngine} (KHTML, like Gecko) Chrome/{$softwareVersion} Mobile Safari/{$layoutEngine} 24 | // Mac / WindowsPC 25 | AppleWebKit/{$layoutEngine} (KHTML, like Gecko) Chrome/{$softwareVersion} Safari/{$layoutEngine} 26 | */ 27 | 28 | public init() { 29 | } 30 | 31 | public func setUserDevice(_ device: UserDevice?) { 32 | userDevice = device 33 | } 34 | 35 | public func getResultSystemInformation() -> String { 36 | return "" 37 | } 38 | 39 | public func getResultPlatform() -> String { 40 | if userDevice == nil { 41 | return "" 42 | } 43 | 44 | if userDevice is iPhone 45 | || userDevice is iPad { 46 | return String(format: "AppleWebKit/%@ (KHTML, like Gecko) CriOS/%@ Mobile/%@ Safari/%@", 47 | arguments: [layoutEngine_iOS, 48 | softwareVersion, 49 | build_iOS, 50 | layoutEngine_iOS]) 51 | } 52 | 53 | if userDevice is Mac 54 | || userDevice is WindowsPC { 55 | return String(format: "AppleWebKit/%@ (KHTML, like Gecko) Chrome/%@ Safari/%@", 56 | arguments: [layoutEngine, 57 | softwareVersion, 58 | layoutEngine]) 59 | } 60 | 61 | return String(format: "AppleWebKit/%@ (KHTML, like Gecko) Chrome/%@ Mobile Safari/%@", 62 | arguments: [layoutEngine, 63 | softwareVersion, 64 | layoutEngine]) 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /UserAgencyExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | UISceneStoryboardFile 37 | Main 38 | 39 | 40 | 41 | 42 | UIApplicationSupportsIndirectInputEvents 43 | 44 | UILaunchStoryboardName 45 | LaunchScreen 46 | UIMainStoryboardFile 47 | Main 48 | UIRequiredDeviceCapabilities 49 | 50 | armv7 51 | 52 | UISupportedInterfaceOrientations 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationLandscapeLeft 56 | UIInterfaceOrientationLandscapeRight 57 | 58 | UISupportedInterfaceOrientations~ipad 59 | 60 | UIInterfaceOrientationPortrait 61 | UIInterfaceOrientationPortraitUpsideDown 62 | UIInterfaceOrientationLandscapeLeft 63 | UIInterfaceOrientationLandscapeRight 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /UserAgencyExample/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // UserAgencyExample 4 | // 5 | // Created by Terry Huang on 2020/12/22. 6 | // 7 | 8 | import UIKit 9 | 10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 11 | 12 | var window: UIWindow? 13 | 14 | 15 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 16 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 17 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 18 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 19 | guard let _ = (scene as? UIWindowScene) else { return } 20 | } 21 | 22 | func sceneDidDisconnect(_ scene: UIScene) { 23 | // Called as the scene is being released by the system. 24 | // This occurs shortly after the scene enters the background, or when its session is discarded. 25 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 26 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). 27 | } 28 | 29 | func sceneDidBecomeActive(_ scene: UIScene) { 30 | // Called when the scene has moved from an inactive state to an active state. 31 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 32 | } 33 | 34 | func sceneWillResignActive(_ scene: UIScene) { 35 | // Called when the scene will move from an active state to an inactive state. 36 | // This may occur due to temporary interruptions (ex. an incoming phone call). 37 | } 38 | 39 | func sceneWillEnterForeground(_ scene: UIScene) { 40 | // Called as the scene transitions from the background to the foreground. 41 | // Use this method to undo the changes made on entering the background. 42 | } 43 | 44 | func sceneDidEnterBackground(_ scene: UIScene) { 45 | // Called as the scene transitions from the foreground to the background. 46 | // Use this method to save data, release shared resources, and store enough scene-specific state information 47 | // to restore the scene back to its current state. 48 | } 49 | 50 | 51 | } 52 | 53 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | # .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | 92 | -------------------------------------------------------------------------------- /UserAgency/UserApp/Firefox.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Firefox.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/23. 6 | // 7 | 8 | import Foundation 9 | 10 | public class Firefox: UserApp { 11 | weak var userDevice: UserDevice? 12 | 13 | var layoutEngine_iOS = "605.1.15" 14 | var softwareVersion_iOS = "29.0" 15 | var build_iOS = "15E148" 16 | 17 | var softwareVersion = "84.0" 18 | var geckoVersion_PC_Mac = "20100101" 19 | 20 | /* 21 | // iPhone / iPad 22 | AppleWebKit/{$layoutEngine_iOS} (KHTML, like Gecko) FxiOS/{$softwareVersion_iOS} Mobile/{$build_iOS} Safari/{$layoutEngine_iOS} 23 | // Android Phone / Tablet 24 | ; rv:{$softwareVersion} 25 | Gecko/{$softwareVersion} Firefox/{$softwareVersion} 26 | // Mac / WindowsPC 27 | ; rv:{$softwareVersion} 28 | Gecko/{$geckoVersion_PC_Mac} Firefox/{$softwareVersion} 29 | */ 30 | 31 | public init() { 32 | } 33 | 34 | public func setUserDevice(_ device: UserDevice?) { 35 | userDevice = device 36 | } 37 | 38 | public func getResultSystemInformation() -> String { 39 | if userDevice == nil { 40 | return "" 41 | } 42 | 43 | if userDevice is AndroidPhone 44 | || userDevice is AndroidPad 45 | || userDevice is Mac 46 | || userDevice is WindowsPC { 47 | return String(format: "; rv:%@", 48 | arguments: [softwareVersion]) 49 | } 50 | 51 | return "" 52 | } 53 | 54 | public func getResultPlatform() -> String { 55 | if userDevice == nil { 56 | return "" 57 | } 58 | 59 | if userDevice is iPhone 60 | || userDevice is iPad { 61 | return String(format: "AppleWebKit/%@ (KHTML, like Gecko) FxiOS/%@ Mobile/%@ Safari/%@", 62 | arguments: [layoutEngine_iOS, 63 | softwareVersion_iOS, 64 | build_iOS, 65 | layoutEngine_iOS]) 66 | } 67 | 68 | if userDevice is Mac 69 | || userDevice is WindowsPC { 70 | return String(format: "Gecko/%@ Firefox/%@", 71 | arguments: [geckoVersion_PC_Mac, 72 | softwareVersion]) 73 | 74 | } 75 | 76 | 77 | return String(format: "Gecko/%@ Firefox/%@", 78 | arguments: [softwareVersion, 79 | softwareVersion]) 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /UserAgency/UserApp/Edge.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Edge.swift 3 | // UserAgency 4 | // 5 | // Created by Terry Huang on 2020/12/27. 6 | // 7 | 8 | import Foundation 9 | 10 | public class Edge: UserApp { 11 | weak var userDevice: UserDevice? 12 | 13 | var layoutEngine_iOS = "605.1.15" 14 | var version_iOS = "14.0" 15 | var build_iOS = "15E148" 16 | 17 | var softwareVersion_Chrome = "87.0.4280.101" 18 | 19 | var layoutEngine = "537.36" 20 | var softwareVersion = "45.12.24.5121" 21 | 22 | /* 23 | // iPhone / iPad 24 | AppleWebKit/{$layoutEngine_iOS} (KHTML, like Gecko) Version/{$version_iOS} EdgiOS/{$softwareVersion} Mobile/{$build_iOS} Safari/{$layoutEngine_iOS} 25 | // Android Phone / Tablet 26 | AppleWebKit/{$layoutEngine} (KHTML, like Gecko) Chrome/{$softwareVersion_Chrome} Mobile Safari/{$layoutEngine_iOS} EdgA/{$softwareVersion} 27 | // Mac / WindowsPC 28 | AppleWebKit/{$layoutEngine} (KHTML, like Gecko) Chrome/{$softwareVersion_Chrome} Safari/{$layoutEngine} Edg/{$softwareVersion_Chrome} 29 | */ 30 | 31 | public init() { 32 | } 33 | 34 | public func setUserDevice(_ device: UserDevice?) { 35 | userDevice = device 36 | } 37 | 38 | public func getResultSystemInformation() -> String { 39 | return "" 40 | } 41 | 42 | public func getResultPlatform() -> String { 43 | if userDevice == nil { 44 | return "" 45 | } 46 | 47 | if userDevice is iPhone 48 | || userDevice is iPad { 49 | return String(format: "AppleWebKit/%@ (KHTML, like Gecko) Version/%@ EdgiOS/%@ Mobile/%@ Safari/%@", 50 | arguments: [layoutEngine_iOS, 51 | version_iOS, 52 | softwareVersion, 53 | build_iOS, 54 | layoutEngine_iOS]) 55 | } 56 | 57 | if userDevice is Mac 58 | || userDevice is WindowsPC { 59 | return String(format: "AppleWebKit/%@ (KHTML, like Gecko) Chrome/%@ Safari/%@ Edg/%@", 60 | arguments: [layoutEngine, 61 | softwareVersion_Chrome, 62 | layoutEngine, 63 | softwareVersion_Chrome]) 64 | } 65 | 66 | return String(format: "AppleWebKit/%@ (KHTML, like Gecko) Chrome/%@ Mobile Safari/%@ EdgA/%@", 67 | arguments: [layoutEngine, 68 | softwareVersion_Chrome, 69 | layoutEngine_iOS, 70 | softwareVersion]) 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /UserAgency.xcodeproj/xcshareddata/xcschemes/UserAgency.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 54 | 55 | 61 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![UserAgency: User-Agent generator in Swift](https://raw.githubusercontent.com/TerryHuangHD/UserAgency-iOS/master/UserAgency.png) 2 | 3 | [![Build Status](https://travis-ci.com/TerryHuangHD/UserAgency-iOS.svg?branch=main)](https://travis-ci.com/TerryHuangHD/UserAgency-iOS) 4 | [![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg)](https://swift.org/package-manager/) 5 | [![Cocoapos](https://cocoapod-badges.herokuapp.com/v/UserAgency/badge.png)](https://cocoapods.org/pods/UserAgency) 6 | [![Cocoapos](https://cocoapod-badges.herokuapp.com/p/UserAgency/badge.png)](https://cocoapods.org/pods/UserAgency) 7 | [![GitHub license](https://img.shields.io/github/license/TerryHuangHD/UserAgency-iOS)](https://github.com/TerryHuangHD/UserAgency-iOS/blob/main/LICENSE) 8 | 9 | UserAgency is an iOS/macOS User-Agent generator library written in swift. Provides story-oriented usage, and comprehensive way to mock real life data. 10 | 11 | # Install 12 | 13 | ### CocoaPods 14 | 15 | Add it in your Podfile 16 | 17 | ```gradle 18 | pod 'UserAgency', '~> 0.5' 19 | ``` 20 | 21 | ### Swift Package Manager 22 | 23 | ```SPM 24 | let package = Package( 25 | dependencies: [ 26 | .package(url: "https://github.com/TerryHuangHD/UserAgency-iOS.git", from: "0.5") 27 | ], 28 | ) 29 | ``` 30 | 31 | ### Download Framework 32 | 33 | Download framework file from [releases page](https://github.com/TerryHuangHD/UserAgency-iOS/releases) 34 | 35 | * iOS Version (Any iOS Device: arm64, armv7) 36 | * Mac Version (Any Mac: Apple Silicon, Intel) 37 | 38 | # Requirements 39 | 40 | * iOS: 9 41 | * macOS: 10.15 42 | 43 | # Usage 44 | 45 | * iPhone & Safari: 46 | 47 | ```swift 48 | import UserAgency 49 | ``` 50 | 51 | ```swift 52 | UserAgency() 53 | .setDevice(iPhone()) 54 | .setApp(Safari()) 55 | .getString() 56 | ``` 57 | 58 | # Support 59 | Device | OS | Chrome | Safari | Firefox | Edge | IE 60 | ----- | ----- | ----- | ----- | ----- | ----- | ----- 61 | AndroidPhone | Android | ✅ | ❌ | ✅ | ✅ | ❌ 62 | AndroidPad | Android | ✅ | ❌ | ✅ | ✅ | ❌ 63 | iPhone | iOS | ✅ | ✅ | ✅ | ✅ | ❌ 64 | iPad | iOS | ✅ | ✅ | ✅ | ✅ | ❌ 65 | Mac | macOS | ✅ | ✅ | ✅ | ✅ | ❌ 66 | WindowsPC | Windows | ✅ | ❌ | ✅ | ✅ | ✅ 67 | 68 | MIT License 69 | -------- 70 | 71 | Copyright (c) 2020 Terry Huang 72 | 73 | Permission is hereby granted, free of charge, to any person obtaining a copy 74 | of this software and associated documentation files (the "Software"), to deal 75 | in the Software without restriction, including without limitation the rights 76 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 77 | copies of the Software, and to permit persons to whom the Software is 78 | furnished to do so, subject to the following conditions: 79 | 80 | The above copyright notice and this permission notice shall be included in all 81 | copies or substantial portions of the Software. 82 | 83 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 84 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 85 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 86 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 87 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 88 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 89 | SOFTWARE. 90 | -------------------------------------------------------------------------------- /UserAgency.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint UserAgency.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see https://guides.cocoapods.org/syntax/podspec.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |spec| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | spec.name = "UserAgency" 19 | spec.version = "0.5" 20 | spec.summary = "User-Agent generator library written in swift" 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | spec.description = <<-DESC 28 | UserAgency is an iOS/macOS User-Agent generator library written in swift. Provides story-oriented usage, and comprehensive way to mock real life data. 29 | DESC 30 | 31 | spec.homepage = "https://github.com/TerryHuangHD/UserAgency-iOS" 32 | # spec.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 33 | 34 | 35 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 36 | # 37 | # Licensing your code is important. See https://choosealicense.com for more info. 38 | # CocoaPods will detect a license file if there is a named LICENSE* 39 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 40 | # 41 | 42 | spec.license = { :type => "MIT", :file => "LICENSE" } 43 | # spec.license = { :type => "MIT", :file => "FILE_LICENSE" } 44 | 45 | 46 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 47 | # 48 | # Specify the authors of the library, with email addresses. Email addresses 49 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 50 | # accepts just a name if you'd rather not provide an email address. 51 | # 52 | # Specify a social_media_url where others can refer to, for example a twitter 53 | # profile URL. 54 | # 55 | 56 | spec.author = { "Terry Huang" => "TerryHuangHD@gmail.com" } 57 | # Or just: spec.author = "test" 58 | # spec.authors = { "test" => "test@test.test" } 59 | # spec.social_media_url = "https://twitter.com/test" 60 | 61 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 62 | # 63 | # If this Pod runs only on iOS or OS X, then specify the platform and 64 | # the deployment target. You can optionally include the target after the platform. 65 | # 66 | 67 | # spec.platform = :ios 68 | # spec.platform = :ios, "5.0" 69 | 70 | spec.ios.deployment_target = "9.0" 71 | spec.osx.deployment_target = "10.15" 72 | spec.swift_versions = ['5.1', '5.2', '5.3'] 73 | 74 | # When using multiple platforms 75 | # spec.ios.deployment_target = "5.0" 76 | # spec.osx.deployment_target = "10.7" 77 | # spec.watchos.deployment_target = "2.0" 78 | # spec.tvos.deployment_target = "9.0" 79 | 80 | 81 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 82 | # 83 | # Specify the location from where the source should be retrieved. 84 | # Supports git, hg, bzr, svn and HTTP. 85 | # 86 | 87 | spec.source = { :git => "https://github.com/TerryHuangHD/UserAgency-iOS.git", :tag => "#{spec.version}" } 88 | 89 | 90 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 91 | # 92 | # CocoaPods is smart about how it includes source code. For source files 93 | # giving a folder will include any swift, h, m, mm, c & cpp files. 94 | # For header files it will include any header in the folder. 95 | # Not including the public_header_files will make all headers public. 96 | # 97 | 98 | spec.source_files = "UserAgency/**/*.{h,m,swift}" 99 | # spec.source_files = "Classes", "Classes/**/*.{h,m}" 100 | # spec.exclude_files = "Classes/Exclude" 101 | 102 | # spec.public_header_files = "Classes/**/*.h" 103 | 104 | 105 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 106 | # 107 | # A list of resources included with the Pod. These are copied into the 108 | # target bundle with a build phase script. Anything else will be cleaned. 109 | # You can preserve files from being cleaned, please don't preserve 110 | # non-essential files like tests, examples and documentation. 111 | # 112 | 113 | # spec.resource = "icon.png" 114 | # spec.resources = "Resources/*.png" 115 | 116 | # spec.preserve_paths = "FilesToSave", "MoreFilesToSave" 117 | 118 | 119 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 120 | # 121 | # Link your library with frameworks, or libraries. Libraries do not include 122 | # the lib prefix of their name. 123 | # 124 | 125 | # spec.framework = "SomeFramework" 126 | # spec.frameworks = "SomeFramework", "AnotherFramework" 127 | 128 | # spec.library = "iconv" 129 | # spec.libraries = "iconv", "xml2" 130 | 131 | 132 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 133 | # 134 | # If your library depends on compiler flags you can set them in the xcconfig hash 135 | # where they will only apply to your library. If you depend on other Podspecs 136 | # you can include multiple dependencies to ensure it works. 137 | 138 | # spec.requires_arc = true 139 | 140 | # spec.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 141 | # spec.dependency "JSONKit", "~> 1.4" 142 | 143 | end 144 | -------------------------------------------------------------------------------- /UserAgency.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | D8250FE5259335ED00B88649 /* Mac.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8250FE4259335ED00B88649 /* Mac.swift */; }; 11 | D8250FE9259335FC00B88649 /* WindowsPC.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8250FE8259335FC00B88649 /* WindowsPC.swift */; }; 12 | D8250FED2593360B00B88649 /* AndroidPhone.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8250FEC2593360B00B88649 /* AndroidPhone.swift */; }; 13 | D8250FF1259336C600B88649 /* Chrome.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8250FF0259336C600B88649 /* Chrome.swift */; }; 14 | D8250FF5259336DD00B88649 /* Firefox.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8250FF4259336DD00B88649 /* Firefox.swift */; }; 15 | D85BFE512594912C0051F637 /* AndroidPad.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85BFE502594912C0051F637 /* AndroidPad.swift */; }; 16 | D85BFE55259491680051F637 /* iPad.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85BFE54259491680051F637 /* iPad.swift */; }; 17 | D86742392597EB2000E0B65E /* Edge.swift in Sources */ = {isa = PBXBuildFile; fileRef = D86742382597EB2000E0B65E /* Edge.swift */; }; 18 | D867423D2597EC5D00E0B65E /* IE.swift in Sources */ = {isa = PBXBuildFile; fileRef = D867423C2597EC5D00E0B65E /* IE.swift */; }; 19 | D899BEBA2591DA4C004390B1 /* UserAgency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D899BEB02591DA4C004390B1 /* UserAgency.framework */; }; 20 | D899BEBF2591DA4C004390B1 /* UserAgencyBaseTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D899BEBE2591DA4C004390B1 /* UserAgencyBaseTests.swift */; }; 21 | D899BEC12591DA4C004390B1 /* UserAgency.h in Headers */ = {isa = PBXBuildFile; fileRef = D899BEB32591DA4C004390B1 /* UserAgency.h */; settings = {ATTRIBUTES = (Public, ); }; }; 22 | D899BED32591DB2B004390B1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D899BED22591DB2B004390B1 /* AppDelegate.swift */; }; 23 | D899BED52591DB2B004390B1 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D899BED42591DB2B004390B1 /* SceneDelegate.swift */; }; 24 | D899BED72591DB2B004390B1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D899BED62591DB2B004390B1 /* ViewController.swift */; }; 25 | D899BEDA2591DB2B004390B1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D899BED82591DB2B004390B1 /* Main.storyboard */; }; 26 | D899BEDC2591DB2D004390B1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D899BEDB2591DB2D004390B1 /* Assets.xcassets */; }; 27 | D899BEDF2591DB2D004390B1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D899BEDD2591DB2D004390B1 /* LaunchScreen.storyboard */; }; 28 | D899CA99259341A40033DC9F /* UserAgencySafariTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D899CA98259341A40033DC9F /* UserAgencySafariTests.swift */; }; 29 | D8F0C4272591E67A005088E5 /* UserAgency.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F0C4262591E67A005088E5 /* UserAgency.swift */; }; 30 | D8F0C42C2591EDD0005088E5 /* UserAgency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D899BEB02591DA4C004390B1 /* UserAgency.framework */; }; 31 | D8F0C42D2591EDD0005088E5 /* UserAgency.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D899BEB02591DA4C004390B1 /* UserAgency.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 32 | D8F0C4382591F0E7005088E5 /* UserDevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F0C4372591F0E7005088E5 /* UserDevice.swift */; }; 33 | D8F0C43C2591F12D005088E5 /* UserApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F0C43B2591F12D005088E5 /* UserApp.swift */; }; 34 | D8F0C4402591F1FB005088E5 /* iPhone.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F0C43F2591F1FB005088E5 /* iPhone.swift */; }; 35 | D8F0C4442591F5FC005088E5 /* Safari.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F0C4432591F5FC005088E5 /* Safari.swift */; }; 36 | /* End PBXBuildFile section */ 37 | 38 | /* Begin PBXContainerItemProxy section */ 39 | D899BEBB2591DA4C004390B1 /* PBXContainerItemProxy */ = { 40 | isa = PBXContainerItemProxy; 41 | containerPortal = D899BEA72591DA4C004390B1 /* Project object */; 42 | proxyType = 1; 43 | remoteGlobalIDString = D899BEAF2591DA4C004390B1; 44 | remoteInfo = UserAgency; 45 | }; 46 | D8F0C42E2591EDD0005088E5 /* PBXContainerItemProxy */ = { 47 | isa = PBXContainerItemProxy; 48 | containerPortal = D899BEA72591DA4C004390B1 /* Project object */; 49 | proxyType = 1; 50 | remoteGlobalIDString = D899BEAF2591DA4C004390B1; 51 | remoteInfo = UserAgency; 52 | }; 53 | /* End PBXContainerItemProxy section */ 54 | 55 | /* Begin PBXCopyFilesBuildPhase section */ 56 | D8F0C4302591EDD0005088E5 /* Embed Frameworks */ = { 57 | isa = PBXCopyFilesBuildPhase; 58 | buildActionMask = 2147483647; 59 | dstPath = ""; 60 | dstSubfolderSpec = 10; 61 | files = ( 62 | D8F0C42D2591EDD0005088E5 /* UserAgency.framework in Embed Frameworks */, 63 | ); 64 | name = "Embed Frameworks"; 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | /* End PBXCopyFilesBuildPhase section */ 68 | 69 | /* Begin PBXFileReference section */ 70 | D8250FE4259335ED00B88649 /* Mac.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Mac.swift; sourceTree = ""; }; 71 | D8250FE8259335FC00B88649 /* WindowsPC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowsPC.swift; sourceTree = ""; }; 72 | D8250FEC2593360B00B88649 /* AndroidPhone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AndroidPhone.swift; sourceTree = ""; }; 73 | D8250FF0259336C600B88649 /* Chrome.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Chrome.swift; sourceTree = ""; }; 74 | D8250FF4259336DD00B88649 /* Firefox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Firefox.swift; sourceTree = ""; }; 75 | D85BFE502594912C0051F637 /* AndroidPad.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AndroidPad.swift; sourceTree = ""; }; 76 | D85BFE54259491680051F637 /* iPad.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iPad.swift; sourceTree = ""; }; 77 | D86742382597EB2000E0B65E /* Edge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Edge.swift; sourceTree = ""; }; 78 | D867423C2597EC5D00E0B65E /* IE.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IE.swift; sourceTree = ""; }; 79 | D899BEB02591DA4C004390B1 /* UserAgency.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UserAgency.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 80 | D899BEB32591DA4C004390B1 /* UserAgency.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserAgency.h; sourceTree = ""; }; 81 | D899BEB42591DA4C004390B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 82 | D899BEB92591DA4C004390B1 /* UserAgencyTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UserAgencyTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | D899BEBE2591DA4C004390B1 /* UserAgencyBaseTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAgencyBaseTests.swift; sourceTree = ""; }; 84 | D899BEC02591DA4C004390B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 85 | D899BED02591DB2B004390B1 /* UserAgencyExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UserAgencyExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 86 | D899BED22591DB2B004390B1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 87 | D899BED42591DB2B004390B1 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 88 | D899BED62591DB2B004390B1 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 89 | D899BED92591DB2B004390B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 90 | D899BEDB2591DB2D004390B1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 91 | D899BEDE2591DB2D004390B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 92 | D899BEE02591DB2D004390B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 93 | D899CA98259341A40033DC9F /* UserAgencySafariTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAgencySafariTests.swift; sourceTree = ""; }; 94 | D8F0C4262591E67A005088E5 /* UserAgency.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAgency.swift; sourceTree = ""; }; 95 | D8F0C4372591F0E7005088E5 /* UserDevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDevice.swift; sourceTree = ""; }; 96 | D8F0C43B2591F12D005088E5 /* UserApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserApp.swift; sourceTree = ""; }; 97 | D8F0C43F2591F1FB005088E5 /* iPhone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iPhone.swift; sourceTree = ""; }; 98 | D8F0C4432591F5FC005088E5 /* Safari.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Safari.swift; sourceTree = ""; }; 99 | /* End PBXFileReference section */ 100 | 101 | /* Begin PBXFrameworksBuildPhase section */ 102 | D899BEAD2591DA4C004390B1 /* Frameworks */ = { 103 | isa = PBXFrameworksBuildPhase; 104 | buildActionMask = 2147483647; 105 | files = ( 106 | ); 107 | runOnlyForDeploymentPostprocessing = 0; 108 | }; 109 | D899BEB62591DA4C004390B1 /* Frameworks */ = { 110 | isa = PBXFrameworksBuildPhase; 111 | buildActionMask = 2147483647; 112 | files = ( 113 | D899BEBA2591DA4C004390B1 /* UserAgency.framework in Frameworks */, 114 | ); 115 | runOnlyForDeploymentPostprocessing = 0; 116 | }; 117 | D899BECD2591DB2B004390B1 /* Frameworks */ = { 118 | isa = PBXFrameworksBuildPhase; 119 | buildActionMask = 2147483647; 120 | files = ( 121 | D8F0C42C2591EDD0005088E5 /* UserAgency.framework in Frameworks */, 122 | ); 123 | runOnlyForDeploymentPostprocessing = 0; 124 | }; 125 | /* End PBXFrameworksBuildPhase section */ 126 | 127 | /* Begin PBXGroup section */ 128 | D899BEA62591DA4C004390B1 = { 129 | isa = PBXGroup; 130 | children = ( 131 | D899BEB22591DA4C004390B1 /* UserAgency */, 132 | D899BEBD2591DA4C004390B1 /* UserAgencyTests */, 133 | D899BED12591DB2B004390B1 /* UserAgencyExample */, 134 | D899BEB12591DA4C004390B1 /* Products */, 135 | D8F0C42B2591EDD0005088E5 /* Frameworks */, 136 | ); 137 | sourceTree = ""; 138 | }; 139 | D899BEB12591DA4C004390B1 /* Products */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | D899BEB02591DA4C004390B1 /* UserAgency.framework */, 143 | D899BEB92591DA4C004390B1 /* UserAgencyTests.xctest */, 144 | D899BED02591DB2B004390B1 /* UserAgencyExample.app */, 145 | ); 146 | name = Products; 147 | sourceTree = ""; 148 | }; 149 | D899BEB22591DA4C004390B1 /* UserAgency */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | D899BEB32591DA4C004390B1 /* UserAgency.h */, 153 | D899BEB42591DA4C004390B1 /* Info.plist */, 154 | D8F0C4262591E67A005088E5 /* UserAgency.swift */, 155 | D8F0C4332591EE67005088E5 /* UserDevice */, 156 | D8F0C4342591EE74005088E5 /* UserApp */, 157 | ); 158 | path = UserAgency; 159 | sourceTree = ""; 160 | }; 161 | D899BEBD2591DA4C004390B1 /* UserAgencyTests */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | D899BEBE2591DA4C004390B1 /* UserAgencyBaseTests.swift */, 165 | D899CA98259341A40033DC9F /* UserAgencySafariTests.swift */, 166 | D899BEC02591DA4C004390B1 /* Info.plist */, 167 | ); 168 | path = UserAgencyTests; 169 | sourceTree = ""; 170 | }; 171 | D899BED12591DB2B004390B1 /* UserAgencyExample */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | D899BED22591DB2B004390B1 /* AppDelegate.swift */, 175 | D899BED42591DB2B004390B1 /* SceneDelegate.swift */, 176 | D899BED62591DB2B004390B1 /* ViewController.swift */, 177 | D899BED82591DB2B004390B1 /* Main.storyboard */, 178 | D899BEDB2591DB2D004390B1 /* Assets.xcassets */, 179 | D899BEDD2591DB2D004390B1 /* LaunchScreen.storyboard */, 180 | D899BEE02591DB2D004390B1 /* Info.plist */, 181 | ); 182 | path = UserAgencyExample; 183 | sourceTree = ""; 184 | }; 185 | D8F0C42B2591EDD0005088E5 /* Frameworks */ = { 186 | isa = PBXGroup; 187 | children = ( 188 | ); 189 | name = Frameworks; 190 | sourceTree = ""; 191 | }; 192 | D8F0C4332591EE67005088E5 /* UserDevice */ = { 193 | isa = PBXGroup; 194 | children = ( 195 | D8F0C4372591F0E7005088E5 /* UserDevice.swift */, 196 | D8250FEC2593360B00B88649 /* AndroidPhone.swift */, 197 | D85BFE502594912C0051F637 /* AndroidPad.swift */, 198 | D8F0C43F2591F1FB005088E5 /* iPhone.swift */, 199 | D85BFE54259491680051F637 /* iPad.swift */, 200 | D8250FE4259335ED00B88649 /* Mac.swift */, 201 | D8250FE8259335FC00B88649 /* WindowsPC.swift */, 202 | ); 203 | path = UserDevice; 204 | sourceTree = ""; 205 | }; 206 | D8F0C4342591EE74005088E5 /* UserApp */ = { 207 | isa = PBXGroup; 208 | children = ( 209 | D8F0C43B2591F12D005088E5 /* UserApp.swift */, 210 | D8250FF0259336C600B88649 /* Chrome.swift */, 211 | D8250FF4259336DD00B88649 /* Firefox.swift */, 212 | D8F0C4432591F5FC005088E5 /* Safari.swift */, 213 | D86742382597EB2000E0B65E /* Edge.swift */, 214 | D867423C2597EC5D00E0B65E /* IE.swift */, 215 | ); 216 | path = UserApp; 217 | sourceTree = ""; 218 | }; 219 | /* End PBXGroup section */ 220 | 221 | /* Begin PBXHeadersBuildPhase section */ 222 | D899BEAB2591DA4C004390B1 /* Headers */ = { 223 | isa = PBXHeadersBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | D899BEC12591DA4C004390B1 /* UserAgency.h in Headers */, 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | }; 230 | /* End PBXHeadersBuildPhase section */ 231 | 232 | /* Begin PBXNativeTarget section */ 233 | D899BEAF2591DA4C004390B1 /* UserAgency */ = { 234 | isa = PBXNativeTarget; 235 | buildConfigurationList = D899BEC42591DA4C004390B1 /* Build configuration list for PBXNativeTarget "UserAgency" */; 236 | buildPhases = ( 237 | D899BEAB2591DA4C004390B1 /* Headers */, 238 | D899BEAC2591DA4C004390B1 /* Sources */, 239 | D899BEAD2591DA4C004390B1 /* Frameworks */, 240 | D899BEAE2591DA4C004390B1 /* Resources */, 241 | ); 242 | buildRules = ( 243 | ); 244 | dependencies = ( 245 | ); 246 | name = UserAgency; 247 | productName = UserAgency; 248 | productReference = D899BEB02591DA4C004390B1 /* UserAgency.framework */; 249 | productType = "com.apple.product-type.framework"; 250 | }; 251 | D899BEB82591DA4C004390B1 /* UserAgencyTests */ = { 252 | isa = PBXNativeTarget; 253 | buildConfigurationList = D899BEC72591DA4C004390B1 /* Build configuration list for PBXNativeTarget "UserAgencyTests" */; 254 | buildPhases = ( 255 | D899BEB52591DA4C004390B1 /* Sources */, 256 | D899BEB62591DA4C004390B1 /* Frameworks */, 257 | D899BEB72591DA4C004390B1 /* Resources */, 258 | ); 259 | buildRules = ( 260 | ); 261 | dependencies = ( 262 | D899BEBC2591DA4C004390B1 /* PBXTargetDependency */, 263 | ); 264 | name = UserAgencyTests; 265 | productName = UserAgencyTests; 266 | productReference = D899BEB92591DA4C004390B1 /* UserAgencyTests.xctest */; 267 | productType = "com.apple.product-type.bundle.unit-test"; 268 | }; 269 | D899BECF2591DB2B004390B1 /* UserAgencyExample */ = { 270 | isa = PBXNativeTarget; 271 | buildConfigurationList = D899BEE12591DB2D004390B1 /* Build configuration list for PBXNativeTarget "UserAgencyExample" */; 272 | buildPhases = ( 273 | D899BECC2591DB2B004390B1 /* Sources */, 274 | D899BECD2591DB2B004390B1 /* Frameworks */, 275 | D899BECE2591DB2B004390B1 /* Resources */, 276 | D8F0C4302591EDD0005088E5 /* Embed Frameworks */, 277 | ); 278 | buildRules = ( 279 | ); 280 | dependencies = ( 281 | D8F0C42F2591EDD0005088E5 /* PBXTargetDependency */, 282 | ); 283 | name = UserAgencyExample; 284 | productName = UserAgencyExample; 285 | productReference = D899BED02591DB2B004390B1 /* UserAgencyExample.app */; 286 | productType = "com.apple.product-type.application"; 287 | }; 288 | /* End PBXNativeTarget section */ 289 | 290 | /* Begin PBXProject section */ 291 | D899BEA72591DA4C004390B1 /* Project object */ = { 292 | isa = PBXProject; 293 | attributes = { 294 | LastSwiftUpdateCheck = 1230; 295 | LastUpgradeCheck = 1230; 296 | TargetAttributes = { 297 | D899BEAF2591DA4C004390B1 = { 298 | CreatedOnToolsVersion = 12.3; 299 | LastSwiftMigration = 1230; 300 | }; 301 | D899BEB82591DA4C004390B1 = { 302 | CreatedOnToolsVersion = 12.3; 303 | }; 304 | D899BECF2591DB2B004390B1 = { 305 | CreatedOnToolsVersion = 12.3; 306 | }; 307 | }; 308 | }; 309 | buildConfigurationList = D899BEAA2591DA4C004390B1 /* Build configuration list for PBXProject "UserAgency" */; 310 | compatibilityVersion = "Xcode 9.3"; 311 | developmentRegion = en; 312 | hasScannedForEncodings = 0; 313 | knownRegions = ( 314 | en, 315 | Base, 316 | ); 317 | mainGroup = D899BEA62591DA4C004390B1; 318 | productRefGroup = D899BEB12591DA4C004390B1 /* Products */; 319 | projectDirPath = ""; 320 | projectRoot = ""; 321 | targets = ( 322 | D899BEAF2591DA4C004390B1 /* UserAgency */, 323 | D899BEB82591DA4C004390B1 /* UserAgencyTests */, 324 | D899BECF2591DB2B004390B1 /* UserAgencyExample */, 325 | ); 326 | }; 327 | /* End PBXProject section */ 328 | 329 | /* Begin PBXResourcesBuildPhase section */ 330 | D899BEAE2591DA4C004390B1 /* Resources */ = { 331 | isa = PBXResourcesBuildPhase; 332 | buildActionMask = 2147483647; 333 | files = ( 334 | ); 335 | runOnlyForDeploymentPostprocessing = 0; 336 | }; 337 | D899BEB72591DA4C004390B1 /* Resources */ = { 338 | isa = PBXResourcesBuildPhase; 339 | buildActionMask = 2147483647; 340 | files = ( 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | }; 344 | D899BECE2591DB2B004390B1 /* Resources */ = { 345 | isa = PBXResourcesBuildPhase; 346 | buildActionMask = 2147483647; 347 | files = ( 348 | D899BEDF2591DB2D004390B1 /* LaunchScreen.storyboard in Resources */, 349 | D899BEDC2591DB2D004390B1 /* Assets.xcassets in Resources */, 350 | D899BEDA2591DB2B004390B1 /* Main.storyboard in Resources */, 351 | ); 352 | runOnlyForDeploymentPostprocessing = 0; 353 | }; 354 | /* End PBXResourcesBuildPhase section */ 355 | 356 | /* Begin PBXSourcesBuildPhase section */ 357 | D899BEAC2591DA4C004390B1 /* Sources */ = { 358 | isa = PBXSourcesBuildPhase; 359 | buildActionMask = 2147483647; 360 | files = ( 361 | D8250FED2593360B00B88649 /* AndroidPhone.swift in Sources */, 362 | D8F0C43C2591F12D005088E5 /* UserApp.swift in Sources */, 363 | D85BFE512594912C0051F637 /* AndroidPad.swift in Sources */, 364 | D8250FE5259335ED00B88649 /* Mac.swift in Sources */, 365 | D8250FF5259336DD00B88649 /* Firefox.swift in Sources */, 366 | D86742392597EB2000E0B65E /* Edge.swift in Sources */, 367 | D8250FE9259335FC00B88649 /* WindowsPC.swift in Sources */, 368 | D8F0C4382591F0E7005088E5 /* UserDevice.swift in Sources */, 369 | D8F0C4402591F1FB005088E5 /* iPhone.swift in Sources */, 370 | D8250FF1259336C600B88649 /* Chrome.swift in Sources */, 371 | D8F0C4272591E67A005088E5 /* UserAgency.swift in Sources */, 372 | D8F0C4442591F5FC005088E5 /* Safari.swift in Sources */, 373 | D85BFE55259491680051F637 /* iPad.swift in Sources */, 374 | D867423D2597EC5D00E0B65E /* IE.swift in Sources */, 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | }; 378 | D899BEB52591DA4C004390B1 /* Sources */ = { 379 | isa = PBXSourcesBuildPhase; 380 | buildActionMask = 2147483647; 381 | files = ( 382 | D899BEBF2591DA4C004390B1 /* UserAgencyBaseTests.swift in Sources */, 383 | D899CA99259341A40033DC9F /* UserAgencySafariTests.swift in Sources */, 384 | ); 385 | runOnlyForDeploymentPostprocessing = 0; 386 | }; 387 | D899BECC2591DB2B004390B1 /* Sources */ = { 388 | isa = PBXSourcesBuildPhase; 389 | buildActionMask = 2147483647; 390 | files = ( 391 | D899BED72591DB2B004390B1 /* ViewController.swift in Sources */, 392 | D899BED32591DB2B004390B1 /* AppDelegate.swift in Sources */, 393 | D899BED52591DB2B004390B1 /* SceneDelegate.swift in Sources */, 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | }; 397 | /* End PBXSourcesBuildPhase section */ 398 | 399 | /* Begin PBXTargetDependency section */ 400 | D899BEBC2591DA4C004390B1 /* PBXTargetDependency */ = { 401 | isa = PBXTargetDependency; 402 | target = D899BEAF2591DA4C004390B1 /* UserAgency */; 403 | targetProxy = D899BEBB2591DA4C004390B1 /* PBXContainerItemProxy */; 404 | }; 405 | D8F0C42F2591EDD0005088E5 /* PBXTargetDependency */ = { 406 | isa = PBXTargetDependency; 407 | target = D899BEAF2591DA4C004390B1 /* UserAgency */; 408 | targetProxy = D8F0C42E2591EDD0005088E5 /* PBXContainerItemProxy */; 409 | }; 410 | /* End PBXTargetDependency section */ 411 | 412 | /* Begin PBXVariantGroup section */ 413 | D899BED82591DB2B004390B1 /* Main.storyboard */ = { 414 | isa = PBXVariantGroup; 415 | children = ( 416 | D899BED92591DB2B004390B1 /* Base */, 417 | ); 418 | name = Main.storyboard; 419 | sourceTree = ""; 420 | }; 421 | D899BEDD2591DB2D004390B1 /* LaunchScreen.storyboard */ = { 422 | isa = PBXVariantGroup; 423 | children = ( 424 | D899BEDE2591DB2D004390B1 /* Base */, 425 | ); 426 | name = LaunchScreen.storyboard; 427 | sourceTree = ""; 428 | }; 429 | /* End PBXVariantGroup section */ 430 | 431 | /* Begin XCBuildConfiguration section */ 432 | D899BEC22591DA4C004390B1 /* Debug */ = { 433 | isa = XCBuildConfiguration; 434 | buildSettings = { 435 | ALWAYS_SEARCH_USER_PATHS = NO; 436 | CLANG_ANALYZER_NONNULL = YES; 437 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 438 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 439 | CLANG_CXX_LIBRARY = "libc++"; 440 | CLANG_ENABLE_MODULES = YES; 441 | CLANG_ENABLE_OBJC_ARC = YES; 442 | CLANG_ENABLE_OBJC_WEAK = YES; 443 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 444 | CLANG_WARN_BOOL_CONVERSION = YES; 445 | CLANG_WARN_COMMA = YES; 446 | CLANG_WARN_CONSTANT_CONVERSION = YES; 447 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 448 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 449 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 450 | CLANG_WARN_EMPTY_BODY = YES; 451 | CLANG_WARN_ENUM_CONVERSION = YES; 452 | CLANG_WARN_INFINITE_RECURSION = YES; 453 | CLANG_WARN_INT_CONVERSION = YES; 454 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 455 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 456 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 457 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 458 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 459 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 460 | CLANG_WARN_STRICT_PROTOTYPES = YES; 461 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 462 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 463 | CLANG_WARN_UNREACHABLE_CODE = YES; 464 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 465 | COPY_PHASE_STRIP = NO; 466 | CURRENT_PROJECT_VERSION = 1; 467 | DEBUG_INFORMATION_FORMAT = dwarf; 468 | ENABLE_STRICT_OBJC_MSGSEND = YES; 469 | ENABLE_TESTABILITY = YES; 470 | GCC_C_LANGUAGE_STANDARD = gnu11; 471 | GCC_DYNAMIC_NO_PIC = NO; 472 | GCC_NO_COMMON_BLOCKS = YES; 473 | GCC_OPTIMIZATION_LEVEL = 0; 474 | GCC_PREPROCESSOR_DEFINITIONS = ( 475 | "DEBUG=1", 476 | "$(inherited)", 477 | ); 478 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 479 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 480 | GCC_WARN_UNDECLARED_SELECTOR = YES; 481 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 482 | GCC_WARN_UNUSED_FUNCTION = YES; 483 | GCC_WARN_UNUSED_VARIABLE = YES; 484 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 485 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 486 | MTL_FAST_MATH = YES; 487 | ONLY_ACTIVE_ARCH = YES; 488 | SDKROOT = iphoneos; 489 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 490 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 491 | VERSIONING_SYSTEM = "apple-generic"; 492 | VERSION_INFO_PREFIX = ""; 493 | }; 494 | name = Debug; 495 | }; 496 | D899BEC32591DA4C004390B1 /* Release */ = { 497 | isa = XCBuildConfiguration; 498 | buildSettings = { 499 | ALWAYS_SEARCH_USER_PATHS = NO; 500 | CLANG_ANALYZER_NONNULL = YES; 501 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 502 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 503 | CLANG_CXX_LIBRARY = "libc++"; 504 | CLANG_ENABLE_MODULES = YES; 505 | CLANG_ENABLE_OBJC_ARC = YES; 506 | CLANG_ENABLE_OBJC_WEAK = YES; 507 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 508 | CLANG_WARN_BOOL_CONVERSION = YES; 509 | CLANG_WARN_COMMA = YES; 510 | CLANG_WARN_CONSTANT_CONVERSION = YES; 511 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 512 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 513 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 514 | CLANG_WARN_EMPTY_BODY = YES; 515 | CLANG_WARN_ENUM_CONVERSION = YES; 516 | CLANG_WARN_INFINITE_RECURSION = YES; 517 | CLANG_WARN_INT_CONVERSION = YES; 518 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 519 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 520 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 521 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 522 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 523 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 524 | CLANG_WARN_STRICT_PROTOTYPES = YES; 525 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 526 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 527 | CLANG_WARN_UNREACHABLE_CODE = YES; 528 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 529 | COPY_PHASE_STRIP = NO; 530 | CURRENT_PROJECT_VERSION = 1; 531 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 532 | ENABLE_NS_ASSERTIONS = NO; 533 | ENABLE_STRICT_OBJC_MSGSEND = YES; 534 | GCC_C_LANGUAGE_STANDARD = gnu11; 535 | GCC_NO_COMMON_BLOCKS = YES; 536 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 537 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 538 | GCC_WARN_UNDECLARED_SELECTOR = YES; 539 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 540 | GCC_WARN_UNUSED_FUNCTION = YES; 541 | GCC_WARN_UNUSED_VARIABLE = YES; 542 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 543 | MTL_ENABLE_DEBUG_INFO = NO; 544 | MTL_FAST_MATH = YES; 545 | SDKROOT = iphoneos; 546 | SWIFT_COMPILATION_MODE = wholemodule; 547 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 548 | VALIDATE_PRODUCT = YES; 549 | VERSIONING_SYSTEM = "apple-generic"; 550 | VERSION_INFO_PREFIX = ""; 551 | }; 552 | name = Release; 553 | }; 554 | D899BEC52591DA4C004390B1 /* Debug */ = { 555 | isa = XCBuildConfiguration; 556 | buildSettings = { 557 | CLANG_ENABLE_MODULES = YES; 558 | CODE_SIGN_STYLE = Automatic; 559 | DEFINES_MODULE = YES; 560 | DEVELOPMENT_TEAM = ""; 561 | DYLIB_COMPATIBILITY_VERSION = 1; 562 | DYLIB_CURRENT_VERSION = 1; 563 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 564 | INFOPLIST_FILE = UserAgency/Info.plist; 565 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 566 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 567 | "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 13.1; 568 | LD_RUNPATH_SEARCH_PATHS = ( 569 | "$(inherited)", 570 | "@executable_path/Frameworks", 571 | "@loader_path/Frameworks", 572 | ); 573 | PRODUCT_BUNDLE_IDENTIFIER = com.terryhuanghd.UserAgency; 574 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 575 | SKIP_INSTALL = YES; 576 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 577 | SWIFT_VERSION = 5.0; 578 | TARGETED_DEVICE_FAMILY = "1,2"; 579 | }; 580 | name = Debug; 581 | }; 582 | D899BEC62591DA4C004390B1 /* Release */ = { 583 | isa = XCBuildConfiguration; 584 | buildSettings = { 585 | CLANG_ENABLE_MODULES = YES; 586 | CODE_SIGN_STYLE = Automatic; 587 | DEFINES_MODULE = YES; 588 | DEVELOPMENT_TEAM = ""; 589 | DYLIB_COMPATIBILITY_VERSION = 1; 590 | DYLIB_CURRENT_VERSION = 1; 591 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 592 | INFOPLIST_FILE = UserAgency/Info.plist; 593 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 594 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 595 | "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 13.1; 596 | LD_RUNPATH_SEARCH_PATHS = ( 597 | "$(inherited)", 598 | "@executable_path/Frameworks", 599 | "@loader_path/Frameworks", 600 | ); 601 | PRODUCT_BUNDLE_IDENTIFIER = com.terryhuanghd.UserAgency; 602 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 603 | SKIP_INSTALL = YES; 604 | SWIFT_VERSION = 5.0; 605 | TARGETED_DEVICE_FAMILY = "1,2"; 606 | }; 607 | name = Release; 608 | }; 609 | D899BEC82591DA4C004390B1 /* Debug */ = { 610 | isa = XCBuildConfiguration; 611 | buildSettings = { 612 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 613 | CODE_SIGN_STYLE = Automatic; 614 | DEVELOPMENT_TEAM = YH9352NQ3R; 615 | INFOPLIST_FILE = UserAgencyTests/Info.plist; 616 | LD_RUNPATH_SEARCH_PATHS = ( 617 | "$(inherited)", 618 | "@executable_path/Frameworks", 619 | "@loader_path/Frameworks", 620 | ); 621 | PRODUCT_BUNDLE_IDENTIFIER = com.terryhuanghd.UserAgencyTests; 622 | PRODUCT_NAME = "$(TARGET_NAME)"; 623 | SWIFT_VERSION = 5.0; 624 | TARGETED_DEVICE_FAMILY = "1,2"; 625 | }; 626 | name = Debug; 627 | }; 628 | D899BEC92591DA4C004390B1 /* Release */ = { 629 | isa = XCBuildConfiguration; 630 | buildSettings = { 631 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 632 | CODE_SIGN_STYLE = Automatic; 633 | DEVELOPMENT_TEAM = YH9352NQ3R; 634 | INFOPLIST_FILE = UserAgencyTests/Info.plist; 635 | LD_RUNPATH_SEARCH_PATHS = ( 636 | "$(inherited)", 637 | "@executable_path/Frameworks", 638 | "@loader_path/Frameworks", 639 | ); 640 | PRODUCT_BUNDLE_IDENTIFIER = com.terryhuanghd.UserAgencyTests; 641 | PRODUCT_NAME = "$(TARGET_NAME)"; 642 | SWIFT_VERSION = 5.0; 643 | TARGETED_DEVICE_FAMILY = "1,2"; 644 | }; 645 | name = Release; 646 | }; 647 | D899BEE22591DB2D004390B1 /* Debug */ = { 648 | isa = XCBuildConfiguration; 649 | buildSettings = { 650 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 651 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 652 | CODE_SIGN_STYLE = Automatic; 653 | DEVELOPMENT_TEAM = YH9352NQ3R; 654 | INFOPLIST_FILE = UserAgencyExample/Info.plist; 655 | IPHONEOS_DEPLOYMENT_TARGET = 14.3; 656 | LD_RUNPATH_SEARCH_PATHS = ( 657 | "$(inherited)", 658 | "@executable_path/Frameworks", 659 | ); 660 | PRODUCT_BUNDLE_IDENTIFIER = com.terryhuanghd.UserAgencyExample; 661 | PRODUCT_NAME = "$(TARGET_NAME)"; 662 | SWIFT_VERSION = 5.0; 663 | TARGETED_DEVICE_FAMILY = "1,2"; 664 | }; 665 | name = Debug; 666 | }; 667 | D899BEE32591DB2D004390B1 /* Release */ = { 668 | isa = XCBuildConfiguration; 669 | buildSettings = { 670 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 671 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 672 | CODE_SIGN_STYLE = Automatic; 673 | DEVELOPMENT_TEAM = YH9352NQ3R; 674 | INFOPLIST_FILE = UserAgencyExample/Info.plist; 675 | IPHONEOS_DEPLOYMENT_TARGET = 14.3; 676 | LD_RUNPATH_SEARCH_PATHS = ( 677 | "$(inherited)", 678 | "@executable_path/Frameworks", 679 | ); 680 | PRODUCT_BUNDLE_IDENTIFIER = com.terryhuanghd.UserAgencyExample; 681 | PRODUCT_NAME = "$(TARGET_NAME)"; 682 | SWIFT_VERSION = 5.0; 683 | TARGETED_DEVICE_FAMILY = "1,2"; 684 | }; 685 | name = Release; 686 | }; 687 | /* End XCBuildConfiguration section */ 688 | 689 | /* Begin XCConfigurationList section */ 690 | D899BEAA2591DA4C004390B1 /* Build configuration list for PBXProject "UserAgency" */ = { 691 | isa = XCConfigurationList; 692 | buildConfigurations = ( 693 | D899BEC22591DA4C004390B1 /* Debug */, 694 | D899BEC32591DA4C004390B1 /* Release */, 695 | ); 696 | defaultConfigurationIsVisible = 0; 697 | defaultConfigurationName = Release; 698 | }; 699 | D899BEC42591DA4C004390B1 /* Build configuration list for PBXNativeTarget "UserAgency" */ = { 700 | isa = XCConfigurationList; 701 | buildConfigurations = ( 702 | D899BEC52591DA4C004390B1 /* Debug */, 703 | D899BEC62591DA4C004390B1 /* Release */, 704 | ); 705 | defaultConfigurationIsVisible = 0; 706 | defaultConfigurationName = Release; 707 | }; 708 | D899BEC72591DA4C004390B1 /* Build configuration list for PBXNativeTarget "UserAgencyTests" */ = { 709 | isa = XCConfigurationList; 710 | buildConfigurations = ( 711 | D899BEC82591DA4C004390B1 /* Debug */, 712 | D899BEC92591DA4C004390B1 /* Release */, 713 | ); 714 | defaultConfigurationIsVisible = 0; 715 | defaultConfigurationName = Release; 716 | }; 717 | D899BEE12591DB2D004390B1 /* Build configuration list for PBXNativeTarget "UserAgencyExample" */ = { 718 | isa = XCConfigurationList; 719 | buildConfigurations = ( 720 | D899BEE22591DB2D004390B1 /* Debug */, 721 | D899BEE32591DB2D004390B1 /* Release */, 722 | ); 723 | defaultConfigurationIsVisible = 0; 724 | defaultConfigurationName = Release; 725 | }; 726 | /* End XCConfigurationList section */ 727 | }; 728 | rootObject = D899BEA72591DA4C004390B1 /* Project object */; 729 | } 730 | --------------------------------------------------------------------------------