├── .codecov.yml ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .ruby-version ├── .swift-version ├── .swiftlint.yml ├── AutoChangeable.podspec ├── AutoChangeable.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── AutoChangeable iOS.xcscheme │ ├── AutoChangeable macOS.xcscheme │ ├── AutoChangeable tvOS.xcscheme │ └── AutoChangeable watchOS.xcscheme ├── Bin ├── AutoChangeable └── AutoChangeable.stencil ├── Brewfile ├── Dangerfile ├── Demo ├── AutoChangeableDemo.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── ChangeableCopyDemo.xcscheme ├── AutoChangeableDemo.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Podfile ├── Podfile.lock └── Sources │ ├── AppDelegate.swift │ ├── Generated │ └── AutoChangeable.swift │ ├── Info.plist │ ├── Models │ ├── Company.swift │ └── User.swift │ ├── Resources │ └── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ └── Contents.json │ │ └── Contents.json │ ├── Storyboards │ └── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ └── ViewController.swift ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── Package.swift ├── README.md ├── Scripts ├── bootstrap.sh └── swiftlint.sh ├── Sources ├── .swiftlint.yml ├── AutoChangeable.h ├── AutoChangeable.swift ├── Changeable.swift ├── ChangeableWrapper.swift ├── Extensions │ ├── CoreGraphics │ │ ├── CGPoint+Changeable.swift │ │ ├── CGRect+Changeable.swift │ │ └── CGSize+Changeable.swift │ ├── Foundation │ │ ├── Array+Changeable.swift │ │ ├── Dictionary+Changeable.swift │ │ └── Set+Changeable.swift │ └── UIKit │ │ └── UIEdgeInsets+Changeable.swift └── Info.plist └── Tests ├── .swiftlint.yml ├── ChangeableTests.swift ├── ChangeableWrapperTests.swift ├── Extensions ├── CoreGraphics │ ├── CGPointChangingTests.swift │ ├── CGRectChangingTests.swift │ └── CGSizeChangingTests.swift ├── Foundation │ ├── ArrayChangingTests.swift │ ├── DictionaryChangingTests.swift │ └── SetChangingTests.swift └── UIKit │ └── UIEdgeInsetsChangingTests.swift ├── Info.plist └── Models ├── Company.swift └── User.swift /.codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | precision: 2 3 | round: down 4 | range: "70...100" 5 | 6 | status: 7 | project: 8 | default: 9 | threshold: 1.0% 10 | changes: 11 | default: 12 | threshold: 1.0% 13 | patch: off 14 | 15 | comment: 16 | layout: "flags, files" 17 | behavior: new 18 | 19 | ignore: 20 | - Tests/**/* 21 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: "CI" 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | env: 12 | LC_CTYPE: en_US.UTF-8 13 | LANG: en_US.UTF-8 14 | RUBY_VERSION: 2.6.x 15 | 16 | jobs: 17 | BuildAndTests: 18 | name: Build & Tests 19 | runs-on: macOS-latest 20 | env: 21 | DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer 22 | XCODE_PROJECT: AutoChangeable.xcodeproj 23 | IOS_SCHEME: AutoChangeable iOS 24 | IOS_DESTINATION: OS=13.5,name=iPhone 11 Pro 25 | IOS_BUILD_LOG_PATH: xcodebuild-ios.json 26 | MACOS_SCHEME: AutoChangeable macOS 27 | MACOS_DESTINATION: platform=macOS 28 | MACOS_BUILD_LOG_PATH: xcodebuild-macos.json 29 | TVOS_SCHEME: AutoChangeable tvOS 30 | TVOS_DESTINATION: OS=13.4,name=Apple TV 4K 31 | TVOS_BUILD_LOG_PATH: xcodebuild-tvos.json 32 | WATCHOS_SCHEME: AutoChangeable watchOS 33 | WATCHOS_DESTINATION: OS=6.2.1,name=Apple Watch Series 5 - 44mm 34 | WATCHOS_BUILD_LOG_PATH: xcodebuild-watchos.json 35 | SKIP_SWIFTLINT: TRUE 36 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 37 | DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} 38 | steps: 39 | - uses: actions/checkout@v2 40 | - name: Ruby 41 | uses: actions/setup-ruby@v1 42 | with: 43 | ruby-version: ${{ env.RUBY_VERSION }} 44 | - name: Bundler 45 | run: | 46 | gem install bundler 47 | bundle install --without=documentation 48 | - name: Preparation 49 | run: | 50 | set -o pipefail 51 | swift --version 52 | - name: Test iOS 53 | run: | 54 | xcodebuild clean build test -project "$XCODE_PROJECT" -scheme "$IOS_SCHEME" -destination "$IOS_DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="$IOS_BUILD_LOG_PATH" xcpretty -f `xcpretty-json-formatter` 55 | bash <(curl -s https://codecov.io/bash) -cF ios -J 'AutoChangeable' 56 | - name: Test macOS 57 | run: | 58 | xcodebuild clean build test -project "$XCODE_PROJECT" -scheme "$MACOS_SCHEME" -destination "$MACOS_DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="$MACOS_BUILD_LOG_PATH" xcpretty -f `xcpretty-json-formatter` 59 | bash <(curl -s https://codecov.io/bash) -cF osx -J 'AutoChangeable' 60 | - name: Test tvOS 61 | run: | 62 | xcodebuild clean build test -project "$XCODE_PROJECT" -scheme "$TVOS_SCHEME" -destination "$TVOS_DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="$TVOS_BUILD_LOG_PATH" xcpretty -f `xcpretty-json-formatter` 63 | bash <(curl -s https://codecov.io/bash) -cF tvos -J 'AutoChangeable' 64 | - name: Build watchOS 65 | run: | 66 | xcodebuild clean build -project "$XCODE_PROJECT" -scheme "$WATCHOS_SCHEME" -destination "$WATCHOS_DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="$WATCHOS_BUILD_LOG_PATH" xcpretty -f `xcpretty-json-formatter` 67 | - name: Danger 68 | run: bundle exec danger --remove-previous-comments 69 | 70 | Cocoapods: 71 | name: Cocoapods 72 | runs-on: macOS-latest 73 | steps: 74 | - uses: actions/checkout@v2 75 | - name: Ruby 76 | uses: actions/setup-ruby@v1 77 | with: 78 | ruby-version: ${{ env.RUBY_VERSION }} 79 | - name: Bundler 80 | run: | 81 | gem install bundler 82 | bundle install --without=documentation 83 | - name: Linting 84 | run: bundle exec pod lib lint --skip-tests --allow-warnings 85 | 86 | SPM: 87 | name: Swift Package Manager 88 | runs-on: macOS-latest 89 | steps: 90 | - uses: actions/checkout@v2 91 | - name: Build 92 | run: swift build 93 | - name: Test 94 | run: swift test 95 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## OS X files 2 | .DS_Store 3 | .DS_Store? 4 | .Trashes 5 | .Spotlight-V100 6 | *.swp 7 | 8 | ## Xcode build files 9 | DerivedData/ 10 | build/ 11 | 12 | ## Xcode private settings 13 | *.pbxuser 14 | !default.pbxuser 15 | *.mode1v3 16 | !default.mode1v3 17 | *.mode2v3 18 | !default.mode2v3 19 | *.perspectivev3 20 | !default.perspectivev3 21 | xcuserdata/ 22 | 23 | ## Other 24 | *.xccheckout 25 | *.moved-aside 26 | *.xcuserstate 27 | *.xcscmblueprint 28 | 29 | ## Obj-C/Swift specific 30 | *.hmap 31 | *.ipa 32 | *.dSYM.zip 33 | *.dSYM 34 | 35 | ## Playgrounds 36 | timeline.xctimeline 37 | playground.xcworkspace 38 | 39 | # Swift Packages Manager 40 | Packages 41 | .build 42 | .swiftpm 43 | 44 | # CocoaPods 45 | Pods/ 46 | 47 | # Carthage 48 | Carthage/Build 49 | 50 | # fastlane 51 | fastlane/report.xml 52 | fastlane/Preview.html 53 | fastlane/screenshots/**/*.png 54 | fastlane/test_output 55 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.6.3 -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 5.1 2 | -------------------------------------------------------------------------------- /.swiftlint.yml: -------------------------------------------------------------------------------- 1 | included: 2 | - Sources 3 | - Tests 4 | 5 | whitelist_rules: 6 | - anyobject_protocol 7 | - array_init 8 | - attributes 9 | - block_based_kvo 10 | - class_delegate_protocol 11 | - closing_brace 12 | - closure_body_length 13 | - closure_end_indentation 14 | - closure_parameter_position 15 | - closure_spacing 16 | - collection_alignment 17 | - colon 18 | - comma 19 | - compiler_protocol_init 20 | - conditional_returns_on_newline 21 | - contains_over_filter_count 22 | - contains_over_filter_is_empty 23 | - contains_over_first_not_nil 24 | - contains_over_range_nil_comparison 25 | - control_statement 26 | - convenience_type 27 | - custom_rules 28 | - cyclomatic_complexity 29 | - discarded_notification_center_observer 30 | - discouraged_direct_init 31 | - discouraged_object_literal 32 | - duplicate_enum_cases 33 | - duplicate_imports 34 | - dynamic_inline 35 | - empty_count 36 | - empty_enum_arguments 37 | - empty_parameters 38 | - empty_parentheses_with_trailing_closure 39 | - empty_string 40 | - empty_xctest_method 41 | - enum_case_associated_values_count 42 | - explicit_init 43 | - extension_access_modifier 44 | - file_header 45 | - file_length 46 | - file_name 47 | - first_where 48 | - flatmap_over_map_reduce 49 | - for_where 50 | - force_try 51 | - function_body_length 52 | - generic_type_name 53 | - identical_operands 54 | - identifier_name 55 | - implicit_getter 56 | - inert_defer 57 | - is_disjoint 58 | - joined_default_parameter 59 | - large_tuple 60 | - last_where 61 | - leading_whitespace 62 | - legacy_cggeometry_functions 63 | - legacy_constant 64 | - legacy_constructor 65 | - legacy_hashing 66 | - legacy_multiple 67 | - legacy_nsgeometry_functions 68 | - legacy_random 69 | - let_var_whitespace 70 | - line_length 71 | - literal_expression_end_indentation 72 | - lower_acl_than_parent 73 | - mark 74 | - modifier_order 75 | - multiline_arguments 76 | - multiline_arguments_brackets 77 | - multiline_literal_brackets 78 | - multiline_parameters 79 | - multiline_parameters_brackets 80 | - multiple_closures_with_trailing_closure 81 | - nesting 82 | - no_space_in_method_call 83 | - nsobject_prefer_isequal 84 | - number_separator 85 | - opening_brace 86 | - operator_usage_whitespace 87 | - operator_whitespace 88 | - optional_enum_case_matching 89 | - orphaned_doc_comment 90 | - overridden_super_call 91 | - override_in_extension 92 | - pattern_matching_keywords 93 | - prefer_self_type_over_type_of_self 94 | - private_action 95 | - private_outlet 96 | - private_over_fileprivate 97 | - private_unit_test 98 | - prohibited_super_call 99 | - protocol_property_accessors_order 100 | - quick_discouraged_call 101 | - quick_discouraged_focused_test 102 | - quick_discouraged_pending_test 103 | - raw_value_for_camel_cased_codable_enum 104 | - reduce_boolean 105 | - redundant_discardable_let 106 | - redundant_nil_coalescing 107 | - redundant_objc_attribute 108 | - redundant_optional_initialization 109 | - redundant_set_access_control 110 | - redundant_string_enum_value 111 | - redundant_type_annotation 112 | - redundant_void_return 113 | - return_arrow_whitespace 114 | - shorthand_operator 115 | - single_test_class 116 | - sorted_first_last 117 | - statement_position 118 | - static_operator 119 | - superfluous_disable_command 120 | - switch_case_alignment 121 | - switch_case_on_newline 122 | - syntactic_sugar 123 | - todo 124 | - toggle_bool 125 | - trailing_closure 126 | - trailing_comma 127 | - trailing_newline 128 | - trailing_semicolon 129 | - trailing_whitespace 130 | - type_body_length 131 | - type_contents_order 132 | - type_name 133 | - unavailable_function 134 | - unneeded_break_in_switch 135 | - untyped_error_in_catch 136 | - unused_capture_list 137 | - unused_closure_parameter 138 | - unused_control_flow_label 139 | - unused_declaration 140 | - unused_enumerated 141 | - unused_import 142 | - unused_optional_binding 143 | - unused_setter_value 144 | - valid_ibinspectable 145 | - vertical_parameter_alignment 146 | - vertical_parameter_alignment_on_call 147 | - vertical_whitespace 148 | - vertical_whitespace_between_cases 149 | - vertical_whitespace_closing_braces 150 | - void_return 151 | - weak_delegate 152 | - xct_specific_matcher 153 | - xctfail_message 154 | - yoda_condition 155 | 156 | attributes: 157 | always_on_same_line: 158 | - '@IBAction' 159 | - '@IBOutlet' 160 | - '@IBDesignable' 161 | - '@IBInspectable' 162 | - '@GKInspectable' 163 | - '@NSCopying' 164 | - '@NSManaged' 165 | - '@dynamic' 166 | - '@nonobjc' 167 | - '@objc' 168 | - '@objcMembers' 169 | - '@testable' 170 | always_on_line_above: 171 | - '@UIApplicationMain' 172 | - '@NSApplicationMain' 173 | - '@dynamicMemberLookup' 174 | - '@dynamicCallable' 175 | - '@propertyWrapper' 176 | - '@convention' 177 | - '@frozen' 178 | - '@available' 179 | - '@discardableResult' 180 | - '@inlinable' 181 | - '@usableFromInline' 182 | - '@warn_unqualified_access' 183 | - '@requires_stored_property_inits' 184 | 185 | closure_body_length: 186 | warning: 20 187 | error: 200 188 | 189 | collection_alignment: 190 | align_colons: false 191 | 192 | colon: 193 | flexible_right_spacing: true 194 | apply_to_dictionaries: true 195 | 196 | conditional_returns_on_newline: 197 | if_only: false 198 | 199 | cyclomatic_complexity: 200 | warning: 16 201 | error: 160 202 | ignores_case_statements: true 203 | 204 | discouraged_direct_init: 205 | types: 206 | - Bundle 207 | - UIDevice 208 | - AVAudioSession 209 | 210 | discouraged_object_literal: 211 | image_literal: true 212 | color_literal: true 213 | 214 | duplicate_enum_cases: 215 | severity: warning 216 | 217 | dynamic_inline: 218 | severity: warning 219 | 220 | empty_count: 221 | severity: warning 222 | 223 | enum_case_associated_values_count: 224 | warning: 4 225 | error: 40 226 | 227 | file_header: 228 | forbidden_pattern: ".?" 229 | 230 | file_length: 231 | warning: 400 232 | error: 4000 233 | ignore_comment_only_lines: true 234 | 235 | file_name: 236 | excluded: 237 | - main.swift 238 | prefix_pattern: '' 239 | suffix_pattern: '[+][A-z][A-z]+' 240 | nested_type_separator: '' 241 | 242 | force_try: 243 | severity: warning 244 | 245 | function_body_length: 246 | warning: 40 247 | error: 400 248 | 249 | generic_type_name: 250 | min_length: 251 | warning: 3 252 | error: 0 253 | max_length: 254 | warning: 20 255 | error: 200 256 | validates_start_with_lowercase: true 257 | excluded: 258 | - T 259 | - U 260 | - V 261 | 262 | identifier_name: 263 | min_length: 264 | warning: 2 265 | error: 1 266 | max_length: 267 | warning: 40 268 | error: 400 269 | validates_start_with_lowercase: true 270 | excluded: 271 | - a 272 | - r 273 | - g 274 | - b 275 | - i 276 | - j 277 | - x 278 | - y 279 | - z 280 | - w 281 | 282 | large_tuple: 283 | warning: 3 284 | error: 8 285 | 286 | line_length: 287 | warning: 120 288 | error: 1200 289 | ignores_urls: false 290 | ignores_function_declarations: false 291 | ignores_comments: false 292 | ignores_interpolated_strings: false 293 | 294 | modifier_order: 295 | preferred_modifier_order: 296 | - acl 297 | - setterACL 298 | - override 299 | - owned 300 | - mutators 301 | - final 302 | - typeMethods 303 | - required 304 | - convenience 305 | - lazy 306 | - dynamic 307 | 308 | multiline_arguments: 309 | first_argument_location: next_line 310 | only_enforce_after_first_closure_on_first_line: false 311 | 312 | nesting: 313 | type_level: 314 | warning: 1 315 | error: 10 316 | statement_level: 317 | warning: 4 318 | error: 40 319 | 320 | number_separator: 321 | minimum_length: 5 322 | minimum_fraction_length: 5 323 | exclude_ranges: [] 324 | 325 | overridden_super_call: 326 | included: 327 | - '*' 328 | excluded: [] 329 | 330 | private_outlet: 331 | allow_private_set: false 332 | 333 | private_over_fileprivate: 334 | validate_extensions: true 335 | 336 | prohibited_super_call: 337 | included: 338 | - '*' 339 | excluded: [] 340 | 341 | shorthand_operator: 342 | severity: warning 343 | 344 | statement_position: 345 | statement_mode: default 346 | 347 | switch_case_alignment: 348 | indented_cases: false 349 | 350 | trailing_closure: 351 | only_single_muted_parameter: false 352 | 353 | trailing_comma: 354 | mandatory_comma: false 355 | 356 | trailing_whitespace: 357 | ignores_empty_lines: false 358 | ignores_comments: false 359 | 360 | type_contents_order: 361 | order: 362 | - associated_type 363 | - type_alias 364 | - subtype 365 | - case 366 | - type_property 367 | - type_method 368 | - ib_outlet 369 | - ib_inspectable 370 | - instance_property 371 | - initializer 372 | - ib_action 373 | - other_method 374 | - view_life_cycle_method 375 | - subscript 376 | 377 | type_body_length: 378 | warning: 400 379 | error: 4000 380 | 381 | type_name: 382 | min_length: 383 | warning: 3 384 | error: 0 385 | max_length: 386 | warning: 50 387 | error: 500 388 | validates_start_with_lowercase: true 389 | 390 | unused_optional_binding: 391 | ignore_optional_try: false 392 | 393 | unused_declaration: 394 | severity: warning 395 | include_public_and_open: false 396 | 397 | vertical_whitespace: 398 | max_empty_lines: 1 399 | 400 | warning_threshold: 100 401 | -------------------------------------------------------------------------------- /AutoChangeable.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |spec| 2 | spec.name = "AutoChangeable" 3 | spec.version = "1.0.1" 4 | spec.summary = "Convenient way to copy instances of Swift types with changed properties" 5 | 6 | spec.homepage = "https://github.com/almazrafi/AutoChangeable" 7 | spec.license = { :type => 'MIT', :file => 'LICENSE' } 8 | spec.author = { "Almaz Ibragimov" => "almazrafi@gmail.com" } 9 | spec.source = { :git => "https://github.com/almazrafi/AutoChangeable.git", :tag => "#{spec.version}" } 10 | 11 | spec.swift_version = '5.1' 12 | spec.requires_arc = true 13 | spec.source_files = 'Sources/**/*.swift' 14 | spec.preserve_path = 'Bin/**/*' 15 | 16 | spec.ios.frameworks = 'Foundation' 17 | spec.ios.deployment_target = "10.0" 18 | 19 | spec.osx.frameworks = 'Foundation' 20 | spec.osx.deployment_target = "10.12" 21 | 22 | spec.watchos.frameworks = 'Foundation' 23 | spec.watchos.deployment_target = "3.0" 24 | 25 | spec.tvos.frameworks = 'Foundation' 26 | spec.tvos.deployment_target = "10.0" 27 | end 28 | -------------------------------------------------------------------------------- /AutoChangeable.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C057F01823CB8EEB00C2D895 /* AutoChangeable.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C057F00E23CB8EEB00C2D895 /* AutoChangeable.framework */; }; 11 | C057F01F23CB8EEB00C2D895 /* AutoChangeable.h in Headers */ = {isa = PBXBuildFile; fileRef = C057F01123CB8EEB00C2D895 /* AutoChangeable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | C060B9D324C7854F004C5200 /* ChangeableWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06DF3EE24BA4F170034B365 /* ChangeableWrapper.swift */; }; 13 | C060B9D424C78550004C5200 /* ChangeableWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06DF3EE24BA4F170034B365 /* ChangeableWrapper.swift */; }; 14 | C060B9D524C78550004C5200 /* ChangeableWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06DF3EE24BA4F170034B365 /* ChangeableWrapper.swift */; }; 15 | C060B9D624C78551004C5200 /* ChangeableWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06DF3EE24BA4F170034B365 /* ChangeableWrapper.swift */; }; 16 | C060B9F324C78BDE004C5200 /* Array+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B98624C702CC004C5200 /* Array+Changeable.swift */; }; 17 | C060B9F424C78BDE004C5200 /* Set+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B98B24C70338004C5200 /* Set+Changeable.swift */; }; 18 | C060B9F524C78BDE004C5200 /* Dictionary+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B99024C70366004C5200 /* Dictionary+Changeable.swift */; }; 19 | C060B9F624C78BDF004C5200 /* Array+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B98624C702CC004C5200 /* Array+Changeable.swift */; }; 20 | C060B9F724C78BDF004C5200 /* Set+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B98B24C70338004C5200 /* Set+Changeable.swift */; }; 21 | C060B9F824C78BDF004C5200 /* Dictionary+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B99024C70366004C5200 /* Dictionary+Changeable.swift */; }; 22 | C060B9F924C78BE0004C5200 /* Array+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B98624C702CC004C5200 /* Array+Changeable.swift */; }; 23 | C060B9FA24C78BE0004C5200 /* Set+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B98B24C70338004C5200 /* Set+Changeable.swift */; }; 24 | C060B9FB24C78BE0004C5200 /* Dictionary+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B99024C70366004C5200 /* Dictionary+Changeable.swift */; }; 25 | C060B9FC24C78BE0004C5200 /* Array+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B98624C702CC004C5200 /* Array+Changeable.swift */; }; 26 | C060B9FD24C78BE0004C5200 /* Set+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B98B24C70338004C5200 /* Set+Changeable.swift */; }; 27 | C060B9FE24C78BE0004C5200 /* Dictionary+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060B99024C70366004C5200 /* Dictionary+Changeable.swift */; }; 28 | C060B9FF24C78C20004C5200 /* UIEdgeInsets+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66CD24C63B0E00E21EC2 /* UIEdgeInsets+Changeable.swift */; }; 29 | C060BA0024C78C21004C5200 /* UIEdgeInsets+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66CD24C63B0E00E21EC2 /* UIEdgeInsets+Changeable.swift */; }; 30 | C060BA0124C78C21004C5200 /* UIEdgeInsets+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66CD24C63B0E00E21EC2 /* UIEdgeInsets+Changeable.swift */; }; 31 | C060BA0224C78C21004C5200 /* UIEdgeInsets+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66CD24C63B0E00E21EC2 /* UIEdgeInsets+Changeable.swift */; }; 32 | C060BA0324C78C44004C5200 /* CGPoint+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66C324C63A5600E21EC2 /* CGPoint+Changeable.swift */; }; 33 | C060BA0424C78C44004C5200 /* CGRect+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66C824C63AB200E21EC2 /* CGRect+Changeable.swift */; }; 34 | C060BA0524C78C44004C5200 /* CGSize+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66BE24C639F400E21EC2 /* CGSize+Changeable.swift */; }; 35 | C060BA0624C78C44004C5200 /* CGPoint+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66C324C63A5600E21EC2 /* CGPoint+Changeable.swift */; }; 36 | C060BA0724C78C44004C5200 /* CGRect+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66C824C63AB200E21EC2 /* CGRect+Changeable.swift */; }; 37 | C060BA0824C78C44004C5200 /* CGSize+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66BE24C639F400E21EC2 /* CGSize+Changeable.swift */; }; 38 | C060BA0924C78C44004C5200 /* CGPoint+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66C324C63A5600E21EC2 /* CGPoint+Changeable.swift */; }; 39 | C060BA0A24C78C44004C5200 /* CGRect+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66C824C63AB200E21EC2 /* CGRect+Changeable.swift */; }; 40 | C060BA0B24C78C44004C5200 /* CGSize+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66BE24C639F400E21EC2 /* CGSize+Changeable.swift */; }; 41 | C060BA0C24C78C45004C5200 /* CGPoint+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66C324C63A5600E21EC2 /* CGPoint+Changeable.swift */; }; 42 | C060BA0D24C78C45004C5200 /* CGRect+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66C824C63AB200E21EC2 /* CGRect+Changeable.swift */; }; 43 | C060BA0E24C78C45004C5200 /* CGSize+Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66BE24C639F400E21EC2 /* CGSize+Changeable.swift */; }; 44 | C060BA2124C79433004C5200 /* ArrayChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060BA1224C793E9004C5200 /* ArrayChangingTests.swift */; }; 45 | C060BA2224C79434004C5200 /* ArrayChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060BA1224C793E9004C5200 /* ArrayChangingTests.swift */; }; 46 | C060BA2324C79434004C5200 /* ArrayChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060BA1224C793E9004C5200 /* ArrayChangingTests.swift */; }; 47 | C060BA2424C7943C004C5200 /* SetChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060BA1724C793F5004C5200 /* SetChangingTests.swift */; }; 48 | C060BA2524C7943C004C5200 /* SetChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060BA1724C793F5004C5200 /* SetChangingTests.swift */; }; 49 | C060BA2624C7943D004C5200 /* SetChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060BA1724C793F5004C5200 /* SetChangingTests.swift */; }; 50 | C060BA2724C7944F004C5200 /* DictionaryChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060BA1C24C79404004C5200 /* DictionaryChangingTests.swift */; }; 51 | C060BA2824C7944F004C5200 /* DictionaryChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060BA1C24C79404004C5200 /* DictionaryChangingTests.swift */; }; 52 | C060BA2924C79450004C5200 /* DictionaryChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C060BA1C24C79404004C5200 /* DictionaryChangingTests.swift */; }; 53 | C06DF3EA24BA4EA00034B365 /* Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06DF3E924BA4EA00034B365 /* Changeable.swift */; }; 54 | C06DF3EB24BA4EA00034B365 /* Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06DF3E924BA4EA00034B365 /* Changeable.swift */; }; 55 | C06DF3EC24BA4EA00034B365 /* Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06DF3E924BA4EA00034B365 /* Changeable.swift */; }; 56 | C06DF3ED24BA4EA00034B365 /* Changeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06DF3E924BA4EA00034B365 /* Changeable.swift */; }; 57 | C08F5BCD24C39B2700E21EC2 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BCC24C39B2700E21EC2 /* User.swift */; }; 58 | C08F5BCE24C39B2700E21EC2 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BCC24C39B2700E21EC2 /* User.swift */; }; 59 | C08F5BCF24C39B2700E21EC2 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BCC24C39B2700E21EC2 /* User.swift */; }; 60 | C08F5BD124C39B5500E21EC2 /* Company.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BD024C39B5500E21EC2 /* Company.swift */; }; 61 | C08F5BD224C39B5500E21EC2 /* Company.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BD024C39B5500E21EC2 /* Company.swift */; }; 62 | C08F5BD324C39B5500E21EC2 /* Company.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BD024C39B5500E21EC2 /* Company.swift */; }; 63 | C08F5BD524C39C2700E21EC2 /* ChangeableWrapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BD424C39C2700E21EC2 /* ChangeableWrapperTests.swift */; }; 64 | C08F5BD624C39C2700E21EC2 /* ChangeableWrapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BD424C39C2700E21EC2 /* ChangeableWrapperTests.swift */; }; 65 | C08F5BD724C39C2700E21EC2 /* ChangeableWrapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BD424C39C2700E21EC2 /* ChangeableWrapperTests.swift */; }; 66 | C08F5BD924C3B5D800E21EC2 /* ChangeableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BD824C3B5D800E21EC2 /* ChangeableTests.swift */; }; 67 | C08F5BDA24C3B5D800E21EC2 /* ChangeableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BD824C3B5D800E21EC2 /* ChangeableTests.swift */; }; 68 | C08F5BDB24C3B5D800E21EC2 /* ChangeableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5BD824C3B5D800E21EC2 /* ChangeableTests.swift */; }; 69 | C08F5EC324C3BD2A00E21EC2 /* AutoChangeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5EC224C3BD2A00E21EC2 /* AutoChangeable.swift */; }; 70 | C08F5EC424C3BD2A00E21EC2 /* AutoChangeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5EC224C3BD2A00E21EC2 /* AutoChangeable.swift */; }; 71 | C08F5EC524C3BD2A00E21EC2 /* AutoChangeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5EC224C3BD2A00E21EC2 /* AutoChangeable.swift */; }; 72 | C08F5EC624C3BD2A00E21EC2 /* AutoChangeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5EC224C3BD2A00E21EC2 /* AutoChangeable.swift */; }; 73 | C08F66D424C63D0B00E21EC2 /* CGSizeChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66D324C63D0B00E21EC2 /* CGSizeChangingTests.swift */; }; 74 | C08F66D524C63D0B00E21EC2 /* CGSizeChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66D324C63D0B00E21EC2 /* CGSizeChangingTests.swift */; }; 75 | C08F66D624C63D0B00E21EC2 /* CGSizeChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66D324C63D0B00E21EC2 /* CGSizeChangingTests.swift */; }; 76 | C08F66D824C640A800E21EC2 /* CGPointChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66D724C640A800E21EC2 /* CGPointChangingTests.swift */; }; 77 | C08F66D924C640A800E21EC2 /* CGPointChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66D724C640A800E21EC2 /* CGPointChangingTests.swift */; }; 78 | C08F66DA24C640A800E21EC2 /* CGPointChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66D724C640A800E21EC2 /* CGPointChangingTests.swift */; }; 79 | C08F66DC24C6412100E21EC2 /* CGRectChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66DB24C6412100E21EC2 /* CGRectChangingTests.swift */; }; 80 | C08F66DD24C6412100E21EC2 /* CGRectChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66DB24C6412100E21EC2 /* CGRectChangingTests.swift */; }; 81 | C08F66DE24C6412100E21EC2 /* CGRectChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66DB24C6412100E21EC2 /* CGRectChangingTests.swift */; }; 82 | C08F66E024C6425800E21EC2 /* UIEdgeInsetsChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66DF24C6425800E21EC2 /* UIEdgeInsetsChangingTests.swift */; }; 83 | C08F66E124C6425800E21EC2 /* UIEdgeInsetsChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66DF24C6425800E21EC2 /* UIEdgeInsetsChangingTests.swift */; }; 84 | C08F66E224C6425800E21EC2 /* UIEdgeInsetsChangingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F66DF24C6425800E21EC2 /* UIEdgeInsetsChangingTests.swift */; }; 85 | C0A01A3223CB90F200AC2C3A /* AutoChangeable.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A01A2923CB90F200AC2C3A /* AutoChangeable.framework */; }; 86 | C0A01A4123CB912C00AC2C3A /* AutoChangeable.h in Headers */ = {isa = PBXBuildFile; fileRef = C057F01123CB8EEB00C2D895 /* AutoChangeable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 87 | C0A01A5023CB92EB00AC2C3A /* AutoChangeable.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A01A4723CB92EB00AC2C3A /* AutoChangeable.framework */; }; 88 | C0A01A5E23CB92F200AC2C3A /* AutoChangeable.h in Headers */ = {isa = PBXBuildFile; fileRef = C057F01123CB8EEB00C2D895 /* AutoChangeable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 89 | /* End PBXBuildFile section */ 90 | 91 | /* Begin PBXContainerItemProxy section */ 92 | C057F01923CB8EEB00C2D895 /* PBXContainerItemProxy */ = { 93 | isa = PBXContainerItemProxy; 94 | containerPortal = C057F00523CB8EEB00C2D895 /* Project object */; 95 | proxyType = 1; 96 | remoteGlobalIDString = C057F00D23CB8EEB00C2D895; 97 | remoteInfo = AutoChangeable; 98 | }; 99 | C0A01A3323CB90F200AC2C3A /* PBXContainerItemProxy */ = { 100 | isa = PBXContainerItemProxy; 101 | containerPortal = C057F00523CB8EEB00C2D895 /* Project object */; 102 | proxyType = 1; 103 | remoteGlobalIDString = C0A01A2823CB90F200AC2C3A; 104 | remoteInfo = "AutoChangeable macOS"; 105 | }; 106 | C0A01A5123CB92EB00AC2C3A /* PBXContainerItemProxy */ = { 107 | isa = PBXContainerItemProxy; 108 | containerPortal = C057F00523CB8EEB00C2D895 /* Project object */; 109 | proxyType = 1; 110 | remoteGlobalIDString = C0A01A4623CB92EB00AC2C3A; 111 | remoteInfo = "AutoChangeable tvOS"; 112 | }; 113 | /* End PBXContainerItemProxy section */ 114 | 115 | /* Begin PBXFileReference section */ 116 | C0007FFA23CBAAA5005F95E0 /* .swift-version */ = {isa = PBXFileReference; lastKnownFileType = text; path = ".swift-version"; sourceTree = ""; }; 117 | C006F1A22406B13E00C3F783 /* AutoChangeable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AutoChangeable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 118 | C057F00E23CB8EEB00C2D895 /* AutoChangeable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AutoChangeable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 119 | C057F01123CB8EEB00C2D895 /* AutoChangeable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AutoChangeable.h; sourceTree = ""; }; 120 | C057F01223CB8EEB00C2D895 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 121 | C057F01723CB8EEB00C2D895 /* AutoChangeable Tests iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AutoChangeable Tests iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 122 | C057F01E23CB8EEB00C2D895 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 123 | C060B98624C702CC004C5200 /* Array+Changeable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Changeable.swift"; sourceTree = ""; }; 124 | C060B98B24C70338004C5200 /* Set+Changeable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Set+Changeable.swift"; sourceTree = ""; }; 125 | C060B99024C70366004C5200 /* Dictionary+Changeable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Dictionary+Changeable.swift"; sourceTree = ""; }; 126 | C060BA1224C793E9004C5200 /* ArrayChangingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayChangingTests.swift; sourceTree = ""; }; 127 | C060BA1724C793F5004C5200 /* SetChangingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetChangingTests.swift; sourceTree = ""; }; 128 | C060BA1C24C79404004C5200 /* DictionaryChangingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DictionaryChangingTests.swift; sourceTree = ""; }; 129 | C06DF3E924BA4EA00034B365 /* Changeable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Changeable.swift; sourceTree = ""; }; 130 | C06DF3EE24BA4F170034B365 /* ChangeableWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeableWrapper.swift; sourceTree = ""; }; 131 | C08F5BCC24C39B2700E21EC2 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; 132 | C08F5BD024C39B5500E21EC2 /* Company.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Company.swift; sourceTree = ""; }; 133 | C08F5BD424C39C2700E21EC2 /* ChangeableWrapperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeableWrapperTests.swift; sourceTree = ""; }; 134 | C08F5BD824C3B5D800E21EC2 /* ChangeableTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeableTests.swift; sourceTree = ""; }; 135 | C08F5EC224C3BD2A00E21EC2 /* AutoChangeable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutoChangeable.swift; sourceTree = ""; }; 136 | C08F5F1424C471F900E21EC2 /* Demo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Demo; sourceTree = ""; }; 137 | C08F61A024C4772400E21EC2 /* AutoChangeable.stencil */ = {isa = PBXFileReference; lastKnownFileType = text; path = AutoChangeable.stencil; sourceTree = ""; }; 138 | C08F61A124C4772400E21EC2 /* AutoChangeable */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = AutoChangeable; sourceTree = ""; }; 139 | C08F66BE24C639F400E21EC2 /* CGSize+Changeable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGSize+Changeable.swift"; sourceTree = ""; }; 140 | C08F66C324C63A5600E21EC2 /* CGPoint+Changeable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGPoint+Changeable.swift"; sourceTree = ""; }; 141 | C08F66C824C63AB200E21EC2 /* CGRect+Changeable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGRect+Changeable.swift"; sourceTree = ""; }; 142 | C08F66CD24C63B0E00E21EC2 /* UIEdgeInsets+Changeable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIEdgeInsets+Changeable.swift"; sourceTree = ""; }; 143 | C08F66D324C63D0B00E21EC2 /* CGSizeChangingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGSizeChangingTests.swift; sourceTree = ""; }; 144 | C08F66D724C640A800E21EC2 /* CGPointChangingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGPointChangingTests.swift; sourceTree = ""; }; 145 | C08F66DB24C6412100E21EC2 /* CGRectChangingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGRectChangingTests.swift; sourceTree = ""; }; 146 | C08F66DF24C6425800E21EC2 /* UIEdgeInsetsChangingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIEdgeInsetsChangingTests.swift; sourceTree = ""; }; 147 | C0A01A1423CB8FF300AC2C3A /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; }; 148 | C0A01A1523CB8FFC00AC2C3A /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; }; 149 | C0A01A1623CB900800AC2C3A /* AutoChangeable.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = AutoChangeable.podspec; sourceTree = ""; }; 150 | C0A01A1723CB900900AC2C3A /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 151 | C0A01A1823CB900900AC2C3A /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 152 | C0A01A1923CB900900AC2C3A /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 153 | C0A01A1A23CB901C00AC2C3A /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; 154 | C0A01A1B23CB901C00AC2C3A /* .codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .codecov.yml; sourceTree = ""; }; 155 | C0A01A1C23CB901C00AC2C3A /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; }; 156 | C0A01A1D23CB901C00AC2C3A /* .ruby-version */ = {isa = PBXFileReference; lastKnownFileType = text; path = ".ruby-version"; sourceTree = ""; }; 157 | C0A01A2923CB90F200AC2C3A /* AutoChangeable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AutoChangeable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 158 | C0A01A3123CB90F200AC2C3A /* AutoChangeable Tests macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AutoChangeable Tests macOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 159 | C0A01A4723CB92EB00AC2C3A /* AutoChangeable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AutoChangeable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 160 | C0A01A4F23CB92EB00AC2C3A /* AutoChangeable Tests tvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AutoChangeable Tests tvOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 161 | C0A01A6323CB9B0A00AC2C3A /* Scripts */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Scripts; sourceTree = ""; }; 162 | C0A01A6423CB9B1600AC2C3A /* Dangerfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Dangerfile; sourceTree = ""; }; 163 | C0A01A6523CB9B1600AC2C3A /* Gemfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Gemfile; sourceTree = ""; }; 164 | C0A01A6623CB9B5900AC2C3A /* Brewfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Brewfile; sourceTree = ""; }; 165 | /* End PBXFileReference section */ 166 | 167 | /* Begin PBXFrameworksBuildPhase section */ 168 | C006F19F2406B13E00C3F783 /* Frameworks */ = { 169 | isa = PBXFrameworksBuildPhase; 170 | buildActionMask = 2147483647; 171 | files = ( 172 | ); 173 | runOnlyForDeploymentPostprocessing = 0; 174 | }; 175 | C057F00B23CB8EEB00C2D895 /* Frameworks */ = { 176 | isa = PBXFrameworksBuildPhase; 177 | buildActionMask = 2147483647; 178 | files = ( 179 | ); 180 | runOnlyForDeploymentPostprocessing = 0; 181 | }; 182 | C057F01423CB8EEB00C2D895 /* Frameworks */ = { 183 | isa = PBXFrameworksBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | C057F01823CB8EEB00C2D895 /* AutoChangeable.framework in Frameworks */, 187 | ); 188 | runOnlyForDeploymentPostprocessing = 0; 189 | }; 190 | C0A01A2623CB90F200AC2C3A /* Frameworks */ = { 191 | isa = PBXFrameworksBuildPhase; 192 | buildActionMask = 2147483647; 193 | files = ( 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | }; 197 | C0A01A2E23CB90F200AC2C3A /* Frameworks */ = { 198 | isa = PBXFrameworksBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | C0A01A3223CB90F200AC2C3A /* AutoChangeable.framework in Frameworks */, 202 | ); 203 | runOnlyForDeploymentPostprocessing = 0; 204 | }; 205 | C0A01A4423CB92EB00AC2C3A /* Frameworks */ = { 206 | isa = PBXFrameworksBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | C0A01A4C23CB92EB00AC2C3A /* Frameworks */ = { 213 | isa = PBXFrameworksBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | C0A01A5023CB92EB00AC2C3A /* AutoChangeable.framework in Frameworks */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXFrameworksBuildPhase section */ 221 | 222 | /* Begin PBXGroup section */ 223 | C057F00423CB8EEB00C2D895 = { 224 | isa = PBXGroup; 225 | children = ( 226 | C057F01023CB8EEB00C2D895 /* Sources */, 227 | C08F619F24C4772400E21EC2 /* Bin */, 228 | C057F01B23CB8EEB00C2D895 /* Tests */, 229 | C057F00F23CB8EEB00C2D895 /* Products */, 230 | C08F5F1424C471F900E21EC2 /* Demo */, 231 | C0A01A6323CB9B0A00AC2C3A /* Scripts */, 232 | C0A01A1B23CB901C00AC2C3A /* .codecov.yml */, 233 | C0A01A1A23CB901C00AC2C3A /* .gitignore */, 234 | C0A01A1D23CB901C00AC2C3A /* .ruby-version */, 235 | C0007FFA23CBAAA5005F95E0 /* .swift-version */, 236 | C0A01A1C23CB901C00AC2C3A /* .swiftlint.yml */, 237 | C0A01A6623CB9B5900AC2C3A /* Brewfile */, 238 | C0A01A6423CB9B1600AC2C3A /* Dangerfile */, 239 | C0A01A6523CB9B1600AC2C3A /* Gemfile */, 240 | C0A01A1623CB900800AC2C3A /* AutoChangeable.podspec */, 241 | C0A01A1923CB900900AC2C3A /* LICENSE */, 242 | C0A01A1823CB900900AC2C3A /* Package.swift */, 243 | C0A01A1723CB900900AC2C3A /* README.md */, 244 | ); 245 | sourceTree = ""; 246 | }; 247 | C057F00F23CB8EEB00C2D895 /* Products */ = { 248 | isa = PBXGroup; 249 | children = ( 250 | C057F00E23CB8EEB00C2D895 /* AutoChangeable.framework */, 251 | C057F01723CB8EEB00C2D895 /* AutoChangeable Tests iOS.xctest */, 252 | C0A01A2923CB90F200AC2C3A /* AutoChangeable.framework */, 253 | C0A01A3123CB90F200AC2C3A /* AutoChangeable Tests macOS.xctest */, 254 | C0A01A4723CB92EB00AC2C3A /* AutoChangeable.framework */, 255 | C0A01A4F23CB92EB00AC2C3A /* AutoChangeable Tests tvOS.xctest */, 256 | C006F1A22406B13E00C3F783 /* AutoChangeable.framework */, 257 | ); 258 | name = Products; 259 | sourceTree = ""; 260 | }; 261 | C057F01023CB8EEB00C2D895 /* Sources */ = { 262 | isa = PBXGroup; 263 | children = ( 264 | C08F66BD24C639D800E21EC2 /* Extensions */, 265 | C0A01A1423CB8FF300AC2C3A /* .swiftlint.yml */, 266 | C057F01123CB8EEB00C2D895 /* AutoChangeable.h */, 267 | C08F5EC224C3BD2A00E21EC2 /* AutoChangeable.swift */, 268 | C06DF3E924BA4EA00034B365 /* Changeable.swift */, 269 | C06DF3EE24BA4F170034B365 /* ChangeableWrapper.swift */, 270 | C057F01223CB8EEB00C2D895 /* Info.plist */, 271 | ); 272 | path = Sources; 273 | sourceTree = ""; 274 | }; 275 | C057F01B23CB8EEB00C2D895 /* Tests */ = { 276 | isa = PBXGroup; 277 | children = ( 278 | C08F66D224C63C1500E21EC2 /* Extensions */, 279 | C08F5BDC24C3B5DF00E21EC2 /* Models */, 280 | C0A01A1523CB8FFC00AC2C3A /* .swiftlint.yml */, 281 | C08F5BD424C39C2700E21EC2 /* ChangeableWrapperTests.swift */, 282 | C08F5BD824C3B5D800E21EC2 /* ChangeableTests.swift */, 283 | C057F01E23CB8EEB00C2D895 /* Info.plist */, 284 | ); 285 | path = Tests; 286 | sourceTree = ""; 287 | }; 288 | C060B98324C7025C004C5200 /* CoreGraphics */ = { 289 | isa = PBXGroup; 290 | children = ( 291 | C08F66C324C63A5600E21EC2 /* CGPoint+Changeable.swift */, 292 | C08F66C824C63AB200E21EC2 /* CGRect+Changeable.swift */, 293 | C08F66BE24C639F400E21EC2 /* CGSize+Changeable.swift */, 294 | ); 295 | path = CoreGraphics; 296 | sourceTree = ""; 297 | }; 298 | C060B98424C70269004C5200 /* UIKit */ = { 299 | isa = PBXGroup; 300 | children = ( 301 | C08F66CD24C63B0E00E21EC2 /* UIEdgeInsets+Changeable.swift */, 302 | ); 303 | path = UIKit; 304 | sourceTree = ""; 305 | }; 306 | C060B98524C70274004C5200 /* Foundation */ = { 307 | isa = PBXGroup; 308 | children = ( 309 | C060B98624C702CC004C5200 /* Array+Changeable.swift */, 310 | C060B98B24C70338004C5200 /* Set+Changeable.swift */, 311 | C060B99024C70366004C5200 /* Dictionary+Changeable.swift */, 312 | ); 313 | path = Foundation; 314 | sourceTree = ""; 315 | }; 316 | C060BA0F24C793A2004C5200 /* Foundation */ = { 317 | isa = PBXGroup; 318 | children = ( 319 | C060BA1224C793E9004C5200 /* ArrayChangingTests.swift */, 320 | C060BA1724C793F5004C5200 /* SetChangingTests.swift */, 321 | C060BA1C24C79404004C5200 /* DictionaryChangingTests.swift */, 322 | ); 323 | path = Foundation; 324 | sourceTree = ""; 325 | }; 326 | C060BA1024C793AB004C5200 /* CoreGraphics */ = { 327 | isa = PBXGroup; 328 | children = ( 329 | C08F66D724C640A800E21EC2 /* CGPointChangingTests.swift */, 330 | C08F66DB24C6412100E21EC2 /* CGRectChangingTests.swift */, 331 | C08F66D324C63D0B00E21EC2 /* CGSizeChangingTests.swift */, 332 | ); 333 | path = CoreGraphics; 334 | sourceTree = ""; 335 | }; 336 | C060BA1124C793B9004C5200 /* UIKit */ = { 337 | isa = PBXGroup; 338 | children = ( 339 | C08F66DF24C6425800E21EC2 /* UIEdgeInsetsChangingTests.swift */, 340 | ); 341 | path = UIKit; 342 | sourceTree = ""; 343 | }; 344 | C08F5BDC24C3B5DF00E21EC2 /* Models */ = { 345 | isa = PBXGroup; 346 | children = ( 347 | C08F5BCC24C39B2700E21EC2 /* User.swift */, 348 | C08F5BD024C39B5500E21EC2 /* Company.swift */, 349 | ); 350 | path = Models; 351 | sourceTree = ""; 352 | }; 353 | C08F619F24C4772400E21EC2 /* Bin */ = { 354 | isa = PBXGroup; 355 | children = ( 356 | C08F61A024C4772400E21EC2 /* AutoChangeable.stencil */, 357 | C08F61A124C4772400E21EC2 /* AutoChangeable */, 358 | ); 359 | path = Bin; 360 | sourceTree = ""; 361 | }; 362 | C08F66BD24C639D800E21EC2 /* Extensions */ = { 363 | isa = PBXGroup; 364 | children = ( 365 | C060B98524C70274004C5200 /* Foundation */, 366 | C060B98324C7025C004C5200 /* CoreGraphics */, 367 | C060B98424C70269004C5200 /* UIKit */, 368 | ); 369 | path = Extensions; 370 | sourceTree = ""; 371 | }; 372 | C08F66D224C63C1500E21EC2 /* Extensions */ = { 373 | isa = PBXGroup; 374 | children = ( 375 | C060BA0F24C793A2004C5200 /* Foundation */, 376 | C060BA1024C793AB004C5200 /* CoreGraphics */, 377 | C060BA1124C793B9004C5200 /* UIKit */, 378 | ); 379 | path = Extensions; 380 | sourceTree = ""; 381 | }; 382 | /* End PBXGroup section */ 383 | 384 | /* Begin PBXHeadersBuildPhase section */ 385 | C006F19D2406B13E00C3F783 /* Headers */ = { 386 | isa = PBXHeadersBuildPhase; 387 | buildActionMask = 2147483647; 388 | files = ( 389 | ); 390 | runOnlyForDeploymentPostprocessing = 0; 391 | }; 392 | C057F00923CB8EEB00C2D895 /* Headers */ = { 393 | isa = PBXHeadersBuildPhase; 394 | buildActionMask = 2147483647; 395 | files = ( 396 | C057F01F23CB8EEB00C2D895 /* AutoChangeable.h in Headers */, 397 | ); 398 | runOnlyForDeploymentPostprocessing = 0; 399 | }; 400 | C0A01A2423CB90F200AC2C3A /* Headers */ = { 401 | isa = PBXHeadersBuildPhase; 402 | buildActionMask = 2147483647; 403 | files = ( 404 | C0A01A4123CB912C00AC2C3A /* AutoChangeable.h in Headers */, 405 | ); 406 | runOnlyForDeploymentPostprocessing = 0; 407 | }; 408 | C0A01A4223CB92EB00AC2C3A /* Headers */ = { 409 | isa = PBXHeadersBuildPhase; 410 | buildActionMask = 2147483647; 411 | files = ( 412 | C0A01A5E23CB92F200AC2C3A /* AutoChangeable.h in Headers */, 413 | ); 414 | runOnlyForDeploymentPostprocessing = 0; 415 | }; 416 | /* End PBXHeadersBuildPhase section */ 417 | 418 | /* Begin PBXNativeTarget section */ 419 | C006F1A12406B13E00C3F783 /* AutoChangeable watchOS */ = { 420 | isa = PBXNativeTarget; 421 | buildConfigurationList = C006F1A92406B13E00C3F783 /* Build configuration list for PBXNativeTarget "AutoChangeable watchOS" */; 422 | buildPhases = ( 423 | C006F1C42406B21000C3F783 /* SwiftLint */, 424 | C006F19D2406B13E00C3F783 /* Headers */, 425 | C006F19E2406B13E00C3F783 /* Sources */, 426 | C006F19F2406B13E00C3F783 /* Frameworks */, 427 | C006F1A02406B13E00C3F783 /* Resources */, 428 | ); 429 | buildRules = ( 430 | ); 431 | dependencies = ( 432 | ); 433 | name = "AutoChangeable watchOS"; 434 | productName = "AutoChangeable watchOS"; 435 | productReference = C006F1A22406B13E00C3F783 /* AutoChangeable.framework */; 436 | productType = "com.apple.product-type.framework"; 437 | }; 438 | C057F00D23CB8EEB00C2D895 /* AutoChangeable iOS */ = { 439 | isa = PBXNativeTarget; 440 | buildConfigurationList = C057F02223CB8EEB00C2D895 /* Build configuration list for PBXNativeTarget "AutoChangeable iOS" */; 441 | buildPhases = ( 442 | C0A01A2323CB907300AC2C3A /* SwiftLint */, 443 | C057F00923CB8EEB00C2D895 /* Headers */, 444 | C057F00A23CB8EEB00C2D895 /* Sources */, 445 | C057F00B23CB8EEB00C2D895 /* Frameworks */, 446 | C057F00C23CB8EEB00C2D895 /* Resources */, 447 | ); 448 | buildRules = ( 449 | ); 450 | dependencies = ( 451 | ); 452 | name = "AutoChangeable iOS"; 453 | productName = AutoChangeable; 454 | productReference = C057F00E23CB8EEB00C2D895 /* AutoChangeable.framework */; 455 | productType = "com.apple.product-type.framework"; 456 | }; 457 | C057F01623CB8EEB00C2D895 /* AutoChangeable Tests iOS */ = { 458 | isa = PBXNativeTarget; 459 | buildConfigurationList = C057F02523CB8EEB00C2D895 /* Build configuration list for PBXNativeTarget "AutoChangeable Tests iOS" */; 460 | buildPhases = ( 461 | C057F01323CB8EEB00C2D895 /* Sources */, 462 | C057F01423CB8EEB00C2D895 /* Frameworks */, 463 | C057F01523CB8EEB00C2D895 /* Resources */, 464 | ); 465 | buildRules = ( 466 | ); 467 | dependencies = ( 468 | C057F01A23CB8EEB00C2D895 /* PBXTargetDependency */, 469 | ); 470 | name = "AutoChangeable Tests iOS"; 471 | productName = AutoChangeableTests; 472 | productReference = C057F01723CB8EEB00C2D895 /* AutoChangeable Tests iOS.xctest */; 473 | productType = "com.apple.product-type.bundle.unit-test"; 474 | }; 475 | C0A01A2823CB90F200AC2C3A /* AutoChangeable macOS */ = { 476 | isa = PBXNativeTarget; 477 | buildConfigurationList = C0A01A3A23CB90F200AC2C3A /* Build configuration list for PBXNativeTarget "AutoChangeable macOS" */; 478 | buildPhases = ( 479 | C0A01A6123CB931500AC2C3A /* SwiftLint */, 480 | C0A01A2423CB90F200AC2C3A /* Headers */, 481 | C0A01A2523CB90F200AC2C3A /* Sources */, 482 | C0A01A2623CB90F200AC2C3A /* Frameworks */, 483 | C0A01A2723CB90F200AC2C3A /* Resources */, 484 | ); 485 | buildRules = ( 486 | ); 487 | dependencies = ( 488 | ); 489 | name = "AutoChangeable macOS"; 490 | productName = "AutoChangeable macOS"; 491 | productReference = C0A01A2923CB90F200AC2C3A /* AutoChangeable.framework */; 492 | productType = "com.apple.product-type.framework"; 493 | }; 494 | C0A01A3023CB90F200AC2C3A /* AutoChangeable Tests macOS */ = { 495 | isa = PBXNativeTarget; 496 | buildConfigurationList = C0A01A3D23CB90F200AC2C3A /* Build configuration list for PBXNativeTarget "AutoChangeable Tests macOS" */; 497 | buildPhases = ( 498 | C0A01A2D23CB90F200AC2C3A /* Sources */, 499 | C0A01A2E23CB90F200AC2C3A /* Frameworks */, 500 | C0A01A2F23CB90F200AC2C3A /* Resources */, 501 | ); 502 | buildRules = ( 503 | ); 504 | dependencies = ( 505 | C0A01A3423CB90F200AC2C3A /* PBXTargetDependency */, 506 | ); 507 | name = "AutoChangeable Tests macOS"; 508 | productName = "AutoChangeable macOSTests"; 509 | productReference = C0A01A3123CB90F200AC2C3A /* AutoChangeable Tests macOS.xctest */; 510 | productType = "com.apple.product-type.bundle.unit-test"; 511 | }; 512 | C0A01A4623CB92EB00AC2C3A /* AutoChangeable tvOS */ = { 513 | isa = PBXNativeTarget; 514 | buildConfigurationList = C0A01A5823CB92EB00AC2C3A /* Build configuration list for PBXNativeTarget "AutoChangeable tvOS" */; 515 | buildPhases = ( 516 | C0A01A6223CB932700AC2C3A /* SwiftLint */, 517 | C0A01A4223CB92EB00AC2C3A /* Headers */, 518 | C0A01A4323CB92EB00AC2C3A /* Sources */, 519 | C0A01A4423CB92EB00AC2C3A /* Frameworks */, 520 | C0A01A4523CB92EB00AC2C3A /* Resources */, 521 | ); 522 | buildRules = ( 523 | ); 524 | dependencies = ( 525 | ); 526 | name = "AutoChangeable tvOS"; 527 | productName = "AutoChangeable tvOS"; 528 | productReference = C0A01A4723CB92EB00AC2C3A /* AutoChangeable.framework */; 529 | productType = "com.apple.product-type.framework"; 530 | }; 531 | C0A01A4E23CB92EB00AC2C3A /* AutoChangeable Tests tvOS */ = { 532 | isa = PBXNativeTarget; 533 | buildConfigurationList = C0A01A5B23CB92EB00AC2C3A /* Build configuration list for PBXNativeTarget "AutoChangeable Tests tvOS" */; 534 | buildPhases = ( 535 | C0A01A4B23CB92EB00AC2C3A /* Sources */, 536 | C0A01A4C23CB92EB00AC2C3A /* Frameworks */, 537 | C0A01A4D23CB92EB00AC2C3A /* Resources */, 538 | ); 539 | buildRules = ( 540 | ); 541 | dependencies = ( 542 | C0A01A5223CB92EB00AC2C3A /* PBXTargetDependency */, 543 | ); 544 | name = "AutoChangeable Tests tvOS"; 545 | productName = "AutoChangeable tvOSTests"; 546 | productReference = C0A01A4F23CB92EB00AC2C3A /* AutoChangeable Tests tvOS.xctest */; 547 | productType = "com.apple.product-type.bundle.unit-test"; 548 | }; 549 | /* End PBXNativeTarget section */ 550 | 551 | /* Begin PBXProject section */ 552 | C057F00523CB8EEB00C2D895 /* Project object */ = { 553 | isa = PBXProject; 554 | attributes = { 555 | LastSwiftUpdateCheck = 1130; 556 | LastUpgradeCheck = 1130; 557 | ORGANIZATIONNAME = "Almaz Ibragimov"; 558 | TargetAttributes = { 559 | C006F1A12406B13E00C3F783 = { 560 | CreatedOnToolsVersion = 11.3.1; 561 | LastSwiftMigration = 1150; 562 | }; 563 | C057F00D23CB8EEB00C2D895 = { 564 | CreatedOnToolsVersion = 11.3; 565 | LastSwiftMigration = 1150; 566 | }; 567 | C057F01623CB8EEB00C2D895 = { 568 | CreatedOnToolsVersion = 11.3; 569 | LastSwiftMigration = 1150; 570 | }; 571 | C0A01A2823CB90F200AC2C3A = { 572 | CreatedOnToolsVersion = 11.3; 573 | LastSwiftMigration = 1150; 574 | }; 575 | C0A01A3023CB90F200AC2C3A = { 576 | CreatedOnToolsVersion = 11.3; 577 | LastSwiftMigration = 1150; 578 | }; 579 | C0A01A4623CB92EB00AC2C3A = { 580 | CreatedOnToolsVersion = 11.3; 581 | LastSwiftMigration = 1150; 582 | }; 583 | C0A01A4E23CB92EB00AC2C3A = { 584 | CreatedOnToolsVersion = 11.3; 585 | LastSwiftMigration = 1150; 586 | }; 587 | }; 588 | }; 589 | buildConfigurationList = C057F00823CB8EEB00C2D895 /* Build configuration list for PBXProject "AutoChangeable" */; 590 | compatibilityVersion = "Xcode 11.0"; 591 | developmentRegion = en; 592 | hasScannedForEncodings = 0; 593 | knownRegions = ( 594 | en, 595 | Base, 596 | ); 597 | mainGroup = C057F00423CB8EEB00C2D895; 598 | productRefGroup = C057F00F23CB8EEB00C2D895 /* Products */; 599 | projectDirPath = ""; 600 | projectRoot = ""; 601 | targets = ( 602 | C057F00D23CB8EEB00C2D895 /* AutoChangeable iOS */, 603 | C0A01A2823CB90F200AC2C3A /* AutoChangeable macOS */, 604 | C0A01A4623CB92EB00AC2C3A /* AutoChangeable tvOS */, 605 | C006F1A12406B13E00C3F783 /* AutoChangeable watchOS */, 606 | C057F01623CB8EEB00C2D895 /* AutoChangeable Tests iOS */, 607 | C0A01A3023CB90F200AC2C3A /* AutoChangeable Tests macOS */, 608 | C0A01A4E23CB92EB00AC2C3A /* AutoChangeable Tests tvOS */, 609 | ); 610 | }; 611 | /* End PBXProject section */ 612 | 613 | /* Begin PBXResourcesBuildPhase section */ 614 | C006F1A02406B13E00C3F783 /* Resources */ = { 615 | isa = PBXResourcesBuildPhase; 616 | buildActionMask = 2147483647; 617 | files = ( 618 | ); 619 | runOnlyForDeploymentPostprocessing = 0; 620 | }; 621 | C057F00C23CB8EEB00C2D895 /* Resources */ = { 622 | isa = PBXResourcesBuildPhase; 623 | buildActionMask = 2147483647; 624 | files = ( 625 | ); 626 | runOnlyForDeploymentPostprocessing = 0; 627 | }; 628 | C057F01523CB8EEB00C2D895 /* Resources */ = { 629 | isa = PBXResourcesBuildPhase; 630 | buildActionMask = 2147483647; 631 | files = ( 632 | ); 633 | runOnlyForDeploymentPostprocessing = 0; 634 | }; 635 | C0A01A2723CB90F200AC2C3A /* Resources */ = { 636 | isa = PBXResourcesBuildPhase; 637 | buildActionMask = 2147483647; 638 | files = ( 639 | ); 640 | runOnlyForDeploymentPostprocessing = 0; 641 | }; 642 | C0A01A2F23CB90F200AC2C3A /* Resources */ = { 643 | isa = PBXResourcesBuildPhase; 644 | buildActionMask = 2147483647; 645 | files = ( 646 | ); 647 | runOnlyForDeploymentPostprocessing = 0; 648 | }; 649 | C0A01A4523CB92EB00AC2C3A /* Resources */ = { 650 | isa = PBXResourcesBuildPhase; 651 | buildActionMask = 2147483647; 652 | files = ( 653 | ); 654 | runOnlyForDeploymentPostprocessing = 0; 655 | }; 656 | C0A01A4D23CB92EB00AC2C3A /* Resources */ = { 657 | isa = PBXResourcesBuildPhase; 658 | buildActionMask = 2147483647; 659 | files = ( 660 | ); 661 | runOnlyForDeploymentPostprocessing = 0; 662 | }; 663 | /* End PBXResourcesBuildPhase section */ 664 | 665 | /* Begin PBXShellScriptBuildPhase section */ 666 | C006F1C42406B21000C3F783 /* SwiftLint */ = { 667 | isa = PBXShellScriptBuildPhase; 668 | buildActionMask = 2147483647; 669 | files = ( 670 | ); 671 | inputFileListPaths = ( 672 | ); 673 | inputPaths = ( 674 | ); 675 | name = SwiftLint; 676 | outputFileListPaths = ( 677 | ); 678 | outputPaths = ( 679 | ); 680 | runOnlyForDeploymentPostprocessing = 0; 681 | shellPath = /bin/sh; 682 | shellScript = "sh Scripts/swiftlint.sh\n"; 683 | }; 684 | C0A01A2323CB907300AC2C3A /* SwiftLint */ = { 685 | isa = PBXShellScriptBuildPhase; 686 | buildActionMask = 2147483647; 687 | files = ( 688 | ); 689 | inputFileListPaths = ( 690 | ); 691 | inputPaths = ( 692 | ); 693 | name = SwiftLint; 694 | outputFileListPaths = ( 695 | ); 696 | outputPaths = ( 697 | ); 698 | runOnlyForDeploymentPostprocessing = 0; 699 | shellPath = /bin/sh; 700 | shellScript = "sh Scripts/swiftlint.sh\n"; 701 | }; 702 | C0A01A6123CB931500AC2C3A /* SwiftLint */ = { 703 | isa = PBXShellScriptBuildPhase; 704 | buildActionMask = 2147483647; 705 | files = ( 706 | ); 707 | inputFileListPaths = ( 708 | ); 709 | inputPaths = ( 710 | ); 711 | name = SwiftLint; 712 | outputFileListPaths = ( 713 | ); 714 | outputPaths = ( 715 | ); 716 | runOnlyForDeploymentPostprocessing = 0; 717 | shellPath = /bin/sh; 718 | shellScript = "sh Scripts/swiftlint.sh\n"; 719 | }; 720 | C0A01A6223CB932700AC2C3A /* SwiftLint */ = { 721 | isa = PBXShellScriptBuildPhase; 722 | buildActionMask = 2147483647; 723 | files = ( 724 | ); 725 | inputFileListPaths = ( 726 | ); 727 | inputPaths = ( 728 | ); 729 | name = SwiftLint; 730 | outputFileListPaths = ( 731 | ); 732 | outputPaths = ( 733 | ); 734 | runOnlyForDeploymentPostprocessing = 0; 735 | shellPath = /bin/sh; 736 | shellScript = "sh Scripts/swiftlint.sh\n"; 737 | }; 738 | /* End PBXShellScriptBuildPhase section */ 739 | 740 | /* Begin PBXSourcesBuildPhase section */ 741 | C006F19E2406B13E00C3F783 /* Sources */ = { 742 | isa = PBXSourcesBuildPhase; 743 | buildActionMask = 2147483647; 744 | files = ( 745 | C060B9D624C78551004C5200 /* ChangeableWrapper.swift in Sources */, 746 | C060B9FD24C78BE0004C5200 /* Set+Changeable.swift in Sources */, 747 | C060B9FC24C78BE0004C5200 /* Array+Changeable.swift in Sources */, 748 | C08F5EC624C3BD2A00E21EC2 /* AutoChangeable.swift in Sources */, 749 | C060BA0C24C78C45004C5200 /* CGPoint+Changeable.swift in Sources */, 750 | C06DF3ED24BA4EA00034B365 /* Changeable.swift in Sources */, 751 | C060B9FE24C78BE0004C5200 /* Dictionary+Changeable.swift in Sources */, 752 | C060BA0D24C78C45004C5200 /* CGRect+Changeable.swift in Sources */, 753 | C060BA0E24C78C45004C5200 /* CGSize+Changeable.swift in Sources */, 754 | C060BA0224C78C21004C5200 /* UIEdgeInsets+Changeable.swift in Sources */, 755 | ); 756 | runOnlyForDeploymentPostprocessing = 0; 757 | }; 758 | C057F00A23CB8EEB00C2D895 /* Sources */ = { 759 | isa = PBXSourcesBuildPhase; 760 | buildActionMask = 2147483647; 761 | files = ( 762 | C060B9D324C7854F004C5200 /* ChangeableWrapper.swift in Sources */, 763 | C060B9F424C78BDE004C5200 /* Set+Changeable.swift in Sources */, 764 | C060B9F324C78BDE004C5200 /* Array+Changeable.swift in Sources */, 765 | C08F5EC324C3BD2A00E21EC2 /* AutoChangeable.swift in Sources */, 766 | C060BA0324C78C44004C5200 /* CGPoint+Changeable.swift in Sources */, 767 | C06DF3EA24BA4EA00034B365 /* Changeable.swift in Sources */, 768 | C060B9F524C78BDE004C5200 /* Dictionary+Changeable.swift in Sources */, 769 | C060BA0424C78C44004C5200 /* CGRect+Changeable.swift in Sources */, 770 | C060BA0524C78C44004C5200 /* CGSize+Changeable.swift in Sources */, 771 | C060B9FF24C78C20004C5200 /* UIEdgeInsets+Changeable.swift in Sources */, 772 | ); 773 | runOnlyForDeploymentPostprocessing = 0; 774 | }; 775 | C057F01323CB8EEB00C2D895 /* Sources */ = { 776 | isa = PBXSourcesBuildPhase; 777 | buildActionMask = 2147483647; 778 | files = ( 779 | C08F66D424C63D0B00E21EC2 /* CGSizeChangingTests.swift in Sources */, 780 | C060BA2724C7944F004C5200 /* DictionaryChangingTests.swift in Sources */, 781 | C08F5BD524C39C2700E21EC2 /* ChangeableWrapperTests.swift in Sources */, 782 | C060BA2124C79433004C5200 /* ArrayChangingTests.swift in Sources */, 783 | C060BA2424C7943C004C5200 /* SetChangingTests.swift in Sources */, 784 | C08F5BD924C3B5D800E21EC2 /* ChangeableTests.swift in Sources */, 785 | C08F66DC24C6412100E21EC2 /* CGRectChangingTests.swift in Sources */, 786 | C08F66D824C640A800E21EC2 /* CGPointChangingTests.swift in Sources */, 787 | C08F66E024C6425800E21EC2 /* UIEdgeInsetsChangingTests.swift in Sources */, 788 | C08F5BCD24C39B2700E21EC2 /* User.swift in Sources */, 789 | C08F5BD124C39B5500E21EC2 /* Company.swift in Sources */, 790 | ); 791 | runOnlyForDeploymentPostprocessing = 0; 792 | }; 793 | C0A01A2523CB90F200AC2C3A /* Sources */ = { 794 | isa = PBXSourcesBuildPhase; 795 | buildActionMask = 2147483647; 796 | files = ( 797 | C060B9D424C78550004C5200 /* ChangeableWrapper.swift in Sources */, 798 | C060B9F724C78BDF004C5200 /* Set+Changeable.swift in Sources */, 799 | C060B9F624C78BDF004C5200 /* Array+Changeable.swift in Sources */, 800 | C08F5EC424C3BD2A00E21EC2 /* AutoChangeable.swift in Sources */, 801 | C060BA0624C78C44004C5200 /* CGPoint+Changeable.swift in Sources */, 802 | C06DF3EB24BA4EA00034B365 /* Changeable.swift in Sources */, 803 | C060B9F824C78BDF004C5200 /* Dictionary+Changeable.swift in Sources */, 804 | C060BA0724C78C44004C5200 /* CGRect+Changeable.swift in Sources */, 805 | C060BA0824C78C44004C5200 /* CGSize+Changeable.swift in Sources */, 806 | C060BA0024C78C21004C5200 /* UIEdgeInsets+Changeable.swift in Sources */, 807 | ); 808 | runOnlyForDeploymentPostprocessing = 0; 809 | }; 810 | C0A01A2D23CB90F200AC2C3A /* Sources */ = { 811 | isa = PBXSourcesBuildPhase; 812 | buildActionMask = 2147483647; 813 | files = ( 814 | C08F66D524C63D0B00E21EC2 /* CGSizeChangingTests.swift in Sources */, 815 | C060BA2824C7944F004C5200 /* DictionaryChangingTests.swift in Sources */, 816 | C08F5BD624C39C2700E21EC2 /* ChangeableWrapperTests.swift in Sources */, 817 | C060BA2224C79434004C5200 /* ArrayChangingTests.swift in Sources */, 818 | C060BA2524C7943C004C5200 /* SetChangingTests.swift in Sources */, 819 | C08F5BDA24C3B5D800E21EC2 /* ChangeableTests.swift in Sources */, 820 | C08F66DD24C6412100E21EC2 /* CGRectChangingTests.swift in Sources */, 821 | C08F66D924C640A800E21EC2 /* CGPointChangingTests.swift in Sources */, 822 | C08F66E124C6425800E21EC2 /* UIEdgeInsetsChangingTests.swift in Sources */, 823 | C08F5BCE24C39B2700E21EC2 /* User.swift in Sources */, 824 | C08F5BD224C39B5500E21EC2 /* Company.swift in Sources */, 825 | ); 826 | runOnlyForDeploymentPostprocessing = 0; 827 | }; 828 | C0A01A4323CB92EB00AC2C3A /* Sources */ = { 829 | isa = PBXSourcesBuildPhase; 830 | buildActionMask = 2147483647; 831 | files = ( 832 | C060B9D524C78550004C5200 /* ChangeableWrapper.swift in Sources */, 833 | C060B9FA24C78BE0004C5200 /* Set+Changeable.swift in Sources */, 834 | C060B9F924C78BE0004C5200 /* Array+Changeable.swift in Sources */, 835 | C08F5EC524C3BD2A00E21EC2 /* AutoChangeable.swift in Sources */, 836 | C060BA0924C78C44004C5200 /* CGPoint+Changeable.swift in Sources */, 837 | C06DF3EC24BA4EA00034B365 /* Changeable.swift in Sources */, 838 | C060B9FB24C78BE0004C5200 /* Dictionary+Changeable.swift in Sources */, 839 | C060BA0A24C78C44004C5200 /* CGRect+Changeable.swift in Sources */, 840 | C060BA0B24C78C44004C5200 /* CGSize+Changeable.swift in Sources */, 841 | C060BA0124C78C21004C5200 /* UIEdgeInsets+Changeable.swift in Sources */, 842 | ); 843 | runOnlyForDeploymentPostprocessing = 0; 844 | }; 845 | C0A01A4B23CB92EB00AC2C3A /* Sources */ = { 846 | isa = PBXSourcesBuildPhase; 847 | buildActionMask = 2147483647; 848 | files = ( 849 | C08F66D624C63D0B00E21EC2 /* CGSizeChangingTests.swift in Sources */, 850 | C060BA2924C79450004C5200 /* DictionaryChangingTests.swift in Sources */, 851 | C08F5BD724C39C2700E21EC2 /* ChangeableWrapperTests.swift in Sources */, 852 | C060BA2324C79434004C5200 /* ArrayChangingTests.swift in Sources */, 853 | C060BA2624C7943D004C5200 /* SetChangingTests.swift in Sources */, 854 | C08F5BDB24C3B5D800E21EC2 /* ChangeableTests.swift in Sources */, 855 | C08F66DE24C6412100E21EC2 /* CGRectChangingTests.swift in Sources */, 856 | C08F66DA24C640A800E21EC2 /* CGPointChangingTests.swift in Sources */, 857 | C08F66E224C6425800E21EC2 /* UIEdgeInsetsChangingTests.swift in Sources */, 858 | C08F5BCF24C39B2700E21EC2 /* User.swift in Sources */, 859 | C08F5BD324C39B5500E21EC2 /* Company.swift in Sources */, 860 | ); 861 | runOnlyForDeploymentPostprocessing = 0; 862 | }; 863 | /* End PBXSourcesBuildPhase section */ 864 | 865 | /* Begin PBXTargetDependency section */ 866 | C057F01A23CB8EEB00C2D895 /* PBXTargetDependency */ = { 867 | isa = PBXTargetDependency; 868 | target = C057F00D23CB8EEB00C2D895 /* AutoChangeable iOS */; 869 | targetProxy = C057F01923CB8EEB00C2D895 /* PBXContainerItemProxy */; 870 | }; 871 | C0A01A3423CB90F200AC2C3A /* PBXTargetDependency */ = { 872 | isa = PBXTargetDependency; 873 | target = C0A01A2823CB90F200AC2C3A /* AutoChangeable macOS */; 874 | targetProxy = C0A01A3323CB90F200AC2C3A /* PBXContainerItemProxy */; 875 | }; 876 | C0A01A5223CB92EB00AC2C3A /* PBXTargetDependency */ = { 877 | isa = PBXTargetDependency; 878 | target = C0A01A4623CB92EB00AC2C3A /* AutoChangeable tvOS */; 879 | targetProxy = C0A01A5123CB92EB00AC2C3A /* PBXContainerItemProxy */; 880 | }; 881 | /* End PBXTargetDependency section */ 882 | 883 | /* Begin XCBuildConfiguration section */ 884 | C006F1A72406B13E00C3F783 /* Debug */ = { 885 | isa = XCBuildConfiguration; 886 | buildSettings = { 887 | APPLICATION_EXTENSION_API_ONLY = YES; 888 | CLANG_ENABLE_MODULES = YES; 889 | CODE_SIGN_IDENTITY = ""; 890 | CODE_SIGN_STYLE = Automatic; 891 | DEFINES_MODULE = YES; 892 | DYLIB_COMPATIBILITY_VERSION = 1; 893 | DYLIB_CURRENT_VERSION = 1; 894 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 895 | INFOPLIST_FILE = Sources/Info.plist; 896 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 897 | LD_RUNPATH_SEARCH_PATHS = ( 898 | "$(inherited)", 899 | "@executable_path/Frameworks", 900 | "@loader_path/Frameworks", 901 | ); 902 | MARKETING_VERSION = 1.0.1; 903 | PRODUCT_BUNDLE_IDENTIFIER = com.almazrafi.AutoChangeable; 904 | PRODUCT_NAME = AutoChangeable; 905 | SDKROOT = watchos; 906 | SKIP_INSTALL = YES; 907 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 908 | SWIFT_VERSION = 5.0; 909 | TARGETED_DEVICE_FAMILY = 4; 910 | TVOS_DEPLOYMENT_TARGET = 10.0; 911 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 912 | }; 913 | name = Debug; 914 | }; 915 | C006F1A82406B13E00C3F783 /* Release */ = { 916 | isa = XCBuildConfiguration; 917 | buildSettings = { 918 | APPLICATION_EXTENSION_API_ONLY = YES; 919 | CLANG_ENABLE_MODULES = YES; 920 | CODE_SIGN_IDENTITY = ""; 921 | CODE_SIGN_STYLE = Automatic; 922 | DEFINES_MODULE = YES; 923 | DYLIB_COMPATIBILITY_VERSION = 1; 924 | DYLIB_CURRENT_VERSION = 1; 925 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 926 | INFOPLIST_FILE = Sources/Info.plist; 927 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 928 | LD_RUNPATH_SEARCH_PATHS = ( 929 | "$(inherited)", 930 | "@executable_path/Frameworks", 931 | "@loader_path/Frameworks", 932 | ); 933 | MARKETING_VERSION = 1.0.1; 934 | PRODUCT_BUNDLE_IDENTIFIER = com.almazrafi.AutoChangeable; 935 | PRODUCT_NAME = AutoChangeable; 936 | SDKROOT = watchos; 937 | SKIP_INSTALL = YES; 938 | SWIFT_VERSION = 5.0; 939 | TARGETED_DEVICE_FAMILY = 4; 940 | TVOS_DEPLOYMENT_TARGET = 10.0; 941 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 942 | }; 943 | name = Release; 944 | }; 945 | C057F02023CB8EEB00C2D895 /* Debug */ = { 946 | isa = XCBuildConfiguration; 947 | buildSettings = { 948 | ALWAYS_SEARCH_USER_PATHS = NO; 949 | CLANG_ANALYZER_NONNULL = YES; 950 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 951 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 952 | CLANG_CXX_LIBRARY = "libc++"; 953 | CLANG_ENABLE_MODULES = YES; 954 | CLANG_ENABLE_OBJC_ARC = YES; 955 | CLANG_ENABLE_OBJC_WEAK = YES; 956 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 957 | CLANG_WARN_BOOL_CONVERSION = YES; 958 | CLANG_WARN_COMMA = YES; 959 | CLANG_WARN_CONSTANT_CONVERSION = YES; 960 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 961 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 962 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 963 | CLANG_WARN_EMPTY_BODY = YES; 964 | CLANG_WARN_ENUM_CONVERSION = YES; 965 | CLANG_WARN_INFINITE_RECURSION = YES; 966 | CLANG_WARN_INT_CONVERSION = YES; 967 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 968 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 969 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 970 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 971 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 972 | CLANG_WARN_STRICT_PROTOTYPES = YES; 973 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 974 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 975 | CLANG_WARN_UNREACHABLE_CODE = YES; 976 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 977 | COPY_PHASE_STRIP = NO; 978 | CURRENT_PROJECT_VERSION = 1; 979 | DEBUG_INFORMATION_FORMAT = dwarf; 980 | ENABLE_STRICT_OBJC_MSGSEND = YES; 981 | ENABLE_TESTABILITY = YES; 982 | GCC_C_LANGUAGE_STANDARD = gnu11; 983 | GCC_DYNAMIC_NO_PIC = NO; 984 | GCC_NO_COMMON_BLOCKS = YES; 985 | GCC_OPTIMIZATION_LEVEL = 0; 986 | GCC_PREPROCESSOR_DEFINITIONS = ( 987 | "DEBUG=1", 988 | "$(inherited)", 989 | ); 990 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 991 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 992 | GCC_WARN_UNDECLARED_SELECTOR = YES; 993 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 994 | GCC_WARN_UNUSED_FUNCTION = YES; 995 | GCC_WARN_UNUSED_VARIABLE = YES; 996 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 997 | MACOSX_DEPLOYMENT_TARGET = 10.12; 998 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 999 | MTL_FAST_MATH = YES; 1000 | ONLY_ACTIVE_ARCH = YES; 1001 | SDKROOT = iphoneos; 1002 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 1003 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 1004 | VERSIONING_SYSTEM = "apple-generic"; 1005 | VERSION_INFO_PREFIX = ""; 1006 | }; 1007 | name = Debug; 1008 | }; 1009 | C057F02123CB8EEB00C2D895 /* Release */ = { 1010 | isa = XCBuildConfiguration; 1011 | buildSettings = { 1012 | ALWAYS_SEARCH_USER_PATHS = NO; 1013 | CLANG_ANALYZER_NONNULL = YES; 1014 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 1015 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 1016 | CLANG_CXX_LIBRARY = "libc++"; 1017 | CLANG_ENABLE_MODULES = YES; 1018 | CLANG_ENABLE_OBJC_ARC = YES; 1019 | CLANG_ENABLE_OBJC_WEAK = YES; 1020 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 1021 | CLANG_WARN_BOOL_CONVERSION = YES; 1022 | CLANG_WARN_COMMA = YES; 1023 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1024 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 1025 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1026 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1027 | CLANG_WARN_EMPTY_BODY = YES; 1028 | CLANG_WARN_ENUM_CONVERSION = YES; 1029 | CLANG_WARN_INFINITE_RECURSION = YES; 1030 | CLANG_WARN_INT_CONVERSION = YES; 1031 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 1032 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 1033 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 1034 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1035 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 1036 | CLANG_WARN_STRICT_PROTOTYPES = YES; 1037 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1038 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 1039 | CLANG_WARN_UNREACHABLE_CODE = YES; 1040 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1041 | COPY_PHASE_STRIP = NO; 1042 | CURRENT_PROJECT_VERSION = 1; 1043 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1044 | ENABLE_NS_ASSERTIONS = NO; 1045 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1046 | GCC_C_LANGUAGE_STANDARD = gnu11; 1047 | GCC_NO_COMMON_BLOCKS = YES; 1048 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1049 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1050 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1051 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1052 | GCC_WARN_UNUSED_FUNCTION = YES; 1053 | GCC_WARN_UNUSED_VARIABLE = YES; 1054 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 1055 | MACOSX_DEPLOYMENT_TARGET = 10.12; 1056 | MTL_ENABLE_DEBUG_INFO = NO; 1057 | MTL_FAST_MATH = YES; 1058 | SDKROOT = iphoneos; 1059 | SWIFT_COMPILATION_MODE = wholemodule; 1060 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 1061 | VALIDATE_PRODUCT = YES; 1062 | VERSIONING_SYSTEM = "apple-generic"; 1063 | VERSION_INFO_PREFIX = ""; 1064 | }; 1065 | name = Release; 1066 | }; 1067 | C057F02323CB8EEB00C2D895 /* Debug */ = { 1068 | isa = XCBuildConfiguration; 1069 | buildSettings = { 1070 | CLANG_ENABLE_MODULES = YES; 1071 | CODE_SIGN_IDENTITY = ""; 1072 | CODE_SIGN_STYLE = Automatic; 1073 | DEFINES_MODULE = YES; 1074 | DYLIB_COMPATIBILITY_VERSION = 1; 1075 | DYLIB_CURRENT_VERSION = 1; 1076 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1077 | INFOPLIST_FILE = Sources/Info.plist; 1078 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1079 | LD_RUNPATH_SEARCH_PATHS = ( 1080 | "$(inherited)", 1081 | "@executable_path/Frameworks", 1082 | "@loader_path/Frameworks", 1083 | ); 1084 | MARKETING_VERSION = 1.0.1; 1085 | PRODUCT_BUNDLE_IDENTIFIER = com.almazrafi.AutoChangeable; 1086 | PRODUCT_NAME = AutoChangeable; 1087 | SKIP_INSTALL = YES; 1088 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 1089 | SWIFT_VERSION = 5.0; 1090 | TARGETED_DEVICE_FAMILY = "1,2"; 1091 | TVOS_DEPLOYMENT_TARGET = 10.0; 1092 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1093 | }; 1094 | name = Debug; 1095 | }; 1096 | C057F02423CB8EEB00C2D895 /* Release */ = { 1097 | isa = XCBuildConfiguration; 1098 | buildSettings = { 1099 | CLANG_ENABLE_MODULES = YES; 1100 | CODE_SIGN_IDENTITY = ""; 1101 | CODE_SIGN_STYLE = Automatic; 1102 | DEFINES_MODULE = YES; 1103 | DYLIB_COMPATIBILITY_VERSION = 1; 1104 | DYLIB_CURRENT_VERSION = 1; 1105 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1106 | INFOPLIST_FILE = Sources/Info.plist; 1107 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1108 | LD_RUNPATH_SEARCH_PATHS = ( 1109 | "$(inherited)", 1110 | "@executable_path/Frameworks", 1111 | "@loader_path/Frameworks", 1112 | ); 1113 | MARKETING_VERSION = 1.0.1; 1114 | PRODUCT_BUNDLE_IDENTIFIER = com.almazrafi.AutoChangeable; 1115 | PRODUCT_NAME = AutoChangeable; 1116 | SKIP_INSTALL = YES; 1117 | SWIFT_VERSION = 5.0; 1118 | TARGETED_DEVICE_FAMILY = "1,2"; 1119 | TVOS_DEPLOYMENT_TARGET = 10.0; 1120 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1121 | }; 1122 | name = Release; 1123 | }; 1124 | C057F02623CB8EEB00C2D895 /* Debug */ = { 1125 | isa = XCBuildConfiguration; 1126 | buildSettings = { 1127 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 1128 | CLANG_ENABLE_MODULES = YES; 1129 | CODE_SIGN_IDENTITY = ""; 1130 | CODE_SIGN_STYLE = Automatic; 1131 | INFOPLIST_FILE = Tests/Info.plist; 1132 | LD_RUNPATH_SEARCH_PATHS = ( 1133 | "$(inherited)", 1134 | "@executable_path/Frameworks", 1135 | "@loader_path/Frameworks", 1136 | ); 1137 | PRODUCT_BUNDLE_IDENTIFIER = "com.almazrafi.AutoChangeable.Tests-iOS"; 1138 | PRODUCT_NAME = "$(TARGET_NAME)"; 1139 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 1140 | SWIFT_VERSION = 5.0; 1141 | TARGETED_DEVICE_FAMILY = "1,2"; 1142 | TVOS_DEPLOYMENT_TARGET = 10.0; 1143 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1144 | }; 1145 | name = Debug; 1146 | }; 1147 | C057F02723CB8EEB00C2D895 /* Release */ = { 1148 | isa = XCBuildConfiguration; 1149 | buildSettings = { 1150 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 1151 | CLANG_ENABLE_MODULES = YES; 1152 | CODE_SIGN_IDENTITY = ""; 1153 | CODE_SIGN_STYLE = Automatic; 1154 | INFOPLIST_FILE = Tests/Info.plist; 1155 | LD_RUNPATH_SEARCH_PATHS = ( 1156 | "$(inherited)", 1157 | "@executable_path/Frameworks", 1158 | "@loader_path/Frameworks", 1159 | ); 1160 | PRODUCT_BUNDLE_IDENTIFIER = "com.almazrafi.AutoChangeable.Tests-iOS"; 1161 | PRODUCT_NAME = "$(TARGET_NAME)"; 1162 | SWIFT_VERSION = 5.0; 1163 | TARGETED_DEVICE_FAMILY = "1,2"; 1164 | TVOS_DEPLOYMENT_TARGET = 10.0; 1165 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1166 | }; 1167 | name = Release; 1168 | }; 1169 | C0A01A3B23CB90F200AC2C3A /* Debug */ = { 1170 | isa = XCBuildConfiguration; 1171 | buildSettings = { 1172 | CLANG_ENABLE_MODULES = YES; 1173 | CODE_SIGN_STYLE = Automatic; 1174 | COMBINE_HIDPI_IMAGES = YES; 1175 | DEFINES_MODULE = YES; 1176 | DYLIB_COMPATIBILITY_VERSION = 1; 1177 | DYLIB_CURRENT_VERSION = 1; 1178 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1179 | INFOPLIST_FILE = Sources/Info.plist; 1180 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1181 | LD_RUNPATH_SEARCH_PATHS = ( 1182 | "$(inherited)", 1183 | "@executable_path/../Frameworks", 1184 | "@loader_path/Frameworks", 1185 | ); 1186 | MACOSX_DEPLOYMENT_TARGET = 10.12; 1187 | MARKETING_VERSION = 1.0.1; 1188 | PRODUCT_BUNDLE_IDENTIFIER = com.almazrafi.AutoChangeable; 1189 | PRODUCT_NAME = AutoChangeable; 1190 | SDKROOT = macosx; 1191 | SKIP_INSTALL = YES; 1192 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 1193 | SWIFT_VERSION = 5.0; 1194 | TVOS_DEPLOYMENT_TARGET = 10.0; 1195 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1196 | }; 1197 | name = Debug; 1198 | }; 1199 | C0A01A3C23CB90F200AC2C3A /* Release */ = { 1200 | isa = XCBuildConfiguration; 1201 | buildSettings = { 1202 | CLANG_ENABLE_MODULES = YES; 1203 | CODE_SIGN_STYLE = Automatic; 1204 | COMBINE_HIDPI_IMAGES = YES; 1205 | DEFINES_MODULE = YES; 1206 | DYLIB_COMPATIBILITY_VERSION = 1; 1207 | DYLIB_CURRENT_VERSION = 1; 1208 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1209 | INFOPLIST_FILE = Sources/Info.plist; 1210 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1211 | LD_RUNPATH_SEARCH_PATHS = ( 1212 | "$(inherited)", 1213 | "@executable_path/../Frameworks", 1214 | "@loader_path/Frameworks", 1215 | ); 1216 | MACOSX_DEPLOYMENT_TARGET = 10.12; 1217 | MARKETING_VERSION = 1.0.1; 1218 | PRODUCT_BUNDLE_IDENTIFIER = com.almazrafi.AutoChangeable; 1219 | PRODUCT_NAME = AutoChangeable; 1220 | SDKROOT = macosx; 1221 | SKIP_INSTALL = YES; 1222 | SWIFT_VERSION = 5.0; 1223 | TVOS_DEPLOYMENT_TARGET = 10.0; 1224 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1225 | }; 1226 | name = Release; 1227 | }; 1228 | C0A01A3E23CB90F200AC2C3A /* Debug */ = { 1229 | isa = XCBuildConfiguration; 1230 | buildSettings = { 1231 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 1232 | CLANG_ENABLE_MODULES = YES; 1233 | CODE_SIGN_STYLE = Automatic; 1234 | COMBINE_HIDPI_IMAGES = YES; 1235 | INFOPLIST_FILE = Tests/Info.plist; 1236 | LD_RUNPATH_SEARCH_PATHS = ( 1237 | "$(inherited)", 1238 | "@executable_path/../Frameworks", 1239 | "@loader_path/../Frameworks", 1240 | ); 1241 | MACOSX_DEPLOYMENT_TARGET = 10.12; 1242 | PRODUCT_BUNDLE_IDENTIFIER = "com.almazrafi.AutoChangeable.Tests-macOS"; 1243 | PRODUCT_NAME = "$(TARGET_NAME)"; 1244 | SDKROOT = macosx; 1245 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 1246 | SWIFT_VERSION = 5.0; 1247 | TVOS_DEPLOYMENT_TARGET = 10.0; 1248 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1249 | }; 1250 | name = Debug; 1251 | }; 1252 | C0A01A3F23CB90F200AC2C3A /* Release */ = { 1253 | isa = XCBuildConfiguration; 1254 | buildSettings = { 1255 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 1256 | CLANG_ENABLE_MODULES = YES; 1257 | CODE_SIGN_STYLE = Automatic; 1258 | COMBINE_HIDPI_IMAGES = YES; 1259 | INFOPLIST_FILE = Tests/Info.plist; 1260 | LD_RUNPATH_SEARCH_PATHS = ( 1261 | "$(inherited)", 1262 | "@executable_path/../Frameworks", 1263 | "@loader_path/../Frameworks", 1264 | ); 1265 | MACOSX_DEPLOYMENT_TARGET = 10.12; 1266 | PRODUCT_BUNDLE_IDENTIFIER = "com.almazrafi.AutoChangeable.Tests-macOS"; 1267 | PRODUCT_NAME = "$(TARGET_NAME)"; 1268 | SDKROOT = macosx; 1269 | SWIFT_VERSION = 5.0; 1270 | TVOS_DEPLOYMENT_TARGET = 10.0; 1271 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1272 | }; 1273 | name = Release; 1274 | }; 1275 | C0A01A5923CB92EB00AC2C3A /* Debug */ = { 1276 | isa = XCBuildConfiguration; 1277 | buildSettings = { 1278 | CLANG_ENABLE_MODULES = YES; 1279 | CODE_SIGN_IDENTITY = ""; 1280 | CODE_SIGN_STYLE = Automatic; 1281 | DEFINES_MODULE = YES; 1282 | DYLIB_COMPATIBILITY_VERSION = 1; 1283 | DYLIB_CURRENT_VERSION = 1; 1284 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1285 | INFOPLIST_FILE = Sources/Info.plist; 1286 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1287 | LD_RUNPATH_SEARCH_PATHS = ( 1288 | "$(inherited)", 1289 | "@executable_path/Frameworks", 1290 | "@loader_path/Frameworks", 1291 | ); 1292 | MARKETING_VERSION = 1.0.1; 1293 | PRODUCT_BUNDLE_IDENTIFIER = com.almazrafi.AutoChangeable; 1294 | PRODUCT_NAME = AutoChangeable; 1295 | SDKROOT = appletvos; 1296 | SKIP_INSTALL = YES; 1297 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 1298 | SWIFT_VERSION = 5.0; 1299 | TARGETED_DEVICE_FAMILY = 3; 1300 | TVOS_DEPLOYMENT_TARGET = 10.0; 1301 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1302 | }; 1303 | name = Debug; 1304 | }; 1305 | C0A01A5A23CB92EB00AC2C3A /* Release */ = { 1306 | isa = XCBuildConfiguration; 1307 | buildSettings = { 1308 | CLANG_ENABLE_MODULES = YES; 1309 | CODE_SIGN_IDENTITY = ""; 1310 | CODE_SIGN_STYLE = Automatic; 1311 | DEFINES_MODULE = YES; 1312 | DYLIB_COMPATIBILITY_VERSION = 1; 1313 | DYLIB_CURRENT_VERSION = 1; 1314 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1315 | INFOPLIST_FILE = Sources/Info.plist; 1316 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1317 | LD_RUNPATH_SEARCH_PATHS = ( 1318 | "$(inherited)", 1319 | "@executable_path/Frameworks", 1320 | "@loader_path/Frameworks", 1321 | ); 1322 | MARKETING_VERSION = 1.0.1; 1323 | PRODUCT_BUNDLE_IDENTIFIER = com.almazrafi.AutoChangeable; 1324 | PRODUCT_NAME = AutoChangeable; 1325 | SDKROOT = appletvos; 1326 | SKIP_INSTALL = YES; 1327 | SWIFT_VERSION = 5.0; 1328 | TARGETED_DEVICE_FAMILY = 3; 1329 | TVOS_DEPLOYMENT_TARGET = 10.0; 1330 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1331 | }; 1332 | name = Release; 1333 | }; 1334 | C0A01A5C23CB92EB00AC2C3A /* Debug */ = { 1335 | isa = XCBuildConfiguration; 1336 | buildSettings = { 1337 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 1338 | CLANG_ENABLE_MODULES = YES; 1339 | CODE_SIGN_IDENTITY = ""; 1340 | CODE_SIGN_STYLE = Automatic; 1341 | INFOPLIST_FILE = Tests/Info.plist; 1342 | LD_RUNPATH_SEARCH_PATHS = ( 1343 | "$(inherited)", 1344 | "@executable_path/Frameworks", 1345 | "@loader_path/Frameworks", 1346 | ); 1347 | PRODUCT_BUNDLE_IDENTIFIER = "com.almazrafi.AutoChangeable.Tests-tvOS"; 1348 | PRODUCT_NAME = "$(TARGET_NAME)"; 1349 | SDKROOT = appletvos; 1350 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 1351 | SWIFT_VERSION = 5.0; 1352 | TARGETED_DEVICE_FAMILY = 3; 1353 | TVOS_DEPLOYMENT_TARGET = 10.0; 1354 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1355 | }; 1356 | name = Debug; 1357 | }; 1358 | C0A01A5D23CB92EB00AC2C3A /* Release */ = { 1359 | isa = XCBuildConfiguration; 1360 | buildSettings = { 1361 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 1362 | CLANG_ENABLE_MODULES = YES; 1363 | CODE_SIGN_IDENTITY = ""; 1364 | CODE_SIGN_STYLE = Automatic; 1365 | INFOPLIST_FILE = Tests/Info.plist; 1366 | LD_RUNPATH_SEARCH_PATHS = ( 1367 | "$(inherited)", 1368 | "@executable_path/Frameworks", 1369 | "@loader_path/Frameworks", 1370 | ); 1371 | PRODUCT_BUNDLE_IDENTIFIER = "com.almazrafi.AutoChangeable.Tests-tvOS"; 1372 | PRODUCT_NAME = "$(TARGET_NAME)"; 1373 | SDKROOT = appletvos; 1374 | SWIFT_VERSION = 5.0; 1375 | TARGETED_DEVICE_FAMILY = 3; 1376 | TVOS_DEPLOYMENT_TARGET = 10.0; 1377 | WATCHOS_DEPLOYMENT_TARGET = 3.0; 1378 | }; 1379 | name = Release; 1380 | }; 1381 | /* End XCBuildConfiguration section */ 1382 | 1383 | /* Begin XCConfigurationList section */ 1384 | C006F1A92406B13E00C3F783 /* Build configuration list for PBXNativeTarget "AutoChangeable watchOS" */ = { 1385 | isa = XCConfigurationList; 1386 | buildConfigurations = ( 1387 | C006F1A72406B13E00C3F783 /* Debug */, 1388 | C006F1A82406B13E00C3F783 /* Release */, 1389 | ); 1390 | defaultConfigurationIsVisible = 0; 1391 | defaultConfigurationName = Release; 1392 | }; 1393 | C057F00823CB8EEB00C2D895 /* Build configuration list for PBXProject "AutoChangeable" */ = { 1394 | isa = XCConfigurationList; 1395 | buildConfigurations = ( 1396 | C057F02023CB8EEB00C2D895 /* Debug */, 1397 | C057F02123CB8EEB00C2D895 /* Release */, 1398 | ); 1399 | defaultConfigurationIsVisible = 0; 1400 | defaultConfigurationName = Release; 1401 | }; 1402 | C057F02223CB8EEB00C2D895 /* Build configuration list for PBXNativeTarget "AutoChangeable iOS" */ = { 1403 | isa = XCConfigurationList; 1404 | buildConfigurations = ( 1405 | C057F02323CB8EEB00C2D895 /* Debug */, 1406 | C057F02423CB8EEB00C2D895 /* Release */, 1407 | ); 1408 | defaultConfigurationIsVisible = 0; 1409 | defaultConfigurationName = Release; 1410 | }; 1411 | C057F02523CB8EEB00C2D895 /* Build configuration list for PBXNativeTarget "AutoChangeable Tests iOS" */ = { 1412 | isa = XCConfigurationList; 1413 | buildConfigurations = ( 1414 | C057F02623CB8EEB00C2D895 /* Debug */, 1415 | C057F02723CB8EEB00C2D895 /* Release */, 1416 | ); 1417 | defaultConfigurationIsVisible = 0; 1418 | defaultConfigurationName = Release; 1419 | }; 1420 | C0A01A3A23CB90F200AC2C3A /* Build configuration list for PBXNativeTarget "AutoChangeable macOS" */ = { 1421 | isa = XCConfigurationList; 1422 | buildConfigurations = ( 1423 | C0A01A3B23CB90F200AC2C3A /* Debug */, 1424 | C0A01A3C23CB90F200AC2C3A /* Release */, 1425 | ); 1426 | defaultConfigurationIsVisible = 0; 1427 | defaultConfigurationName = Release; 1428 | }; 1429 | C0A01A3D23CB90F200AC2C3A /* Build configuration list for PBXNativeTarget "AutoChangeable Tests macOS" */ = { 1430 | isa = XCConfigurationList; 1431 | buildConfigurations = ( 1432 | C0A01A3E23CB90F200AC2C3A /* Debug */, 1433 | C0A01A3F23CB90F200AC2C3A /* Release */, 1434 | ); 1435 | defaultConfigurationIsVisible = 0; 1436 | defaultConfigurationName = Release; 1437 | }; 1438 | C0A01A5823CB92EB00AC2C3A /* Build configuration list for PBXNativeTarget "AutoChangeable tvOS" */ = { 1439 | isa = XCConfigurationList; 1440 | buildConfigurations = ( 1441 | C0A01A5923CB92EB00AC2C3A /* Debug */, 1442 | C0A01A5A23CB92EB00AC2C3A /* Release */, 1443 | ); 1444 | defaultConfigurationIsVisible = 0; 1445 | defaultConfigurationName = Release; 1446 | }; 1447 | C0A01A5B23CB92EB00AC2C3A /* Build configuration list for PBXNativeTarget "AutoChangeable Tests tvOS" */ = { 1448 | isa = XCConfigurationList; 1449 | buildConfigurations = ( 1450 | C0A01A5C23CB92EB00AC2C3A /* Debug */, 1451 | C0A01A5D23CB92EB00AC2C3A /* Release */, 1452 | ); 1453 | defaultConfigurationIsVisible = 0; 1454 | defaultConfigurationName = Release; 1455 | }; 1456 | /* End XCConfigurationList section */ 1457 | }; 1458 | rootObject = C057F00523CB8EEB00C2D895 /* Project object */; 1459 | } 1460 | -------------------------------------------------------------------------------- /AutoChangeable.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AutoChangeable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AutoChangeable.xcodeproj/xcshareddata/xcschemes/AutoChangeable iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 39 | 40 | 41 | 42 | 44 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /AutoChangeable.xcodeproj/xcshareddata/xcschemes/AutoChangeable macOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 39 | 40 | 41 | 42 | 44 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /AutoChangeable.xcodeproj/xcshareddata/xcschemes/AutoChangeable tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 39 | 40 | 41 | 42 | 44 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /AutoChangeable.xcodeproj/xcshareddata/xcschemes/AutoChangeable watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Bin/AutoChangeable: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | template_path="$(dirname "$0")/AutoChangeable.stencil" 4 | 5 | while [[ "$#" -gt 0 ]]; do 6 | case $1 in 7 | -s|--sources) sources_path="$2"; shift ;; 8 | -o|--output) output_path="$2"; shift ;; 9 | *) echo "Unknown parameter passed: $1"; exit 1 ;; 10 | esac 11 | shift 12 | done 13 | 14 | if [ ! $sources_path ]; then 15 | echo "No sources provided" 16 | exit 1 17 | fi 18 | 19 | if [ ! $output_path ]; then 20 | echo "No output provided" 21 | exit 1 22 | fi 23 | 24 | unlock_output_file() { 25 | if [[ -f $output_path ]]; then 26 | chmod a=rw ${output_path} 27 | fi 28 | } 29 | 30 | lock_output_file() { 31 | if [[ -f $output_path ]]; then 32 | chmod a=r ${output_path} 33 | fi 34 | } 35 | 36 | resolve_sourcery_path() { 37 | pods_root_path=${PODS_ROOT} 38 | 39 | if [ ! $sources_path ]; then 40 | pods_root_path="Pods" 41 | fi 42 | 43 | pods_sourcery_path="${pods_root_path}/Sourcery/bin/sourcery" 44 | 45 | if [[ -f $pods_sourcery_path ]]; then 46 | echo $pods_sourcery_path 47 | else 48 | echo "sourcery" 49 | fi 50 | } 51 | 52 | trap lock_output_file EXIT 53 | unlock_output_file 54 | 55 | sourcery_path=$(resolve_sourcery_path) 56 | 57 | $sourcery_path \ 58 | --sources ${sources_path} \ 59 | --output ${output_path} \ 60 | --templates ${template_path} 61 | -------------------------------------------------------------------------------- /Bin/AutoChangeable.stencil: -------------------------------------------------------------------------------- 1 | // swiftlint:disable all 2 | 3 | import Foundation 4 | 5 | #if canImport(AutoChangeable) 6 | import AutoChangeable 7 | #endif 8 | 9 | {% for type in types.structs where type.based.AutoChangeable %} 10 | {% if type.accessLevel != "private" %} 11 | extension {{ type.name }} { 12 | 13 | {{ type.accessLevel }} init(copy: ChangeableWrapper) { 14 | self.init( 15 | {% for variable in type.storedVariables %} 16 | {% if forloop.last %} 17 | {{ variable.name }}: copy.{{ variable.name }} 18 | {% else %} 19 | {{ variable.name }}: copy.{{ variable.name }}, 20 | {% endif %} 21 | {% endfor %} 22 | ) 23 | } 24 | } 25 | 26 | {% endif %} 27 | {% endfor %} 28 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | tap "homebrew/bundle" 2 | 3 | brew "rbenv" 4 | brew "kylef/formulae/swiftenv" 5 | brew "swiftlint" 6 | -------------------------------------------------------------------------------- /Dangerfile: -------------------------------------------------------------------------------- 1 | def report_xcode_summary(platform:) 2 | path = "xcodebuild-#{platform.downcase}.json" 3 | 4 | return if !File.exist?(path) 5 | 6 | data = File.read(path) 7 | json = JSON.parse(data) 8 | 9 | json["tests_summary_messages"].each { |message| 10 | if !message.empty? 11 | message.insert(1, " " + platform + ":") 12 | end 13 | } 14 | 15 | File.open(path, "w") do |file| 16 | file.puts JSON.pretty_generate(json) 17 | end 18 | 19 | xcode_summary.report(path) 20 | end 21 | 22 | warn('This pull request is marked as Work in Progress. DO NOT MERGE!') if github.pr_title.include? "[WIP]" 23 | 24 | swiftlint.lint_all_files = true 25 | swiftlint.lint_files(fail_on_error: true, inline_mode: true) 26 | 27 | report_xcode_summary(platform: "iOS") 28 | report_xcode_summary(platform: "macOS") 29 | report_xcode_summary(platform: "tvOS") 30 | report_xcode_summary(platform: "watchOS") 31 | -------------------------------------------------------------------------------- /Demo/AutoChangeableDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | AC4FC03A37847EE52DD2DE88 /* Pods_AutoChangeableDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ACCF29720EAEE4373F294903 /* Pods_AutoChangeableDemo.framework */; }; 11 | C08F5EFD24C4668B00E21EC2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5EFC24C4668B00E21EC2 /* AppDelegate.swift */; }; 12 | C08F5F0124C4668B00E21EC2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5F0024C4668B00E21EC2 /* ViewController.swift */; }; 13 | C08F5F0424C4668B00E21EC2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C08F5F0224C4668B00E21EC2 /* Main.storyboard */; }; 14 | C08F5F0624C4668C00E21EC2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C08F5F0524C4668C00E21EC2 /* Assets.xcassets */; }; 15 | C08F5F0924C4668C00E21EC2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C08F5F0724C4668C00E21EC2 /* LaunchScreen.storyboard */; }; 16 | C08F5F1724C4732C00E21EC2 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5F1624C4732C00E21EC2 /* User.swift */; }; 17 | C08F5F1924C4734E00E21EC2 /* Company.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F5F1824C4734E00E21EC2 /* Company.swift */; }; 18 | C08F61B124C484E900E21EC2 /* AutoChangeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08F61B024C484E800E21EC2 /* AutoChangeable.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 06BD6460656501F9CF977620 /* Pods-AutoChangeableDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoChangeableDemo.release.xcconfig"; path = "Target Support Files/Pods-AutoChangeableDemo/Pods-AutoChangeableDemo.release.xcconfig"; sourceTree = ""; }; 23 | ACCF29720EAEE4373F294903 /* Pods_AutoChangeableDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AutoChangeableDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | C08F5EF924C4668B00E21EC2 /* AutoChangeableDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AutoChangeableDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | C08F5EFC24C4668B00E21EC2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 26 | C08F5F0024C4668B00E21EC2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 27 | C08F5F0324C4668B00E21EC2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 28 | C08F5F0524C4668C00E21EC2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 29 | C08F5F0824C4668C00E21EC2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 30 | C08F5F0A24C4668D00E21EC2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 31 | C08F5F1624C4732C00E21EC2 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; 32 | C08F5F1824C4734E00E21EC2 /* Company.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Company.swift; sourceTree = ""; }; 33 | C08F61B024C484E800E21EC2 /* AutoChangeable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutoChangeable.swift; sourceTree = ""; }; 34 | E8F8C844A8472DEC37109F94 /* Pods-AutoChangeableDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoChangeableDemo.debug.xcconfig"; path = "Target Support Files/Pods-AutoChangeableDemo/Pods-AutoChangeableDemo.debug.xcconfig"; sourceTree = ""; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | C08F5EF624C4668B00E21EC2 /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | AC4FC03A37847EE52DD2DE88 /* Pods_AutoChangeableDemo.framework in Frameworks */, 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | /* End PBXFrameworksBuildPhase section */ 47 | 48 | /* Begin PBXGroup section */ 49 | 50270B7568B9B6A261C85E5F /* Pods */ = { 50 | isa = PBXGroup; 51 | children = ( 52 | E8F8C844A8472DEC37109F94 /* Pods-AutoChangeableDemo.debug.xcconfig */, 53 | 06BD6460656501F9CF977620 /* Pods-AutoChangeableDemo.release.xcconfig */, 54 | ); 55 | path = Pods; 56 | sourceTree = ""; 57 | }; 58 | C08F5EF024C4668B00E21EC2 = { 59 | isa = PBXGroup; 60 | children = ( 61 | C08F5EFB24C4668B00E21EC2 /* Sources */, 62 | C08F5EFA24C4668B00E21EC2 /* Products */, 63 | 50270B7568B9B6A261C85E5F /* Pods */, 64 | DCD5B052E2BA13FDDE8D24B1 /* Frameworks */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | C08F5EFA24C4668B00E21EC2 /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | C08F5EF924C4668B00E21EC2 /* AutoChangeableDemo.app */, 72 | ); 73 | name = Products; 74 | sourceTree = ""; 75 | }; 76 | C08F5EFB24C4668B00E21EC2 /* Sources */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | C08F61AF24C484E800E21EC2 /* Generated */, 80 | C08F5F1524C4731F00E21EC2 /* Models */, 81 | C08F5F1124C46E6100E21EC2 /* Resources */, 82 | C08F5F1024C46E5300E21EC2 /* Storyboards */, 83 | C08F5EFC24C4668B00E21EC2 /* AppDelegate.swift */, 84 | C08F5F0A24C4668D00E21EC2 /* Info.plist */, 85 | C08F5F0024C4668B00E21EC2 /* ViewController.swift */, 86 | ); 87 | path = Sources; 88 | sourceTree = ""; 89 | }; 90 | C08F5F1024C46E5300E21EC2 /* Storyboards */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | C08F5F0724C4668C00E21EC2 /* LaunchScreen.storyboard */, 94 | C08F5F0224C4668B00E21EC2 /* Main.storyboard */, 95 | ); 96 | path = Storyboards; 97 | sourceTree = ""; 98 | }; 99 | C08F5F1124C46E6100E21EC2 /* Resources */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | C08F5F0524C4668C00E21EC2 /* Assets.xcassets */, 103 | ); 104 | path = Resources; 105 | sourceTree = ""; 106 | }; 107 | C08F5F1524C4731F00E21EC2 /* Models */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | C08F5F1624C4732C00E21EC2 /* User.swift */, 111 | C08F5F1824C4734E00E21EC2 /* Company.swift */, 112 | ); 113 | path = Models; 114 | sourceTree = ""; 115 | }; 116 | C08F61AF24C484E800E21EC2 /* Generated */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | C08F61B024C484E800E21EC2 /* AutoChangeable.swift */, 120 | ); 121 | path = Generated; 122 | sourceTree = ""; 123 | }; 124 | DCD5B052E2BA13FDDE8D24B1 /* Frameworks */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | ACCF29720EAEE4373F294903 /* Pods_AutoChangeableDemo.framework */, 128 | ); 129 | name = Frameworks; 130 | sourceTree = ""; 131 | }; 132 | /* End PBXGroup section */ 133 | 134 | /* Begin PBXNativeTarget section */ 135 | C08F5EF824C4668B00E21EC2 /* AutoChangeableDemo */ = { 136 | isa = PBXNativeTarget; 137 | buildConfigurationList = C08F5F0D24C4668D00E21EC2 /* Build configuration list for PBXNativeTarget "AutoChangeableDemo" */; 138 | buildPhases = ( 139 | 1CB0C8D52BD0A7ABA31BA3CB /* [CP] Check Pods Manifest.lock */, 140 | C08F643624C4999F00E21EC2 /* AutoChangeable */, 141 | C08F5EF524C4668B00E21EC2 /* Sources */, 142 | C08F5EF624C4668B00E21EC2 /* Frameworks */, 143 | C08F5EF724C4668B00E21EC2 /* Resources */, 144 | 47895E2C6D97C8B9E398709A /* [CP] Embed Pods Frameworks */, 145 | ); 146 | buildRules = ( 147 | ); 148 | dependencies = ( 149 | ); 150 | name = AutoChangeableDemo; 151 | productName = AutoChangeableDemo; 152 | productReference = C08F5EF924C4668B00E21EC2 /* AutoChangeableDemo.app */; 153 | productType = "com.apple.product-type.application"; 154 | }; 155 | /* End PBXNativeTarget section */ 156 | 157 | /* Begin PBXProject section */ 158 | C08F5EF124C4668B00E21EC2 /* Project object */ = { 159 | isa = PBXProject; 160 | attributes = { 161 | LastSwiftUpdateCheck = 1150; 162 | LastUpgradeCheck = 1150; 163 | ORGANIZATIONNAME = almazrafi; 164 | TargetAttributes = { 165 | C08F5EF824C4668B00E21EC2 = { 166 | CreatedOnToolsVersion = 11.5; 167 | }; 168 | }; 169 | }; 170 | buildConfigurationList = C08F5EF424C4668B00E21EC2 /* Build configuration list for PBXProject "AutoChangeableDemo" */; 171 | compatibilityVersion = "Xcode 9.3"; 172 | developmentRegion = en; 173 | hasScannedForEncodings = 0; 174 | knownRegions = ( 175 | en, 176 | Base, 177 | ); 178 | mainGroup = C08F5EF024C4668B00E21EC2; 179 | productRefGroup = C08F5EFA24C4668B00E21EC2 /* Products */; 180 | projectDirPath = ""; 181 | projectRoot = ""; 182 | targets = ( 183 | C08F5EF824C4668B00E21EC2 /* AutoChangeableDemo */, 184 | ); 185 | }; 186 | /* End PBXProject section */ 187 | 188 | /* Begin PBXResourcesBuildPhase section */ 189 | C08F5EF724C4668B00E21EC2 /* Resources */ = { 190 | isa = PBXResourcesBuildPhase; 191 | buildActionMask = 2147483647; 192 | files = ( 193 | C08F5F0924C4668C00E21EC2 /* LaunchScreen.storyboard in Resources */, 194 | C08F5F0624C4668C00E21EC2 /* Assets.xcassets in Resources */, 195 | C08F5F0424C4668B00E21EC2 /* Main.storyboard in Resources */, 196 | ); 197 | runOnlyForDeploymentPostprocessing = 0; 198 | }; 199 | /* End PBXResourcesBuildPhase section */ 200 | 201 | /* Begin PBXShellScriptBuildPhase section */ 202 | 1CB0C8D52BD0A7ABA31BA3CB /* [CP] Check Pods Manifest.lock */ = { 203 | isa = PBXShellScriptBuildPhase; 204 | buildActionMask = 2147483647; 205 | files = ( 206 | ); 207 | inputFileListPaths = ( 208 | ); 209 | inputPaths = ( 210 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 211 | "${PODS_ROOT}/Manifest.lock", 212 | ); 213 | name = "[CP] Check Pods Manifest.lock"; 214 | outputFileListPaths = ( 215 | ); 216 | outputPaths = ( 217 | "$(DERIVED_FILE_DIR)/Pods-AutoChangeableDemo-checkManifestLockResult.txt", 218 | ); 219 | runOnlyForDeploymentPostprocessing = 0; 220 | shellPath = /bin/sh; 221 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 222 | showEnvVarsInLog = 0; 223 | }; 224 | 47895E2C6D97C8B9E398709A /* [CP] Embed Pods Frameworks */ = { 225 | isa = PBXShellScriptBuildPhase; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | ); 229 | inputFileListPaths = ( 230 | "${PODS_ROOT}/Target Support Files/Pods-AutoChangeableDemo/Pods-AutoChangeableDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist", 231 | ); 232 | name = "[CP] Embed Pods Frameworks"; 233 | outputFileListPaths = ( 234 | "${PODS_ROOT}/Target Support Files/Pods-AutoChangeableDemo/Pods-AutoChangeableDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist", 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | shellPath = /bin/sh; 238 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AutoChangeableDemo/Pods-AutoChangeableDemo-frameworks.sh\"\n"; 239 | showEnvVarsInLog = 0; 240 | }; 241 | C08F643624C4999F00E21EC2 /* AutoChangeable */ = { 242 | isa = PBXShellScriptBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | ); 246 | inputFileListPaths = ( 247 | ); 248 | inputPaths = ( 249 | ); 250 | name = AutoChangeable; 251 | outputFileListPaths = ( 252 | ); 253 | outputPaths = ( 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | shellPath = /bin/sh; 257 | shellScript = "\"${PODS_ROOT}/AutoChangeable/Bin/AutoChangeable\" \\\n--sources \"${SRCROOT}/Sources\" \\\n--output \"${SRCROOT}/Sources/Generated/AutoChangeable.swift\"\n"; 258 | }; 259 | /* End PBXShellScriptBuildPhase section */ 260 | 261 | /* Begin PBXSourcesBuildPhase section */ 262 | C08F5EF524C4668B00E21EC2 /* Sources */ = { 263 | isa = PBXSourcesBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | C08F61B124C484E900E21EC2 /* AutoChangeable.swift in Sources */, 267 | C08F5F0124C4668B00E21EC2 /* ViewController.swift in Sources */, 268 | C08F5EFD24C4668B00E21EC2 /* AppDelegate.swift in Sources */, 269 | C08F5F1724C4732C00E21EC2 /* User.swift in Sources */, 270 | C08F5F1924C4734E00E21EC2 /* Company.swift in Sources */, 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | /* End PBXSourcesBuildPhase section */ 275 | 276 | /* Begin PBXVariantGroup section */ 277 | C08F5F0224C4668B00E21EC2 /* Main.storyboard */ = { 278 | isa = PBXVariantGroup; 279 | children = ( 280 | C08F5F0324C4668B00E21EC2 /* Base */, 281 | ); 282 | name = Main.storyboard; 283 | sourceTree = ""; 284 | }; 285 | C08F5F0724C4668C00E21EC2 /* LaunchScreen.storyboard */ = { 286 | isa = PBXVariantGroup; 287 | children = ( 288 | C08F5F0824C4668C00E21EC2 /* Base */, 289 | ); 290 | name = LaunchScreen.storyboard; 291 | sourceTree = ""; 292 | }; 293 | /* End PBXVariantGroup section */ 294 | 295 | /* Begin XCBuildConfiguration section */ 296 | C08F5F0B24C4668D00E21EC2 /* Debug */ = { 297 | isa = XCBuildConfiguration; 298 | buildSettings = { 299 | ALWAYS_SEARCH_USER_PATHS = NO; 300 | CLANG_ANALYZER_NONNULL = YES; 301 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 302 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 303 | CLANG_CXX_LIBRARY = "libc++"; 304 | CLANG_ENABLE_MODULES = YES; 305 | CLANG_ENABLE_OBJC_ARC = YES; 306 | CLANG_ENABLE_OBJC_WEAK = YES; 307 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 308 | CLANG_WARN_BOOL_CONVERSION = YES; 309 | CLANG_WARN_COMMA = YES; 310 | CLANG_WARN_CONSTANT_CONVERSION = YES; 311 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 312 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 313 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 314 | CLANG_WARN_EMPTY_BODY = YES; 315 | CLANG_WARN_ENUM_CONVERSION = YES; 316 | CLANG_WARN_INFINITE_RECURSION = YES; 317 | CLANG_WARN_INT_CONVERSION = YES; 318 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 319 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 320 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 321 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 322 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 323 | CLANG_WARN_STRICT_PROTOTYPES = YES; 324 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 325 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 326 | CLANG_WARN_UNREACHABLE_CODE = YES; 327 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 328 | COPY_PHASE_STRIP = NO; 329 | DEBUG_INFORMATION_FORMAT = dwarf; 330 | ENABLE_STRICT_OBJC_MSGSEND = YES; 331 | ENABLE_TESTABILITY = YES; 332 | GCC_C_LANGUAGE_STANDARD = gnu11; 333 | GCC_DYNAMIC_NO_PIC = NO; 334 | GCC_NO_COMMON_BLOCKS = YES; 335 | GCC_OPTIMIZATION_LEVEL = 0; 336 | GCC_PREPROCESSOR_DEFINITIONS = ( 337 | "DEBUG=1", 338 | "$(inherited)", 339 | ); 340 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 341 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 342 | GCC_WARN_UNDECLARED_SELECTOR = YES; 343 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 344 | GCC_WARN_UNUSED_FUNCTION = YES; 345 | GCC_WARN_UNUSED_VARIABLE = YES; 346 | IPHONEOS_DEPLOYMENT_TARGET = 13.5; 347 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 348 | MTL_FAST_MATH = YES; 349 | ONLY_ACTIVE_ARCH = YES; 350 | SDKROOT = iphoneos; 351 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 352 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 353 | }; 354 | name = Debug; 355 | }; 356 | C08F5F0C24C4668D00E21EC2 /* Release */ = { 357 | isa = XCBuildConfiguration; 358 | buildSettings = { 359 | ALWAYS_SEARCH_USER_PATHS = NO; 360 | CLANG_ANALYZER_NONNULL = YES; 361 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_ENABLE_OBJC_WEAK = YES; 367 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 368 | CLANG_WARN_BOOL_CONVERSION = YES; 369 | CLANG_WARN_COMMA = YES; 370 | CLANG_WARN_CONSTANT_CONVERSION = YES; 371 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 372 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 373 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 374 | CLANG_WARN_EMPTY_BODY = YES; 375 | CLANG_WARN_ENUM_CONVERSION = YES; 376 | CLANG_WARN_INFINITE_RECURSION = YES; 377 | CLANG_WARN_INT_CONVERSION = YES; 378 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 380 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 381 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 382 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 383 | CLANG_WARN_STRICT_PROTOTYPES = YES; 384 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 385 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 386 | CLANG_WARN_UNREACHABLE_CODE = YES; 387 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 388 | COPY_PHASE_STRIP = NO; 389 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 390 | ENABLE_NS_ASSERTIONS = NO; 391 | ENABLE_STRICT_OBJC_MSGSEND = YES; 392 | GCC_C_LANGUAGE_STANDARD = gnu11; 393 | GCC_NO_COMMON_BLOCKS = YES; 394 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 395 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 396 | GCC_WARN_UNDECLARED_SELECTOR = YES; 397 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 398 | GCC_WARN_UNUSED_FUNCTION = YES; 399 | GCC_WARN_UNUSED_VARIABLE = YES; 400 | IPHONEOS_DEPLOYMENT_TARGET = 13.5; 401 | MTL_ENABLE_DEBUG_INFO = NO; 402 | MTL_FAST_MATH = YES; 403 | SDKROOT = iphoneos; 404 | SWIFT_COMPILATION_MODE = wholemodule; 405 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 406 | VALIDATE_PRODUCT = YES; 407 | }; 408 | name = Release; 409 | }; 410 | C08F5F0E24C4668D00E21EC2 /* Debug */ = { 411 | isa = XCBuildConfiguration; 412 | baseConfigurationReference = E8F8C844A8472DEC37109F94 /* Pods-AutoChangeableDemo.debug.xcconfig */; 413 | buildSettings = { 414 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 415 | CODE_SIGN_STYLE = Automatic; 416 | INFOPLIST_FILE = Sources/Info.plist; 417 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 418 | LD_RUNPATH_SEARCH_PATHS = ( 419 | "$(inherited)", 420 | "@executable_path/Frameworks", 421 | ); 422 | PRODUCT_BUNDLE_IDENTIFIER = "com.almazrafi.AutoChangeable-Demo"; 423 | PRODUCT_NAME = AutoChangeableDemo; 424 | SWIFT_VERSION = 5.0; 425 | TARGETED_DEVICE_FAMILY = 1; 426 | }; 427 | name = Debug; 428 | }; 429 | C08F5F0F24C4668D00E21EC2 /* Release */ = { 430 | isa = XCBuildConfiguration; 431 | baseConfigurationReference = 06BD6460656501F9CF977620 /* Pods-AutoChangeableDemo.release.xcconfig */; 432 | buildSettings = { 433 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 434 | CODE_SIGN_STYLE = Automatic; 435 | INFOPLIST_FILE = Sources/Info.plist; 436 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 437 | LD_RUNPATH_SEARCH_PATHS = ( 438 | "$(inherited)", 439 | "@executable_path/Frameworks", 440 | ); 441 | PRODUCT_BUNDLE_IDENTIFIER = "com.almazrafi.AutoChangeable-Demo"; 442 | PRODUCT_NAME = AutoChangeableDemo; 443 | SWIFT_VERSION = 5.0; 444 | TARGETED_DEVICE_FAMILY = 1; 445 | }; 446 | name = Release; 447 | }; 448 | /* End XCBuildConfiguration section */ 449 | 450 | /* Begin XCConfigurationList section */ 451 | C08F5EF424C4668B00E21EC2 /* Build configuration list for PBXProject "AutoChangeableDemo" */ = { 452 | isa = XCConfigurationList; 453 | buildConfigurations = ( 454 | C08F5F0B24C4668D00E21EC2 /* Debug */, 455 | C08F5F0C24C4668D00E21EC2 /* Release */, 456 | ); 457 | defaultConfigurationIsVisible = 0; 458 | defaultConfigurationName = Release; 459 | }; 460 | C08F5F0D24C4668D00E21EC2 /* Build configuration list for PBXNativeTarget "AutoChangeableDemo" */ = { 461 | isa = XCConfigurationList; 462 | buildConfigurations = ( 463 | C08F5F0E24C4668D00E21EC2 /* Debug */, 464 | C08F5F0F24C4668D00E21EC2 /* Release */, 465 | ); 466 | defaultConfigurationIsVisible = 0; 467 | defaultConfigurationName = Release; 468 | }; 469 | /* End XCConfigurationList section */ 470 | }; 471 | rootObject = C08F5EF124C4668B00E21EC2 /* Project object */; 472 | } 473 | -------------------------------------------------------------------------------- /Demo/AutoChangeableDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/AutoChangeableDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/AutoChangeableDemo.xcodeproj/xcshareddata/xcschemes/ChangeableCopyDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /Demo/AutoChangeableDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Demo/AutoChangeableDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '10.0' 2 | 3 | target 'AutoChangeableDemo' do 4 | use_frameworks! 5 | 6 | pod 'AutoChangeable', :git => 'https://github.com/almazrafi/AutoChangeable.git' 7 | pod 'Sourcery' 8 | end 9 | -------------------------------------------------------------------------------- /Demo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AutoChangeable (1.0.0) 3 | - Sourcery (0.18.0) 4 | 5 | DEPENDENCIES: 6 | - AutoChangeable (from `https://github.com/almazrafi/AutoChangeable.git`) 7 | - Sourcery 8 | 9 | SPEC REPOS: 10 | trunk: 11 | - Sourcery 12 | 13 | EXTERNAL SOURCES: 14 | AutoChangeable: 15 | :git: https://github.com/almazrafi/AutoChangeable.git 16 | 17 | CHECKOUT OPTIONS: 18 | AutoChangeable: 19 | :commit: 3ba33e2063a2edef72c2782058dba5185394d5a3 20 | :git: https://github.com/almazrafi/AutoChangeable.git 21 | 22 | SPEC CHECKSUMS: 23 | AutoChangeable: 9e7d6e13c5973435cffb20231ebe91346cd48562 24 | Sourcery: e0e8658a1ce6d9f475156ad3ffce4c68f1261b3e 25 | 26 | PODFILE CHECKSUM: c2f3c87faa2d3844fb5e268a9bea919a0554a10b 27 | 28 | COCOAPODS: 1.9.3 29 | -------------------------------------------------------------------------------- /Demo/Sources/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @UIApplicationMain 4 | class AppDelegate: UIResponder, UIApplicationDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func application( 9 | _ application: UIApplication, 10 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 11 | ) -> Bool { 12 | return true 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Demo/Sources/Generated/AutoChangeable.swift: -------------------------------------------------------------------------------- 1 | // Generated using Sourcery 0.18.0 — https://github.com/krzysztofzablocki/Sourcery 2 | // DO NOT EDIT 3 | 4 | 5 | // swiftlint:disable all 6 | 7 | import Foundation 8 | 9 | #if canImport(AutoChangeable) 10 | import AutoChangeable 11 | #endif 12 | 13 | extension Company { 14 | 15 | internal init(copy: ChangeableWrapper) { 16 | self.init( 17 | name: copy.name, 18 | country: copy.country 19 | ) 20 | } 21 | } 22 | 23 | extension User { 24 | 25 | internal init(copy: ChangeableWrapper) { 26 | self.init( 27 | id: copy.id, 28 | name: copy.name, 29 | age: copy.age, 30 | company: copy.company 31 | ) 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /Demo/Sources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | 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 | -------------------------------------------------------------------------------- /Demo/Sources/Models/Company.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import AutoChangeable 3 | 4 | struct Company: AutoChangeable { 5 | 6 | let name: String 7 | let country: String? 8 | } 9 | -------------------------------------------------------------------------------- /Demo/Sources/Models/User.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import AutoChangeable 3 | 4 | struct User: AutoChangeable { 5 | 6 | let id: Int 7 | let name: String 8 | let age: Int 9 | let company: Company 10 | } 11 | -------------------------------------------------------------------------------- /Demo/Sources/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Demo/Sources/Resources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Demo/Sources/Storyboards/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 | -------------------------------------------------------------------------------- /Demo/Sources/Storyboards/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 | -------------------------------------------------------------------------------- /Demo/Sources/ViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import AutoChangeable 3 | 4 | class ViewController: UIViewController { 5 | 6 | override func viewDidLoad() { 7 | super.viewDidLoad() 8 | 9 | let apple = Company(name: "Apple", country: "USA") 10 | let steve = User(id: 1, name: "Steve", age: 21, company: apple) 11 | 12 | let steveJobs = steve.changing { newUser in 13 | newUser.name = "Steve Jobs" 14 | newUser.age = 30 15 | newUser.company.name = "NeXT" 16 | } 17 | 18 | print("original: \(steve)") 19 | print("changed: \(steveJobs)") 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem 'cocoapods' 4 | gem 'xcpretty' 5 | gem 'xcpretty-json-formatter' 6 | 7 | gem "danger" 8 | gem 'danger-xcode_summary' 9 | gem 'danger-swiftlint' 10 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (3.0.2) 5 | activesupport (4.2.11.3) 6 | i18n (~> 0.7) 7 | minitest (~> 5.1) 8 | thread_safe (~> 0.3, >= 0.3.4) 9 | tzinfo (~> 1.1) 10 | addressable (2.7.0) 11 | public_suffix (>= 2.0.2, < 5.0) 12 | algoliasearch (1.27.3) 13 | httpclient (~> 2.8, >= 2.8.3) 14 | json (>= 1.5.1) 15 | atomos (0.1.3) 16 | claide (1.0.3) 17 | claide-plugins (0.9.2) 18 | cork 19 | nap 20 | open4 (~> 1.3) 21 | cocoapods (1.9.3) 22 | activesupport (>= 4.0.2, < 5) 23 | claide (>= 1.0.2, < 2.0) 24 | cocoapods-core (= 1.9.3) 25 | cocoapods-deintegrate (>= 1.0.3, < 2.0) 26 | cocoapods-downloader (>= 1.2.2, < 2.0) 27 | cocoapods-plugins (>= 1.0.0, < 2.0) 28 | cocoapods-search (>= 1.0.0, < 2.0) 29 | cocoapods-stats (>= 1.0.0, < 2.0) 30 | cocoapods-trunk (>= 1.4.0, < 2.0) 31 | cocoapods-try (>= 1.1.0, < 2.0) 32 | colored2 (~> 3.1) 33 | escape (~> 0.0.4) 34 | fourflusher (>= 2.3.0, < 3.0) 35 | gh_inspector (~> 1.0) 36 | molinillo (~> 0.6.6) 37 | nap (~> 1.0) 38 | ruby-macho (~> 1.4) 39 | xcodeproj (>= 1.14.0, < 2.0) 40 | cocoapods-core (1.9.3) 41 | activesupport (>= 4.0.2, < 6) 42 | algoliasearch (~> 1.0) 43 | concurrent-ruby (~> 1.1) 44 | fuzzy_match (~> 2.0.4) 45 | nap (~> 1.0) 46 | netrc (~> 0.11) 47 | typhoeus (~> 1.0) 48 | cocoapods-deintegrate (1.0.4) 49 | cocoapods-downloader (1.4.0) 50 | cocoapods-plugins (1.0.0) 51 | nap 52 | cocoapods-search (1.0.0) 53 | cocoapods-stats (1.1.0) 54 | cocoapods-trunk (1.5.0) 55 | nap (>= 0.8, < 2.0) 56 | netrc (~> 0.11) 57 | cocoapods-try (1.2.0) 58 | colored2 (3.1.2) 59 | concurrent-ruby (1.1.7) 60 | cork (0.3.0) 61 | colored2 (~> 3.1) 62 | danger (8.0.4) 63 | claide (~> 1.0) 64 | claide-plugins (>= 0.9.2) 65 | colored2 (~> 3.1) 66 | cork (~> 0.1) 67 | faraday (>= 0.9.0, < 2.0) 68 | faraday-http-cache (~> 2.0) 69 | git (~> 1.7) 70 | kramdown (~> 2.0) 71 | kramdown-parser-gfm (~> 1.0) 72 | no_proxy_fix 73 | octokit (~> 4.7) 74 | terminal-table (~> 1) 75 | danger-plugin-api (1.0.0) 76 | danger (> 2.0) 77 | danger-swiftlint (0.24.3) 78 | danger 79 | rake (> 10) 80 | thor (~> 0.19) 81 | danger-xcode_summary (0.5.2) 82 | danger-plugin-api (~> 1.0) 83 | escape (0.0.4) 84 | ethon (0.12.0) 85 | ffi (>= 1.3.0) 86 | faraday (1.0.1) 87 | multipart-post (>= 1.2, < 3) 88 | faraday-http-cache (2.2.0) 89 | faraday (>= 0.8) 90 | ffi (1.13.1) 91 | fourflusher (2.3.1) 92 | fuzzy_match (2.0.4) 93 | gh_inspector (1.1.3) 94 | git (1.7.0) 95 | rchardet (~> 1.8) 96 | httpclient (2.8.3) 97 | i18n (0.9.5) 98 | concurrent-ruby (~> 1.0) 99 | json (2.3.1) 100 | kramdown (2.3.1) 101 | rexml 102 | kramdown-parser-gfm (1.1.0) 103 | kramdown (~> 2.0) 104 | minitest (5.14.1) 105 | molinillo (0.6.6) 106 | multipart-post (2.1.1) 107 | nanaimo (0.3.0) 108 | nap (1.1.0) 109 | netrc (0.11.0) 110 | no_proxy_fix (0.1.2) 111 | octokit (4.18.0) 112 | faraday (>= 0.9) 113 | sawyer (~> 0.8.0, >= 0.5.3) 114 | open4 (1.3.4) 115 | public_suffix (4.0.5) 116 | rake (13.0.1) 117 | rchardet (1.8.0) 118 | rexml (3.2.4) 119 | rouge (2.0.7) 120 | ruby-macho (1.4.0) 121 | sawyer (0.8.2) 122 | addressable (>= 2.3.5) 123 | faraday (> 0.8, < 2.0) 124 | terminal-table (1.8.0) 125 | unicode-display_width (~> 1.1, >= 1.1.1) 126 | thor (0.20.3) 127 | thread_safe (0.3.6) 128 | typhoeus (1.4.0) 129 | ethon (>= 0.9.0) 130 | tzinfo (1.2.7) 131 | thread_safe (~> 0.1) 132 | unicode-display_width (1.7.0) 133 | xcodeproj (1.18.0) 134 | CFPropertyList (>= 2.3.3, < 4.0) 135 | atomos (~> 0.1.3) 136 | claide (>= 1.0.2, < 2.0) 137 | colored2 (~> 3.1) 138 | nanaimo (~> 0.3.0) 139 | xcpretty (0.3.0) 140 | rouge (~> 2.0.7) 141 | xcpretty-json-formatter (0.1.1) 142 | xcpretty (~> 0.2, >= 0.0.7) 143 | 144 | PLATFORMS 145 | ruby 146 | 147 | DEPENDENCIES 148 | cocoapods 149 | danger 150 | danger-swiftlint 151 | danger-xcode_summary 152 | xcpretty 153 | xcpretty-json-formatter 154 | 155 | BUNDLED WITH 156 | 2.1.4 157 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Almaz Ibragimov 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 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.1 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "AutoChangeable", 6 | products: [ 7 | .library( 8 | name: "AutoChangeable", 9 | targets: ["AutoChangeable"] 10 | ) 11 | ], 12 | targets: [ 13 | .target( 14 | name: "AutoChangeable", 15 | path: "Sources" 16 | ), 17 | .testTarget( 18 | name: "AutoChangeableTests", 19 | dependencies: ["AutoChangeable"], 20 | path: "Tests" 21 | ) 22 | ], 23 | swiftLanguageVersions: [.v5] 24 | ) 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AutoChangeable 2 | [![Build Status](https://github.com/almazrafi/AutoChangeable/workflows/CI/badge.svg?branch=main)](https://github.com/almazrafi/AutoChangeable/actions) 3 | [![Codecov](https://codecov.io/gh/almazrafi/AutoChangeable/branch/master/graph/badge.svg)](https://codecov.io/gh/almazrafi/AutoChangeable) 4 | [![Cocoapods](https://img.shields.io/cocoapods/v/AutoChangeable)](http://cocoapods.org/pods/AutoChangeable) 5 | [![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen)](https://github.com/Carthage/Carthage) 6 | [![SPM compatible](https://img.shields.io/badge/SPM-Compatible-brightgreen.svg)](https://swift.org/package-manager/) 7 | [![Platforms](https://img.shields.io/cocoapods/p/AutoChangeable)](https://developer.apple.com/discover/) 8 | [![Xcode](https://img.shields.io/badge/Xcode-12-blue)](https://developer.apple.com/xcode) 9 | [![Swift](https://img.shields.io/badge/Swift-5.1-orange)](https://swift.org) 10 | [![License](https://img.shields.io/github/license/almazrafi/AutoChangeable)](https://opensource.org/licenses/MIT) 11 | 12 | AutoChangeable is a simple library that provides a convenient way to copy instances of Swift types with changed properties: 13 | 14 | ```swift 15 | struct User: AutoChangeable { 16 | let id: Int 17 | let name: String 18 | let age: Int 19 | } 20 | 21 | let steve = User(id: 1, name: "Steve", age: 21) 22 | 23 | // Copy the instance by changing the `name` and `age` properties 24 | let steveJobs = steve.changing { newUser in 25 | newUser.name = "Steve Jobs" 26 | newUser.age = 41 27 | } 28 | ``` 29 | 30 | ## Requirements 31 | - iOS 10.0+ / macOS 10.12+ / watchOS 3.0+ / tvOS 10.0+ 32 | - Xcode 12.5+ 33 | - Swift 5.1+ 34 | 35 | ## Usage 36 | The most convenient way to use AutoChangeable is to configure [code generation](#code-generation) 37 | and conform your structs to the `AutoChangeable` protocol: 38 | 39 | ```swift 40 | struct User: AutoChangeable { 41 | let id: Int 42 | let name: String 43 | let age: Int 44 | } 45 | ``` 46 | 47 | If you don't want to configure code generation, 48 | you just need to implement initialization from a copy **manually**: 49 | 50 | ```swift 51 | extension User: Changeable { 52 | init(copy: ChangeableWrapper) { 53 | self.init( 54 | id: copy.id, 55 | name: copy.name, 56 | age: copy.age 57 | ) 58 | } 59 | } 60 | ``` 61 | 62 | ## Installation 63 | ### CocoaPods 64 | [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: 65 | ```bash 66 | $ gem install cocoapods 67 | ``` 68 | 69 | To integrate AutoChangeable into your Xcode project using [CocoaPods](http://cocoapods.org), specify it in your `Podfile`: 70 | ```ruby 71 | platform :ios, '10.0' 72 | use_frameworks! 73 | 74 | target '' do 75 | pod 'AutoChangeable' 76 | end 77 | ``` 78 | 79 | Finally run the following command: 80 | ```bash 81 | $ pod install 82 | ``` 83 | 84 | ### Carthage 85 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. You can install Carthage with Homebrew using the following command: 86 | ```bash 87 | $ brew update 88 | $ brew install carthage 89 | ``` 90 | 91 | To integrate AutoChangeable into your Xcode project using Carthage, specify it in your `Cartfile`: 92 | ```ogdl 93 | github "almazrafi/AutoChangeable" ~> 1.0.1 94 | ``` 95 | 96 | Finally run `carthage update` to build the framework and drag the built `AutoChangeable.framework` into your Xcode project. 97 | 98 | ### Swift Package Manager 99 | The [Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. 100 | 101 | To integrate AutoChangeable into your Xcode project using Swift Package Manager, 102 | add the following as a dependency to your `Package.swift`: 103 | ```swift 104 | .package(url: "https://github.com/almazrafi/AutoChangeable.git", from: "1.0.1") 105 | ``` 106 | and then specify `"AutoChangeable"` as a dependency of the Target in which you wish to use AutoChangeable. 107 | 108 | Here's an example `Package.swift`: 109 | ```swift 110 | // swift-tools-version:5.0 111 | import PackageDescription 112 | 113 | let package = Package( 114 | name: "MyPackage", 115 | products: [ 116 | .library(name: "MyPackage", targets: ["MyPackage"]) 117 | ], 118 | dependencies: [ 119 | .package(url: "https://github.com/almazrafi/AutoChangeable.git", from: "1.0.1") 120 | ], 121 | targets: [ 122 | .target(name: "MyPackage", dependencies: ["AutoChangeable"]) 123 | ] 124 | ) 125 | ``` 126 | 127 | ## Code Generation 128 | To generate code for the `AutoChangeable` protocol, the first thing you need to do 129 | is to install the [Sourcery](https://github.com/krzysztofzablocki/Sourcery) command line tool. 130 | 131 | You can use a ready-made [Stencil](https://github.com/stencilproject/Stencil)-template for Sourcery, 132 | which can be downloaded from the latest release files 133 | on the [repository releases page](https://github.com/almazrafi/AutoChangeable/releases). 134 | 135 | If AutoChangeable is installed using CocoaPods, it already contains this template 136 | and a helper script for generating code. 137 | You can either run it manually or in a custom build phase using the following command: 138 | 139 | ``` sh 140 | Pods/AutoChangeable/Bin/AutoChangeable \ 141 | --sources Path/to/yours/sources \ 142 | --output Path/to/generated/file 143 | ``` 144 | 145 | ## Communication 146 | - If you need help, open an issue. 147 | - If you found a bug, open an issue. 148 | - If you have a feature request, open an issue. 149 | - If you want to contribute, submit a pull request. 150 | 151 | ## License 152 | AutoChangeable is available under the MIT license. See the [LICENSE](LICENSE) file for more info. 153 | -------------------------------------------------------------------------------- /Scripts/bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | readonly arguments=$@ 4 | 5 | readonly update_gems_flag='--update-gems' 6 | readonly update_packages_flag='--update-packages' 7 | 8 | readonly project_path="$( pwd )" 9 | 10 | readonly required_macos_version='10.14.0' 11 | readonly required_ruby_version=$(cat .ruby-version) 12 | readonly required_swift_version=$(cat .swift-version) 13 | 14 | readonly homebrew_url='https://raw.githubusercontent.com/Homebrew/install/master/install' 15 | readonly rbenv_doctor_url='https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor' 16 | readonly rbenv_doctor_temp_path="${project_path}/rbenv_doctor" 17 | 18 | readonly rbenv_shell_init_line='if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' 19 | readonly swiftenv_shell_init_line='if which swiftenv > /dev/null; then eval "$(swiftenv init -)"; fi' 20 | 21 | readonly default_style='\033[0m' 22 | readonly warning_style='\033[33m' 23 | readonly error_style='\033[31m' 24 | 25 | readonly macos_style='\033[38;5;161m' 26 | readonly xcode_style='\033[38;5;75m' 27 | readonly homebrew_style='\033[38;5;208m' 28 | readonly rbenv_style='\033[38;5;43m' 29 | readonly ruby_style='\033[38;5;89m' 30 | readonly bundler_style='\033[38;5;45m' 31 | readonly cocoapods_style='\033[38;5;161m' 32 | readonly swiftenv_style='\033[38;5;226m' 33 | readonly swift_style='\033[38;5;208m' 34 | readonly spm_style='\033[38;5;202m' 35 | readonly congratulations_style='\033[38;5;48m' 36 | 37 | cleanup() { 38 | rm -rf $rbenv_doctor_temp_path; 39 | } 40 | 41 | failure() { 42 | echo "${error_style}Fatal error:${default_style} '$1' failed with exit code $2" 43 | exit 1 44 | } 45 | 46 | warning() { 47 | echo "${warning_style}Warning:${default_style} '$1' failed with exit code $2" 48 | } 49 | 50 | assert_failure() { 51 | eval $1 2>&1 | sed -e "s/^/ /" 52 | 53 | local exit_code=${PIPESTATUS[0]} 54 | 55 | if [ $exit_code -ne 0 ]; then 56 | failure "$1" $exit_code 57 | fi 58 | } 59 | 60 | assert_warning() { 61 | eval $1 2>&1 | sed -e "s/^/ /" 62 | 63 | local exit_code=${PIPESTATUS[0]} 64 | 65 | if [ $exit_code -ne 0 ]; then 66 | warning "$1" $exit_code 67 | fi 68 | } 69 | 70 | plain_version() { 71 | echo "$@" | awk -F. '{ printf("%d%03d%03d%03d", $1,$2,$3,$4); }' 72 | } 73 | 74 | ######################################################################################## 75 | 76 | welcome_message_step() { 77 | echo "${default_style}" 78 | echo "This script will set up your development environment." 79 | echo "This might take a few minutes. Please don't interrupt the script." 80 | } 81 | 82 | macos_version_step() { 83 | echo "" 84 | echo "Checking ${macos_style}macOS${default_style} version:" 85 | 86 | macos_version=$(/usr/bin/sw_vers -productVersion 2>&1) 87 | 88 | if [ "$(plain_version $macos_version)" -lt "$(plain_version $required_macos_version)" ]; then 89 | echo " ${error_style}Your macOS version ($macos_version) is older then required version ($required_macos_version). Exiting...${default_style}" 90 | exit 1 91 | else 92 | echo " Your macOS version: $macos_version" 93 | fi 94 | } 95 | 96 | xcode_command_line_tools_step() { 97 | echo "" 98 | echo "Checking ${xcode_style}Xcode Command Line Tools${default_style} installation:" 99 | 100 | if xcode-select --version &> /dev/null; then 101 | echo " Xcode Command Line Tools already installed." 102 | else 103 | echo " Xcode Command Line Tools not found. Installing..." 104 | assert_failure 'xcode-select --install' 105 | fi 106 | } 107 | 108 | homebrew_step() { 109 | echo "" 110 | echo "Checking ${homebrew_style}Homebrew${default_style} installation:" 111 | 112 | if which -s brew; then 113 | echo " Homebrew already installed. Updating..." 114 | assert_failure 'brew update' 115 | else 116 | echo " Homebrew not found. Installing..." 117 | assert_failure 'ruby -e "$(curl -fsSL $homebrew_url)" < /dev/null' 118 | fi 119 | 120 | echo "" 121 | echo " Installing 'brew bundle' command..." 122 | assert_failure 'brew tap Homebrew/bundle' 123 | 124 | echo "" 125 | echo " Verifying that Homebrew is properly set up..." 126 | assert_warning 'brew doctor' 127 | } 128 | 129 | brewfile_step() { 130 | echo "" 131 | echo "Installing ${homebrew_style}Homebrew formulae${default_style} specified in Brewfile..." 132 | assert_failure 'brew bundle --no-lock' 133 | } 134 | 135 | rbenv_shell_step() { 136 | shell_profile_path=$1 137 | 138 | if [[ -f $shell_profile_path ]]; then 139 | shell_profile_content=$(grep rbenv $shell_profile_path 2> /dev/null) 140 | 141 | if [[ $shell_profile_content != *"$rbenv_shell_init_line"* ]]; then 142 | echo $rbenv_shell_init_line >> $shell_profile_path 143 | fi 144 | fi 145 | } 146 | 147 | rbenv_step() { 148 | echo "" 149 | echo "Checking ${rbenv_style}rbenv${default_style} installation:" 150 | 151 | if brew ls --versions rbenv &> /dev/null; then 152 | echo " rbenv already installed." 153 | else 154 | echo " rbenv not found. Installing..." 155 | assert_failure 'brew install rbenv' 156 | fi 157 | 158 | assert_warning 'rbenv rehash' 159 | 160 | rbenv_shell_step "${HOME}/.bash_profile" 161 | rbenv_shell_step "${HOME}/.zshrc" 162 | 163 | eval "$(rbenv init -)" 164 | 165 | echo "" 166 | echo " Verifying that rbenv is properly set up..." 167 | curl -fsSL $rbenv_doctor_url > $rbenv_doctor_temp_path 2> /dev/null 168 | rbenv_doctor_exit_code=$? 169 | 170 | if [ $rbenv_doctor_exit_code -ne 0 ]; then 171 | echo " Failed to load rbenv-doctor script." 172 | warning 'curl -fsSL $rbenv_doctor_url' $rbenv_doctor_exit_code 173 | else 174 | chmod a+x $rbenv_doctor_temp_path 175 | assert_warning 'bash $rbenv_doctor_temp_path' 176 | fi 177 | } 178 | 179 | ruby_step() { 180 | echo "" 181 | echo "Checking ${ruby_style}Ruby${default_style} version:" 182 | 183 | ruby_versions=$(rbenv versions 2>&1) 184 | 185 | if [[ " ${ruby_versions[@]} " =~ " ${required_ruby_version} " ]]; then 186 | echo " Required Ruby version ($required_ruby_version) already installed." 187 | else 188 | echo " Required Ruby version ($required_ruby_version) not found. Installing..." 189 | assert_failure 'rbenv install $required_ruby_version' 190 | assert_warning 'rbenv rehash' 191 | fi 192 | } 193 | 194 | bundler_step() { 195 | echo "" 196 | echo "Checking ${bundler_style}Bundler${default_style} installation:" 197 | 198 | if rbenv which bundler &> /dev/null; then 199 | echo " Bundler already installed. Updating..." 200 | assert_failure 'gem update bundler' 201 | else 202 | echo " Bundler not found. Installing..." 203 | assert_failure 'gem install bundler' 204 | fi 205 | 206 | assert_warning 'rbenv rehash' 207 | } 208 | 209 | gemfile_step() { 210 | echo "" 211 | 212 | if [[ " ${arguments[*]} " == *" $update_gems_flag "* ]]; then 213 | echo "Updating ${ruby_style}Ruby gems${default_style} specified in Gemfile..." 214 | assert_failure 'bundle update' 215 | else 216 | echo "Installing ${ruby_style}Ruby gems${default_style} specified in Gemfile..." 217 | assert_failure 'bundle install' 218 | fi 219 | } 220 | 221 | swiftenv_shell_step() { 222 | shell_profile_path=$1 223 | 224 | if [[ -f $shell_profile_path ]]; then 225 | shell_profile_content=$(grep swiftenv $shell_profile_path 2> /dev/null) 226 | 227 | if [[ $shell_profile_content != *"$swiftenv_shell_init_line"* ]]; then 228 | echo $swiftenv_shell_init_line >> $shell_profile_path 229 | fi 230 | fi 231 | } 232 | 233 | swiftenv_step() { 234 | echo "" 235 | echo "Checking ${swiftenv_style}swiftenv${default_style} installation:" 236 | 237 | if brew ls --versions swiftenv &> /dev/null; then 238 | echo " swiftenv already installed." 239 | else 240 | echo " swiftenv not found. Installing..." 241 | assert_failure 'brew install kylef/formulae/swiftenv' 242 | fi 243 | 244 | assert_warning 'swiftenv rehash' 245 | 246 | swiftenv_shell_step "${HOME}/.bash_profile" 247 | swiftenv_shell_step "${HOME}/.zshrc" 248 | 249 | eval "$(swiftenv init -)" 250 | } 251 | 252 | swift_step() { 253 | echo "" 254 | echo "Checking ${swift_style}Swift${default_style} version:" 255 | 256 | swift_versions=$(swiftenv versions 2>&1) 257 | 258 | if [[ " ${swift_versions[@]} " =~ " ${required_swift_version} " ]]; then 259 | echo " Required Swift version ($required_swift_version) already installed." 260 | else 261 | echo " Required Swift version ($required_swift_version) not found. Installing..." 262 | assert_failure 'swiftenv install $required_swift_version' 263 | assert_warning 'swiftenv rehash' 264 | fi 265 | } 266 | 267 | spm_step() { 268 | echo "" 269 | 270 | if [[ " ${arguments[*]} " == *" $update_packages_flag "* ]]; then 271 | echo "Updating ${spm_style}Swift packages${default_style} specified in Package.swift..." 272 | assert_failure 'swift package update' 273 | else 274 | echo "Resolving ${spm_style}Swift packages${default_style} specified in Package.swift..." 275 | assert_failure 'swift package resolve' 276 | fi 277 | } 278 | 279 | congratulations_step() { 280 | echo "" 281 | echo "" 282 | echo "${congratulations_style}Congratulations!${default_style} Setting up the development environment successfully completed 🥳" 283 | echo "" 284 | } 285 | 286 | ######################################################################################## 287 | 288 | trap cleanup EXIT 289 | 290 | welcome_message_step 291 | macos_version_step 292 | xcode_command_line_tools_step 293 | homebrew_step 294 | brewfile_step 295 | rbenv_step 296 | ruby_step 297 | bundler_step 298 | gemfile_step 299 | swiftenv_step 300 | swift_step 301 | spm_step 302 | congratulations_step 303 | -------------------------------------------------------------------------------- /Scripts/swiftlint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [[ ! $CI && ! $SKIP_SWIFTLINT ]]; then 4 | if which swiftlint >/dev/null; then 5 | swiftlint --no-cache 6 | else 7 | echo "warning: SwiftLint does not exist, download it from https://github.com/realm/SwiftLint" 8 | fi 9 | fi 10 | -------------------------------------------------------------------------------- /Sources/.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - extension_access_modifier 3 | 4 | opt_in_rules: 5 | - explicit_acl 6 | - explicit_top_level_acl 7 | -------------------------------------------------------------------------------- /Sources/AutoChangeable.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | FOUNDATION_EXPORT double AutoChangeableVersionNumber; 4 | FOUNDATION_EXPORT const unsigned char AutoChangeableVersionString[]; 5 | -------------------------------------------------------------------------------- /Sources/AutoChangeable.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public protocol AutoChangeable: Changeable { } 4 | -------------------------------------------------------------------------------- /Sources/Changeable.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public protocol Changeable { 4 | 5 | associatedtype ChangeableCopy 6 | 7 | var changeableCopy: ChangeableCopy { get } 8 | 9 | init(copy: ChangeableCopy) 10 | } 11 | 12 | extension Changeable where ChangeableCopy == Self { 13 | 14 | public var changeableCopy: ChangeableCopy { self } 15 | 16 | public init(copy: ChangeableCopy) { 17 | self = copy 18 | } 19 | } 20 | 21 | extension Changeable { 22 | 23 | public func changing(_ change: (inout ChangeableCopy) -> Void) -> Self { 24 | var copy = self.changeableCopy 25 | 26 | change(©) 27 | 28 | return Self(copy: copy) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Sources/ChangeableWrapper.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @dynamicMemberLookup 4 | public struct ChangeableWrapper { 5 | 6 | private let wrapped: Wrapped 7 | private var changes: [PartialKeyPath: Any] = [:] 8 | 9 | public init(_ wrapped: Wrapped) { 10 | self.wrapped = wrapped 11 | } 12 | 13 | public subscript(dynamicMember keyPath: KeyPath) -> T { 14 | get { changes[keyPath].flatMap { $0 as? T } ?? wrapped[keyPath: keyPath] } 15 | set { changes[keyPath] = newValue } 16 | } 17 | 18 | public subscript(dynamicMember keyPath: KeyPath) -> T.ChangeableCopy { 19 | get { self[dynamicMember: keyPath].changeableCopy } 20 | set { self[dynamicMember: keyPath] = T(copy: newValue) } 21 | } 22 | } 23 | 24 | extension Changeable where ChangeableCopy == ChangeableWrapper { 25 | 26 | public var changeableCopy: ChangeableCopy { 27 | ChangeableCopy(self) 28 | } 29 | } 30 | 31 | extension ChangeableWrapper: Equatable where Wrapped: Equatable & Changeable, Wrapped.ChangeableCopy == Self { 32 | 33 | public static func == (lhs: ChangeableWrapper, rhs: ChangeableWrapper) -> Bool { 34 | Wrapped(copy: lhs) == Wrapped(copy: rhs) 35 | } 36 | } 37 | 38 | extension ChangeableWrapper: Hashable where Wrapped: Hashable & Changeable, Wrapped.ChangeableCopy == Self { 39 | 40 | public func hash(into hasher: inout Hasher) { 41 | wrapped.hash(into: &hasher) 42 | } 43 | } 44 | 45 | extension ChangeableWrapper: Comparable where Wrapped: Comparable & Changeable, Wrapped.ChangeableCopy == Self { 46 | 47 | public static func < (lhs: ChangeableWrapper, rhs: ChangeableWrapper) -> Bool { 48 | Wrapped(copy: lhs) < Wrapped(copy: rhs) 49 | } 50 | } 51 | 52 | extension ChangeableWrapper: Decodable where Wrapped: Decodable & Changeable, Wrapped.ChangeableCopy == Self { 53 | 54 | public init(from decoder: Decoder) throws { 55 | self.init(try Wrapped(from: decoder)) 56 | } 57 | } 58 | 59 | extension ChangeableWrapper: Encodable where Wrapped: Encodable & Changeable, Wrapped.ChangeableCopy == Self { 60 | 61 | public func encode(to encoder: Encoder) throws { 62 | try Wrapped(copy: self).encode(to: encoder) 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Sources/Extensions/CoreGraphics/CGPoint+Changeable.swift: -------------------------------------------------------------------------------- 1 | #if canImport(CoreGraphics) 2 | import CoreGraphics 3 | 4 | extension CGPoint: Changeable { 5 | 6 | public init(copy: ChangeableWrapper) { 7 | self.init( 8 | x: copy.x, 9 | y: copy.y 10 | ) 11 | } 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /Sources/Extensions/CoreGraphics/CGRect+Changeable.swift: -------------------------------------------------------------------------------- 1 | #if canImport(CoreGraphics) 2 | import CoreGraphics 3 | 4 | extension CGRect: Changeable { 5 | 6 | public init(copy: ChangeableWrapper) { 7 | self.init( 8 | origin: copy.origin, 9 | size: copy.size 10 | ) 11 | } 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /Sources/Extensions/CoreGraphics/CGSize+Changeable.swift: -------------------------------------------------------------------------------- 1 | #if canImport(CoreGraphics) 2 | import CoreGraphics 3 | 4 | extension CGSize: Changeable { 5 | 6 | public init(copy: ChangeableWrapper) { 7 | self.init( 8 | width: copy.width, 9 | height: copy.height 10 | ) 11 | } 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /Sources/Extensions/Foundation/Array+Changeable.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Array: Changeable { 4 | 5 | public typealias ChangeableCopy = Self 6 | } 7 | 8 | extension Array where Element: Changeable { 9 | 10 | public subscript(changing index: Index) -> Element.ChangeableCopy { 11 | get { self[index].changeableCopy } 12 | set { self[index] = Element(copy: newValue) } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sources/Extensions/Foundation/Dictionary+Changeable.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Dictionary: Changeable { 4 | 5 | public typealias ChangeableCopy = Self 6 | } 7 | -------------------------------------------------------------------------------- /Sources/Extensions/Foundation/Set+Changeable.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Set: Changeable { 4 | 5 | public typealias ChangeableCopy = Self 6 | } 7 | -------------------------------------------------------------------------------- /Sources/Extensions/UIKit/UIEdgeInsets+Changeable.swift: -------------------------------------------------------------------------------- 1 | #if canImport(UIKit) 2 | import UIKit 3 | 4 | extension UIEdgeInsets: Changeable { 5 | 6 | public init(copy: ChangeableWrapper) { 7 | self.init( 8 | top: copy.top, 9 | left: copy.left, 10 | bottom: copy.bottom, 11 | right: copy.right 12 | ) 13 | } 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /Sources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Tests/.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - closure_body_length 3 | - file_length 4 | - force_try 5 | - function_body_length 6 | - trailing_closure 7 | - type_body_length 8 | - nesting 9 | -------------------------------------------------------------------------------- /Tests/ChangeableTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import AutoChangeable 4 | 5 | class ChangeableTests: XCTestCase { 6 | 7 | // MARK: - Instance Methods 8 | 9 | func testThatInstanceCanBeCopiedWithoutChanges() { 10 | let expectedCompany = Company.apple 11 | let company = expectedCompany 12 | 13 | let newCompany = company.changing { _ in } 14 | 15 | XCTAssertEqual(newCompany, expectedCompany) 16 | } 17 | 18 | func testThatInstanceCanBeCopiedWithChanges() { 19 | let expectedCompany = Company.next 20 | let company = Company.noname 21 | 22 | let newCompany = company.changing { newCompany in 23 | newCompany.name = expectedCompany.name 24 | newCompany.country = expectedCompany.country 25 | } 26 | 27 | XCTAssertEqual(newCompany, expectedCompany) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Tests/ChangeableWrapperTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import AutoChangeable 4 | 5 | class ChangeableWrapperTests: XCTestCase { 6 | 7 | // MARK: - Instance Methods 8 | 9 | func testThatPropertyCanBeChanged() { 10 | let expectedCompanyName = Company.next.name 11 | 12 | let company = Company.apple 13 | var companyCopy = ChangeableWrapper(company) 14 | 15 | companyCopy.name = expectedCompanyName 16 | 17 | XCTAssertEqual(companyCopy.name, expectedCompanyName) 18 | XCTAssertEqual(companyCopy.country, company.country) 19 | } 20 | 21 | func testThatOptionalPropertyCanBeChangedToValue() { 22 | let expectedCompanyCountry = Company.apple.country 23 | 24 | let company = Company.noname 25 | var companyCopy = ChangeableWrapper(company) 26 | 27 | companyCopy.country = expectedCompanyCountry 28 | 29 | XCTAssertEqual(companyCopy.name, company.name) 30 | XCTAssertEqual(companyCopy.country, expectedCompanyCountry) 31 | } 32 | 33 | func testThatOptionalPropertyCanBeChangedToNil() { 34 | let expectedCompanyCountry = Company.noname.country 35 | 36 | let company = Company.apple 37 | var companyCopy = ChangeableWrapper(company) 38 | 39 | companyCopy.country = expectedCompanyCountry 40 | 41 | XCTAssertEqual(companyCopy.name, company.name) 42 | XCTAssertEqual(companyCopy.country, expectedCompanyCountry) 43 | } 44 | 45 | func testThatMultiplePropertiesCanBeChanged() { 46 | let expectedCompanyName = Company.apple.name 47 | let expectedCompanyCountry = Company.apple.country 48 | 49 | let company = Company.noname 50 | var companyCopy = ChangeableWrapper(company) 51 | 52 | companyCopy.name = expectedCompanyName 53 | companyCopy.country = expectedCompanyCountry 54 | 55 | XCTAssertEqual(companyCopy.name, expectedCompanyName) 56 | XCTAssertEqual(companyCopy.country, expectedCompanyCountry) 57 | } 58 | 59 | func testThatNestedPropertyCanBeChanged() { 60 | let expectedCompanyName = Company.apple.name 61 | 62 | let user = User.youngSteve 63 | var userCopy = ChangeableWrapper(user) 64 | 65 | userCopy.company.name = expectedCompanyName 66 | 67 | XCTAssertEqual(userCopy.company.name, expectedCompanyName) 68 | XCTAssertEqual(userCopy.company.country, user.company.country) 69 | 70 | XCTAssertEqual(userCopy.id, user.id) 71 | XCTAssertEqual(userCopy.name, user.name) 72 | XCTAssertEqual(userCopy.age, user.age) 73 | } 74 | 75 | func testThatNestedOptionalPropertyCanBeChangedToValue() { 76 | let expectedCompanyCountry = Company.apple.country 77 | 78 | let user = User.youngSteve 79 | var userCopy = ChangeableWrapper(user) 80 | 81 | userCopy.company.country = expectedCompanyCountry 82 | 83 | XCTAssertEqual(userCopy.company.name, user.company.name) 84 | XCTAssertEqual(userCopy.company.country, expectedCompanyCountry) 85 | 86 | XCTAssertEqual(userCopy.id, user.id) 87 | XCTAssertEqual(userCopy.name, user.name) 88 | XCTAssertEqual(userCopy.age, user.age) 89 | } 90 | 91 | func testThatNestedOptionalPropertyCanBeChangedToNil() { 92 | let expectedCompanyCountry = Company.noname.country 93 | 94 | let user = User.appleSteve 95 | var userCopy = ChangeableWrapper(user) 96 | 97 | userCopy.company.country = expectedCompanyCountry 98 | 99 | XCTAssertEqual(userCopy.company.name, user.company.name) 100 | XCTAssertEqual(userCopy.company.country, expectedCompanyCountry) 101 | 102 | XCTAssertEqual(userCopy.id, user.id) 103 | XCTAssertEqual(userCopy.name, user.name) 104 | XCTAssertEqual(userCopy.age, user.age) 105 | } 106 | 107 | func testThatCopyCanBeEqualToAnotherCopy() { 108 | var lhsUserCopy = ChangeableWrapper(User.youngSteve) 109 | var rhsUserCopy = ChangeableWrapper(User.youngSteve) 110 | 111 | lhsUserCopy.id = 123 112 | rhsUserCopy.id = 123 113 | 114 | XCTAssertEqual(lhsUserCopy, rhsUserCopy) 115 | } 116 | 117 | func testThatCopyCanNotBeEqualToAnotherCopy() { 118 | var lhsUserCopy = ChangeableWrapper(User.appleSteve) 119 | var rhsUserCopy = ChangeableWrapper(User.appleSteve) 120 | 121 | lhsUserCopy.id = 123 122 | rhsUserCopy.id = 456 123 | 124 | XCTAssertNotEqual(lhsUserCopy, rhsUserCopy) 125 | } 126 | 127 | func testThatCopyCanBeHashed() { 128 | var firstUserCopy = ChangeableWrapper(User.nextSteve) 129 | var secondUserCopy = ChangeableWrapper(User.nextSteve) 130 | 131 | firstUserCopy.id = 123 132 | secondUserCopy.id = 123 133 | 134 | let set: Set> = [firstUserCopy, secondUserCopy] 135 | 136 | XCTAssertTrue(set.contains(firstUserCopy)) 137 | XCTAssertTrue(set.contains(secondUserCopy)) 138 | } 139 | 140 | func testThatCopyCanBeGreaterThanAnotherCopy() { 141 | var lhsUserCopy = ChangeableWrapper(User.youngSteve) 142 | var rhsUserCopy = ChangeableWrapper(User.youngSteve) 143 | 144 | lhsUserCopy.age = 46 145 | rhsUserCopy.age = 23 146 | 147 | XCTAssertGreaterThan(lhsUserCopy, rhsUserCopy) 148 | } 149 | 150 | func testThatCopyCanBeLessThanAnotherCopy() { 151 | var lhsUserCopy = ChangeableWrapper(User.youngSteve) 152 | var rhsUserCopy = ChangeableWrapper(User.youngSteve) 153 | 154 | lhsUserCopy.age = 23 155 | rhsUserCopy.age = 46 156 | 157 | XCTAssertLessThan(lhsUserCopy, rhsUserCopy) 158 | } 159 | 160 | func testThatCopyCanBeDecoded() { 161 | let expectedCompany = Company.apple 162 | 163 | let jsonEncoder = JSONEncoder() 164 | let jsonDecoder = JSONDecoder() 165 | 166 | do { 167 | let jsonData = try jsonEncoder.encode(expectedCompany) 168 | let companyCopy = try jsonDecoder.decode(ChangeableWrapper.self, from: jsonData) 169 | 170 | XCTAssertEqual(companyCopy.name, expectedCompany.name) 171 | XCTAssertEqual(companyCopy.country, expectedCompany.country) 172 | } catch { 173 | XCTFail("Test encountered unexpected error: \(error)") 174 | } 175 | } 176 | 177 | @available(iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 3.0, *) 178 | func testThatCopyCanBeEncoded() { 179 | let expectedCompany = Company.next 180 | 181 | var companyCopy = ChangeableWrapper(Company.apple) 182 | 183 | companyCopy.name = expectedCompany.name 184 | companyCopy.country = expectedCompany.country 185 | 186 | let jsonEncoder = JSONEncoder() 187 | 188 | do { 189 | let expectedJSONData = try jsonEncoder.encode(expectedCompany) 190 | let jsonData = try jsonEncoder.encode(companyCopy) 191 | 192 | XCTAssertEqual(jsonData, expectedJSONData) 193 | } catch { 194 | XCTFail("Test encountered unexpected error: \(error)") 195 | } 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /Tests/Extensions/CoreGraphics/CGPointChangingTests.swift: -------------------------------------------------------------------------------- 1 | #if canImport(CoreGraphics) 2 | import CoreGraphics 3 | import XCTest 4 | 5 | @testable import AutoChangeable 6 | 7 | class CGPointChangingTests: XCTestCase { 8 | 9 | func testThatInstanceCanBeCopiedWithoutChanges() { 10 | let expectedPoint = CGPoint(x: 123, y: 456) 11 | let point = expectedPoint 12 | 13 | let newPoint = point.changing { _ in } 14 | 15 | XCTAssertEqual(newPoint, expectedPoint) 16 | } 17 | 18 | func testThatInstanceCanBeCopiedWithChanges() { 19 | let expectedPoint = CGPoint(x: 12, y: 34) 20 | let point = CGPoint(x: 56, y: 34) 21 | 22 | let newPoint = point.changing { newPoint in 23 | newPoint.x = expectedPoint.x 24 | } 25 | 26 | XCTAssertEqual(newPoint, expectedPoint) 27 | } 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Tests/Extensions/CoreGraphics/CGRectChangingTests.swift: -------------------------------------------------------------------------------- 1 | #if canImport(CoreGraphics) 2 | import CoreGraphics 3 | import XCTest 4 | 5 | @testable import AutoChangeable 6 | 7 | class CGRectChangingTests: XCTestCase { 8 | 9 | func testThatInstanceCanBeCopiedWithoutChanges() { 10 | let expectedRect = CGRect( 11 | origin: CGPoint(x: 12, y: 34), 12 | size: CGSize(width: 56, height: 78) 13 | ) 14 | 15 | let rect = expectedRect 16 | 17 | let newRect = rect.changing { _ in } 18 | 19 | XCTAssertEqual(newRect, expectedRect) 20 | } 21 | 22 | func testThatInstanceCanBeCopiedWithChanges() { 23 | let expectedRect = CGRect( 24 | origin: CGPoint(x: 12, y: 34), 25 | size: CGSize(width: 56, height: 78) 26 | ) 27 | 28 | let rect = CGRect( 29 | origin: CGPoint(x: 87, y: 65), 30 | size: CGSize(width: 56, height: 78) 31 | ) 32 | 33 | let newRect = rect.changing { newRect in 34 | newRect.origin = expectedRect.origin 35 | } 36 | 37 | XCTAssertEqual(newRect, expectedRect) 38 | } 39 | 40 | func testThatInstanceCanBeCopiedWithNestedChanges() { 41 | let expectedRect = CGRect( 42 | origin: CGPoint(x: 12, y: 34), 43 | size: CGSize(width: 56, height: 78) 44 | ) 45 | 46 | let rect = CGRect( 47 | origin: CGPoint(x: 87, y: 34), 48 | size: CGSize(width: 56, height: 21) 49 | ) 50 | 51 | let newRect = rect.changing { newRect in 52 | newRect.origin.x = expectedRect.origin.x 53 | newRect.size.height = expectedRect.size.height 54 | } 55 | 56 | XCTAssertEqual(newRect, expectedRect) 57 | } 58 | } 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /Tests/Extensions/CoreGraphics/CGSizeChangingTests.swift: -------------------------------------------------------------------------------- 1 | #if canImport(CoreGraphics) 2 | import CoreGraphics 3 | import XCTest 4 | 5 | @testable import AutoChangeable 6 | 7 | class CGSizeChangingTests: XCTestCase { 8 | 9 | func testThatInstanceCanBeCopiedWithoutChanges() { 10 | let expectedSize = CGSize(width: 123, height: 456) 11 | let size = expectedSize 12 | 13 | let newSize = size.changing { _ in } 14 | 15 | XCTAssertEqual(newSize, expectedSize) 16 | } 17 | 18 | func testThatInstanceCanBeCopiedWithChanges() { 19 | let expectedSize = CGSize(width: 12, height: 34) 20 | let size = CGSize(width: 56, height: 34) 21 | 22 | let newSize = size.changing { newSize in 23 | newSize.width = expectedSize.width 24 | } 25 | 26 | XCTAssertEqual(newSize, expectedSize) 27 | } 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Tests/Extensions/Foundation/ArrayChangingTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import AutoChangeable 4 | 5 | class ArrayChangingTests: XCTestCase { 6 | 7 | func testThatInstanceCanBeCopiedWithoutChanges() { 8 | let expectedCollection = [1, 2, 3] 9 | let collection = expectedCollection 10 | 11 | let newCollection = collection.changing { _ in } 12 | 13 | XCTAssertEqual(newCollection, expectedCollection) 14 | } 15 | 16 | func testThatInstanceCanBeCopiedWithChanges() { 17 | let expectedCollection = [1, 2] 18 | let collection = [4, 5, 6] 19 | 20 | let newCollection = collection.changing { newCollection in 21 | newCollection[0] = expectedCollection[0] 22 | newCollection[1] = expectedCollection[1] 23 | newCollection.remove(at: 2) 24 | } 25 | 26 | XCTAssertEqual(newCollection, expectedCollection) 27 | } 28 | 29 | func testThatInstanceCanBeCopiedWithNestedChanges() { 30 | let expectedCollection: [Company] = [.apple, .next] 31 | let collection: [Company] = [.noname, .next] 32 | 33 | let newCollection = collection.changing { newCollection in 34 | newCollection[changing: 0].name = expectedCollection[0].name 35 | newCollection[changing: 0].country = expectedCollection[0].country 36 | } 37 | 38 | XCTAssertEqual(newCollection, expectedCollection) 39 | } 40 | 41 | func testThatInstanceCanBeCopiedWhenItIsNested() { 42 | struct Foobar: Changeable, Equatable { 43 | let list: [Company] 44 | 45 | init(list: [Company]) { 46 | self.list = list 47 | } 48 | 49 | init(copy: ChangeableWrapper) { 50 | self.init(list: copy.list) 51 | } 52 | } 53 | 54 | let expectedFoobar = Foobar(list: [.apple, .next]) 55 | let foobar = Foobar(list: [.noname, .next]) 56 | 57 | let newFoobar = foobar.changing { newFoobar in 58 | newFoobar.list[changing: 0].name = expectedFoobar.list[0].name 59 | newFoobar.list[changing: 0].country = expectedFoobar.list[0].country 60 | } 61 | 62 | XCTAssertEqual(newFoobar, expectedFoobar) 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Tests/Extensions/Foundation/DictionaryChangingTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import AutoChangeable 4 | 5 | class DictionaryChangingTests: XCTestCase { 6 | 7 | func testThatInstanceCanBeCopiedWithoutChanges() { 8 | let expectedCollection = ["foo": "qwe", "bar": "asd"] 9 | let collection = expectedCollection 10 | 11 | let newCollection = collection.changing { _ in } 12 | 13 | XCTAssertEqual(newCollection, expectedCollection) 14 | } 15 | 16 | func testThatInstanceCanBeCopiedWithChanges() { 17 | let expectedCollection = ["foo": "qwe", "bar": "asd"] 18 | let collection = ["baz": "qwe"] 19 | 20 | let newCollection = collection.changing { newCollection in 21 | newCollection.removeAll() 22 | 23 | expectedCollection.forEach { newCollection[$0.key] = $0.value } 24 | } 25 | 26 | XCTAssertEqual(newCollection, expectedCollection) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Tests/Extensions/Foundation/SetChangingTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import AutoChangeable 4 | 5 | class SetChangingTests: XCTestCase { 6 | 7 | func testThatInstanceCanBeCopiedWithoutChanges() { 8 | let expectedCollection: Set = [1, 2, 3] 9 | let collection = expectedCollection 10 | 11 | let newCollection = collection.changing { _ in } 12 | 13 | XCTAssertEqual(newCollection, expectedCollection) 14 | } 15 | 16 | func testThatInstanceCanBeCopiedWithChanges() { 17 | let expectedCollection: Set = [1, 2] 18 | let collection: Set = [4, 5, 6] 19 | 20 | let newCollection = collection.changing { newCollection in 21 | newCollection.removeAll() 22 | 23 | expectedCollection.forEach { newCollection.insert($0) } 24 | } 25 | 26 | XCTAssertEqual(newCollection, expectedCollection) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Tests/Extensions/UIKit/UIEdgeInsetsChangingTests.swift: -------------------------------------------------------------------------------- 1 | #if canImport(UIKit) 2 | import UIKit 3 | import XCTest 4 | 5 | @testable import AutoChangeable 6 | 7 | class UIEdgeInsetsChangingTests: XCTestCase { 8 | 9 | // MARK: - Instance Methods 10 | 11 | func testThatInstanceCanBeCopiedWithoutChanges() { 12 | let expectedInsets = UIEdgeInsets( 13 | top: 12.0, 14 | left: 34.0, 15 | bottom: 56.0, 16 | right: 78.0 17 | ) 18 | 19 | let insets = expectedInsets 20 | 21 | let newInsets = insets.changing { _ in } 22 | 23 | XCTAssertEqual(newInsets, expectedInsets) 24 | } 25 | 26 | func testThatInstanceCanBeCopiedWithChanges() { 27 | let expectedInsets = UIEdgeInsets( 28 | top: 12.0, 29 | left: 34.0, 30 | bottom: 56.0, 31 | right: 78.0 32 | ) 33 | 34 | let insets = UIEdgeInsets( 35 | top: 87.0, 36 | left: 65.0, 37 | bottom: 43.0, 38 | right: 21.0 39 | ) 40 | 41 | let newInsets = insets.changing { newInsets in 42 | newInsets.top = expectedInsets.top 43 | newInsets.left = expectedInsets.left 44 | newInsets.bottom = expectedInsets.bottom 45 | newInsets.right = expectedInsets.right 46 | } 47 | 48 | XCTAssertEqual(newInsets, expectedInsets) 49 | } 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Tests/Models/Company.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import AutoChangeable 3 | 4 | struct Company: Hashable, Codable { 5 | 6 | // MARK: - Instance Properties 7 | 8 | let name: String 9 | let country: String? 10 | } 11 | 12 | extension Company: Changeable { 13 | 14 | // MARK: - Initializers 15 | 16 | init(copy: ChangeableWrapper) { 17 | self.init( 18 | name: copy.name, 19 | country: copy.country 20 | ) 21 | } 22 | } 23 | 24 | extension Company { 25 | 26 | // MARK: - Type Properties 27 | 28 | static let noname = Company(name: "Noname", country: nil) 29 | static let apple = Company(name: "Apple", country: "USA") 30 | static let next = Company(name: "NeXT", country: "USA") 31 | } 32 | -------------------------------------------------------------------------------- /Tests/Models/User.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import AutoChangeable 3 | 4 | struct User: Hashable, Codable { 5 | 6 | // MARK: - Instance Properties 7 | 8 | let id: Int 9 | let name: String 10 | let age: Int 11 | let company: Company 12 | } 13 | 14 | extension User: Comparable { 15 | 16 | // MARK: - Type Methods 17 | 18 | static func < (lhs: User, rhs: User) -> Bool { 19 | lhs.age < rhs.age 20 | } 21 | } 22 | 23 | extension User: Changeable { 24 | 25 | // MARK: - Initializers 26 | 27 | init(copy: ChangeableWrapper) { 28 | self.init( 29 | id: copy.id, 30 | name: copy.name, 31 | age: copy.age, 32 | company: copy.company 33 | ) 34 | } 35 | } 36 | 37 | extension User { 38 | 39 | // MARK: - Type Properties 40 | 41 | static let youngSteve = User(id: 1, name: "Steve", age: 20, company: .noname) 42 | static let appleSteve = User(id: 1, name: "Steve", age: 21, company: .apple) 43 | static let nextSteve = User(id: 1, name: "Steve", age: 30, company: .next) 44 | } 45 | --------------------------------------------------------------------------------