├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── Fakery │ ├── LICENSE.md │ ├── README.md │ ├── Resources │ │ └── Locales │ │ │ ├── de-AT.json │ │ │ ├── de-CH.json │ │ │ ├── de.json │ │ │ ├── en-AU.json │ │ │ ├── en-CA.json │ │ │ ├── en-GB.json │ │ │ ├── en-IND.json │ │ │ ├── en-TEST.json │ │ │ ├── en-US.json │ │ │ ├── en.json │ │ │ ├── es.json │ │ │ ├── fa.json │ │ │ ├── fr.json │ │ │ ├── it.json │ │ │ ├── ja.json │ │ │ ├── ko.json │ │ │ ├── nb-NO.json │ │ │ ├── nl.json │ │ │ ├── pl.json │ │ │ ├── ru.json │ │ │ ├── sk.json │ │ │ ├── sv.json │ │ │ ├── tr-TR.json │ │ │ ├── uk.json │ │ │ ├── zh-CN.json │ │ │ └── zh-TW.json │ └── Sources │ │ └── Fakery │ │ ├── Config.swift │ │ ├── Data │ │ ├── Parser.swift │ │ └── Provider.swift │ │ ├── Extensions │ │ └── ArrayExtension.swift │ │ ├── Faker.swift │ │ └── Generators │ │ ├── Address.swift │ │ ├── App.swift │ │ ├── Bank.swift │ │ ├── Business.swift │ │ ├── Commerce.swift │ │ ├── Company.swift │ │ ├── Generator.swift │ │ ├── Internet.swift │ │ ├── Lorem.swift │ │ ├── Name.swift │ │ ├── Number.swift │ │ ├── PhoneNumber.swift │ │ └── Team.swift ├── Manifest.lock ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── JamesDouble.xcuserdatad │ │ └── xcschemes │ │ ├── Fakery-Faker.xcscheme │ │ ├── Fakery.xcscheme │ │ ├── Pods-RandMyModel.xcscheme │ │ └── xcschememanagement.plist └── Target Support Files │ ├── Fakery │ ├── Fakery-dummy.m │ ├── Fakery-prefix.pch │ ├── Fakery-umbrella.h │ ├── Fakery.modulemap │ ├── Fakery.xcconfig │ ├── Info.plist │ └── ResourceBundle-Faker-Info.plist │ └── Pods-RandMyModel │ ├── Info.plist │ ├── Pods-RandMyModel-acknowledgements.markdown │ ├── Pods-RandMyModel-acknowledgements.plist │ ├── Pods-RandMyModel-dummy.m │ ├── Pods-RandMyModel-frameworks.sh │ ├── Pods-RandMyModel-resources.sh │ ├── Pods-RandMyModel-umbrella.h │ ├── Pods-RandMyModel.debug.xcconfig │ ├── Pods-RandMyModel.modulemap │ └── Pods-RandMyModel.release.xcconfig ├── README.md ├── RandMyMod.podspec ├── RandMyModel.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── JamesDouble.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── JamesDouble.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── RandMyModel.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ └── JamesDouble.xcuserdatad │ └── UserInterfaceState.xcuserstate ├── RandMyModel ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── MyPlayground.playground │ ├── Contents.swift │ ├── contents.xcplayground │ ├── playground.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── JamesDouble.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── timeline.xctimeline ├── RandMyMod │ ├── RandCore.swift │ ├── RandFactory.swift │ └── RandMyMod.swift └── ViewController.swift └── Readme_img └── logo.png /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 郭介騵 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 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'RandMyModel' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | pod 'Fakery' 7 | use_frameworks! 8 | 9 | # Pods for RandMyModel 10 | 11 | end 12 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Fakery (3.3.0) 3 | 4 | DEPENDENCIES: 5 | - Fakery 6 | 7 | SPEC CHECKSUMS: 8 | Fakery: 3aae11a87721c807c18c6456500d088c1230d3e5 9 | 10 | PODFILE CHECKSUM: 3a0d3b333bb6421575e3daa623246747433c042c 11 | 12 | COCOAPODS: 1.3.1 13 | -------------------------------------------------------------------------------- /Pods/Fakery/LICENSE.md: -------------------------------------------------------------------------------- 1 | Licensed under the **MIT** license 2 | 3 | > Copyright (c) 2015 Vadym Markov 4 | > 5 | > Permission is hereby granted, free of charge, to any person obtaining 6 | > a copy of this software and associated documentation files (the 7 | > "Software"), to deal in the Software without restriction, including 8 | > without limitation the rights to use, copy, modify, merge, publish, 9 | > distribute, sublicense, and/or sell copies of the Software, and to 10 | > permit persons to whom the Software is furnished to do so, subject to 11 | > the following conditions: 12 | > 13 | > The above copyright notice and this permission notice shall be 14 | > included in all copies or substantial portions of the Software. 15 | > 16 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | > IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | > CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | > TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /Pods/Fakery/README.md: -------------------------------------------------------------------------------- 1 | ![Fakery logo](https://raw.githubusercontent.com/vadymmarkov/Fakery/master/Images/logo.png) 2 | [![CI Status](http://img.shields.io/travis/vadymmarkov/Fakery.svg?style=flat)](https://travis-ci.org/vadymmarkov/Fakery) 3 | [![Version](https://img.shields.io/cocoapods/v/Fakery.svg?style=flat)](http://cocoadocs.org/docsets/Fakery) 4 | [![License](https://img.shields.io/cocoapods/l/Fakery.svg?style=flat)](http://cocoadocs.org/docsets/Fakery) 5 | [![Platform](https://img.shields.io/cocoapods/p/Fakery.svg?style=flat)](http://cocoadocs.org/docsets/Fakery) 6 | 7 | This is a Swift port of Ruby's [Faker](https://github.com/stympy/faker) library that generates fake data. 8 | 9 | Are you still bothered with meaningless randomly character strings? Just relax and leave this job to **Fakery**. 10 | It's useful in all the cases when you need to use some dummy data for testing, population of database during development, etc. 11 | 12 | **NOTE**: Generated data is pretty realistic, supports a range of locales, but returned values are not guaranteed to be unique. 13 | 14 | ## Table of Contents 15 | 16 | * [Usage](#usage) 17 | * [Localization](#localization) 18 | * [Generators](#generators) 19 | * [Address](#address) 20 | * [App](#app) 21 | * [Business](#business) 22 | * [Commerce](#commerce) 23 | * [Company](#company) 24 | * [Internet](#internet) 25 | * [Lorem](#lorem) 26 | * [Name](#name) 27 | * [Number](#number) 28 | * [Phone number](#phone-number) 29 | * [Team](#team) 30 | * [Bank](#bank) 31 | * [Installation](#installation) 32 | * [Contributing](#contributing) 33 | * [Author](#author) 34 | * [License](#license) 35 | 36 | ## Usage 37 | 38 | ```swift 39 | 40 | let faker = Faker(locale: "nb-NO") 41 | 42 | let firstName = faker.name.firstName() //=> "Emilie" 43 | let lastName = faker.name.lastName() //=> "Hansen" 44 | let city = faker.address.city() //=> "Oslo" 45 | ``` 46 | 47 | ## Localization 48 | 49 | **Fakery** is quite powerful when it comes to generation of locale-specific data. 50 | In `Resources/Locales` you can find JSON files for more than 20 locales, and, of course, it's not a limit. 51 | Feel free to contribute and add more! 52 | 53 | The default locale is English. When you use one of the available generators and 54 | the corresponding key is not found in a JSON file for the currently selected 55 | locale **Fakery** will also check if it exists in "en.json" file. 56 | 57 | ## Generators 58 | 59 | ### Address 60 | 61 | ```swift 62 | 63 | faker.address.city() //=> "Oslo" 64 | faker.address.streetName() //=> "North Avenue" 65 | faker.address.secondaryAddress() //=> "Apt. 123" 66 | faker.address.streetAddress(includeSecondary: Bool) //=> "12 North Avenue" 67 | faker.address.buildingNumber() //=> "123" 68 | faker.address.postcode(stateAbbreviation: String) //=> "0884" 69 | faker.address.timeZone() //=> "America/Los_Angeles" 70 | faker.address.streetSuffix() //=> "Avenue" 71 | faker.address.citySuffix() //=> "town" 72 | faker.address.cityPrefix() //=> "North" 73 | faker.address.stateAbbreviation() //=> "CA" 74 | faker.address.state() //=> "California" 75 | faker.address.county() //=> "Autauga County" 76 | faker.address.country() //=> "United States of America" 77 | faker.address.countryCode() //=> "US" 78 | faker.address.latitude() //=> -58.17256227443719 79 | faker.address.longitude() //=> -156.65548382095133 80 | faker.address.coordinate() //=> CLLocationCoordinate2D(latitude: 40.97868, longitude: 29.09306) 81 | ``` 82 | 83 | ### App 84 | 85 | ```swift 86 | 87 | faker.app.name() //=> "Namfix" 88 | faker.app.version() //=> "0.1.1" 89 | faker.app.author() //=> "Ida Adams" 90 | ``` 91 | 92 | ### Business 93 | 94 | ```swift 95 | 96 | faker.business.creditCardNumber() //=> "1234-2121-1221-1211" 97 | faker.business.creditCardType() //=> "visa" 98 | faker.business.creditCardExpiryDate() //=> "2020-10-12" 99 | ``` 100 | 101 | ### Commerce 102 | 103 | ```swift 104 | 105 | faker.commerce.color() //=> "black" 106 | faker.commerce.department(maximum: Int, fixedAmount: Bool) //=> "Music" 107 | faker.commerce.productName() //=> "Awesome Wooden Hat" 108 | faker.commerce.price() // 90.5 109 | ``` 110 | 111 | ### Company 112 | 113 | ```swift 114 | 115 | faker.company.name() //=> "Adams Inc" 116 | faker.company.suffix() //=> "Inc" 117 | faker.company.catchPhrase() //=> "Universal software" 118 | faker.company.bs() //=> "implement innovative methodologies" 119 | faker.company.logo() // "http://pigment.github.io/fake-logos/logos/medium/color/1.png" 120 | ``` 121 | 122 | ### Internet 123 | 124 | ```swift 125 | 126 | faker.internet.username(separator: String?) //=> "ida4" 127 | faker.internet.domainName(alphaNumericOnly: Bool) //=> "example.com" 128 | faker.internet.domainWord(alphaNumericOnly: Bool) //=> "domainword" 129 | faker.internet.domainSuffix() //=> "com" 130 | faker.internet.email() // => "ida4@some.info" 131 | faker.internet.freeEmail() //=> "gmail.com" 132 | faker.internet.safeEmail() //=> "adams@example.org" 133 | faker.internet.password(minimumLength: Int, maximumLength: Int) //=> "e2dddhwd1g5qhvhgfi" 134 | faker.internet.ipV4Address() //=> "24.29.18.175" 135 | faker.internet.ipV6Address() //=> "ac5f:d696:3807:1d72:2eb5:4e81:7d2b:e1df" 136 | faker.internet.url() //=> "http://example.com/ida4" 137 | faker.internet.image() //=> "http://lorempixel.com/320/200" 138 | faker.internet.templateImage() //=> "http://dummyimage.com/320x200/000000/ffffff" 139 | faker.internet.hashtag() //=> "#art" 140 | 141 | ``` 142 | 143 | ### Lorem 144 | 145 | ```swift 146 | 147 | faker.lorem.word() //=> "repellendus" 148 | faker.lorem.words(amount: Int) //=> ["dolores", "adipisci", "nesciunt"] 149 | faker.lorem.character() //=> "a" 150 | faker.lorem.characters(amount: Int) // Default = 255 151 | faker.lorem.sentence(wordsAmount: Int) // Default = 4 152 | faker.lorem.sentences(amount: Int) // Default = 3 153 | faker.lorem.paragraph(sentencesAmount: Int) // Default = 3 154 | faker.lorem.paragraphs(amount: Int) // Default = 3 155 | ``` 156 | 157 | ### Name 158 | 159 | ```swift 160 | 161 | faker.name.name() //=> "Ida Adams" 162 | faker.name.firstName() //=> "Ida" 163 | faker.name.lastName() //=> "Adams" 164 | faker.name.prefix() //=> "Mrs." 165 | faker.name.suffix() //=> "PhD" 166 | faker.name.title() //=> "Lead" 167 | ``` 168 | 169 | ### Number 170 | 171 | ```swift 172 | 173 | faker.number.randomBool() //=> true or false 174 | faker.number.randomInt() //=> some Int between 0 and 1000 175 | faker.number.randomInt(min: -100, max:50) //=> some Int between -100 and 50 176 | faker.number.randomFloat() //=> some Float between 0 and 1000 177 | faker.number.randomFloat(min: -10.4, max:50) //=> some Float between -10.4 and 50 178 | faker.number.randomCGFloat() //=> some CGFloat between 0 and 1000 179 | faker.number.randomCGFloat(min: 42.42, max:86) //=> some CGFloat between -42.42 and 86 180 | faker.number.randomDouble() //=> some Double between 0 and 1000 181 | faker.number.randomDouble(min: 0, max:1) //=> some Double between 0 and 1 182 | faker.number.increasingUniqueId() //=> every call returns an unique int 183 | ``` 184 | 185 | ### Phone number 186 | 187 | ```swift 188 | 189 | faker.phoneNumber.phoneNumber() //=> "1-333-333-3333" 190 | faker.phoneNumber.cellPhone() //=> "333-333-3333" 191 | faker.phoneNumber.areaCode() //=> "201" 192 | faker.phoneNumber.exchangeCode() //=> "201" 193 | faker.phoneNumber.subscriberNumber() //=> "1234" 194 | faker.phoneNumber.numberExtension(length: Int) // "123" 195 | ``` 196 | 197 | ### Team 198 | 199 | ```swift 200 | 201 | faker.team.name() //=> "bats" 202 | faker.team.creature() //=> "Alabama bats" 203 | faker.team.state() // => "Alabama" 204 | ``` 205 | 206 | ### Bank 207 | 208 | ```swift 209 | faker.bank.name() //=> "ABN AMRO CORPORATE FINANCE LIMITED" 210 | faker.bank.swiftBic() //=> "AAFMGB21" 211 | faker.bank.iban() // => "NL45BUNQ2209931378" 212 | faker.bank.bban() //=> ABNA0136468471 213 | ``` 214 | 215 | ## Installation 216 | 217 | **Fakery** is available through [CocoaPods](http://cocoapods.org). To install 218 | it, simply add the following line to your Podfile: 219 | 220 | ```ruby 221 | pod 'Fakery' 222 | ``` 223 | 224 | ## Contributing 225 | 226 | Please see our [playbook](https://github.com/hyperoslo/playbook/blob/master/GIT_AND_GITHUB.md) for guidelines on contributing. 227 | 228 | ## Author 229 | 230 | Vadym Markov, markov.vadym@gmail.com 231 | 232 | ## License 233 | 234 | **Fakery** is available under the MIT license. See the LICENSE file for more info. 235 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/de-CH.json: -------------------------------------------------------------------------------- 1 | { 2 | "de-CH": { 3 | "faker": { 4 | "address": { 5 | "country_code": [ 6 | "CH", 7 | "CH", 8 | "CH", 9 | "DE", 10 | "AT", 11 | "US", 12 | "LI", 13 | "US", 14 | "HK", 15 | "VN" 16 | ], 17 | "postcode": [ 18 | "1###", 19 | "2###", 20 | "3###", 21 | "4###", 22 | "5###", 23 | "6###", 24 | "7###", 25 | "8###", 26 | "9###" 27 | ], 28 | "default_country": [ 29 | "Schweiz" 30 | ] 31 | }, 32 | "company": { 33 | "suffix": [ 34 | "AG", 35 | "GmbH", 36 | "und Söhne", 37 | "und Partner", 38 | "& Co.", 39 | "Gruppe", 40 | "LLC", 41 | "Inc." 42 | ], 43 | "name": [ 44 | "#{Name.last_name} #{suffix}", 45 | "#{Name.last_name}-#{Name.last_name}", 46 | "#{Name.last_name}, #{Name.last_name} und #{Name.last_name}" 47 | ] 48 | }, 49 | "internet": { 50 | "domain_suffix": [ 51 | "com", 52 | "net", 53 | "biz", 54 | "ch", 55 | "de", 56 | "li", 57 | "at", 58 | "ch", 59 | "ch" 60 | ] 61 | }, 62 | "phone_number": { 63 | "formats": [ 64 | "0800 ### ###", 65 | "0800 ## ## ##", 66 | "0## ### ## ##", 67 | "0## ### ## ##", 68 | "+41 ## ### ## ##", 69 | "0900 ### ###", 70 | "076 ### ## ##", 71 | "+4178 ### ## ##", 72 | "0041 79 ### ## ##" 73 | ] 74 | } 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/en-AU.json: -------------------------------------------------------------------------------- 1 | { 2 | "en-AU": { 3 | "faker": { 4 | "name": { 5 | "first_name": [ 6 | "William", 7 | "Jack", 8 | "Oliver", 9 | "Joshua", 10 | "Thomas", 11 | "Lachlan", 12 | "Cooper", 13 | "Noah", 14 | "Ethan", 15 | "Lucas", 16 | "James", 17 | "Samuel", 18 | "Jacob", 19 | "Liam", 20 | "Alexander", 21 | "Benjamin", 22 | "Max", 23 | "Isaac", 24 | "Daniel", 25 | "Riley", 26 | "Ryan", 27 | "Charlie", 28 | "Tyler", 29 | "Jake", 30 | "Matthew", 31 | "Xavier", 32 | "Harry", 33 | "Jayden", 34 | "Nicholas", 35 | "Harrison", 36 | "Levi", 37 | "Luke", 38 | "Adam", 39 | "Henry", 40 | "Aiden", 41 | "Dylan", 42 | "Oscar", 43 | "Michael", 44 | "Jackson", 45 | "Logan", 46 | "Joseph", 47 | "Blake", 48 | "Nathan", 49 | "Connor", 50 | "Elijah", 51 | "Nate", 52 | "Archie", 53 | "Bailey", 54 | "Marcus", 55 | "Cameron", 56 | "Jordan", 57 | "Zachary", 58 | "Caleb", 59 | "Hunter", 60 | "Ashton", 61 | "Toby", 62 | "Aidan", 63 | "Hayden", 64 | "Mason", 65 | "Hamish", 66 | "Edward", 67 | "Angus", 68 | "Eli", 69 | "Sebastian", 70 | "Christian", 71 | "Patrick", 72 | "Andrew", 73 | "Anthony", 74 | "Luca", 75 | "Kai", 76 | "Beau", 77 | "Alex", 78 | "George", 79 | "Callum", 80 | "Finn", 81 | "Zac", 82 | "Mitchell", 83 | "Jett", 84 | "Jesse", 85 | "Gabriel", 86 | "Leo", 87 | "Declan", 88 | "Charles", 89 | "Jasper", 90 | "Jonathan", 91 | "Aaron", 92 | "Hugo", 93 | "David", 94 | "Christopher", 95 | "Chase", 96 | "Owen", 97 | "Justin", 98 | "Ali", 99 | "Darcy", 100 | "Lincoln", 101 | "Cody", 102 | "Phoenix", 103 | "Sam", 104 | "John", 105 | "Joel", 106 | "Isabella", 107 | "Ruby", 108 | "Chloe", 109 | "Olivia", 110 | "Charlotte", 111 | "Mia", 112 | "Lily", 113 | "Emily", 114 | "Ella", 115 | "Sienna", 116 | "Sophie", 117 | "Amelia", 118 | "Grace", 119 | "Ava", 120 | "Zoe", 121 | "Emma", 122 | "Sophia", 123 | "Matilda", 124 | "Hannah", 125 | "Jessica", 126 | "Lucy", 127 | "Georgia", 128 | "Sarah", 129 | "Abigail", 130 | "Zara", 131 | "Eva", 132 | "Scarlett", 133 | "Jasmine", 134 | "Chelsea", 135 | "Lilly", 136 | "Ivy", 137 | "Isla", 138 | "Evie", 139 | "Isabelle", 140 | "Maddison", 141 | "Layla", 142 | "Summer", 143 | "Annabelle", 144 | "Alexis", 145 | "Elizabeth", 146 | "Bella", 147 | "Holly", 148 | "Lara", 149 | "Madison", 150 | "Alyssa", 151 | "Maya", 152 | "Tahlia", 153 | "Claire", 154 | "Hayley", 155 | "Imogen", 156 | "Jade", 157 | "Ellie", 158 | "Sofia", 159 | "Addison", 160 | "Molly", 161 | "Phoebe", 162 | "Alice", 163 | "Savannah", 164 | "Gabriella", 165 | "Kayla", 166 | "Mikayla", 167 | "Abbey", 168 | "Eliza", 169 | "Willow", 170 | "Alexandra", 171 | "Poppy", 172 | "Samantha", 173 | "Stella", 174 | "Amy", 175 | "Amelie", 176 | "Anna", 177 | "Piper", 178 | "Gemma", 179 | "Isabel", 180 | "Victoria", 181 | "Stephanie", 182 | "Caitlin", 183 | "Heidi", 184 | "Paige", 185 | "Rose", 186 | "Amber", 187 | "Audrey", 188 | "Claudia", 189 | "Taylor", 190 | "Madeline", 191 | "Angelina", 192 | "Natalie", 193 | "Charli", 194 | "Lauren", 195 | "Ashley", 196 | "Violet", 197 | "Mackenzie", 198 | "Abby", 199 | "Skye", 200 | "Lillian", 201 | "Alana", 202 | "Lola", 203 | "Leah", 204 | "Eve", 205 | "Kiara" 206 | ], 207 | "last_name": [ 208 | "Smith", 209 | "Jones", 210 | "Williams", 211 | "Brown", 212 | "Wilson", 213 | "Taylor", 214 | "Johnson", 215 | "White", 216 | "Martin", 217 | "Anderson", 218 | "Thompson", 219 | "Nguyen", 220 | "Thomas", 221 | "Walker", 222 | "Harris", 223 | "Lee", 224 | "Ryan", 225 | "Robinson", 226 | "Kelly", 227 | "King", 228 | "Davis", 229 | "Wright", 230 | "Evans", 231 | "Roberts", 232 | "Green", 233 | "Hall", 234 | "Wood", 235 | "Jackson", 236 | "Clarke", 237 | "Patel", 238 | "Khan", 239 | "Lewis", 240 | "James", 241 | "Phillips", 242 | "Mason", 243 | "Mitchell", 244 | "Rose", 245 | "Davies", 246 | "Rodriguez", 247 | "Cox", 248 | "Alexander", 249 | "Garden", 250 | "Campbell", 251 | "Johnston", 252 | "Moore", 253 | "Smyth", 254 | "O'neill", 255 | "Doherty", 256 | "Stewart", 257 | "Quinn", 258 | "Murphy", 259 | "Graham", 260 | "Mclaughlin", 261 | "Hamilton", 262 | "Murray", 263 | "Hughes", 264 | "Robertson", 265 | "Thomson", 266 | "Scott", 267 | "Macdonald", 268 | "Reid", 269 | "Clark", 270 | "Ross", 271 | "Young", 272 | "Watson", 273 | "Paterson", 274 | "Morrison", 275 | "Morgan", 276 | "Griffiths", 277 | "Edwards", 278 | "Rees", 279 | "Jenkins", 280 | "Owen", 281 | "Price", 282 | "Moss", 283 | "Richards", 284 | "Abbott", 285 | "Adams", 286 | "Armstrong", 287 | "Bahringer", 288 | "Bailey", 289 | "Barrows", 290 | "Bartell", 291 | "Bartoletti", 292 | "Barton", 293 | "Bauch", 294 | "Baumbach", 295 | "Bayer", 296 | "Beahan", 297 | "Beatty", 298 | "Becker", 299 | "Beier", 300 | "Berge", 301 | "Bergstrom", 302 | "Bode", 303 | "Bogan", 304 | "Borer", 305 | "Bosco", 306 | "Botsford", 307 | "Boyer", 308 | "Boyle", 309 | "Braun", 310 | "Bruen", 311 | "Carroll", 312 | "Carter", 313 | "Cartwright", 314 | "Casper", 315 | "Cassin", 316 | "Champlin", 317 | "Christiansen", 318 | "Cole", 319 | "Collier", 320 | "Collins", 321 | "Connelly", 322 | "Conroy", 323 | "Corkery", 324 | "Cormier", 325 | "Corwin", 326 | "Cronin", 327 | "Crooks", 328 | "Cruickshank", 329 | "Cummings", 330 | "D'amore", 331 | "Daniel", 332 | "Dare", 333 | "Daugherty", 334 | "Dickens", 335 | "Dickinson", 336 | "Dietrich", 337 | "Donnelly", 338 | "Dooley", 339 | "Douglas", 340 | "Doyle", 341 | "Durgan", 342 | "Ebert", 343 | "Emard", 344 | "Emmerich", 345 | "Erdman", 346 | "Ernser", 347 | "Fadel", 348 | "Fahey", 349 | "Farrell", 350 | "Fay", 351 | "Feeney", 352 | "Feil", 353 | "Ferry", 354 | "Fisher", 355 | "Flatley", 356 | "Gibson", 357 | "Gleason", 358 | "Glover", 359 | "Goldner", 360 | "Goodwin", 361 | "Grady", 362 | "Grant", 363 | "Greenfelder", 364 | "Greenholt", 365 | "Grimes", 366 | "Gutmann", 367 | "Hackett", 368 | "Hahn", 369 | "Haley", 370 | "Hammes", 371 | "Hand", 372 | "Hane", 373 | "Hansen", 374 | "Harber", 375 | "Hartmann", 376 | "Harvey", 377 | "Hayes", 378 | "Heaney", 379 | "Heathcote", 380 | "Heller", 381 | "Hermann", 382 | "Hermiston", 383 | "Hessel", 384 | "Hettinger", 385 | "Hickle", 386 | "Hill", 387 | "Hills", 388 | "Hoppe", 389 | "Howe", 390 | "Howell", 391 | "Hudson", 392 | "Huel", 393 | "Hyatt", 394 | "Jacobi", 395 | "Jacobs", 396 | "Jacobson", 397 | "Jerde", 398 | "Johns", 399 | "Keeling", 400 | "Kemmer", 401 | "Kessler", 402 | "Kiehn", 403 | "Kirlin", 404 | "Klein", 405 | "Koch", 406 | "Koelpin", 407 | "Kohler", 408 | "Koss", 409 | "Kovacek", 410 | "Kreiger", 411 | "Kris", 412 | "Kuhlman", 413 | "Kuhn", 414 | "Kulas", 415 | "Kunde", 416 | "Kutch", 417 | "Lakin", 418 | "Lang", 419 | "Langworth", 420 | "Larkin", 421 | "Larson", 422 | "Leannon", 423 | "Leffler", 424 | "Little", 425 | "Lockman", 426 | "Lowe", 427 | "Lynch", 428 | "Mann", 429 | "Marks", 430 | "Marvin", 431 | "Mayer", 432 | "Mccullough", 433 | "Mcdermott", 434 | "Mckenzie", 435 | "Miller", 436 | "Mills", 437 | "Monahan", 438 | "Morissette", 439 | "Mueller", 440 | "Muller", 441 | "Nader", 442 | "Nicolas", 443 | "Nolan", 444 | "O'connell", 445 | "O'conner", 446 | "O'hara", 447 | "O'keefe", 448 | "Olson", 449 | "O'reilly", 450 | "Parisian", 451 | "Parker", 452 | "Quigley", 453 | "Reilly", 454 | "Reynolds", 455 | "Rice", 456 | "Ritchie", 457 | "Rohan", 458 | "Rolfson", 459 | "Rowe", 460 | "Russel", 461 | "Rutherford", 462 | "Sanford", 463 | "Sauer", 464 | "Schmidt", 465 | "Schmitt", 466 | "Schneider", 467 | "Schroeder", 468 | "Schultz", 469 | "Shields", 470 | "Smitham", 471 | "Spencer", 472 | "Stanton", 473 | "Stark", 474 | "Stokes", 475 | "Swift", 476 | "Tillman", 477 | "Towne", 478 | "Tremblay", 479 | "Tromp", 480 | "Turcotte", 481 | "Turner", 482 | "Walsh", 483 | "Walter", 484 | "Ward", 485 | "Waters", 486 | "Weber", 487 | "Welch", 488 | "West", 489 | "Wilderman", 490 | "Wilkinson", 491 | "Williamson", 492 | "Windler", 493 | "Wolf" 494 | ] 495 | }, 496 | "company": { 497 | "suffix": [ 498 | "Pty Ltd", 499 | "and Sons", 500 | "Corp", 501 | "Group", 502 | "Brothers", 503 | "Partners" 504 | ] 505 | }, 506 | "internet": { 507 | "domain_suffix": [ 508 | "com.au", 509 | "com", 510 | "net.au", 511 | "net", 512 | "org.au", 513 | "org" 514 | ] 515 | }, 516 | "address": { 517 | "state_abbr": [ 518 | "NSW", 519 | "QLD", 520 | "NT", 521 | "SA", 522 | "WA", 523 | "TAS", 524 | "ACT", 525 | "VIC" 526 | ], 527 | "state": [ 528 | "New South Wales", 529 | "Queensland", 530 | "Northern Territory", 531 | "South Australia", 532 | "Western Australia", 533 | "Tasmania", 534 | "Australian Capital Territory", 535 | "Victoria" 536 | ], 537 | "postcode": [ 538 | "0###", 539 | "2###", 540 | "3###", 541 | "4###", 542 | "5###", 543 | "6###", 544 | "7###" 545 | ], 546 | "building_number": [ 547 | "####", 548 | "###", 549 | "##" 550 | ], 551 | "street_suffix": [ 552 | "Avenue", 553 | "Boulevard", 554 | "Circle", 555 | "Circuit", 556 | "Court", 557 | "Crescent", 558 | "Crest", 559 | "Drive", 560 | "Estate Dr", 561 | "Grove", 562 | "Hill", 563 | "Island", 564 | "Junction", 565 | "Knoll", 566 | "Lane", 567 | "Loop", 568 | "Mall", 569 | "Manor", 570 | "Meadow", 571 | "Mews", 572 | "Parade", 573 | "Parkway", 574 | "Pass", 575 | "Place", 576 | "Plaza", 577 | "Ridge", 578 | "Road", 579 | "Run", 580 | "Square", 581 | "Station St", 582 | "Street", 583 | "Summit", 584 | "Terrace", 585 | "Track", 586 | "Trail", 587 | "View Rd", 588 | "Way" 589 | ], 590 | "default_country": [ 591 | "Australia" 592 | ] 593 | }, 594 | "phone_number": { 595 | "formats": [ 596 | "0# #### ####", 597 | "+61 # #### ####", 598 | "04## ### ###", 599 | "+61 4## ### ###" 600 | ] 601 | }, 602 | "team": { 603 | "sport": [ 604 | "basketball", 605 | "football", 606 | "footy", 607 | "netball", 608 | "rugby" 609 | ] 610 | } 611 | } 612 | } 613 | } 614 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/en-CA.json: -------------------------------------------------------------------------------- 1 | { 2 | "en-CA": { 3 | "faker": { 4 | "address": { 5 | "postcode": "/[A-CEJ-NPR-TVXY][0-9][A-CEJ-NPR-TV-Z] ?[0-9][A-CEJ-NPR-TV-Z][0-9]/", 6 | "state": [ 7 | "Alberta", 8 | "British Columbia", 9 | "Manitoba", 10 | "New Brunswick", 11 | "Newfoundland and Labrador", 12 | "Nova Scotia", 13 | "Northwest Territories", 14 | "Nunavut", 15 | "Ontario", 16 | "Prince Edward Island", 17 | "Quebec", 18 | "Saskatchewan", 19 | "Yukon" 20 | ], 21 | "state_abbr": [ 22 | "AB", 23 | "BC", 24 | "MB", 25 | "NB", 26 | "NL", 27 | "NS", 28 | "NU", 29 | "NT", 30 | "ON", 31 | "PE", 32 | "QC", 33 | "SK", 34 | "YT" 35 | ], 36 | "default_country": [ 37 | "Canada" 38 | ] 39 | }, 40 | "internet": { 41 | "free_email": [ 42 | "gmail.com", 43 | "yahoo.ca", 44 | "hotmail.com" 45 | ], 46 | "domain_suffix": [ 47 | "ca", 48 | "com", 49 | "biz", 50 | "info", 51 | "name", 52 | "net", 53 | "org" 54 | ] 55 | }, 56 | "phone_number": { 57 | "formats": [ 58 | "###-###-####", 59 | "(###)###-####", 60 | "###.###.####", 61 | "1-###-###-####", 62 | "###-###-#### x###", 63 | "(###)###-#### x###", 64 | "1-###-###-#### x###", 65 | "###.###.#### x###", 66 | "###-###-#### x####", 67 | "(###)###-#### x####", 68 | "1-###-###-#### x####", 69 | "###.###.#### x####", 70 | "###-###-#### x#####", 71 | "(###)###-#### x#####", 72 | "1-###-###-#### x#####", 73 | "###.###.#### x#####" 74 | ] 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/en-GB.json: -------------------------------------------------------------------------------- 1 | { 2 | "en-GB": { 3 | "faker": { 4 | "address": { 5 | "postcode": "/[A-PR-UWYZ][A-HK-Y]?[0-9][ABEHMNPRVWXY0-9]? [0-9][ABD-HJLN-UW-Z]{2}/", 6 | "county": [ 7 | "Avon", 8 | "Bedfordshire", 9 | "Berkshire", 10 | "Borders", 11 | "Buckinghamshire", 12 | "Cambridgeshire", 13 | "Central", 14 | "Cheshire", 15 | "Cleveland", 16 | "Clwyd", 17 | "Cornwall", 18 | "County Antrim", 19 | "County Armagh", 20 | "County Down", 21 | "County Fermanagh", 22 | "County Londonderry", 23 | "County Tyrone", 24 | "Cumbria", 25 | "Derbyshire", 26 | "Devon", 27 | "Dorset", 28 | "Dumfries and Galloway", 29 | "Durham", 30 | "Dyfed", 31 | "East Sussex", 32 | "Essex", 33 | "Fife", 34 | "Gloucestershire", 35 | "Grampian", 36 | "Greater Manchester", 37 | "Gwent", 38 | "Gwynedd County", 39 | "Hampshire", 40 | "Herefordshire", 41 | "Hertfordshire", 42 | "Highlands and Islands", 43 | "Humberside", 44 | "Isle of Wight", 45 | "Kent", 46 | "Lancashire", 47 | "Leicestershire", 48 | "Lincolnshire", 49 | "Lothian", 50 | "Merseyside", 51 | "Mid Glamorgan", 52 | "Norfolk", 53 | "North Yorkshire", 54 | "Northamptonshire", 55 | "Northumberland", 56 | "Nottinghamshire", 57 | "Oxfordshire", 58 | "Powys", 59 | "Rutland", 60 | "Shropshire", 61 | "Somerset", 62 | "South Glamorgan", 63 | "South Yorkshire", 64 | "Staffordshire", 65 | "Strathclyde", 66 | "Suffolk", 67 | "Surrey", 68 | "Tayside", 69 | "Tyne and Wear", 70 | "Warwickshire", 71 | "West Glamorgan", 72 | "West Midlands", 73 | "West Sussex", 74 | "West Yorkshire", 75 | "Wiltshire", 76 | "Worcestershire" 77 | ], 78 | "uk_country": [ 79 | "England", 80 | "Scotland", 81 | "Wales", 82 | "Northern Ireland" 83 | ], 84 | "default_country": [ 85 | "England", 86 | "Scotland", 87 | "Wales", 88 | "Northern Ireland" 89 | ] 90 | }, 91 | "internet": { 92 | "domain_suffix": [ 93 | "co.uk", 94 | "com", 95 | "biz", 96 | "info", 97 | "name" 98 | ] 99 | }, 100 | "phone_number": { 101 | "formats": [ 102 | "01#### #####", 103 | "01### ######", 104 | "01#1 ### ####", 105 | "011# ### ####", 106 | "02# #### ####", 107 | "03## ### ####", 108 | "055 #### ####", 109 | "056 #### ####", 110 | "0800 ### ####", 111 | "08## ### ####", 112 | "09## ### ####", 113 | "016977 ####", 114 | "01### #####", 115 | "0500 ######", 116 | "0800 ######" 117 | ] 118 | }, 119 | "cell_phone": { 120 | "formats": [ 121 | "074## ######", 122 | "075## ######", 123 | "076## ######", 124 | "077## ######", 125 | "078## ######", 126 | "079## ######" 127 | ] 128 | } 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/en-TEST.json: -------------------------------------------------------------------------------- 1 | { 2 | "en-TEST": { 3 | "faker": { 4 | "separator": " & ", 5 | "address": { 6 | "city_prefix": ["North"], 7 | "city_suffix": ["town"], 8 | "county": ["Autauga County"], 9 | "country": ["United States of America"], 10 | "country_code": ["US"], 11 | "building_number": ["#####"], 12 | "street_suffix": ["Avenue"], 13 | "secondary_address": ["Apt. ###"], 14 | "postcode": ["#####-####"], 15 | "postcode_by_state": { 16 | "CA": "900##" 17 | }, 18 | "state": ["California"], 19 | "state_abbr": ["CA"], 20 | "time_zone": ["America/Los_Angeles"], 21 | "city": ["#{city_prefix} #{Name.first_name}#{city_suffix}"], 22 | "street_name": ["#{Name.first_name} #{street_suffix}"], 23 | "street_address": ["#{building_number} #{street_name}"], 24 | "default_country": ["United States of America"] 25 | }, 26 | "credit_card": { 27 | "visa": ["/4###########L/"], 28 | "mastercard": ["/5[1-5]##-####-####-###L/"], 29 | "discover": ["/6011-####-####-###L/"], 30 | "american_express": ["/34##-######-####L/"], 31 | "diners_club": ["/30[0-5]#-######-###L/"], 32 | "jcb": ["/3528-####-####-###L/"], 33 | "switch": ["/6759-####-####-###L/"], 34 | "solo": ["/6767-####-####-###L/"], 35 | "dankort": "/5019-####-####-###L/", 36 | "maestro": ["/50#{9,16}L/"], 37 | "forbrugsforeningen": "/6007-22##-####-###L/", 38 | "laser": ["/6304###########L/"] 39 | }, 40 | "company": { 41 | "suffix": ["Inc"], 42 | "buzzwords": [ 43 | ["Universal"], 44 | ["24 hour"], 45 | ["software"] 46 | ], 47 | "bs": [ 48 | ["implement"], 49 | ["innovative"], 50 | ["methodologies"] 51 | ], 52 | "name": ["#{Name.last_name} #{suffix}"] 53 | }, 54 | "internet": { 55 | "free_email": ["gmail.com"], 56 | "domain_suffix": ["com"], 57 | "hashtag": ["#art"] 58 | }, 59 | "lorem": { 60 | "words": ["alias"], 61 | "supplemental": ["abbas"] 62 | }, 63 | "name": { 64 | "first_name": ["Vadym"], 65 | "last_name": ["Markov"], 66 | "prefix": ["Mr."], 67 | "suffix": ["I"], 68 | "title": { 69 | "descriptor": ["Lead"], 70 | "level": ["Mobility"], 71 | "job": ["Engineer"] 72 | }, 73 | "name": ["#{prefix} #{first_name} #{last_name}"] 74 | }, 75 | "phone_number": { 76 | "area_code": ["201"], 77 | "exchange_code": ["201"], 78 | "formats": ["###-###-####"] 79 | }, 80 | "cell_phone": { 81 | "formats": ["(###) ###-####"] 82 | }, 83 | "business": { 84 | "credit_card_numbers": ["1234-2121-1221-1211"], 85 | "credit_card_expiry_dates": ["2020-10-12"], 86 | "credit_card_types": ["visa"] 87 | }, 88 | "commerce": { 89 | "color": ["black"], 90 | "department": ["Music", "Video", "Development"], 91 | "product_name": { 92 | "adjective": ["Awesome"], 93 | "material": ["Wooden"], 94 | "product": ["Hat"] 95 | } 96 | }, 97 | "team": { 98 | "creature": ["owls"], 99 | "name": ["#{Address.state} #{creature}"] 100 | }, 101 | "hacker": { 102 | "abbreviation": ["TCP"], 103 | "adjective": ["open-source"], 104 | "noun": ["matrix"], 105 | "verb": ["hack"], 106 | "ingverb": ["bypassing"] 107 | }, 108 | "app": { 109 | "name": ["Namfix"], 110 | "version": ["0.#.#"], 111 | "author": ["#{Name.name}"] 112 | }, 113 | "bank": { 114 | "name": ["ABN AMRO CORPORATE FINANCE LIMITED"], 115 | "swiftBic": ["AAFMGB21"], 116 | "ibanDetails": { 117 | "bankCountryCode": ["EN"], 118 | "ibanLetterCode": ["????"], 119 | "ibanDigits": ["############"], 120 | } 121 | } 122 | } 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/en-US.json: -------------------------------------------------------------------------------- 1 | { 2 | "en-US": { 3 | "faker": { 4 | "internet": { 5 | "domain_suffix": [ 6 | "com", 7 | "us", 8 | "biz", 9 | "info", 10 | "name", 11 | "net", 12 | "org" 13 | ] 14 | }, 15 | "address": { 16 | "default_country": [ 17 | "United States", 18 | "United States of America", 19 | "USA" 20 | ], 21 | "postcode_by_state": { 22 | "AL": "350##", 23 | "AK": "995##", 24 | "AS": "967##", 25 | "AZ": "850##", 26 | "AR": "717##", 27 | "CA": "900##", 28 | "CO": "800##", 29 | "CT": "061##", 30 | "DC": "204##", 31 | "DE": "198##", 32 | "FL": "322##", 33 | "GA": "301##", 34 | "HI": "967##", 35 | "ID": "832##", 36 | "IL": "600##", 37 | "IN": "463##", 38 | "IA": "510##", 39 | "KS": "666##", 40 | "KY": "404##", 41 | "LA": "701##", 42 | "ME": "042##", 43 | "MD": "210##", 44 | "MA": "026##", 45 | "MI": "480##", 46 | "MN": "555##", 47 | "MS": "387##", 48 | "MO": "650##", 49 | "MT": "590##", 50 | "NE": "688##", 51 | "NV": "898##", 52 | "NH": "036##", 53 | "NJ": "076##", 54 | "NM": "880##", 55 | "NY": "122##", 56 | "NC": "288##", 57 | "ND": "586##", 58 | "OH": "444##", 59 | "OK": "730##", 60 | "OR": "979##", 61 | "PA": "186##", 62 | "RI": "029##", 63 | "SC": "299##", 64 | "SD": "577##", 65 | "TN": "383##", 66 | "TX": "798##", 67 | "UT": "847##", 68 | "VT": "050##", 69 | "VA": "222##", 70 | "WA": "990##", 71 | "WV": "247##", 72 | "WI": "549##", 73 | "WY": "831##" 74 | } 75 | }, 76 | "phone_number": { 77 | "area_code": [ 78 | "201", 79 | "202", 80 | "203", 81 | "205", 82 | "206", 83 | "207", 84 | "208", 85 | "209", 86 | "210", 87 | "212", 88 | "213", 89 | "214", 90 | "215", 91 | "216", 92 | "217", 93 | "218", 94 | "219", 95 | "224", 96 | "225", 97 | "227", 98 | "228", 99 | "229", 100 | "231", 101 | "234", 102 | "239", 103 | "240", 104 | "248", 105 | "251", 106 | "252", 107 | "253", 108 | "254", 109 | "256", 110 | "260", 111 | "262", 112 | "267", 113 | "269", 114 | "270", 115 | "276", 116 | "281", 117 | "283", 118 | "301", 119 | "302", 120 | "303", 121 | "304", 122 | "305", 123 | "307", 124 | "308", 125 | "309", 126 | "310", 127 | "312", 128 | "313", 129 | "314", 130 | "315", 131 | "316", 132 | "317", 133 | "318", 134 | "319", 135 | "320", 136 | "321", 137 | "323", 138 | "330", 139 | "331", 140 | "334", 141 | "336", 142 | "337", 143 | "339", 144 | "347", 145 | "351", 146 | "352", 147 | "360", 148 | "361", 149 | "386", 150 | "401", 151 | "402", 152 | "404", 153 | "405", 154 | "406", 155 | "407", 156 | "408", 157 | "409", 158 | "410", 159 | "412", 160 | "413", 161 | "414", 162 | "415", 163 | "417", 164 | "419", 165 | "423", 166 | "424", 167 | "425", 168 | "434", 169 | "435", 170 | "440", 171 | "443", 172 | "445", 173 | "464", 174 | "469", 175 | "470", 176 | "475", 177 | "478", 178 | "479", 179 | "480", 180 | "484", 181 | "501", 182 | "502", 183 | "503", 184 | "504", 185 | "505", 186 | "507", 187 | "508", 188 | "509", 189 | "510", 190 | "512", 191 | "513", 192 | "515", 193 | "516", 194 | "517", 195 | "518", 196 | "520", 197 | "530", 198 | "540", 199 | "541", 200 | "551", 201 | "557", 202 | "559", 203 | "561", 204 | "562", 205 | "563", 206 | "564", 207 | "567", 208 | "570", 209 | "571", 210 | "573", 211 | "574", 212 | "580", 213 | "585", 214 | "586", 215 | "601", 216 | "602", 217 | "603", 218 | "605", 219 | "606", 220 | "607", 221 | "608", 222 | "609", 223 | "610", 224 | "612", 225 | "614", 226 | "615", 227 | "616", 228 | "617", 229 | "618", 230 | "619", 231 | "620", 232 | "623", 233 | "626", 234 | "630", 235 | "631", 236 | "636", 237 | "641", 238 | "646", 239 | "650", 240 | "651", 241 | "660", 242 | "661", 243 | "662", 244 | "667", 245 | "678", 246 | "682", 247 | "701", 248 | "702", 249 | "703", 250 | "704", 251 | "706", 252 | "707", 253 | "708", 254 | "712", 255 | "713", 256 | "714", 257 | "715", 258 | "716", 259 | "717", 260 | "718", 261 | "719", 262 | "720", 263 | "724", 264 | "727", 265 | "731", 266 | "732", 267 | "734", 268 | "737", 269 | "740", 270 | "754", 271 | "757", 272 | "760", 273 | "763", 274 | "765", 275 | "770", 276 | "772", 277 | "773", 278 | "774", 279 | "775", 280 | "781", 281 | "785", 282 | "786", 283 | "801", 284 | "802", 285 | "803", 286 | "804", 287 | "805", 288 | "806", 289 | "808", 290 | "810", 291 | "812", 292 | "813", 293 | "814", 294 | "815", 295 | "816", 296 | "817", 297 | "818", 298 | "828", 299 | "830", 300 | "831", 301 | "832", 302 | "835", 303 | "843", 304 | "845", 305 | "847", 306 | "848", 307 | "850", 308 | "856", 309 | "857", 310 | "858", 311 | "859", 312 | "860", 313 | "862", 314 | "863", 315 | "864", 316 | "865", 317 | "870", 318 | "872", 319 | "878", 320 | "901", 321 | "903", 322 | "904", 323 | "906", 324 | "907", 325 | "908", 326 | "909", 327 | "910", 328 | "912", 329 | "913", 330 | "914", 331 | "915", 332 | "916", 333 | "917", 334 | "918", 335 | "919", 336 | "920", 337 | "925", 338 | "928", 339 | "931", 340 | "936", 341 | "937", 342 | "940", 343 | "941", 344 | "947", 345 | "949", 346 | "952", 347 | "954", 348 | "956", 349 | "959", 350 | "970", 351 | "971", 352 | "972", 353 | "973", 354 | "975", 355 | "978", 356 | "979", 357 | "980", 358 | "984", 359 | "985", 360 | "989" 361 | ], 362 | "exchange_code": [ 363 | "201", 364 | "202", 365 | "203", 366 | "205", 367 | "206", 368 | "207", 369 | "208", 370 | "209", 371 | "210", 372 | "212", 373 | "213", 374 | "214", 375 | "215", 376 | "216", 377 | "217", 378 | "218", 379 | "219", 380 | "224", 381 | "225", 382 | "227", 383 | "228", 384 | "229", 385 | "231", 386 | "234", 387 | "239", 388 | "240", 389 | "248", 390 | "251", 391 | "252", 392 | "253", 393 | "254", 394 | "256", 395 | "260", 396 | "262", 397 | "267", 398 | "269", 399 | "270", 400 | "276", 401 | "281", 402 | "283", 403 | "301", 404 | "302", 405 | "303", 406 | "304", 407 | "305", 408 | "307", 409 | "308", 410 | "309", 411 | "310", 412 | "312", 413 | "313", 414 | "314", 415 | "315", 416 | "316", 417 | "317", 418 | "318", 419 | "319", 420 | "320", 421 | "321", 422 | "323", 423 | "330", 424 | "331", 425 | "334", 426 | "336", 427 | "337", 428 | "339", 429 | "347", 430 | "351", 431 | "352", 432 | "360", 433 | "361", 434 | "386", 435 | "401", 436 | "402", 437 | "404", 438 | "405", 439 | "406", 440 | "407", 441 | "408", 442 | "409", 443 | "410", 444 | "412", 445 | "413", 446 | "414", 447 | "415", 448 | "417", 449 | "419", 450 | "423", 451 | "424", 452 | "425", 453 | "434", 454 | "435", 455 | "440", 456 | "443", 457 | "445", 458 | "464", 459 | "469", 460 | "470", 461 | "475", 462 | "478", 463 | "479", 464 | "480", 465 | "484", 466 | "501", 467 | "502", 468 | "503", 469 | "504", 470 | "505", 471 | "507", 472 | "508", 473 | "509", 474 | "510", 475 | "512", 476 | "513", 477 | "515", 478 | "516", 479 | "517", 480 | "518", 481 | "520", 482 | "530", 483 | "540", 484 | "541", 485 | "551", 486 | "557", 487 | "559", 488 | "561", 489 | "562", 490 | "563", 491 | "564", 492 | "567", 493 | "570", 494 | "571", 495 | "573", 496 | "574", 497 | "580", 498 | "585", 499 | "586", 500 | "601", 501 | "602", 502 | "603", 503 | "605", 504 | "606", 505 | "607", 506 | "608", 507 | "609", 508 | "610", 509 | "612", 510 | "614", 511 | "615", 512 | "616", 513 | "617", 514 | "618", 515 | "619", 516 | "620", 517 | "623", 518 | "626", 519 | "630", 520 | "631", 521 | "636", 522 | "641", 523 | "646", 524 | "650", 525 | "651", 526 | "660", 527 | "661", 528 | "662", 529 | "667", 530 | "678", 531 | "682", 532 | "701", 533 | "702", 534 | "703", 535 | "704", 536 | "706", 537 | "707", 538 | "708", 539 | "712", 540 | "713", 541 | "714", 542 | "715", 543 | "716", 544 | "717", 545 | "718", 546 | "719", 547 | "720", 548 | "724", 549 | "727", 550 | "731", 551 | "732", 552 | "734", 553 | "737", 554 | "740", 555 | "754", 556 | "757", 557 | "760", 558 | "763", 559 | "765", 560 | "770", 561 | "772", 562 | "773", 563 | "774", 564 | "775", 565 | "781", 566 | "785", 567 | "786", 568 | "801", 569 | "802", 570 | "803", 571 | "804", 572 | "805", 573 | "806", 574 | "808", 575 | "810", 576 | "812", 577 | "813", 578 | "814", 579 | "815", 580 | "816", 581 | "817", 582 | "818", 583 | "828", 584 | "830", 585 | "831", 586 | "832", 587 | "835", 588 | "843", 589 | "845", 590 | "847", 591 | "848", 592 | "850", 593 | "856", 594 | "857", 595 | "858", 596 | "859", 597 | "860", 598 | "862", 599 | "863", 600 | "864", 601 | "865", 602 | "870", 603 | "872", 604 | "878", 605 | "901", 606 | "903", 607 | "904", 608 | "906", 609 | "907", 610 | "908", 611 | "909", 612 | "910", 613 | "912", 614 | "913", 615 | "914", 616 | "915", 617 | "916", 618 | "917", 619 | "918", 620 | "919", 621 | "920", 622 | "925", 623 | "928", 624 | "931", 625 | "936", 626 | "937", 627 | "940", 628 | "941", 629 | "947", 630 | "949", 631 | "952", 632 | "954", 633 | "956", 634 | "959", 635 | "970", 636 | "971", 637 | "972", 638 | "973", 639 | "975", 640 | "978", 641 | "979", 642 | "980", 643 | "984", 644 | "985", 645 | "989" 646 | ], 647 | "formats": [ 648 | "#{PhoneNumber.area_code}-#{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number}", 649 | "(#{PhoneNumber.area_code}) #{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number}", 650 | "1-#{PhoneNumber.area_code}-#{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number}", 651 | "#{PhoneNumber.area_code}.#{PhoneNumber.exchange_code}.#{PhoneNumber.subscriber_number}", 652 | "#{PhoneNumber.area_code}-#{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number}", 653 | "(#{PhoneNumber.area_code}) #{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number}", 654 | "1-#{PhoneNumber.area_code}-#{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number}", 655 | "#{PhoneNumber.area_code}.#{PhoneNumber.exchange_code}.#{PhoneNumber.subscriber_number}", 656 | "#{PhoneNumber.area_code}-#{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}", 657 | "(#{PhoneNumber.area_code}) #{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}", 658 | "1-#{PhoneNumber.area_code}-#{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}", 659 | "#{PhoneNumber.area_code}.#{PhoneNumber.exchange_code}.#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}", 660 | "#{PhoneNumber.area_code}-#{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}", 661 | "(#{PhoneNumber.area_code}) #{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}", 662 | "1-#{PhoneNumber.area_code}-#{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}", 663 | "#{PhoneNumber.area_code}.#{PhoneNumber.exchange_code}.#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}", 664 | "#{PhoneNumber.area_code}-#{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}", 665 | "(#{PhoneNumber.area_code}) #{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}", 666 | "1-#{PhoneNumber.area_code}-#{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}", 667 | "#{PhoneNumber.area_code}.#{PhoneNumber.exchange_code}.#{PhoneNumber.subscriber_number} x#{PhoneNumber.extension}" 668 | ] 669 | } 670 | } 671 | } 672 | } 673 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/ja.json: -------------------------------------------------------------------------------- 1 | { 2 | "ja": { 3 | "faker": { 4 | "address": { 5 | "postcode": [ 6 | "###-####" 7 | ], 8 | "state": [ 9 | "北海道", 10 | "青森県", 11 | "岩手県", 12 | "宮城県", 13 | "秋田県", 14 | "山形県", 15 | "福島県", 16 | "茨城県", 17 | "栃木県", 18 | "群馬県", 19 | "埼玉県", 20 | "千葉県", 21 | "東京都", 22 | "神奈川県", 23 | "新潟県", 24 | "富山県", 25 | "石川県", 26 | "福井県", 27 | "山梨県", 28 | "長野県", 29 | "岐阜県", 30 | "静岡県", 31 | "愛知県", 32 | "三重県", 33 | "滋賀県", 34 | "京都府", 35 | "大阪府", 36 | "兵庫県", 37 | "奈良県", 38 | "和歌山県", 39 | "鳥取県", 40 | "島根県", 41 | "岡山県", 42 | "広島県", 43 | "山口県", 44 | "徳島県", 45 | "香川県", 46 | "愛媛県", 47 | "高知県", 48 | "福岡県", 49 | "佐賀県", 50 | "長崎県", 51 | "熊本県", 52 | "大分県", 53 | "宮崎県", 54 | "鹿児島県", 55 | "沖縄県" 56 | ], 57 | "state_abbr": [ 58 | "1", 59 | "2", 60 | "3", 61 | "4", 62 | "5", 63 | "6", 64 | "7", 65 | "8", 66 | "9", 67 | "10", 68 | "11", 69 | "12", 70 | "13", 71 | "14", 72 | "15", 73 | "16", 74 | "17", 75 | "18", 76 | "19", 77 | "20", 78 | "21", 79 | "22", 80 | "23", 81 | "24", 82 | "25", 83 | "26", 84 | "27", 85 | "28", 86 | "29", 87 | "30", 88 | "31", 89 | "32", 90 | "33", 91 | "34", 92 | "35", 93 | "36", 94 | "37", 95 | "38", 96 | "39", 97 | "40", 98 | "41", 99 | "42", 100 | "43", 101 | "44", 102 | "45", 103 | "46", 104 | "47" 105 | ], 106 | "city_prefix": [ 107 | "北", 108 | "東", 109 | "西", 110 | "南", 111 | "新", 112 | "湖", 113 | "港" 114 | ], 115 | "city_suffix": [ 116 | "市", 117 | "区", 118 | "町", 119 | "村" 120 | ], 121 | "city": [ 122 | "#{city_prefix}#{Name.first_name}#{city_suffix}", 123 | "#{Name.first_name}#{city_suffix}", 124 | "#{city_prefix}#{Name.last_name}#{city_suffix}", 125 | "#{Name.last_name}#{city_suffix}" 126 | ], 127 | "street_name": [ 128 | "#{Name.first_name}#{street_suffix}", 129 | "#{Name.last_name}#{street_suffix}" 130 | ] 131 | }, 132 | "phone_number": { 133 | "formats": [ 134 | "0####-#-####", 135 | "0###-##-####", 136 | "0##-###-####", 137 | "0#-####-####" 138 | ] 139 | }, 140 | "cell_phone": { 141 | "formats": [ 142 | "090-####-####", 143 | "080-####-####", 144 | "070-####-####" 145 | ] 146 | }, 147 | "name": { 148 | "last_name": [ 149 | "佐藤", 150 | "鈴木", 151 | "高橋", 152 | "田中", 153 | "渡辺", 154 | "伊藤", 155 | "山本", 156 | "中村", 157 | "小林", 158 | "加藤", 159 | "吉田", 160 | "山田", 161 | "佐々木", 162 | "山口", 163 | "斎藤", 164 | "松本", 165 | "井上", 166 | "木村", 167 | "林", 168 | "清水" 169 | ], 170 | "first_name": [ 171 | "大翔", 172 | "蓮", 173 | "颯太", 174 | "樹", 175 | "大和", 176 | "陽翔", 177 | "陸斗", 178 | "太一", 179 | "海翔", 180 | "蒼空", 181 | "翼", 182 | "陽菜", 183 | "結愛", 184 | "結衣", 185 | "杏", 186 | "莉子", 187 | "美羽", 188 | "結菜", 189 | "心愛", 190 | "愛菜", 191 | "美咲" 192 | ], 193 | "name": [ 194 | "#{last_name} #{first_name}" 195 | ] 196 | } 197 | } 198 | } 199 | } 200 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/ko.json: -------------------------------------------------------------------------------- 1 | { 2 | "ko": { 3 | "faker": { 4 | "address": { 5 | "postcode": [ 6 | "###-###" 7 | ], 8 | "state": [ 9 | "강원", 10 | "경기", 11 | "경남", 12 | "경북", 13 | "광주", 14 | "대구", 15 | "대전", 16 | "부산", 17 | "서울", 18 | "울산", 19 | "인천", 20 | "전남", 21 | "전북", 22 | "제주", 23 | "충남", 24 | "충북", 25 | "세종" 26 | ], 27 | "state_abbr": [ 28 | "강원", 29 | "경기", 30 | "경남", 31 | "경북", 32 | "광주", 33 | "대구", 34 | "대전", 35 | "부산", 36 | "서울", 37 | "울산", 38 | "인천", 39 | "전남", 40 | "전북", 41 | "제주", 42 | "충남", 43 | "충북", 44 | "세종" 45 | ], 46 | "city_suffix": [ 47 | "구", 48 | "시", 49 | "군" 50 | ], 51 | "city_name": [ 52 | "강릉", 53 | "양양", 54 | "인제", 55 | "광주", 56 | "구리", 57 | "부천", 58 | "밀양", 59 | "통영", 60 | "창원", 61 | "거창", 62 | "고성", 63 | "양산", 64 | "김천", 65 | "구미", 66 | "영주", 67 | "광산", 68 | "남", 69 | "북", 70 | "고창", 71 | "군산", 72 | "남원", 73 | "동작", 74 | "마포", 75 | "송파", 76 | "용산", 77 | "부평", 78 | "강화", 79 | "수성" 80 | ], 81 | "city": [ 82 | "#{city_name}#{city_suffix}" 83 | ], 84 | "street_root": [ 85 | "상계", 86 | "화곡", 87 | "신정", 88 | "목", 89 | "잠실", 90 | "면목", 91 | "주안", 92 | "안양", 93 | "중", 94 | "정왕", 95 | "구로", 96 | "신월", 97 | "연산", 98 | "부평", 99 | "창", 100 | "만수", 101 | "중계", 102 | "검단", 103 | "시흥", 104 | "상도", 105 | "방배", 106 | "장유", 107 | "상", 108 | "광명", 109 | "신길", 110 | "행신", 111 | "대명", 112 | "동탄" 113 | ], 114 | "street_suffix": [ 115 | "읍", 116 | "면", 117 | "동" 118 | ], 119 | "street_name": [ 120 | "#{street_root}#{street_suffix}" 121 | ] 122 | }, 123 | "phone_number": { 124 | "formats": [ 125 | "0#-#####-####", 126 | "0##-###-####", 127 | "0##-####-####" 128 | ] 129 | }, 130 | "company": { 131 | "suffix": [ 132 | "연구소", 133 | "게임즈", 134 | "그룹", 135 | "전자", 136 | "물산", 137 | "코리아" 138 | ], 139 | "prefix": [ 140 | "주식회사", 141 | "한국" 142 | ], 143 | "name": [ 144 | "#{prefix} #{Name.first_name}", 145 | "#{Name.first_name} #{suffix}" 146 | ] 147 | }, 148 | "internet": { 149 | "free_email": [ 150 | "gmail.com", 151 | "yahoo.co.kr", 152 | "hanmail.net", 153 | "naver.com" 154 | ], 155 | "domain_suffix": [ 156 | "co.kr", 157 | "com", 158 | "biz", 159 | "info", 160 | "ne.kr", 161 | "net", 162 | "or.kr", 163 | "org" 164 | ] 165 | }, 166 | "lorem": { 167 | "words": [ 168 | "국가는", 169 | "법률이", 170 | "정하는", 171 | "바에", 172 | "의하여", 173 | "재외국민을", 174 | "보호할", 175 | "의무를", 176 | "진다.", 177 | "모든", 178 | "국민은", 179 | "신체의", 180 | "자유를", 181 | "가진다.", 182 | "국가는", 183 | "전통문화의", 184 | "계승·발전과", 185 | "민족문화의", 186 | "창달에", 187 | "노력하여야", 188 | "한다.", 189 | "통신·방송의", 190 | "시설기준과", 191 | "신문의", 192 | "기능을", 193 | "보장하기", 194 | "위하여", 195 | "필요한", 196 | "사항은", 197 | "법률로", 198 | "정한다.", 199 | "헌법에", 200 | "의하여", 201 | "체결·공포된", 202 | "조약과", 203 | "일반적으로", 204 | "승인된", 205 | "국제법규는", 206 | "국내법과", 207 | "같은", 208 | "효력을", 209 | "가진다.", 210 | "다만,", 211 | "현행범인인", 212 | "경우와", 213 | "장기", 214 | "3년", 215 | "이상의", 216 | "형에", 217 | "해당하는", 218 | "죄를", 219 | "범하고", 220 | "도피", 221 | "또는", 222 | "증거인멸의", 223 | "염려가", 224 | "있을", 225 | "때에는", 226 | "사후에", 227 | "영장을", 228 | "청구할", 229 | "수", 230 | "있다.", 231 | "저작자·발명가·과학기술자와", 232 | "예술가의", 233 | "권리는", 234 | "법률로써", 235 | "보호한다.", 236 | "형사피고인은", 237 | "유죄의", 238 | "판결이", 239 | "확정될", 240 | "때까지는", 241 | "무죄로", 242 | "추정된다.", 243 | "모든", 244 | "국민은", 245 | "행위시의", 246 | "법률에", 247 | "의하여", 248 | "범죄를", 249 | "구성하지", 250 | "아니하는", 251 | "행위로", 252 | "소추되지", 253 | "아니하며,", 254 | "동일한", 255 | "범죄에", 256 | "대하여", 257 | "거듭", 258 | "처벌받지", 259 | "아니한다.", 260 | "국가는", 261 | "평생교육을", 262 | "진흥하여야", 263 | "한다.", 264 | "모든", 265 | "국민은", 266 | "사생활의", 267 | "비밀과", 268 | "자유를", 269 | "침해받지", 270 | "아니한다.", 271 | "의무교육은", 272 | "무상으로", 273 | "한다.", 274 | "저작자·발명가·과학기술자와", 275 | "예술가의", 276 | "권리는", 277 | "법률로써", 278 | "보호한다.", 279 | "국가는", 280 | "모성의", 281 | "보호를", 282 | "위하여", 283 | "노력하여야", 284 | "한다.", 285 | "헌법에", 286 | "의하여", 287 | "체결·공포된", 288 | "조약과", 289 | "일반적으로", 290 | "승인된", 291 | "국제법규는", 292 | "국내법과", 293 | "같은", 294 | "효력을", 295 | "가진다." 296 | ] 297 | }, 298 | "name": { 299 | "last_name": [ 300 | "김", 301 | "이", 302 | "박", 303 | "최", 304 | "정", 305 | "강", 306 | "조", 307 | "윤", 308 | "장", 309 | "임", 310 | "오", 311 | "한", 312 | "신", 313 | "서", 314 | "권", 315 | "황", 316 | "안", 317 | "송", 318 | "류", 319 | "홍" 320 | ], 321 | "first_name": [ 322 | "서연", 323 | "민서", 324 | "서현", 325 | "지우", 326 | "서윤", 327 | "지민", 328 | "수빈", 329 | "하은", 330 | "예은", 331 | "윤서", 332 | "민준", 333 | "지후", 334 | "지훈", 335 | "준서", 336 | "현우", 337 | "예준", 338 | "건우", 339 | "현준", 340 | "민재", 341 | "우진", 342 | "은주" 343 | ], 344 | "name": [ 345 | "#{last_name} #{first_name}" 346 | ] 347 | } 348 | } 349 | } 350 | } 351 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/nb-NO.json: -------------------------------------------------------------------------------- 1 | { 2 | "nb-NO": { 3 | "faker": { 4 | "address": { 5 | "city_root": [ 6 | "Fet", 7 | "Gjes", 8 | "Høy", 9 | "Inn", 10 | "Fager", 11 | "Lille", 12 | "Lo", 13 | "Mal", 14 | "Nord", 15 | "Nær", 16 | "Sand", 17 | "Sme", 18 | "Stav", 19 | "Stor", 20 | "Tand", 21 | "Ut", 22 | "Vest" 23 | ], 24 | "city_suffix": [ 25 | "berg", 26 | "borg", 27 | "by", 28 | "bø", 29 | "dal", 30 | "eid", 31 | "fjell", 32 | "fjord", 33 | "foss", 34 | "grunn", 35 | "hamn", 36 | "havn", 37 | "helle", 38 | "mark", 39 | "nes", 40 | "odden", 41 | "sand", 42 | "sjøen", 43 | "stad", 44 | "strand", 45 | "strøm", 46 | "sund", 47 | "vik", 48 | "vær", 49 | "våg", 50 | "ø", 51 | "øy", 52 | "ås" 53 | ], 54 | "street_prefix": [ 55 | "Øvre", 56 | "Nedre", 57 | "Søndre", 58 | "Gamle", 59 | "Østre", 60 | "Vestre" 61 | ], 62 | "street_root": [ 63 | "Eike", 64 | "Bjørke", 65 | "Gran", 66 | "Vass", 67 | "Furu", 68 | "Litj", 69 | "Lille", 70 | "Høy", 71 | "Fosse", 72 | "Elve", 73 | "Ku", 74 | "Konvall", 75 | "Soldugg", 76 | "Hestemyr", 77 | "Granitt", 78 | "Hegge", 79 | "Rogne", 80 | "Fiol", 81 | "Sol", 82 | "Ting", 83 | "Malm", 84 | "Klokker", 85 | "Preste", 86 | "Dam", 87 | "Geiterygg", 88 | "Bekke", 89 | "Berg", 90 | "Kirke", 91 | "Kors", 92 | "Bru", 93 | "Blåveis", 94 | "Torg", 95 | "Sjø" 96 | ], 97 | "street_suffix": [ 98 | "alléen", 99 | "bakken", 100 | "berget", 101 | "bråten", 102 | "eggen", 103 | "engen", 104 | "ekra", 105 | "faret", 106 | "flata", 107 | "gata", 108 | "gjerdet", 109 | "grenda", 110 | "gropa", 111 | "hagen", 112 | "haugen", 113 | "havna", 114 | "holtet", 115 | "høgda", 116 | "jordet", 117 | "kollen", 118 | "kroken", 119 | "lia", 120 | "lunden", 121 | "lyngen", 122 | "løkka", 123 | "marka", 124 | "moen", 125 | "myra", 126 | "plassen", 127 | "ringen", 128 | "roa", 129 | "røa", 130 | "skogen", 131 | "skrenten", 132 | "spranget", 133 | "stien", 134 | "stranda", 135 | "stubben", 136 | "stykket", 137 | "svingen", 138 | "tjernet", 139 | "toppen", 140 | "tunet", 141 | "vollen", 142 | "vika", 143 | "åsen" 144 | ], 145 | "common_street_suffix": [ 146 | "sgate", 147 | "svei", 148 | "s Gate", 149 | "s Vei", 150 | "gata", 151 | "veien" 152 | ], 153 | "building_number": [ 154 | "#", 155 | "##" 156 | ], 157 | "secondary_address": [ 158 | "Leil. ###", 159 | "Oppgang A", 160 | "Oppgang B" 161 | ], 162 | "postcode": [ 163 | "####", 164 | "####", 165 | "####", 166 | "0###" 167 | ], 168 | "state": [ 169 | "" 170 | ], 171 | "city": [ 172 | "#{city_root}#{city_suffix}" 173 | ], 174 | "street_name": [ 175 | "#{street_root}#{street_suffix}", 176 | "#{street_prefix} #{street_root}#{street_suffix}", 177 | "#{Name.first_name}#{common_street_suffix}", 178 | "#{Name.last_name}#{common_street_suffix}" 179 | ], 180 | "street_address": [ 181 | "#{street_name} #{building_number}" 182 | ], 183 | "default_country": [ 184 | "Norge" 185 | ] 186 | }, 187 | "company": { 188 | "suffix": [ 189 | "Gruppen", 190 | "AS", 191 | "ASA", 192 | "BA", 193 | "RFH", 194 | "og Sønner" 195 | ], 196 | "name": [ 197 | "#{Name.last_name} #{suffix}", 198 | "#{Name.last_name}-#{Name.last_name}", 199 | "#{Name.last_name}, #{Name.last_name} og #{Name.last_name}" 200 | ] 201 | }, 202 | "internet": { 203 | "domain_suffix": [ 204 | "no", 205 | "com", 206 | "net", 207 | "org" 208 | ] 209 | }, 210 | "name": { 211 | "first_name": [ 212 | "Emma", 213 | "Sara", 214 | "Thea", 215 | "Ida", 216 | "Julie", 217 | "Nora", 218 | "Emilie", 219 | "Ingrid", 220 | "Hanna", 221 | "Maria", 222 | "Sofie", 223 | "Anna", 224 | "Malin", 225 | "Amalie", 226 | "Vilde", 227 | "Frida", 228 | "Andrea", 229 | "Tuva", 230 | "Victoria", 231 | "Mia", 232 | "Karoline", 233 | "Mathilde", 234 | "Martine", 235 | "Linnea", 236 | "Marte", 237 | "Hedda", 238 | "Marie", 239 | "Helene", 240 | "Silje", 241 | "Leah", 242 | "Maja", 243 | "Elise", 244 | "Oda", 245 | "Kristine", 246 | "Aurora", 247 | "Kaja", 248 | "Camilla", 249 | "Mari", 250 | "Maren", 251 | "Mina", 252 | "Selma", 253 | "Jenny", 254 | "Celine", 255 | "Eline", 256 | "Sunniva", 257 | "Natalie", 258 | "Tiril", 259 | "Synne", 260 | "Sandra", 261 | "Madeleine", 262 | "Markus", 263 | "Mathias", 264 | "Kristian", 265 | "Jonas", 266 | "Andreas", 267 | "Alexander", 268 | "Martin", 269 | "Sander", 270 | "Daniel", 271 | "Magnus", 272 | "Henrik", 273 | "Tobias", 274 | "Kristoffer", 275 | "Emil", 276 | "Adrian", 277 | "Sebastian", 278 | "Marius", 279 | "Elias", 280 | "Fredrik", 281 | "Thomas", 282 | "Sondre", 283 | "Benjamin", 284 | "Jakob", 285 | "Oliver", 286 | "Lucas", 287 | "Oskar", 288 | "Nikolai", 289 | "Filip", 290 | "Mats", 291 | "William", 292 | "Erik", 293 | "Simen", 294 | "Ole", 295 | "Eirik", 296 | "Isak", 297 | "Kasper", 298 | "Noah", 299 | "Lars", 300 | "Joakim", 301 | "Johannes", 302 | "Håkon", 303 | "Sindre", 304 | "Jørgen", 305 | "Herman", 306 | "Anders", 307 | "Jonathan", 308 | "Even", 309 | "Theodor", 310 | "Mikkel", 311 | "Aksel" 312 | ], 313 | "feminine_name": [ 314 | "Emma", 315 | "Sara", 316 | "Thea", 317 | "Ida", 318 | "Julie", 319 | "Nora", 320 | "Emilie", 321 | "Ingrid", 322 | "Hanna", 323 | "Maria", 324 | "Sofie", 325 | "Anna", 326 | "Malin", 327 | "Amalie", 328 | "Vilde", 329 | "Frida", 330 | "Andrea", 331 | "Tuva", 332 | "Victoria", 333 | "Mia", 334 | "Karoline", 335 | "Mathilde", 336 | "Martine", 337 | "Linnea", 338 | "Marte", 339 | "Hedda", 340 | "Marie", 341 | "Helene", 342 | "Silje", 343 | "Leah", 344 | "Maja", 345 | "Elise", 346 | "Oda", 347 | "Kristine", 348 | "Aurora", 349 | "Kaja", 350 | "Camilla", 351 | "Mari", 352 | "Maren", 353 | "Mina", 354 | "Selma", 355 | "Jenny", 356 | "Celine", 357 | "Eline", 358 | "Sunniva", 359 | "Natalie", 360 | "Tiril", 361 | "Synne", 362 | "Sandra", 363 | "Madeleine" 364 | ], 365 | "masculine_name": [ 366 | "Markus", 367 | "Mathias", 368 | "Kristian", 369 | "Jonas", 370 | "Andreas", 371 | "Alexander", 372 | "Martin", 373 | "Sander", 374 | "Daniel", 375 | "Magnus", 376 | "Henrik", 377 | "Tobias", 378 | "Kristoffer", 379 | "Emil", 380 | "Adrian", 381 | "Sebastian", 382 | "Marius", 383 | "Elias", 384 | "Fredrik", 385 | "Thomas", 386 | "Sondre", 387 | "Benjamin", 388 | "Jakob", 389 | "Oliver", 390 | "Lucas", 391 | "Oskar", 392 | "Nikolai", 393 | "Filip", 394 | "Mats", 395 | "William", 396 | "Erik", 397 | "Simen", 398 | "Ole", 399 | "Eirik", 400 | "Isak", 401 | "Kasper", 402 | "Noah", 403 | "Lars", 404 | "Joakim", 405 | "Johannes", 406 | "Håkon", 407 | "Sindre", 408 | "Jørgen", 409 | "Herman", 410 | "Anders", 411 | "Jonathan", 412 | "Even", 413 | "Theodor", 414 | "Mikkel", 415 | "Aksel" 416 | ], 417 | "last_name": [ 418 | "Johansen", 419 | "Hansen", 420 | "Andersen", 421 | "Kristiansen", 422 | "Larsen", 423 | "Olsen", 424 | "Solberg", 425 | "Andresen", 426 | "Pedersen", 427 | "Nilsen", 428 | "Berg", 429 | "Halvorsen", 430 | "Karlsen", 431 | "Svendsen", 432 | "Jensen", 433 | "Haugen", 434 | "Martinsen", 435 | "Eriksen", 436 | "Sørensen", 437 | "Johnsen", 438 | "Myhrer", 439 | "Johannessen", 440 | "Nielsen", 441 | "Hagen", 442 | "Pettersen", 443 | "Bakke", 444 | "Skuterud", 445 | "Løken", 446 | "Gundersen", 447 | "Strand", 448 | "Jørgensen", 449 | "Kvarme", 450 | "Røed", 451 | "Sæther", 452 | "Stensrud", 453 | "Moe", 454 | "Kristoffersen", 455 | "Jakobsen", 456 | "Holm", 457 | "Aas", 458 | "Lie", 459 | "Moen", 460 | "Andreassen", 461 | "Vedvik", 462 | "Nguyen", 463 | "Jacobsen", 464 | "Torgersen", 465 | "Ruud", 466 | "Krogh", 467 | "Christiansen", 468 | "Bjerke", 469 | "Aalerud", 470 | "Borge", 471 | "Sørlie", 472 | "Berge", 473 | "Østli", 474 | "Ødegård", 475 | "Torp", 476 | "Henriksen", 477 | "Haukelidsæter", 478 | "Fjeld", 479 | "Danielsen", 480 | "Aasen", 481 | "Fredriksen", 482 | "Dahl", 483 | "Berntsen", 484 | "Arnesen", 485 | "Wold", 486 | "Thoresen", 487 | "Solheim", 488 | "Skoglund", 489 | "Bakken", 490 | "Amundsen", 491 | "Solli", 492 | "Smogeli", 493 | "Kristensen", 494 | "Glosli", 495 | "Fossum", 496 | "Evensen", 497 | "Eide", 498 | "Carlsen", 499 | "Østby", 500 | "Vegge", 501 | "Tangen", 502 | "Smedsrud", 503 | "Olstad", 504 | "Lunde", 505 | "Kleven", 506 | "Huseby", 507 | "Bjørnstad", 508 | "Ryan", 509 | "Rasmussen", 510 | "Nygård", 511 | "Nordskaug", 512 | "Nordby", 513 | "Mathisen", 514 | "Hopland", 515 | "Gran", 516 | "Finstad", 517 | "Edvardsen" 518 | ], 519 | "prefix": [ 520 | "Dr.", 521 | "Prof." 522 | ], 523 | "suffix": [ 524 | "Jr.", 525 | "Sr.", 526 | "I", 527 | "II", 528 | "III", 529 | "IV", 530 | "V" 531 | ], 532 | "name": [ 533 | "#{prefix} #{first_name} #{last_name}", 534 | "#{first_name} #{last_name} #{suffix}", 535 | "#{feminine_name} #{feminine_name} #{last_name}", 536 | "#{masculine_name} #{masculine_name} #{last_name}", 537 | "#{first_name} #{last_name} #{last_name}", 538 | "#{first_name} #{last_name}" 539 | ] 540 | }, 541 | "phone_number": { 542 | "formats": [ 543 | "########", 544 | "## ## ## ##", 545 | "### ## ###", 546 | "+47 ## ## ## ##" 547 | ] 548 | } 549 | } 550 | } 551 | } 552 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "nl": { 3 | "faker": { 4 | "bank": { 5 | "name": [ 6 | "UBS CLEARING AND EXECUTION SERVICES LIMITED", 7 | "ABN AMRO CORPORATE FINANCE LIMITED", 8 | "ABN AMRO FUND MANAGERS LIMITED", 9 | "ABN AMRO HOARE GOVETT SECURITIES", 10 | "ABN AMRO HOARE GOVETT CORPORATE FINANCE LTD.", 11 | "ALKEN ASSET MANAGEMENT", 12 | "ABN AMRO HOARE GOVETT LIMITED", 13 | "AAC CAPITAL PARTNERS LIMITED", 14 | "ABBOTSTONE AGRICULTURAL PROPERTY UNIT TRUST", 15 | "ABN AMRO QUOTED INVESTMENTS (UK) LIMITED", 16 | "ABN AMRO MEZZANINE (UK) LIMITED", 17 | "ABBEY LIFE", 18 | "SANTANDER UK PLC", 19 | "OTKRITIE SECURITIES LIMITED", 20 | "ABC INTERNATIONAL BANK PLC", 21 | "ALLIED BANK PHILIPPINES (UK) PLC", 22 | "ABU DHABI ISLAMIC BANK", 23 | "ABG SUNDAL COLLIER LIMITED", 24 | "PGMS (GLASGOW) LIMITED", 25 | "ABINGWORTH MANAGEMENT LIMITED", 26 | "THE ROYAL BANK OF SCOTLAND PLC (FORMER RBS NV)" 27 | ], 28 | "swiftBic": [ 29 | "AACCGB21", 30 | "AACNGB21", 31 | "AAFMGB21", 32 | "AAHOGB21", 33 | "AAHVGB21", 34 | "AANLGB21", 35 | "AANLGB2L", 36 | "AAOGGB21", 37 | "AAPEGB21", 38 | "AAPUGB21", 39 | "AAQIGB21", 40 | "ABAZGB21", 41 | "ABBEGB21", 42 | "ABBYGB2L", 43 | "ABCCGB22", 44 | "ABCEGB2L", 45 | "ABCMGB21", 46 | "ABDIGB21", 47 | "ABECGB21", 48 | "ABFIGB21", 49 | "ABMNGB21", 50 | "ABNAGB21VOC" 51 | ], 52 | "ibanDetails": { 53 | "bankCountryCode": "NL", 54 | "ibanLetterCode": ["RABO", "BUNQ", "ABNA", "INGB"], 55 | "ibanDigits": "############", 56 | } 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/sv.json: -------------------------------------------------------------------------------- 1 | { 2 | "sv": { 3 | "faker": { 4 | "address": { 5 | "city_prefix": [ 6 | "Söder", 7 | "Norr", 8 | "Väst", 9 | "Öster", 10 | "Aling", 11 | "Ar", 12 | "Av", 13 | "Bo", 14 | "Br", 15 | "Bå", 16 | "Ek", 17 | "En", 18 | "Esk", 19 | "Fal", 20 | "Gäv", 21 | "Göte", 22 | "Ha", 23 | "Helsing", 24 | "Karl", 25 | "Krist", 26 | "Kram", 27 | "Kung", 28 | "Kö", 29 | "Lyck", 30 | "Ny" 31 | ], 32 | "city_suffix": [ 33 | "stad", 34 | "land", 35 | "sås", 36 | "ås", 37 | "holm", 38 | "tuna", 39 | "sta", 40 | "berg", 41 | "löv", 42 | "borg", 43 | "mora", 44 | "hamn", 45 | "fors", 46 | "köping", 47 | "by", 48 | "hult", 49 | "torp", 50 | "fred", 51 | "vik" 52 | ], 53 | "country": [ 54 | "Ryssland", 55 | "Kanada", 56 | "Kina", 57 | "USA", 58 | "Brasilien", 59 | "Australien", 60 | "Indien", 61 | "Argentina", 62 | "Kazakstan", 63 | "Algeriet", 64 | "DR Kongo", 65 | "Danmark", 66 | "Färöarna", 67 | "Grönland", 68 | "Saudiarabien", 69 | "Mexiko", 70 | "Indonesien", 71 | "Sudan", 72 | "Libyen", 73 | "Iran", 74 | "Mongoliet", 75 | "Peru", 76 | "Tchad", 77 | "Niger", 78 | "Angola", 79 | "Mali", 80 | "Sydafrika", 81 | "Colombia", 82 | "Etiopien", 83 | "Bolivia", 84 | "Mauretanien", 85 | "Egypten", 86 | "Tanzania", 87 | "Nigeria", 88 | "Venezuela", 89 | "Namibia", 90 | "Pakistan", 91 | "Moçambique", 92 | "Turkiet", 93 | "Chile", 94 | "Zambia", 95 | "Marocko", 96 | "Västsahara", 97 | "Burma", 98 | "Afghanistan", 99 | "Somalia", 100 | "Centralafrikanska republiken", 101 | "Sydsudan", 102 | "Ukraina", 103 | "Botswana", 104 | "Madagaskar", 105 | "Kenya", 106 | "Frankrike", 107 | "Franska Guyana", 108 | "Jemen", 109 | "Thailand", 110 | "Spanien", 111 | "Turkmenistan", 112 | "Kamerun", 113 | "Papua Nya Guinea", 114 | "Sverige", 115 | "Uzbekistan", 116 | "Irak", 117 | "Paraguay", 118 | "Zimbabwe", 119 | "Japan", 120 | "Tyskland", 121 | "Kongo", 122 | "Finland", 123 | "Malaysia", 124 | "Vietnam", 125 | "Norge", 126 | "Svalbard", 127 | "Jan Mayen", 128 | "Elfenbenskusten", 129 | "Polen", 130 | "Italien", 131 | "Filippinerna", 132 | "Ecuador", 133 | "Burkina Faso", 134 | "Nya Zeeland", 135 | "Gabon", 136 | "Guinea", 137 | "Storbritannien", 138 | "Ghana", 139 | "Rumänien", 140 | "Laos", 141 | "Uganda", 142 | "Guyana", 143 | "Oman", 144 | "Vitryssland", 145 | "Kirgizistan", 146 | "Senegal", 147 | "Syrien", 148 | "Kambodja", 149 | "Uruguay", 150 | "Tunisien", 151 | "Surinam", 152 | "Nepal", 153 | "Bangladesh", 154 | "Tadzjikistan", 155 | "Grekland", 156 | "Nicaragua", 157 | "Eritrea", 158 | "Nordkorea", 159 | "Malawi", 160 | "Benin", 161 | "Honduras", 162 | "Liberia", 163 | "Bulgarien", 164 | "Kuba", 165 | "Guatemala", 166 | "Island", 167 | "Sydkorea", 168 | "Ungern", 169 | "Portugal", 170 | "Jordanien", 171 | "Serbien", 172 | "Azerbajdzjan", 173 | "Österrike", 174 | "Förenade Arabemiraten", 175 | "Tjeckien", 176 | "Panama", 177 | "Sierra Leone", 178 | "Irland", 179 | "Georgien", 180 | "Sri Lanka", 181 | "Litauen", 182 | "Lettland", 183 | "Togo", 184 | "Kroatien", 185 | "Bosnien och Hercegovina", 186 | "Costa Rica", 187 | "Slovakien", 188 | "Dominikanska republiken", 189 | "Bhutan", 190 | "Estland", 191 | "Danmark", 192 | "Färöarna", 193 | "Grönland", 194 | "Nederländerna", 195 | "Schweiz", 196 | "Guinea-Bissau", 197 | "Taiwan", 198 | "Moldavien", 199 | "Belgien", 200 | "Lesotho", 201 | "Armenien", 202 | "Albanien", 203 | "Salomonöarna", 204 | "Ekvatorialguinea", 205 | "Burundi", 206 | "Haiti", 207 | "Rwanda", 208 | "Makedonien", 209 | "Djibouti", 210 | "Belize", 211 | "Israel", 212 | "El Salvador", 213 | "Slovenien", 214 | "Fiji", 215 | "Kuwait", 216 | "Swaziland", 217 | "Timor-Leste", 218 | "Montenegro", 219 | "Bahamas", 220 | "Vanuatu", 221 | "Qatar", 222 | "Gambia", 223 | "Jamaica", 224 | "Kosovo", 225 | "Libanon", 226 | "Cypern", 227 | "Brunei", 228 | "Trinidad och Tobago", 229 | "Kap Verde", 230 | "Samoa", 231 | "Luxemburg", 232 | "Komorerna", 233 | "Mauritius", 234 | "São Tomé och Príncipe", 235 | "Kiribati", 236 | "Dominica", 237 | "Tonga", 238 | "Mikronesiens federerade stater", 239 | "Singapore", 240 | "Bahrain", 241 | "Saint Lucia", 242 | "Andorra", 243 | "Palau", 244 | "Seychellerna", 245 | "Antigua och Barbuda", 246 | "Barbados", 247 | "Saint Vincent och Grenadinerna", 248 | "Grenada", 249 | "Malta", 250 | "Maldiverna", 251 | "Saint Kitts och Nevis", 252 | "Marshallöarna", 253 | "Liechtenstein", 254 | "San Marino", 255 | "Tuvalu", 256 | "Nauru", 257 | "Monaco", 258 | "Vatikanstaten" 259 | ], 260 | "common_street_suffix": [ 261 | "s Väg", 262 | "s Gata" 263 | ], 264 | "street_prefix": [ 265 | "Västra", 266 | "Östra", 267 | "Norra", 268 | "Södra", 269 | "Övre", 270 | "Undre" 271 | ], 272 | "street_root": [ 273 | "Björk", 274 | "Järnvägs", 275 | "Ring", 276 | "Skol", 277 | "Skogs", 278 | "Ny", 279 | "Gran", 280 | "Idrotts", 281 | "Stor", 282 | "Kyrk", 283 | "Industri", 284 | "Park", 285 | "Strand", 286 | "Skol", 287 | "Trädgård", 288 | "Ängs", 289 | "Kyrko", 290 | "Villa", 291 | "Ek", 292 | "Kvarn", 293 | "Stations", 294 | "Back", 295 | "Furu", 296 | "Gen", 297 | "Fabriks", 298 | "Åker", 299 | "Bäck", 300 | "Asp" 301 | ], 302 | "street_suffix": [ 303 | "vägen", 304 | "gatan", 305 | "gränden", 306 | "gärdet", 307 | "allén" 308 | ], 309 | "state": [ 310 | "Blekinge", 311 | "Dalarna", 312 | "Gotland", 313 | "Gävleborg", 314 | "Göteborg", 315 | "Halland", 316 | "Jämtland", 317 | "Jönköping", 318 | "Kalmar", 319 | "Kronoberg", 320 | "Norrbotten", 321 | "Skaraborg", 322 | "Skåne", 323 | "Stockholm", 324 | "Södermanland", 325 | "Uppsala", 326 | "Värmland", 327 | "Västerbotten", 328 | "Västernorrland", 329 | "Västmanland", 330 | "Älvsborg", 331 | "Örebro", 332 | "Östergötland" 333 | ], 334 | "city": [ 335 | "#{city_prefix}#{city_suffix}" 336 | ], 337 | "street_name": [ 338 | "#{street_root}#{street_suffix}", 339 | "#{street_prefix} #{street_root}#{street_suffix}", 340 | "#{Name.first_name}#{common_street_suffix}", 341 | "#{Name.last_name}#{common_street_suffix}" 342 | ], 343 | "postcode": [ 344 | "#####" 345 | ], 346 | "building_number": [ 347 | "###", 348 | "##", 349 | "#" 350 | ], 351 | "secondary_address": [ 352 | "Lgh. ###", 353 | "Hus ###" 354 | ], 355 | "street_address": [ 356 | "#{street_name} #{building_number}" 357 | ], 358 | "default_country": [ 359 | "Sverige" 360 | ] 361 | }, 362 | "company": { 363 | "suffix": [ 364 | "Gruppen", 365 | "AB", 366 | "HB", 367 | "Group", 368 | "Investment", 369 | "Kommanditbolag", 370 | "Aktiebolag" 371 | ], 372 | "name": [ 373 | "#{Name.last_name} #{suffix}", 374 | "#{Name.last_name}-#{Name.last_name}", 375 | "#{Name.last_name}, #{Name.last_name} #{suffix}" 376 | ] 377 | }, 378 | "internet": { 379 | "domain_suffix": [ 380 | "se", 381 | "nu", 382 | "info", 383 | "com", 384 | "org" 385 | ] 386 | }, 387 | "name": { 388 | "first_name_women": [ 389 | "Maria", 390 | "Anna", 391 | "Margareta", 392 | "Elisabeth", 393 | "Eva", 394 | "Birgitta", 395 | "Kristina", 396 | "Karin", 397 | "Elisabet", 398 | "Marie" 399 | ], 400 | "first_name_men": [ 401 | "Erik", 402 | "Lars", 403 | "Karl", 404 | "Anders", 405 | "Per", 406 | "Johan", 407 | "Nils", 408 | "Lennart", 409 | "Emil", 410 | "Hans" 411 | ], 412 | "last_name": [ 413 | "Johansson", 414 | "Andersson", 415 | "Karlsson", 416 | "Nilsson", 417 | "Eriksson", 418 | "Larsson", 419 | "Olsson", 420 | "Persson", 421 | "Svensson", 422 | "Gustafsson" 423 | ], 424 | "prefix": [ 425 | "Dr.", 426 | "Prof.", 427 | "PhD." 428 | ], 429 | "title": { 430 | "descriptor": [ 431 | "Lead", 432 | "Senior", 433 | "Direct", 434 | "Corporate", 435 | "Dynamic", 436 | "Future", 437 | "Product", 438 | "National", 439 | "Regional", 440 | "District", 441 | "Central", 442 | "Global", 443 | "Customer", 444 | "Investor", 445 | "Dynamic", 446 | "International", 447 | "Legacy", 448 | "Forward", 449 | "Internal", 450 | "Human", 451 | "Chief", 452 | "Principal" 453 | ], 454 | "level": [ 455 | "Solutions", 456 | "Program", 457 | "Brand", 458 | "Security", 459 | "Research", 460 | "Marketing", 461 | "Directives", 462 | "Implementation", 463 | "Integration", 464 | "Functionality", 465 | "Response", 466 | "Paradigm", 467 | "Tactics", 468 | "Identity", 469 | "Markets", 470 | "Group", 471 | "Division", 472 | "Applications", 473 | "Optimization", 474 | "Operations", 475 | "Infrastructure", 476 | "Intranet", 477 | "Communications", 478 | "Web", 479 | "Branding", 480 | "Quality", 481 | "Assurance", 482 | "Mobility", 483 | "Accounts", 484 | "Data", 485 | "Creative", 486 | "Configuration", 487 | "Accountability", 488 | "Interactions", 489 | "Factors", 490 | "Usability", 491 | "Metrics" 492 | ], 493 | "job": [ 494 | "Supervisor", 495 | "Associate", 496 | "Executive", 497 | "Liaison", 498 | "Officer", 499 | "Manager", 500 | "Engineer", 501 | "Specialist", 502 | "Director", 503 | "Coordinator", 504 | "Administrator", 505 | "Architect", 506 | "Analyst", 507 | "Designer", 508 | "Planner", 509 | "Orchestrator", 510 | "Technician", 511 | "Developer", 512 | "Producer", 513 | "Consultant", 514 | "Assistant", 515 | "Facilitator", 516 | "Agent", 517 | "Representative", 518 | "Strategist" 519 | ] 520 | }, 521 | "name": [ 522 | "#{first_name_women} #{last_name}", 523 | "#{first_name_men} #{last_name}", 524 | "#{first_name_women} #{last_name}", 525 | "#{first_name_men} #{last_name}", 526 | "#{first_name_women} #{last_name}", 527 | "#{first_name_men} #{last_name}", 528 | "#{prefix} #{first_name_men} #{last_name}", 529 | "#{prefix} #{first_name_women} #{last_name}" 530 | ] 531 | }, 532 | "phone_number": { 533 | "formats": [ 534 | "####-#####", 535 | "####-######" 536 | ] 537 | }, 538 | "cell_phone": { 539 | "common_cell_prefix": [ 540 | 56, 541 | 62, 542 | 59 543 | ], 544 | "formats": [ 545 | "#{common_cell_prefix}-###-####" 546 | ] 547 | }, 548 | "commerce": { 549 | "color": [ 550 | "vit", 551 | "silver", 552 | "grå", 553 | "svart", 554 | "röd", 555 | "grön", 556 | "blå", 557 | "gul", 558 | "lila", 559 | "indigo", 560 | "guld", 561 | "brun", 562 | "rosa", 563 | "purpur", 564 | "korall" 565 | ], 566 | "department": [ 567 | "Böcker", 568 | "Filmer", 569 | "Musik", 570 | "Spel", 571 | "Elektronik", 572 | "Datorer", 573 | "Hem", 574 | "Trädgård", 575 | "Verktyg", 576 | "Livsmedel", 577 | "Hälsa", 578 | "Skönhet", 579 | "Leksaker", 580 | "Klädsel", 581 | "Skor", 582 | "Smycken", 583 | "Sport" 584 | ], 585 | "product_name": { 586 | "adjective": [ 587 | "Liten", 588 | "Ergonomisk", 589 | "Robust", 590 | "Intelligent", 591 | "Söt", 592 | "Otrolig", 593 | "Fatastisk", 594 | "Praktisk", 595 | "Slimmad", 596 | "Grym", 597 | "Enorm", 598 | "Mediokra", 599 | "Synergistic", 600 | "Tung", 601 | "Lätt", 602 | "Aerodynamisk", 603 | "Tålig" 604 | ], 605 | "material": [ 606 | "Stål", 607 | "Metall", 608 | "Trä", 609 | "Betong", 610 | "Plast", 611 | "Bomul", 612 | "Grnit", 613 | "Gummi", 614 | "Latex", 615 | "Läder", 616 | "Silke", 617 | "Ull", 618 | "Linne", 619 | "Marmor", 620 | "Järn", 621 | "Brons", 622 | "Koppar", 623 | "Aluminium", 624 | "Papper" 625 | ], 626 | "product": [ 627 | "Stol", 628 | "Bil", 629 | "Dator", 630 | "Handskar", 631 | "Pants", 632 | "Shirt", 633 | "Table", 634 | "Shoes", 635 | "Hat", 636 | "Plate", 637 | "Kniv", 638 | "Flaska", 639 | "Coat", 640 | "Lampa. Tangentbord", 641 | "Bag", 642 | "Bänk", 643 | "Klocka", 644 | "Titta", 645 | "Plånbok" 646 | ] 647 | } 648 | }, 649 | "team": { 650 | "suffix": [ 651 | "IF", 652 | "FF", 653 | "BK", 654 | "HK", 655 | "AIF", 656 | "SK", 657 | "FC", 658 | "SK", 659 | "BoIS", 660 | "FK", 661 | "BIS", 662 | "FIF", 663 | "IK" 664 | ], 665 | "name": [ 666 | "#{Address.city} #{suffix}" 667 | ] 668 | } 669 | } 670 | } 671 | } 672 | -------------------------------------------------------------------------------- /Pods/Fakery/Resources/Locales/zh-CN.json: -------------------------------------------------------------------------------- 1 | { 2 | "zh-CN": { 3 | "faker": { 4 | "address": { 5 | "city_prefix": [ 6 | "长", 7 | "上", 8 | "南", 9 | "西", 10 | "北", 11 | "诸", 12 | "宁", 13 | "珠", 14 | "武", 15 | "衡", 16 | "成", 17 | "福", 18 | "厦", 19 | "贵", 20 | "吉", 21 | "海", 22 | "太", 23 | "济", 24 | "安", 25 | "吉", 26 | "包" 27 | ], 28 | "city_suffix": [ 29 | "沙市", 30 | "京市", 31 | "宁市", 32 | "安市", 33 | "乡县", 34 | "海市", 35 | "码市", 36 | "汉市", 37 | "阳市", 38 | "都市", 39 | "州市", 40 | "门市", 41 | "阳市", 42 | "口市", 43 | "原市", 44 | "南市", 45 | "徽市", 46 | "林市", 47 | "头市" 48 | ], 49 | "building_number": [ 50 | "#####", 51 | "####", 52 | "###", 53 | "##", 54 | "#" 55 | ], 56 | "street_suffix": [ 57 | "巷", 58 | "街", 59 | "路", 60 | "桥", 61 | "侬", 62 | "旁", 63 | "中心", 64 | "栋" 65 | ], 66 | "postcode": [ 67 | "######" 68 | ], 69 | "state": [ 70 | "北京市", 71 | "上海市", 72 | "天津市", 73 | "重庆市", 74 | "黑龙江省", 75 | "吉林省", 76 | "辽宁省", 77 | "内蒙古", 78 | "河北省", 79 | "新疆", 80 | "甘肃省", 81 | "青海省", 82 | "陕西省", 83 | "宁夏", 84 | "河南省", 85 | "山东省", 86 | "山西省", 87 | "安徽省", 88 | "湖北省", 89 | "湖南省", 90 | "江苏省", 91 | "四川省", 92 | "贵州省", 93 | "云南省", 94 | "广西省", 95 | "西藏", 96 | "浙江省", 97 | "江西省", 98 | "广东省", 99 | "福建省", 100 | "海南省", 101 | "香港", 102 | "澳门" 103 | ], 104 | "state_abbr": [ 105 | "京", 106 | "沪", 107 | "津", 108 | "渝", 109 | "黑", 110 | "吉", 111 | "辽", 112 | "蒙", 113 | "冀", 114 | "新", 115 | "甘", 116 | "青", 117 | "陕", 118 | "宁", 119 | "豫", 120 | "鲁", 121 | "晋", 122 | "皖", 123 | "鄂", 124 | "湘", 125 | "苏", 126 | "川", 127 | "黔", 128 | "滇", 129 | "桂", 130 | "藏", 131 | "浙", 132 | "赣", 133 | "粤", 134 | "闽", 135 | "琼", 136 | "港", 137 | "澳" 138 | ], 139 | "city": [ 140 | "#{city_prefix}#{city_suffix}" 141 | ], 142 | "street_name": [ 143 | "#{Name.last_name}#{street_suffix}" 144 | ], 145 | "street_address": [ 146 | "#{street_name}#{building_number}号" 147 | ], 148 | "default_country": [ 149 | "中国" 150 | ] 151 | }, 152 | "name": { 153 | "last_name": [ 154 | "王", 155 | "李", 156 | "张", 157 | "刘", 158 | "陈", 159 | "杨", 160 | "黄", 161 | "吴", 162 | "赵", 163 | "周", 164 | "徐", 165 | "孙", 166 | "马", 167 | "朱", 168 | "胡", 169 | "林", 170 | "郭", 171 | "何", 172 | "高", 173 | "罗", 174 | "郑", 175 | "梁", 176 | "谢", 177 | "宋", 178 | "唐", 179 | "许", 180 | "邓", 181 | "冯", 182 | "韩", 183 | "曹", 184 | "曾", 185 | "彭", 186 | "萧", 187 | "蔡", 188 | "潘", 189 | "田", 190 | "董", 191 | "袁", 192 | "于", 193 | "余", 194 | "叶", 195 | "蒋", 196 | "杜", 197 | "苏", 198 | "魏", 199 | "程", 200 | "吕", 201 | "丁", 202 | "沈", 203 | "任", 204 | "姚", 205 | "卢", 206 | "傅", 207 | "钟", 208 | "姜", 209 | "崔", 210 | "谭", 211 | "廖", 212 | "范", 213 | "汪", 214 | "陆", 215 | "金", 216 | "石", 217 | "戴", 218 | "贾", 219 | "韦", 220 | "夏", 221 | "邱", 222 | "方", 223 | "侯", 224 | "邹", 225 | "熊", 226 | "孟", 227 | "秦", 228 | "白", 229 | "江", 230 | "阎", 231 | "薛", 232 | "尹", 233 | "段", 234 | "雷", 235 | "黎", 236 | "史", 237 | "龙", 238 | "陶", 239 | "贺", 240 | "顾", 241 | "毛", 242 | "郝", 243 | "龚", 244 | "邵", 245 | "万", 246 | "钱", 247 | "严", 248 | "赖", 249 | "覃", 250 | "洪", 251 | "武", 252 | "莫", 253 | "孔" 254 | ], 255 | "first_name": [ 256 | "绍齐", 257 | "博文", 258 | "梓晨", 259 | "胤祥", 260 | "瑞霖", 261 | "明哲", 262 | "天翊", 263 | "凯瑞", 264 | "健雄", 265 | "耀杰", 266 | "潇然", 267 | "子涵", 268 | "越彬", 269 | "钰轩", 270 | "智辉", 271 | "致远", 272 | "俊驰", 273 | "雨泽", 274 | "烨磊", 275 | "晟睿", 276 | "文昊", 277 | "修洁", 278 | "黎昕", 279 | "远航", 280 | "旭尧", 281 | "鸿涛", 282 | "伟祺", 283 | "荣轩", 284 | "越泽", 285 | "浩宇", 286 | "瑾瑜", 287 | "皓轩", 288 | "擎苍", 289 | "擎宇", 290 | "志泽", 291 | "子轩", 292 | "睿渊", 293 | "弘文", 294 | "哲瀚", 295 | "雨泽", 296 | "楷瑞", 297 | "建辉", 298 | "晋鹏", 299 | "天磊", 300 | "绍辉", 301 | "泽洋", 302 | "鑫磊", 303 | "鹏煊", 304 | "昊强", 305 | "伟宸", 306 | "博超", 307 | "君浩", 308 | "子骞", 309 | "鹏涛", 310 | "炎彬", 311 | "鹤轩", 312 | "越彬", 313 | "风华", 314 | "靖琪", 315 | "明辉", 316 | "伟诚", 317 | "明轩", 318 | "健柏", 319 | "修杰", 320 | "志泽", 321 | "弘文", 322 | "峻熙", 323 | "嘉懿", 324 | "煜城", 325 | "懿轩", 326 | "烨伟", 327 | "苑博", 328 | "伟泽", 329 | "熠彤", 330 | "鸿煊", 331 | "博涛", 332 | "烨霖", 333 | "烨华", 334 | "煜祺", 335 | "智宸", 336 | "正豪", 337 | "昊然", 338 | "明杰", 339 | "立诚", 340 | "立轩", 341 | "立辉", 342 | "峻熙", 343 | "弘文", 344 | "熠彤", 345 | "鸿煊", 346 | "烨霖", 347 | "哲瀚", 348 | "鑫鹏", 349 | "昊天", 350 | "思聪", 351 | "展鹏", 352 | "笑愚", 353 | "志强", 354 | "炫明", 355 | "雪松", 356 | "思源", 357 | "智渊", 358 | "思淼", 359 | "晓啸", 360 | "天宇", 361 | "浩然", 362 | "文轩", 363 | "鹭洋", 364 | "振家", 365 | "乐驹", 366 | "晓博", 367 | "文博", 368 | "昊焱", 369 | "立果", 370 | "金鑫", 371 | "锦程", 372 | "嘉熙", 373 | "鹏飞", 374 | "子默", 375 | "思远", 376 | "浩轩", 377 | "语堂", 378 | "聪健", 379 | "明", 380 | "文", 381 | "果", 382 | "思", 383 | "鹏", 384 | "驰", 385 | "涛", 386 | "琪", 387 | "浩", 388 | "航", 389 | "彬" 390 | ], 391 | "name": [ 392 | "#{last_name}#{first_name}" 393 | ] 394 | }, 395 | "phone_number": { 396 | "formats": [ 397 | "###-########", 398 | "####-########", 399 | "###########" 400 | ] 401 | } 402 | } 403 | } 404 | } 405 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Config.swift: -------------------------------------------------------------------------------- 1 | public struct Config { 2 | public static let defaultLocale: String = "en" 3 | public static let pathExtension: String = "json" 4 | public static var dirPath: String = "Resources/Locales" 5 | public static var dirFrameworkPath: String = "" 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Data/Parser.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public final class Parser { 4 | public var locale: String { 5 | didSet { 6 | if locale != oldValue { 7 | loadData(forLocale: locale) 8 | } 9 | } 10 | } 11 | 12 | private var data = [String: Any]() 13 | let provider: Provider 14 | 15 | // MARK: - Initialization 16 | 17 | public init(locale: String = Config.defaultLocale) { 18 | self.locale = locale 19 | provider = Provider() 20 | loadData(forLocale: locale) 21 | 22 | if locale != Config.defaultLocale { 23 | loadData(forLocale: Config.defaultLocale) 24 | } 25 | } 26 | 27 | // MARK: - Parsing 28 | 29 | public func fetch(_ key: String) -> String { 30 | var parsed = "" 31 | 32 | guard let keyData = fetchRaw(key) else { 33 | return parsed 34 | } 35 | 36 | let subject = getSubject(key) 37 | 38 | if let value = keyData as? String { 39 | parsed = value 40 | } else if let array = keyData as? [String], let item = array.random() { 41 | parsed = item 42 | } 43 | 44 | if parsed.range(of: "#{") != nil { 45 | parsed = parse(parsed, forSubject: subject) 46 | } 47 | 48 | return parsed 49 | } 50 | 51 | public func fetchRaw(_ key: String) -> Any? { 52 | let result = fetchRaw(key, forLocale: locale) 53 | 54 | guard locale != Config.defaultLocale else { 55 | return result 56 | } 57 | 58 | return result ?? fetchRaw(key, forLocale: Config.defaultLocale) 59 | } 60 | 61 | func parse(_ template: String, forSubject subject: String) -> String { 62 | var text = "" 63 | let string = template as NSString 64 | var regex: NSRegularExpression 65 | 66 | do { 67 | try regex = NSRegularExpression(pattern: "(\\(?)#\\{([A-Za-z]+\\.)?([^\\}]+)\\}([^#]+)?", 68 | options: .caseInsensitive) 69 | let matches = regex.matches(in: string as String, 70 | options: .reportCompletion, 71 | range: NSRange(location: 0, length: string.length)) 72 | 73 | guard !matches.isEmpty else { 74 | return template 75 | } 76 | 77 | for match in matches { 78 | if match.numberOfRanges < 4 { 79 | continue 80 | } 81 | 82 | let prefixRange = match.range(at: 1) 83 | let subjectRange = match.range(at: 2) 84 | let methodRange = match.range(at: 3) 85 | let otherRange = match.range(at: 4) 86 | 87 | if prefixRange.length > 0 { 88 | text += string.substring(with: prefixRange) 89 | } 90 | 91 | var subjectWithDot = subject + "." 92 | 93 | if subjectRange.length > 0 { 94 | subjectWithDot = string.substring(with: subjectRange) 95 | } 96 | 97 | if methodRange.length > 0 { 98 | let key = subjectWithDot.lowercased() + string.substring(with: methodRange) 99 | text += fetch(key) 100 | } 101 | 102 | if otherRange.length > 0 { 103 | text += string.substring(with: otherRange) 104 | } 105 | } 106 | } catch {} 107 | 108 | return text 109 | } 110 | 111 | private func fetchRaw(_ key: String, forLocale locale: String) -> Any? { 112 | let parts = key.components(separatedBy: ".") 113 | 114 | guard let localeData = data[locale] as? [String: Any], 115 | var parsed = localeData["faker"] as? [String: Any], 116 | !parts.isEmpty else { return nil } 117 | 118 | var result: Any? 119 | 120 | for part in parts { 121 | guard let parsedPart = parsed[part] as? [String: Any] else { 122 | result = parsed[part] 123 | continue 124 | } 125 | 126 | parsed = parsedPart 127 | result = parsedPart 128 | } 129 | 130 | return result 131 | } 132 | 133 | private func getSubject(_ key: String) -> String { 134 | var subject: String = "" 135 | var parts = key.components(separatedBy: ".") 136 | 137 | if !parts.isEmpty { 138 | subject = parts[0] 139 | } 140 | 141 | return subject 142 | } 143 | 144 | // MARK: - Data loading 145 | 146 | private func loadData(forLocale locale: String) { 147 | guard let localeData = provider.dataForLocale(locale), 148 | let parsedData = try? JSONSerialization.jsonObject(with: localeData, options: .allowFragments), 149 | let json = parsedData as? [String: Any], 150 | let localeJson = json[locale] else { 151 | print("JSON file for '\(locale)' locale was not found.") 152 | return 153 | } 154 | 155 | data[locale] = localeJson 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Data/Provider.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public final class Provider { 4 | var translations: [String: Data] = [:] 5 | 6 | // MARK: - Locale data 7 | 8 | public func dataForLocale(_ locale: String) -> Data? { 9 | var translation: Data? 10 | 11 | if let translationData = translations[locale] { 12 | translation = translationData 13 | } else { 14 | let bundle = Bundle(for: Provider.self) 15 | var path = bundle.path(forResource: locale, 16 | ofType: Config.pathExtension, 17 | inDirectory: Config.dirPath) 18 | 19 | if path == nil { 20 | path = bundle.path(forResource: locale, 21 | ofType: Config.pathExtension, 22 | inDirectory: Config.dirFrameworkPath) 23 | } 24 | 25 | if let resourcePath = Bundle(for: Provider.self).resourcePath { 26 | let bundlePath = resourcePath + "/Faker.bundle" 27 | 28 | if let bundle = Bundle(path: bundlePath) { 29 | path = bundle.path(forResource: locale, ofType: Config.pathExtension) 30 | } 31 | } 32 | 33 | if let path = path { 34 | let fileURL = URL(fileURLWithPath: path) 35 | 36 | if let data = try? Data(contentsOf: fileURL) { 37 | translation = data 38 | translations[locale] = data 39 | } 40 | } 41 | } 42 | 43 | return translation 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Extensions/ArrayExtension.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Array { 4 | func at(_ index: Int?) -> Element? { 5 | guard let index = index, index >= 0 && index < endIndex else { 6 | return nil 7 | } 8 | 9 | return self[index] 10 | } 11 | 12 | func random() -> Element? { 13 | // swiftlint:disable empty_count 14 | guard count > 0 else { 15 | return nil 16 | } 17 | 18 | return self[Int(arc4random_uniform(UInt32(count)))] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Faker.swift: -------------------------------------------------------------------------------- 1 | public final class Faker { 2 | public var locale: String { 3 | didSet { 4 | if locale != oldValue { 5 | parser.locale = locale 6 | } 7 | } 8 | } 9 | 10 | public let address: Address 11 | public let app: App 12 | public let business: Business 13 | public let company: Company 14 | public let commerce: Commerce 15 | public let internet: Internet 16 | public let lorem: Lorem 17 | public let name: Name 18 | public let phoneNumber: PhoneNumber 19 | public let team: Team 20 | public let number: Number 21 | public let bank: Bank 22 | 23 | let parser: Parser 24 | 25 | // MARK: - Initialization 26 | 27 | public init(locale: String = Config.defaultLocale) { 28 | self.locale = locale 29 | parser = Parser(locale: self.locale) 30 | address = Address(parser: parser) 31 | app = App(parser: parser) 32 | business = Business(parser: parser) 33 | company = Company(parser: parser) 34 | commerce = Commerce(parser: parser) 35 | internet = Internet(parser: parser) 36 | lorem = Lorem(parser: parser) 37 | name = Name(parser: parser) 38 | phoneNumber = PhoneNumber(parser: parser) 39 | team = Team(parser: parser) 40 | number = Number() 41 | bank = Bank(parser: parser) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Generators/Address.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import CoreLocation 3 | 4 | public final class Address: Generator { 5 | public func city() -> String { 6 | return generate("address.city") 7 | } 8 | 9 | public func streetName() -> String { 10 | return generate("address.street_name") 11 | } 12 | 13 | public func secondaryAddress() -> String { 14 | return numerify(generate("address.secondary_address")) 15 | } 16 | 17 | public func streetAddress(includeSecondary: Bool = false) -> String { 18 | var streetAddress = numerify(generate("address.street_address")) 19 | 20 | if includeSecondary { 21 | streetAddress += " " + secondaryAddress() 22 | } 23 | 24 | return streetAddress 25 | } 26 | 27 | public func buildingNumber() -> String { 28 | return bothify(generate("address.building_number")) 29 | } 30 | 31 | public func postcode(stateAbbreviation: String = "") -> String { 32 | if stateAbbreviation.isEmpty { 33 | return bothify(generate("address.postcode")) 34 | } 35 | 36 | return bothify(generate("address.postcode_by_state.\(stateAbbreviation)")) 37 | } 38 | 39 | public func timeZone() -> String { 40 | return generate("address.time_zone") 41 | } 42 | 43 | public func streetSuffix() -> String { 44 | return generate("address.street_suffix") 45 | } 46 | 47 | public func citySuffix() -> String { 48 | return generate("address.city_suffix") 49 | } 50 | 51 | public func cityPrefix() -> String { 52 | return generate("address.city_prefix") 53 | } 54 | 55 | public func stateAbbreviation() -> String { 56 | return generate("address.state_abbr") 57 | } 58 | 59 | public func state() -> String { 60 | return generate("address.state") 61 | } 62 | 63 | public func county() -> String { 64 | return generate("address.county") 65 | } 66 | 67 | public func country() -> String { 68 | return generate("address.country") 69 | } 70 | 71 | public func countryCode() -> String { 72 | return generate("address.country_code") 73 | } 74 | 75 | public func latitude() -> Double { 76 | return drand48() * 180.0 - 90.0 77 | } 78 | 79 | public func longitude() -> Double { 80 | return drand48() * 360.0 - 180.0 81 | } 82 | 83 | public func coordinate(inRadius radius: Double, fromCenter center:CLLocationCoordinate2D) -> CLLocationCoordinate2D { 84 | let y0 = center.latitude 85 | let x0 = center.longitude 86 | 87 | // Convert meters to degrees for radius 88 | let radiusInDegrees = radius / 111300.0 89 | 90 | // Random point in circle 91 | let u = Double(arc4random()) / 0xFFFFFFFF 92 | let v = Double(arc4random()) / 0xFFFFFFFF 93 | let w = radiusInDegrees * sqrt(u) 94 | let t = 2 * .pi * v 95 | let x = w * cos(t) 96 | let y = w * sin(t) 97 | 98 | // Adjust longitude (x) to adjust for east-west shrinking in distance 99 | let latRadians = y0 * .pi / 180 100 | let newx = x / cos(latRadians) 101 | 102 | // Set found random point 103 | let foundLatitude = y + y0 104 | let foundLongitude = newx + x0 105 | 106 | return CLLocationCoordinate2D.init(latitude: foundLatitude, longitude: foundLongitude) 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Generators/App.swift: -------------------------------------------------------------------------------- 1 | public final class App: Generator { 2 | public func name() -> String { 3 | return generate("app.name") 4 | } 5 | 6 | public func version() -> String { 7 | return numerify(generate("app.version")) 8 | } 9 | 10 | public func author() -> String { 11 | return generate("app.author") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Generators/Bank.swift: -------------------------------------------------------------------------------- 1 | public final class Bank: Generator { 2 | public func name() -> String { 3 | return generate("bank.name") 4 | } 5 | 6 | public func swiftBic() -> String { 7 | return generate("bank.swiftBic") 8 | } 9 | 10 | public func iban() -> String { 11 | let bankCountryCode = generate("bank.ibanDetails.bankCountryCode") 12 | let bankCountryString = numerify("##") 13 | let ibanLetterCode = letterify(generate("bank.ibanDetails.ibanLetterCode")) 14 | let iban = numerify(generate("bank.ibanDetails.ibanDigits")) 15 | 16 | return bankCountryCode + bankCountryString + ibanLetterCode + iban 17 | } 18 | 19 | public func bban() -> String { 20 | let ibanLetterCode: String = letterify(generate("bank.ibanDetails.ibanLetterCode")) 21 | let iban: String = numerify(generate("bank.ibanDetails.ibanDigits")) 22 | 23 | return ibanLetterCode + iban 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Generators/Business.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public final class Business: Generator { 4 | public func creditCardNumber() -> String { 5 | return generate("business.credit_card_numbers") 6 | } 7 | 8 | public func creditCardType() -> String { 9 | return generate("business.credit_card_types") 10 | } 11 | 12 | public func creditCardExpiryDate() -> Date? { 13 | let dateString = generate("business.credit_card_expiry_dates") 14 | return dateFormatter.date(from: dateString) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Generators/Commerce.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public final class Commerce: Generator { 4 | public func color() -> String { 5 | return generate("commerce.color") 6 | } 7 | 8 | public func department(maximum: Int = 3, fixedAmount: Bool = false) -> String { 9 | let amount = fixedAmount ? maximum : 1 + Int(arc4random_uniform(UInt32(maximum))) 10 | 11 | let fetchedCategories = categories(amount) 12 | let count = fetchedCategories.count 13 | 14 | var department = "" 15 | 16 | if count > 1 { 17 | department = merge(categories: fetchedCategories) 18 | } else if count == 1 { 19 | department = fetchedCategories[0] 20 | } 21 | 22 | return department 23 | } 24 | 25 | public func productName() -> String { 26 | return generate("commerce.product_name.adjective") + " " 27 | + generate("commerce.product_name.material") + " " 28 | + generate("commerce.product_name.product") 29 | } 30 | 31 | public func price() -> Double { 32 | let arc4randoMax: Double = 0x100000000 33 | return floor(Double((Double(arc4random()) / arc4randoMax) * 100.0) * 100) / 100.0 34 | } 35 | 36 | // MARK: - Helpers 37 | 38 | public func categories(_ amount: Int) -> [String] { 39 | var categories: [String] = [] 40 | 41 | while categories.count < amount { 42 | let category = generate("commerce.department") 43 | 44 | if !categories.contains(category) { 45 | categories.append(category) 46 | } 47 | } 48 | 49 | return categories 50 | } 51 | 52 | public func merge(categories: [String]) -> String { 53 | let separator = generate("separator") 54 | let commaSeparated = categories[0.. String { 5 | return generate("company.name") 6 | } 7 | 8 | public func suffix() -> String { 9 | return generate("company.suffix") 10 | } 11 | 12 | public func catchPhrase() -> String { 13 | return randomWordsFromKey("company.buzzwords") 14 | } 15 | 16 | public func bs() -> String { 17 | return randomWordsFromKey("company.bs") 18 | } 19 | 20 | public func logo() -> String { 21 | let number = Int(arc4random_uniform(13)) + 1 22 | return "https://pigment.github.io/fake-logos/logos/medium/color/\(number).png" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Generators/Generator.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public class Generator { 4 | public struct Constants { 5 | public static let uppercaseLetters = Array("ABCDEFGHIJKLMNOPQRSTUVWXYZ") 6 | public static let letters = Array("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") 7 | public static let numbers = Array("0123456789") 8 | } 9 | 10 | let parser: Parser 11 | let dateFormatter: DateFormatter 12 | 13 | public required init(parser: Parser) { 14 | self.parser = parser 15 | dateFormatter = DateFormatter() 16 | dateFormatter.dateFormat = "yyyy-MM-dd" 17 | } 18 | 19 | public func generate(_ key: String) -> String { 20 | return parser.fetch(key) 21 | } 22 | 23 | // MARK: - Filling 24 | 25 | public func numerify(_ string: String) -> String { 26 | let count = UInt32(Constants.numbers.count) 27 | 28 | return String(string.enumerated().map { (index, item) in 29 | let numberIndex = index == 0 ? arc4random_uniform(count - 1) : 30 | arc4random_uniform(count) 31 | let char = Constants.numbers[Int(numberIndex)] 32 | return String(item) == "#" ? char : item 33 | }) 34 | } 35 | 36 | public func letterify(_ string: String) -> String { 37 | return String(string.enumerated().map { _, item in 38 | let count = UInt32(Constants.uppercaseLetters.count) 39 | let char = Constants.uppercaseLetters[Int(arc4random_uniform(count))] 40 | return String(item) == "?" ? char : item 41 | }) 42 | } 43 | 44 | public func bothify(_ string: String) -> String { 45 | return letterify(numerify(string)) 46 | } 47 | 48 | public func alphaNumerify(_ string: String) -> String { 49 | return string.replacingOccurrences(of: "[^A-Za-z0-9_]", 50 | with: "", 51 | options: .regularExpression, 52 | range: nil) 53 | } 54 | 55 | public func randomWordsFromKey(_ key: String) -> String { 56 | var string = "" 57 | 58 | var list = [String]() 59 | if let wordsList = parser.fetchRaw(key) as? [[String]] { 60 | for words in wordsList { 61 | if let item = words.random() { 62 | list.append(item) 63 | } 64 | } 65 | 66 | string = list.joined(separator: " ") 67 | } 68 | 69 | return string 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Generators/Internet.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public final class Internet: Generator { 4 | private let lorem: Lorem 5 | 6 | public required init(parser: Parser) { 7 | self.lorem = Lorem(parser: parser) 8 | super.init(parser: parser) 9 | } 10 | 11 | public func username(separator: String? = nil) -> String { 12 | var components: [String] = [ 13 | generate("name.first_name"), 14 | generate("name.last_name"), 15 | "\(arc4random_uniform(10000))" 16 | ] 17 | 18 | let randomCount = UInt32(components.count) - 1 19 | let count = Int(arc4random_uniform(randomCount) + randomCount) 20 | 21 | var gap = "" 22 | if let sep = separator { 23 | gap = sep 24 | } 25 | 26 | return components[0.. String { 32 | return domainWord(alphaNumericOnly: alphaNumericOnly) + "." + domainSuffix() 33 | } 34 | 35 | public func domainWord(alphaNumericOnly: Bool = true) -> String { 36 | let nameParts = generate("company.name").components(separatedBy: " ") 37 | var name = "" 38 | 39 | if let first = nameParts.first { 40 | name = first 41 | } else { 42 | name = letterify("?????") 43 | } 44 | 45 | let result = alphaNumericOnly ? alphaNumerify(name) : name 46 | 47 | return result.lowercased() 48 | } 49 | 50 | public func domainSuffix() -> String { 51 | return generate("internet.domain_suffix") 52 | } 53 | 54 | public func email() -> String { 55 | return [username(), domainName()].joined(separator: "@") 56 | } 57 | 58 | public func freeEmail() -> String { 59 | return [username(), generate("internet.free_email")].joined(separator: "@") 60 | } 61 | 62 | public func safeEmail() -> String { 63 | let topLevelDomains = ["org", "com", "net"] 64 | let count = UInt32(topLevelDomains.count) 65 | let topLevelDomain = topLevelDomains[Int(arc4random_uniform(count))] 66 | 67 | return [username(), "example." + topLevelDomain].joined(separator: "@") 68 | } 69 | 70 | public func password(minimumLength: Int = 8, maximumLength: Int = 16) -> String { 71 | var temp = lorem.characters(amount: minimumLength) 72 | let diffLength = maximumLength - minimumLength 73 | 74 | if diffLength > 0 { 75 | let diffRandom = Int(arc4random_uniform(UInt32(diffLength + 1))) 76 | temp += lorem.characters(amount: diffRandom) 77 | } 78 | 79 | return temp 80 | } 81 | 82 | public func ipV4Address() -> String { 83 | let ipRand = { 84 | 2 + arc4random() % 253 85 | } 86 | 87 | return String(format: "%d.%d.%d.%d", ipRand(), ipRand(), ipRand(), ipRand()) 88 | } 89 | 90 | public func ipV6Address() -> String { 91 | var components: [String] = [] 92 | 93 | for _ in 1..<8 { 94 | components.append(String(format: "%X", arc4random() % 65535)) 95 | } 96 | 97 | return components.joined(separator: ":") 98 | } 99 | 100 | public func url() -> String { 101 | return "https://\(domainName())/\(username())" 102 | } 103 | 104 | public func image(width: Int = 320, height: Int = 200) -> String { 105 | return "https://lorempixel.com/\(width)/\(height)" 106 | } 107 | 108 | public func templateImage(width: Int = 320, height: Int = 200, 109 | backColorHex: String = "000000", frontColorHex: String = "ffffff") -> String { 110 | return "https://dummyimage.com/\(width)x\(height)/\(backColorHex)/\(frontColorHex)" 111 | } 112 | 113 | public func hashtag() -> String { 114 | return generate("internet.hashtag") 115 | } 116 | 117 | // @ToDo - slug 118 | } 119 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Generators/Lorem.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public final class Lorem: Generator { 4 | public func word() -> String { 5 | return generate("lorem.words") 6 | } 7 | 8 | public func words(amount: Int = 3) -> String { 9 | var words: [String] = [] 10 | 11 | for _ in 0.. String { 19 | return characters(amount: 1) 20 | } 21 | 22 | public func characters(amount: Int = 255) -> String { 23 | var chars = "" 24 | 25 | if amount > 0 { 26 | for _ in 0.. String { 36 | var sentence = words(amount: wordsAmount) + "." 37 | sentence.replaceSubrange(sentence.startIndex...sentence.startIndex, 38 | with: String(sentence[sentence.startIndex]).capitalized) 39 | return sentence 40 | } 41 | 42 | public func sentences(amount: Int = 3) -> String { 43 | var sentences: [String] = [] 44 | 45 | for _ in 0.. String { 53 | return sentences(amount: sentencesAmount) 54 | } 55 | 56 | public func paragraphs(amount: Int = 3) -> String { 57 | var paragraphs: [String] = [] 58 | 59 | for _ in 0.. String { 3 | return generate("name.name") 4 | } 5 | 6 | public func firstName() -> String { 7 | return generate("name.first_name") 8 | } 9 | 10 | public func lastName() -> String { 11 | return generate("name.last_name") 12 | } 13 | 14 | public func prefix() -> String { 15 | return generate("name.prefix") 16 | } 17 | 18 | public func suffix() -> String { 19 | return generate("name.suffix") 20 | } 21 | 22 | public func title() -> String { 23 | return generate("name.title.descriptor") + " " 24 | + generate("name.title.level") + " " 25 | + generate("name.title.job") 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Generators/Number.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import CoreGraphics 3 | 4 | public final class Number { 5 | fileprivate var lastUsedId: Int64 = 0 6 | 7 | public func randomBool() -> Bool { 8 | return randomInt() % 2 == 0 9 | } 10 | 11 | public func randomInt(min: Int = 0, max: Int = 1000) -> Int { 12 | var i: Int = 0 13 | arc4random_buf(&i, MemoryLayout.size(ofValue: i)) 14 | i = i & Int.max // Make the number positive 15 | 16 | if max >= 0 && max - Int.max >= min { 17 | return min + i 18 | } 19 | 20 | return min + (i % (max - min)) 21 | } 22 | 23 | public func randomFloat(min: Float = 0, max: Float = 1000) -> Float { 24 | return (Float(arc4random()) / Float(UInt32.max)) * (max - min) + min 25 | } 26 | 27 | public func randomCGFloat(min: CGFloat = 0, max: CGFloat = 1000) -> CGFloat { 28 | return CGFloat(Float(arc4random()) / Float(UInt32.max)) * (max - min) + min 29 | } 30 | 31 | public func randomDouble(min: Double = 0, max: Double = 1000) -> Double { 32 | return (Double(arc4random()) / Double(UInt32.max)) * (max - min) + min 33 | } 34 | 35 | public func increasingUniqueId() -> Int { 36 | OSAtomicIncrement64(&lastUsedId) 37 | return Int(lastUsedId) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Generators/PhoneNumber.swift: -------------------------------------------------------------------------------- 1 | public final class PhoneNumber: Generator { 2 | public func phoneNumber() -> String { 3 | return numerify(generate("phone_number.formats")) 4 | } 5 | 6 | public func cellPhone() -> String { 7 | return numerify(generate("cell_phone.formats")) 8 | } 9 | 10 | // US only 11 | public func areaCode() -> String { 12 | return generate("phone_number.area_code") 13 | } 14 | 15 | // US only 16 | public func exchangeCode() -> String { 17 | return generate("phone_number.exchange_code") 18 | } 19 | 20 | // US only 21 | public func subscriberNumber() -> String { 22 | return numerify("####") 23 | } 24 | 25 | public func numberExtension(_ length: Int) -> String { 26 | var template = "" 27 | 28 | for _ in 1...length { 29 | template += "#" 30 | } 31 | 32 | return numerify(template) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Pods/Fakery/Sources/Fakery/Generators/Team.swift: -------------------------------------------------------------------------------- 1 | public final class Team: Generator { 2 | public func name() -> String { 3 | return generate("team.name") 4 | } 5 | 6 | public func creature() -> String { 7 | return generate("team.creature") 8 | } 9 | 10 | public func state() -> String { 11 | return generate("address.state").capitalized 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Fakery (3.3.0) 3 | 4 | DEPENDENCIES: 5 | - Fakery 6 | 7 | SPEC CHECKSUMS: 8 | Fakery: 3aae11a87721c807c18c6456500d088c1230d3e5 9 | 10 | PODFILE CHECKSUM: 3a0d3b333bb6421575e3daa623246747433c042c 11 | 12 | COCOAPODS: 1.3.1 13 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/JamesDouble.xcuserdatad/xcschemes/Fakery-Faker.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/JamesDouble.xcuserdatad/xcschemes/Fakery.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/JamesDouble.xcuserdatad/xcschemes/Pods-RandMyModel.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 65 | 66 | 68 | 69 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/JamesDouble.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Fakery-Faker.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 1 13 | 14 | Fakery.xcscheme 15 | 16 | isShown 17 | 18 | orderHint 19 | 0 20 | 21 | Pods-RandMyModel.xcscheme 22 | 23 | isShown 24 | 25 | orderHint 26 | 2 27 | 28 | 29 | SuppressBuildableAutocreation 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fakery/Fakery-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Fakery : NSObject 3 | @end 4 | @implementation PodsDummy_Fakery 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fakery/Fakery-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fakery/Fakery-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double FakeryVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char FakeryVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fakery/Fakery.modulemap: -------------------------------------------------------------------------------- 1 | framework module Fakery { 2 | umbrella header "Fakery-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fakery/Fakery.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Fakery 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "Foundation" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Fakery 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fakery/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.3.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fakery/ResourceBundle-Faker-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 3.3.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RandMyModel/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RandMyModel/Pods-RandMyModel-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Fakery 5 | 6 | Licensed under the **MIT** license 7 | 8 | > Copyright (c) 2015 Vadym Markov 9 | > 10 | > Permission is hereby granted, free of charge, to any person obtaining 11 | > a copy of this software and associated documentation files (the 12 | > "Software"), to deal in the Software without restriction, including 13 | > without limitation the rights to use, copy, modify, merge, publish, 14 | > distribute, sublicense, and/or sell copies of the Software, and to 15 | > permit persons to whom the Software is furnished to do so, subject to 16 | > the following conditions: 17 | > 18 | > The above copyright notice and this permission notice shall be 19 | > included in all copies or substantial portions of the Software. 20 | > 21 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | > IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 25 | > CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | > TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | 29 | Generated by CocoaPods - https://cocoapods.org 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RandMyModel/Pods-RandMyModel-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Licensed under the **MIT** license 18 | 19 | > Copyright (c) 2015 Vadym Markov 20 | > 21 | > Permission is hereby granted, free of charge, to any person obtaining 22 | > a copy of this software and associated documentation files (the 23 | > "Software"), to deal in the Software without restriction, including 24 | > without limitation the rights to use, copy, modify, merge, publish, 25 | > distribute, sublicense, and/or sell copies of the Software, and to 26 | > permit persons to whom the Software is furnished to do so, subject to 27 | > the following conditions: 28 | > 29 | > The above copyright notice and this permission notice shall be 30 | > included in all copies or substantial portions of the Software. 31 | > 32 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 33 | > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 34 | > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 35 | > IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 36 | > CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 37 | > TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 38 | > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 39 | 40 | License 41 | MIT 42 | Title 43 | Fakery 44 | Type 45 | PSGroupSpecifier 46 | 47 | 48 | FooterText 49 | Generated by CocoaPods - https://cocoapods.org 50 | Title 51 | 52 | Type 53 | PSGroupSpecifier 54 | 55 | 56 | StringsTable 57 | Acknowledgements 58 | Title 59 | Acknowledgements 60 | 61 | 62 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RandMyModel/Pods-RandMyModel-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_RandMyModel : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_RandMyModel 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RandMyModel/Pods-RandMyModel-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 10 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 11 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 12 | 13 | install_framework() 14 | { 15 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 16 | local source="${BUILT_PRODUCTS_DIR}/$1" 17 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 18 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 19 | elif [ -r "$1" ]; then 20 | local source="$1" 21 | fi 22 | 23 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 24 | 25 | if [ -L "${source}" ]; then 26 | echo "Symlinked..." 27 | source="$(readlink "${source}")" 28 | fi 29 | 30 | # Use filter instead of exclude so missing patterns don't throw errors. 31 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 32 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 33 | 34 | local basename 35 | basename="$(basename -s .framework "$1")" 36 | binary="${destination}/${basename}.framework/${basename}" 37 | if ! [ -r "$binary" ]; then 38 | binary="${destination}/${basename}" 39 | fi 40 | 41 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 42 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 43 | strip_invalid_archs "$binary" 44 | fi 45 | 46 | # Resign the code if required by the build settings to avoid unstable apps 47 | code_sign_if_enabled "${destination}/$(basename "$1")" 48 | 49 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 50 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 51 | local swift_runtime_libs 52 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 53 | for lib in $swift_runtime_libs; do 54 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 55 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 56 | code_sign_if_enabled "${destination}/${lib}" 57 | done 58 | fi 59 | } 60 | 61 | # Copies the dSYM of a vendored framework 62 | install_dsym() { 63 | local source="$1" 64 | if [ -r "$source" ]; then 65 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" 66 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" 67 | fi 68 | } 69 | 70 | # Signs a framework with the provided identity 71 | code_sign_if_enabled() { 72 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 73 | # Use the current code_sign_identitiy 74 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 75 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 76 | 77 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 78 | code_sign_cmd="$code_sign_cmd &" 79 | fi 80 | echo "$code_sign_cmd" 81 | eval "$code_sign_cmd" 82 | fi 83 | } 84 | 85 | # Strip invalid architectures 86 | strip_invalid_archs() { 87 | binary="$1" 88 | # Get architectures for current file 89 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 90 | stripped="" 91 | for arch in $archs; do 92 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 93 | # Strip non-valid architectures in-place 94 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 95 | stripped="$stripped $arch" 96 | fi 97 | done 98 | if [[ "$stripped" ]]; then 99 | echo "Stripped $binary of architectures:$stripped" 100 | fi 101 | } 102 | 103 | 104 | if [[ "$CONFIGURATION" == "Debug" ]]; then 105 | install_framework "${BUILT_PRODUCTS_DIR}/Fakery/Fakery.framework" 106 | fi 107 | if [[ "$CONFIGURATION" == "Release" ]]; then 108 | install_framework "${BUILT_PRODUCTS_DIR}/Fakery/Fakery.framework" 109 | fi 110 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 111 | wait 112 | fi 113 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RandMyModel/Pods-RandMyModel-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 12 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 13 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 14 | 15 | case "${TARGETED_DEVICE_FAMILY}" in 16 | 1,2) 17 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 18 | ;; 19 | 1) 20 | TARGET_DEVICE_ARGS="--target-device iphone" 21 | ;; 22 | 2) 23 | TARGET_DEVICE_ARGS="--target-device ipad" 24 | ;; 25 | 3) 26 | TARGET_DEVICE_ARGS="--target-device tv" 27 | ;; 28 | 4) 29 | TARGET_DEVICE_ARGS="--target-device watch" 30 | ;; 31 | *) 32 | TARGET_DEVICE_ARGS="--target-device mac" 33 | ;; 34 | esac 35 | 36 | install_resource() 37 | { 38 | if [[ "$1" = /* ]] ; then 39 | RESOURCE_PATH="$1" 40 | else 41 | RESOURCE_PATH="${PODS_ROOT}/$1" 42 | fi 43 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 44 | cat << EOM 45 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 46 | EOM 47 | exit 1 48 | fi 49 | case $RESOURCE_PATH in 50 | *.storyboard) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.xib) 55 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 56 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 57 | ;; 58 | *.framework) 59 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 60 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 61 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 62 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 63 | ;; 64 | *.xcdatamodel) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 67 | ;; 68 | *.xcdatamodeld) 69 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 70 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 71 | ;; 72 | *.xcmappingmodel) 73 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 74 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 75 | ;; 76 | *.xcassets) 77 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 78 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 79 | ;; 80 | *) 81 | echo "$RESOURCE_PATH" || true 82 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 83 | ;; 84 | esac 85 | } 86 | 87 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 89 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 90 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 91 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 92 | fi 93 | rm -f "$RESOURCES_TO_COPY" 94 | 95 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 96 | then 97 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 98 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 99 | while read line; do 100 | if [[ $line != "${PODS_ROOT}*" ]]; then 101 | XCASSET_FILES+=("$line") 102 | fi 103 | done <<<"$OTHER_XCASSETS" 104 | 105 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 106 | fi 107 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RandMyModel/Pods-RandMyModel-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_RandMyModelVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_RandMyModelVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RandMyModel/Pods-RandMyModel.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Fakery" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Fakery/Fakery.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "Fakery" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RandMyModel/Pods-RandMyModel.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_RandMyModel { 2 | umbrella header "Pods-RandMyModel-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-RandMyModel/Pods-RandMyModel.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Fakery" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Fakery/Fakery.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "Fakery" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Alt text](https://raw.githubusercontent.com/jamesdouble/RandMyMod/master/Readme_img/logo.png) 2 | 3 | **RandMyMod** is an IOS Native Framework helps you generate one or a set of variable base on your own model. 4 | 5 | No matter your model is Class / Struct. 6 | 7 | ![Alt text](https://img.shields.io/badge/SwiftVersion-4.0-red.svg?link=http://left&link=http://right) 8 | ![Alt text](https://img.shields.io/badge/IOSVersion-8.0+-green.svg) 9 | ![Alt text](https://img.shields.io/badge/BuildVersion-1.0.0-green.svg) 10 | ![Alt text](https://img.shields.io/badge/Author-JamesDouble-blue.svg?link=http://https://jamesdouble.github.io/index.html&link=http://https://jamesdouble.github.io/index.html) 11 | 12 | 13 | ## Installation 14 | * Cocoapods 15 | 16 | ``` 17 | pod 'RandMyMod' 18 | ``` 19 | 20 | # Basic Usage 21 | 22 | * ### Model must conform *Codable* 23 | 24 | ```swift 25 | import RandMyMod 26 | ``` 27 | 28 | * **Create a Random Model** 29 | 30 | ```swift 31 | let instance = MyStruct() 32 | RandMyMod().randMe(baseOn: instance) { 33 | (newInstance) in 34 | guard let newinstance = newInstance else { print("error"); return } 35 | } 36 | ``` 37 | 38 | * **Create a set of Random Model** 39 | 40 | ```swift 41 | let instance = MyStruct() 42 | RandMyMod().randUs(baseOn: instance) { 43 | (newInstanceArr) in 44 | for newInstance in newInstanceArr { 45 | guard let newinstance = newInstance else { print("error"); return } 46 | } 47 | } 48 | ``` 49 | 50 | * **RandMyModDelegate** 51 | 52 | ```swift 53 | public protocol RandMyModDelegate { 54 | func countForArray(for key: String) -> Int 55 | func shouldIgnore(for key: String, in Container: String) -> Bool 56 | func catchError(with errorStr: String) 57 | func specificRandType(for key: String, in Container: String, with seed: RandType) -> (()->Any)? 58 | } 59 | ``` 60 | 61 | * **Swift fake data generator** 62 | 63 | *vadymmarkov/Fakery : https://github.com/vadymmarkov/Fakery* 64 | 65 | # Notice 66 | 67 | 1. if the variable in class / stuct is Declared with **『 let 』** , rand mod will not change this variable's value. 68 | 69 | ```swift 70 | struct MyStruct { 71 | let nochange: Int = 0 72 | } 73 | let mystruct = MyStruct() 74 | RandMyMod().randMe(baseOn: mystruct) { (newstruct) in 75 | newstruct.nochange // 0 76 | } 77 | ``` 78 | 79 | 2. if the variable in class / stuct is Declared with **『 Optional 』** and ***have no initial Value*** , rand mod will ignore this variable's value and keep it nil. (Mirror may resolve this issue, may fix in the future) 80 | 81 | ```swift 82 | struct MyStruct { 83 | var opt: Int? = 0 84 | var opt2: Int? 85 | } 86 | let mystruct = MyStruct() 87 | RandMyMod().randMe(baseOn: mystruct) { (newstruct) in 88 | mystruct.opt // 4242 89 | mystruct.opt2 // nil 90 | } 91 | ``` 92 | 93 | 94 | # Example 95 | 96 | ### 1. Stuct / Class with native variable type and no special specific: 97 | 98 | ```swift 99 | class Man: Codable { 100 | var name: String = "" 101 | var address: String = "" 102 | var website: [String] = [] 103 | } 104 | 105 | let man = Man() 106 | RandMyMod().randMe(baseOn: man) { (newMan) in 107 | guard let new = newMan else { return } 108 | print(new.address) //mnxvpkalug 109 | print(new.name) //iivjohpggb 110 | print(new.website) //["pbmsualvei", "vlqhlwpajf", "npgtxdmfyt"] 111 | } 112 | 113 | ``` 114 | 115 | ### 2. Stuct / Class with native variable type and specific Rand Type: 116 | 117 | ```swift 118 | struct Man: Codable { 119 | var name: String = "" 120 | var age: Int = 40 121 | var website: [String] = [] 122 | } 123 | 124 | extension Man: RandMyModDelegate { 125 | 126 | func countForArray(for key: String) -> Int { 127 | switch key { 128 | case "website": 129 | return 3 130 | default: 131 | return 0 132 | } 133 | } 134 | 135 | func specificRandType(for key: String, in Container: String, with seed: RandType) -> (() -> Any)? { 136 | switch key { 137 | case "name": 138 | return { return seed.name.name() } 139 | case "age": 140 | return { return seed.number.randomInt(min: 1, max: 60)} 141 | case "website": 142 | return { return seed.internet.url() } 143 | default: 144 | return nil 145 | } 146 | } 147 | } 148 | 149 | let man = Man() 150 | RandMyMod().randMe(baseOn: man) { (newMan) in 151 | guard let new = newMan else { print("no"); return } 152 | print(new.age) //32 153 | print(new.name) //Lavada Krajcik 154 | print(new.website) //["https://littleohara.name/johathangleason6379", "https://kautzerwunsch.biz/karleejones8880", "https://purdy.net/olivercorkery"] 155 | } 156 | ``` 157 | 158 | ### 3. Stuct / Class with own defined variable type and specific Rand Type: 159 | 160 | ```swift 161 | struct Man: Codable { 162 | var name: String = "" 163 | var age: Int = 40 164 | var website: [String] = [] 165 | var child: Child = Child() 166 | } 167 | 168 | struct Child: Codable { 169 | var name: String = "Baby" //Baby has no name yet. 170 | var age: Int = 2 171 | var toy: Toys = Toys() 172 | } 173 | 174 | class Toys: Codable { 175 | var weight: Double = 0.0 176 | } 177 | 178 | extension Man: RandMyModDelegate { 179 | 180 | func shouldIgnore(for key: String, in Container: String) -> Bool { 181 | switch (key, Container) { 182 | case ("name","child"): 183 | return true 184 | default: 185 | return false 186 | } 187 | } 188 | 189 | func specificRandType(for key: String, in Container: String, with seed: RandType) -> (() -> Any)? { 190 | switch (key, Container) { 191 | case ("age","child"): 192 | return { return seed.number.randomInt(min: 1, max: 6)} 193 | case ("weight",_): 194 | return { return seed.number.randomFloat() } 195 | default: 196 | return nil 197 | } 198 | } 199 | } 200 | 201 | let man = Man() 202 | RandMyMod().randMe(baseOn: man) { (newMan) in 203 | guard let child = newMan?.child else { print("no"); return } 204 | print(child.name) //Baby 205 | print(child.age) //3 206 | print(child.toy.weight) //392.807067871094 207 | } 208 | 209 | 210 | ``` 211 | 212 | # Distribution 213 | 214 | Feel free to fork / pull request / open an issue. 215 | 216 | 217 | -------------------------------------------------------------------------------- /RandMyMod.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint RandMyMod.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 http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 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 | s.name = "RandMyMod" 19 | s.version = "1.0" 20 | s.summary = "Create random Model base on your own struct or class." 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 | s.description = <<-DESC 28 | "RandMyMod is an IOS Native Framework helps you generate one or a set of variable base on your own model. 29 | 30 | No matter your model is Class / Struct." 31 | DESC 32 | 33 | s.homepage = "https://github.com/jamesdouble/RandMyMod" 34 | s.screenshots = "https://raw.githubusercontent.com/jamesdouble/RandMyMod/master/Readme_img/logo.png" 35 | 36 | 37 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 38 | # 39 | # Licensing your code is important. See http://choosealicense.com for more info. 40 | # CocoaPods will detect a license file if there is a named LICENSE* 41 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 42 | # 43 | 44 | s.license = "MIT" 45 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 46 | 47 | 48 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 49 | # 50 | # Specify the authors of the library, with email addresses. Email addresses 51 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 52 | # accepts just a name if you'd rather not provide an email address. 53 | # 54 | # Specify a social_media_url where others can refer to, for example a twitter 55 | # profile URL. 56 | # 57 | 58 | s.author = { "郭介騵" => "jameskuo12345@gmail.com" } 59 | # Or just: s.author = "郭介騵" 60 | # s.authors = { "郭介騵" => "jameskuo12345@gmail.com" } 61 | # s.social_media_url = "http://twitter.com/郭介騵" 62 | 63 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 64 | # 65 | # If this Pod runs only on iOS or OS X, then specify the platform and 66 | # the deployment target. You can optionally include the target after the platform. 67 | # 68 | 69 | # s.platform = :ios 70 | s.platform = :ios, "8.0" 71 | s.swift_version = "4.0" 72 | # When using multiple platforms 73 | # s.ios.deployment_target = "5.0" 74 | # s.osx.deployment_target = "10.7" 75 | # s.watchos.deployment_target = "2.0" 76 | # s.tvos.deployment_target = "9.0" 77 | 78 | 79 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 80 | # 81 | # Specify the location from where the source should be retrieved. 82 | # Supports git, hg, bzr, svn and HTTP. 83 | # 84 | 85 | s.source = { :git => "https://github.com/jamesdouble/RandMyMod.git", :tag => "v#{s.version}" } 86 | 87 | 88 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 89 | # 90 | # CocoaPods is smart about how it includes source code. For source files 91 | # giving a folder will include any swift, h, m, mm, c & cpp files. 92 | # For header files it will include any header in the folder. 93 | # Not including the public_header_files will make all headers public. 94 | # 95 | 96 | s.source_files = "RandMyModel/RandMyMod/*" 97 | 98 | # s.public_header_files = "Classes/**/*.h" 99 | 100 | 101 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 102 | # 103 | # A list of resources included with the Pod. These are copied into the 104 | # target bundle with a build phase script. Anything else will be cleaned. 105 | # You can preserve files from being cleaned, please don't preserve 106 | # non-essential files like tests, examples and documentation. 107 | # 108 | 109 | # s.resource = "icon.png" 110 | # s.resources = "Resources/*.png" 111 | 112 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 113 | 114 | 115 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 116 | # 117 | # Link your library with frameworks, or libraries. Libraries do not include 118 | # the lib prefix of their name. 119 | # 120 | 121 | # s.framework = "SomeFramework" 122 | # s.frameworks = "SomeFramework", "AnotherFramework" 123 | 124 | # s.library = "iconv" 125 | # s.libraries = "iconv", "xml2" 126 | 127 | 128 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 129 | # 130 | # If your library depends on compiler flags you can set them in the xcconfig hash 131 | # where they will only apply to your library. If you depend on other Podspecs 132 | # you can include multiple dependencies to ensure it works. 133 | 134 | # s.requires_arc = true 135 | 136 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 137 | s.dependency "Fakery" 138 | 139 | end 140 | -------------------------------------------------------------------------------- /RandMyModel.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RandMyModel.xcodeproj/project.xcworkspace/xcuserdata/JamesDouble.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesdouble/RandMyMod/750b95db511b0551e05344c0ecb8c10775fc2519/RandMyModel.xcodeproj/project.xcworkspace/xcuserdata/JamesDouble.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /RandMyModel.xcodeproj/xcuserdata/JamesDouble.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | RandMyModel.xcscheme 8 | 9 | orderHint 10 | 3 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /RandMyModel.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /RandMyModel.xcworkspace/xcuserdata/JamesDouble.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesdouble/RandMyMod/750b95db511b0551e05344c0ecb8c10775fc2519/RandMyModel.xcworkspace/xcuserdata/JamesDouble.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /RandMyModel/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // RandMyModel 4 | // 5 | // Created by 郭介騵 on 2018/1/17. 6 | // Copyright © 2018年 james12345. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /RandMyModel/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /RandMyModel/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 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /RandMyModel/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 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /RandMyModel/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /RandMyModel/MyPlayground.playground/Contents.swift: -------------------------------------------------------------------------------- 1 | //: Playground - noun: a place where people can play 2 | 3 | import UIKit 4 | 5 | 6 | class RandCore { 7 | 8 | enum RandableType { 9 | case string 10 | case int 11 | case float 12 | case cgfloat 13 | case double 14 | } 15 | 16 | let type: RandableType 17 | 18 | init(_ type: RandableType) { 19 | self.type = type 20 | } 21 | 22 | func randValue() -> Any { 23 | switch type { 24 | case .string: 25 | return "randon" 26 | case .int: 27 | return 666 28 | case .float: 29 | return 666.0 30 | case .cgfloat: 31 | return 666.0 32 | case .double: 33 | return 666.0 34 | } 35 | } 36 | 37 | func randArray() -> [Any] { 38 | return [randValue(),randValue()] 39 | } 40 | 41 | } 42 | 43 | 44 | class RandFactory { 45 | 46 | let originValue:Any 47 | 48 | init(_ base:Any) { 49 | originValue = base 50 | } 51 | 52 | func randData() -> Any { 53 | switch originValue { 54 | case is String: 55 | return RandCore(.string).randValue() 56 | case is [String]: 57 | return RandCore(.string).randArray() 58 | case is Int: 59 | return RandCore(.int).randValue() 60 | case is [Int]: 61 | return RandCore(.int).randArray() 62 | case is Double: 63 | return RandCore(.double).randValue() 64 | case is [Double]: 65 | return RandCore(.double).randArray() 66 | case is Float: 67 | return RandCore(.float).randValue() 68 | case is [Float]: 69 | return RandCore(.float).randArray() 70 | case is CGFloat: 71 | return RandCore(.cgfloat).randValue() 72 | case is [CGFloat]: 73 | return RandCore(.cgfloat).randArray() 74 | 75 | default: 76 | let mirror = Mirror(reflecting: originValue) 77 | let type = mirror.subjectType 78 | let judgementString = "\(type)" 79 | 80 | ///if variable is nullable, can use this to check 81 | if judgementString.contains("Optional") { 82 | if judgementString.contains("String") { 83 | return judgementString.contains("Array") ? RandCore(.string).randArray() : RandCore(.string).randValue() 84 | } else if judgementString.contains("Int") { 85 | return judgementString.contains("Array") ? RandCore(.int).randArray() : RandCore(.int).randValue() 86 | } else if judgementString.contains("Double") { 87 | return judgementString.contains("Array") ? RandCore(.double).randArray() : RandCore(.double).randValue() 88 | } else if judgementString.contains("Float") { 89 | return judgementString.contains("Array") ? RandCore(.float).randArray() : RandCore(.float).randValue() 90 | } else if judgementString.contains("CGFloat") { 91 | return judgementString.contains("Array") ? RandCore(.cgfloat).randArray() : RandCore(.cgfloat).randValue() 92 | } 93 | } 94 | 95 | //May be something unRandable, Check if it is still a Codable or not 96 | if let stillCodable = originValue as? Codable { 97 | originValue.self 98 | // RandMyMod<>().randMe(baseOn: originValue) { (newInstance) in 99 | // guard let instance = newInstance else { fatalError() } 100 | // print(instance) 101 | // } 102 | } 103 | } 104 | return 0 105 | } 106 | } 107 | 108 | struct Mystruct: Codable { 109 | var name: String? 110 | var age: Int = 0 111 | var struct2: MyStruct2 = MyStruct2() 112 | } 113 | 114 | struct MyStruct2: Codable { 115 | var sub1: String = "" 116 | var sub2: Double = 0 117 | } 118 | 119 | let mystruct = Mystruct() 120 | let jsonEncoder = JSONEncoder() 121 | let jsonData = try jsonEncoder.encode(mystruct) 122 | let jsonDic = try JSONSerialization.jsonObject(with: jsonData, options: .mutableContainers) 123 | let jsonDictionary = jsonDic as! [String: Any] 124 | for (_, value) in jsonDictionary.enumerated() { 125 | let factory = RandFactory(value.value).randData() 126 | print("\(factory)") 127 | } 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /RandMyModel/MyPlayground.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /RandMyModel/MyPlayground.playground/playground.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RandMyModel/MyPlayground.playground/playground.xcworkspace/xcuserdata/JamesDouble.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesdouble/RandMyMod/750b95db511b0551e05344c0ecb8c10775fc2519/RandMyModel/MyPlayground.playground/playground.xcworkspace/xcuserdata/JamesDouble.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /RandMyModel/MyPlayground.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /RandMyModel/RandMyMod/RandCore.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RandCore.swift 3 | // RandMyModel 4 | // 5 | // Created by 郭介騵 on 2018/1/24. 6 | // Copyright © 2018年 james12345. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Fakery 11 | 12 | class RandCore { 13 | 14 | enum RandableType { 15 | case string 16 | case int 17 | case float 18 | case cgfloat 19 | case double 20 | } 21 | let faker: Faker = Faker() 22 | let arrCount: Int 23 | var specificBlock: (()->Any)? 24 | 25 | init(_ arrCount: Int, specificBlock: (()->Any)?) { 26 | self.arrCount = arrCount > 0 ? arrCount : faker.number.randomInt(min: 1, max: 10) 27 | self.specificBlock = specificBlock 28 | } 29 | 30 | func randValue(type: RandableType) -> Any { 31 | if let speciBlock = self.specificBlock { 32 | let specificValue = speciBlock() 33 | return specificValue 34 | } 35 | switch type { 36 | case .string: 37 | return faker.lorem.characters(amount: 10) 38 | case .int: 39 | return faker.number.randomInt() 40 | case .float: 41 | return faker.number.randomFloat() 42 | case .cgfloat: 43 | return faker.number.randomCGFloat() 44 | case .double: 45 | return faker.number.randomDouble() 46 | } 47 | } 48 | 49 | func randArray(type: RandableType) -> [Any] { 50 | var result: [Any] = [] 51 | for _ in 0.. { 13 | 14 | var delegate: RandMyModDelegate? 15 | 16 | init(delegate: RandMyModDelegate?) { 17 | self.delegate = delegate 18 | } 19 | 20 | func extractFromDictionary(_ dictionary: [String: Any]) -> T? { 21 | guard let newDicionary = RandFactory(dictionary, "Root", specificBlock: nil, delegate: delegate).randData() as? [String: Any] else { return nil } 22 | do { 23 | let jsonData = try JSONSerialization.data(withJSONObject: newDicionary, options: .prettyPrinted) 24 | let decoder = JSONDecoder() 25 | let newinstance = try decoder.decode(T.self, from: jsonData) 26 | return newinstance 27 | } catch { 28 | delegate?.catchError(with: error.localizedDescription) 29 | return nil 30 | } 31 | } 32 | } 33 | 34 | //Check a variable is pure(Randomable) or not 35 | class RandFactory { 36 | 37 | let originKey: String 38 | let originValue:Any 39 | var delegate: RandMyModDelegate? 40 | let randCore: RandCore 41 | 42 | init(_ base:Any ,_ key: String ,specificBlock: (()->Any)? ,delegate: RandMyModDelegate?) { 43 | self.originKey = key 44 | self.originValue = base 45 | self.delegate = delegate 46 | let count = delegate?.countForArray(for: key) ?? -1 47 | self.randCore = RandCore(count, specificBlock: specificBlock) 48 | } 49 | 50 | public func randData() -> Any { 51 | switch originValue { 52 | case is String: 53 | return randCore.randValue(type: .string) 54 | case is [String]: 55 | return randCore.randArray(type: .string) 56 | case is Int: 57 | return randCore.randValue(type: .int) 58 | case is [Int]: 59 | return randCore.randArray(type: .int) 60 | case is Double: 61 | return randCore.randValue(type: .double) 62 | case is [Double]: 63 | return randCore.randArray(type: .double) 64 | case is Float: 65 | return randCore.randValue(type: .float) 66 | case is [Float]: 67 | return randCore.randArray(type: .float) 68 | case is CGFloat: 69 | return randCore.randValue(type: .cgfloat) 70 | case is [CGFloat]: 71 | return randCore.randArray(type: .cgfloat) 72 | case is [String: Any]: 73 | var dictionary = originValue as! [String: Any] 74 | var specificBlock: (()->Any)? 75 | for (_, variable) in dictionary.enumerated() { 76 | if let delegate = delegate { 77 | if delegate.shouldIgnore(for: variable.key, in: originKey) { 78 | continue 79 | } 80 | //Specific Type 81 | specificBlock = delegate.specificRandType(for: variable.key, in: self.originKey, with: randCore.faker) 82 | } 83 | let factory = RandFactory(variable.value, variable.key, specificBlock: specificBlock, delegate: delegate).randData() 84 | dictionary.updateValue(factory, forKey: variable.key) 85 | } 86 | return dictionary 87 | default: 88 | let mirror = Mirror(reflecting: originValue) 89 | let type = mirror.subjectType 90 | let judgementString = "\(type)" 91 | 92 | ///if variable is nullable, can use this to check 93 | if judgementString.contains("Optional") { 94 | if judgementString.contains("String") { 95 | return judgementString.contains("Array") ? randCore.randArray(type: .string) : randCore.randValue(type: .string) 96 | } else if judgementString.contains("Int") { 97 | return judgementString.contains("Array") ? randCore.randArray(type: .int) : randCore.randValue(type: .int) 98 | } else if judgementString.contains("Double") { 99 | return judgementString.contains("Array") ? randCore.randArray(type: .double) : randCore.randValue(type: .double) 100 | } else if judgementString.contains("Float") { 101 | return judgementString.contains("Array") ? randCore.randArray(type: .float) : randCore.randValue(type: .float) 102 | } else if judgementString.contains("CGFloat") { 103 | return judgementString.contains("Array") ? randCore.randArray(type: .cgfloat) : randCore.randValue(type: .cgfloat) 104 | } 105 | } 106 | } 107 | return 0 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /RandMyModel/RandMyMod/RandMyMod.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RandMyMod.swift 3 | // RandMyModel 4 | // 5 | // Created by 郭介騵 on 2018/1/18. 6 | // Copyright © 2018年 james12345. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Fakery 11 | 12 | public protocol RandMyModDelegate { 13 | func countForArray(for key: String) -> Int 14 | func shouldIgnore(for key: String, in Container: String) -> Bool 15 | func catchError(with errorStr: String) 16 | func specificRandType(for key: String, in Container: String, with seed: RandType) -> (()->Any)? 17 | } 18 | 19 | public extension RandMyModDelegate { 20 | func shouldIgnore(for key: String, in Container: String) -> Bool { 21 | return false 22 | } 23 | 24 | func catchError(with errorStr: String) { 25 | 26 | } 27 | 28 | func countForArray(for key: String) -> Int { 29 | return -1 30 | } 31 | } 32 | public typealias RandType = Faker 33 | public class RandMyMod { 34 | 35 | public init(forceUnWrapOptional force: Bool = false) { 36 | 37 | } 38 | 39 | //Random Array 40 | public func randUs(amount: Int, baseOn instance: T, completion: ([T])->()) -> [T] { 41 | var result: [T] = [] 42 | for _ in 0.. ()) { 54 | /// Convert Variable To flat Dictionary 55 | let delegate = instance as? RandMyModDelegate 56 | do { 57 | let jsonData = try JSONEncoder().encode(instance) 58 | let jsonDic = try JSONSerialization.jsonObject(with: jsonData, options: .mutableContainers) 59 | guard let jsonDictionary = jsonDic as? [String: Any] else { completion(nil); return } 60 | let newinstance = RandExtractor(delegate: delegate).extractFromDictionary(jsonDictionary) 61 | completion(newinstance) 62 | return 63 | } catch { 64 | delegate?.catchError(with: error.localizedDescription) 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /RandMyModel/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // RandMyModel 4 | // 5 | // Created by 郭介騵 on 2018/1/17. 6 | // Copyright © 2018年 james12345. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Readme_img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesdouble/RandMyMod/750b95db511b0551e05344c0ecb8c10775fc2519/Readme_img/logo.png --------------------------------------------------------------------------------