├── .github ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── publish-to-trunk-workflow.yml │ └── pull-request-workflow.yml ├── .gitignore ├── .ruby-version ├── .travis.yml ├── Example.playground ├── Contents.swift ├── contents.xcplayground └── playground.xcworkspace │ └── contents.xcworkspacedata ├── Example ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── Stateful.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── Pods-DemoApp │ │ ├── Pods-DemoApp-Info.plist │ │ ├── Pods-DemoApp-acknowledgements.markdown │ │ ├── Pods-DemoApp-acknowledgements.plist │ │ ├── Pods-DemoApp-dummy.m │ │ ├── Pods-DemoApp-frameworks.sh │ │ ├── Pods-DemoApp-umbrella.h │ │ ├── Pods-DemoApp.debug.xcconfig │ │ ├── Pods-DemoApp.modulemap │ │ └── Pods-DemoApp.release.xcconfig │ │ └── Stateful │ │ ├── Stateful-Info.plist │ │ ├── Stateful-Unit-UnitTests-Info.plist │ │ ├── Stateful-Unit-UnitTests-frameworks.sh │ │ ├── Stateful-Unit-UnitTests-prefix.pch │ │ ├── Stateful-dummy.m │ │ ├── Stateful-prefix.pch │ │ ├── Stateful-umbrella.h │ │ ├── Stateful.debug.xcconfig │ │ ├── Stateful.modulemap │ │ ├── Stateful.release.xcconfig │ │ ├── Stateful.unit-unittests.debug.xcconfig │ │ └── Stateful.unit-unittests.release.xcconfig ├── Stateful.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── DemoApp.xcscheme ├── Stateful.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Stateful │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── UnitTests.xctestplan │ └── ViewController.swift └── Tests │ └── Info.plist ├── Framework └── Sources │ ├── StateMachine.swift │ └── Transition.swift ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── Package.swift ├── README.md ├── Stateful.podspec ├── Tests └── Sources │ ├── StateMachineTests.swift │ └── TransitionTests.swift └── fastlane ├── Fastfile ├── README.md └── report.xml /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Description 4 | 5 | 6 | ## Motivation and Context 7 | 8 | 9 | 10 | ## How Has This Been Tested? 11 | 12 | 13 | 14 | 15 | ## Screenshots (if appropriate): 16 | 17 | ## Types of changes 18 | 19 | - [ ] Bug fix (non-breaking change which fixes an issue) 20 | - [ ] New feature (non-breaking change which adds functionality) 21 | - [ ] Breaking change (fix or feature that would cause existing functionality to change) 22 | 23 | ## Checklist: 24 | 25 | 26 | - [ ] My code follows the code style of this project. 27 | - [ ] My change requires a change to the documentation. 28 | - [ ] I have updated the documentation accordingly. 29 | -------------------------------------------------------------------------------- /.github/workflows/publish-to-trunk-workflow.yml: -------------------------------------------------------------------------------- 1 | name: Publish to Trunk 2 | on: 3 | push: 4 | tags: 5 | - '*' 6 | jobs: 7 | build: 8 | runs-on: macOS-latest 9 | steps: 10 | - uses: actions/checkout@v1 11 | - name: Install Cocoapods 12 | run: gem install cocoapods 13 | - name: Deploy to Cocoapods 14 | run: | 15 | set -eo pipefail 16 | export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) 17 | pod lib lint --allow-warnings 18 | pod trunk push --allow-warnings 19 | env: 20 | COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} 21 | -------------------------------------------------------------------------------- /.github/workflows/pull-request-workflow.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request Workflow 2 | on: [pull_request] 3 | jobs: 4 | run-tests: 5 | runs-on: macOS-latest 6 | timeout-minutes: 15 7 | steps: 8 | - name: Cancel previous jobs 9 | uses: styfle/cancel-workflow-action@0.6.0 10 | with: 11 | access_token: ${{ github.token }} 12 | - name: Git checkout 13 | uses: actions/checkout@v2.3.4 14 | with: 15 | fetch-depth: 0 16 | ref: ${{ github.ref }} 17 | - name: Setup Xcode 18 | uses: maxim-lobanov/setup-xcode@v1 19 | with: 20 | xcode-version: latest-stable 21 | - name: Setup ruby and bundler dependencies 22 | uses: ruby/setup-ruby@v1.81.0 23 | with: 24 | bundler-cache: true 25 | - name: Run pod install 26 | run: | 27 | set -eo pipefail 28 | export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) 29 | bundle exec pod install --project-directory=Example 30 | - name: Run tests (CocoaPods) 31 | run: bundle exec fastlane unit_tests_cocoapods device:'iPhone 11' 32 | - name: Validate lib 33 | run: | 34 | set -eo pipefail 35 | export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) 36 | bundle exec pod lib lint --allow-warnings 37 | - name: Run tests (SPM) 38 | run: bundle exec fastlane unit_tests_spm device:'iPhone 11' 39 | 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | 39 | .swiftpm 40 | fastlane/test_output 41 | derived_data/ 42 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.0.2 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | # * https://docs.travis-ci.com/user/languages/objective-c/ 5 | 6 | rvm: 7 | - 2.6.3 8 | 9 | osx_image: xcode10.2 10 | language: swift 11 | 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/Stateful.xcworkspace -scheme Stateful-Example ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,OS=12.2,name=iPhone X' 14 | - bundle exec pod lib lint --allow-warnings 15 | -------------------------------------------------------------------------------- /Example.playground/Contents.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import PlaygroundSupport 3 | import Stateful 4 | 5 | class StateMachineExamples { 6 | 7 | typealias TransitionDefault = Transition 8 | typealias StateMachineDefault = StateMachine 9 | 10 | enum EventType { 11 | case start 12 | case stop 13 | case execute 14 | case complete 15 | } 16 | 17 | enum StateType { 18 | case idle 19 | case started 20 | case running 21 | case completed 22 | } 23 | 24 | func runSampleStateMachine() { 25 | 26 | let dispatchQueue = DispatchQueue(label: "com.albertodebortoli.someSerialCallbackQueue") 27 | let stateMachine = StateMachineDefault(initialState: .idle, 28 | callbackQueue: dispatchQueue) 29 | stateMachine.enableLogging = true 30 | 31 | let t1 = TransitionDefault(with: .start, 32 | from: .idle, 33 | to: .started, 34 | preBlock: { 35 | print("Going to move from \(StateType.idle) to \(StateType.started)!") 36 | }, postBlock: { 37 | print("Just moved from \(StateType.idle) to \(StateType.started)!") 38 | }) 39 | 40 | let t2 = TransitionDefault(with: .stop, 41 | from: .started, 42 | to: .idle, 43 | preBlock: { 44 | print("Going to move from \(StateType.started) to Idle!") 45 | }, postBlock: { 46 | print("Just moved from \(StateType.started) to \(StateType.idle)!") 47 | }) 48 | 49 | let t3 = TransitionDefault(with: .execute, 50 | from: .started, 51 | to: .running, 52 | preBlock: { 53 | print("Going to move from \(StateType.started) to \(StateType.running)!") 54 | }, postBlock: { 55 | print("Just moved from \(StateType.started) to \(StateType.running)!") 56 | }) 57 | 58 | let t4 = TransitionDefault(with: .stop, 59 | from: .running, 60 | to: .idle, 61 | preBlock: { 62 | print("Going to move from \(StateType.running) to \(StateType.idle)!") 63 | }, postBlock: { 64 | print("Just moved from \(StateType.running) to \(StateType.idle)!") 65 | }) 66 | 67 | let t5 = TransitionDefault(with: .complete, 68 | from: .running, 69 | to: .completed, 70 | preBlock: { 71 | print("Going to move from \(StateType.running) to \(StateType.completed)!") 72 | }, postBlock: { 73 | print("Just moved from \(StateType.running) to \(StateType.completed)!") 74 | }) 75 | 76 | stateMachine.add(transition: t1) 77 | stateMachine.add(transition: t2) 78 | stateMachine.add(transition: t3) 79 | stateMachine.add(transition: t4) 80 | stateMachine.add(transition: t5) 81 | 82 | let callback: TransitionBlock = { result in 83 | switch result { 84 | case .success: 85 | print("Event 'start' was processed") 86 | case .failure: 87 | print("Event 'start' cannot currently be processed.") 88 | } 89 | } 90 | 91 | stateMachine.process(event: .start, callback: callback) 92 | stateMachine.process(event: .start, callback: callback) 93 | stateMachine.process(event: .stop) 94 | stateMachine.process(event: .start) 95 | stateMachine.process(event: .stop) 96 | stateMachine.process(event: .start) 97 | stateMachine.process(event: .execute) 98 | stateMachine.process(event: .start) 99 | stateMachine.process(event: .stop) 100 | stateMachine.process(event: .start) 101 | stateMachine.process(event: .execute) 102 | stateMachine.process(event: .complete) 103 | stateMachine.process(event: .start) 104 | stateMachine.process(event: .stop) 105 | } 106 | } 107 | 108 | StateMachineExamples().runSampleStateMachine() 109 | -------------------------------------------------------------------------------- /Example.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Example.playground/playground.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://cdn.cocoapods.org/' 2 | 3 | use_frameworks! 4 | 5 | target 'DemoApp' do 6 | platform :ios, 13.0 7 | 8 | pod 'Stateful', :path => '../', :testspecs => ['UnitTests'] 9 | 10 | end 11 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Stateful (2.2.0) 3 | - Stateful/UnitTests (2.2.0) 4 | 5 | DEPENDENCIES: 6 | - Stateful (from `../`) 7 | - Stateful/UnitTests (from `../`) 8 | 9 | EXTERNAL SOURCES: 10 | Stateful: 11 | :path: "../" 12 | 13 | SPEC CHECKSUMS: 14 | Stateful: b62cfa2af17eaf1d00dc53e8cf24f67dab5e4b56 15 | 16 | PODFILE CHECKSUM: 2164c77a0c7226aa8ad3bb61c61bd2c3cf0b4bda 17 | 18 | COCOAPODS: 1.11.3 19 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/Stateful.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Stateful", 3 | "version": "2.2.0", 4 | "summary": "The easiest state machine in Swift", 5 | "description": "A minimalistic, thread-safe, non-boilerplate and super easy to use state machine in Swift.", 6 | "homepage": "https://github.com/albertodebortoli/Stateful", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "Alberto De Bortoli": "albertodebortoli.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/albertodebortoli/Stateful.git", 16 | "tag": "2.2.0" 17 | }, 18 | "social_media_url": "https://twitter.com/albertodebo", 19 | "platforms": { 20 | "ios": "13.0" 21 | }, 22 | "swift_versions": "5.0", 23 | "source_files": "Framework/Sources/**/*.swift", 24 | "frameworks": "Foundation", 25 | "testspecs": [ 26 | { 27 | "name": "UnitTests", 28 | "test_type": "unit", 29 | "source_files": "Tests/Sources/**/*.swift" 30 | } 31 | ], 32 | "swift_version": "5.0" 33 | } 34 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Stateful (2.2.0) 3 | - Stateful/UnitTests (2.2.0) 4 | 5 | DEPENDENCIES: 6 | - Stateful (from `../`) 7 | - Stateful/UnitTests (from `../`) 8 | 9 | EXTERNAL SOURCES: 10 | Stateful: 11 | :path: "../" 12 | 13 | SPEC CHECKSUMS: 14 | Stateful: b62cfa2af17eaf1d00dc53e8cf24f67dab5e4b56 15 | 16 | PODFILE CHECKSUM: 2164c77a0c7226aa8ad3bb61c61bd2c3cf0b4bda 17 | 18 | COCOAPODS: 1.11.3 19 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 04865E7A5A928C969EB03DFE1496316B /* Transition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ADCA840B3D9C143088CAE1C21553C99 /* Transition.swift */; }; 11 | 127D4ECDEFA75D4171A48DAE85EB8822 /* Pods-DemoApp-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 699A7073FA37A911ADA3E1967F70BE98 /* Pods-DemoApp-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 38857701E2C20D62F2DC92C90594349A /* StateMachine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06E469554252AFA4D4008C671598577D /* StateMachine.swift */; }; 13 | 768A48B1E7BFB2C9E5097393839C70CA /* TransitionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B5BE2424F794A933273393F351EA9EC /* TransitionTests.swift */; }; 14 | 9FFC29785257FE21607754BBBDFEAF42 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; 15 | A9A96DC55F0DE7CE101DBCD7A544914F /* Pods-DemoApp-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 77AA908D121ABF1F446FF239741E14A5 /* Pods-DemoApp-dummy.m */; }; 16 | B32A84AE1BB9C25C3AFB203A036B0222 /* StateMachineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59EF1ECD227B0BA81CCD5F9B3D446C26 /* StateMachineTests.swift */; }; 17 | B5BB48E303D3CA97828C857016938D33 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; 18 | DB68BDA88CB215AB4B0631B93CAC3FD7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; 19 | F40BA4FD29305EB055F81B8121F8892D /* Stateful-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E89A55749287A01367A5884FB3A2426 /* Stateful-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 20 | FD57068B27FF91D243038A6C831C857C /* Stateful-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 53656A91EAA43CFED94E5BCAFC07BFD6 /* Stateful-dummy.m */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 550C2A718AC9EDDF4103649F4D1A223C /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 576CDFDCACFD9BB02F4DF6E35C530CC7; 29 | remoteInfo = Stateful; 30 | }; 31 | A5F85EE15518E789D48B0F4ADC5B98CD /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 576CDFDCACFD9BB02F4DF6E35C530CC7; 36 | remoteInfo = Stateful; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 00D3DCF88F9FFF8A2E8E83B69D196DE3 /* Stateful.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Stateful.release.xcconfig; sourceTree = ""; }; 42 | 06E469554252AFA4D4008C671598577D /* StateMachine.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StateMachine.swift; path = Framework/Sources/StateMachine.swift; sourceTree = ""; }; 43 | 1ADCA840B3D9C143088CAE1C21553C99 /* Transition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Transition.swift; path = Framework/Sources/Transition.swift; sourceTree = ""; }; 44 | 22B064629CAE40CF72499DD6D67646C1 /* Pods-DemoApp-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DemoApp-acknowledgements.markdown"; sourceTree = ""; }; 45 | 2E0DA2873CD8A3E6EEF8508B2AF20BA0 /* Stateful.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Stateful.modulemap; sourceTree = ""; }; 46 | 3B14E4C69FA39A46F04CD38F21CCCA3C /* Stateful-Unit-UnitTests */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "Stateful-Unit-UnitTests"; path = "Stateful-Unit-UnitTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 3E89A55749287A01367A5884FB3A2426 /* Stateful-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Stateful-umbrella.h"; sourceTree = ""; }; 48 | 4FE3A8914DCE32ADB404396D24D8F340 /* Pods-DemoApp */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-DemoApp"; path = Pods_DemoApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 5339D612696FC6C768DF487679645853 /* Stateful-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Stateful-prefix.pch"; sourceTree = ""; }; 50 | 53656A91EAA43CFED94E5BCAFC07BFD6 /* Stateful-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Stateful-dummy.m"; sourceTree = ""; }; 51 | 59EF1ECD227B0BA81CCD5F9B3D446C26 /* StateMachineTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StateMachineTests.swift; path = Tests/Sources/StateMachineTests.swift; sourceTree = ""; }; 52 | 64F7736E91647FB1D500612961266F46 /* Pods-DemoApp.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-DemoApp.modulemap"; sourceTree = ""; }; 53 | 699A7073FA37A911ADA3E1967F70BE98 /* Pods-DemoApp-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-DemoApp-umbrella.h"; sourceTree = ""; }; 54 | 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 55 | 77AA908D121ABF1F446FF239741E14A5 /* Pods-DemoApp-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DemoApp-dummy.m"; sourceTree = ""; }; 56 | 7A760A6669D8E0DCFFF794938B0DA2AE /* Stateful.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Stateful.debug.xcconfig; sourceTree = ""; }; 57 | 7B5BE2424F794A933273393F351EA9EC /* TransitionTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransitionTests.swift; path = Tests/Sources/TransitionTests.swift; sourceTree = ""; }; 58 | 7EF8A05838CA951D0326865B6DE09C63 /* Stateful-Unit-UnitTests-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Stateful-Unit-UnitTests-prefix.pch"; sourceTree = ""; }; 59 | 8797808B23708215C054EEAE9FBCB5BE /* Stateful-Unit-UnitTests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Stateful-Unit-UnitTests-Info.plist"; sourceTree = ""; }; 60 | 89EA5AAA1FCCBC5C1D0F90FF865B7518 /* Stateful.unit-unittests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Stateful.unit-unittests.debug.xcconfig"; sourceTree = ""; }; 61 | 946B1D3001B616EC334839A46A26A4D3 /* Pods-DemoApp-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoApp-frameworks.sh"; sourceTree = ""; }; 62 | 96D77C110492176AD33CEDA3985BCF69 /* Stateful.unit-unittests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Stateful.unit-unittests.release.xcconfig"; sourceTree = ""; }; 63 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 64 | A41D60470BFE3915CC345DE5CCF8BC67 /* Pods-DemoApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoApp.release.xcconfig"; sourceTree = ""; }; 65 | C02174662E98E0728B0CE753001E1723 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; 66 | C3CB5CC796F6A53577ADB97FD22E398D /* Pods-DemoApp-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DemoApp-acknowledgements.plist"; sourceTree = ""; }; 67 | CE3CFD745EE9E1A959D5385E1CC31595 /* Stateful.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = Stateful.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 68 | E048771A21D9FAD1B534C47041291E5C /* Stateful-Unit-UnitTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Stateful-Unit-UnitTests-frameworks.sh"; sourceTree = ""; }; 69 | E29370E385DA63D6CAFB58EECFC6BFBB /* Pods-DemoApp-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DemoApp-Info.plist"; sourceTree = ""; }; 70 | E315027EF4AC86DFD061EEBD5772E16A /* Stateful */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Stateful; path = Stateful.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 71 | E347E49A40BE2E413370E30CCBE8BD1F /* Stateful-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Stateful-Info.plist"; sourceTree = ""; }; 72 | E604BEE3D7EE8204E2EA307754FDE881 /* Pods-DemoApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoApp.debug.xcconfig"; sourceTree = ""; }; 73 | FDDDAD8526049EC0A9A64ECB3CE543E7 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; 74 | /* End PBXFileReference section */ 75 | 76 | /* Begin PBXFrameworksBuildPhase section */ 77 | 0AD5AACE8E9D614F9565836CD2AAF369 /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | 9FFC29785257FE21607754BBBDFEAF42 /* Foundation.framework in Frameworks */, 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | 5D8F786AAD0816C537E2BCD115D2A02A /* Frameworks */ = { 86 | isa = PBXFrameworksBuildPhase; 87 | buildActionMask = 2147483647; 88 | files = ( 89 | DB68BDA88CB215AB4B0631B93CAC3FD7 /* Foundation.framework in Frameworks */, 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | 7BFDF95F792224F094946C98C4A27201 /* Frameworks */ = { 94 | isa = PBXFrameworksBuildPhase; 95 | buildActionMask = 2147483647; 96 | files = ( 97 | B5BB48E303D3CA97828C857016938D33 /* Foundation.framework in Frameworks */, 98 | ); 99 | runOnlyForDeploymentPostprocessing = 0; 100 | }; 101 | /* End PBXFrameworksBuildPhase section */ 102 | 103 | /* Begin PBXGroup section */ 104 | 0F39B3F10E74D098903E998DCCB46169 /* Stateful */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 06E469554252AFA4D4008C671598577D /* StateMachine.swift */, 108 | 1ADCA840B3D9C143088CAE1C21553C99 /* Transition.swift */, 109 | 8354AC54C2FB9C47BDA10AB8CAFE343E /* Pod */, 110 | 44A5D3AAD5AAA7622315422D48F61CDD /* Support Files */, 111 | 2921A9CEFE81C7328D94538436FB1A1C /* UnitTests */, 112 | ); 113 | name = Stateful; 114 | path = ../..; 115 | sourceTree = ""; 116 | }; 117 | 2921A9CEFE81C7328D94538436FB1A1C /* UnitTests */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 59EF1ECD227B0BA81CCD5F9B3D446C26 /* StateMachineTests.swift */, 121 | 7B5BE2424F794A933273393F351EA9EC /* TransitionTests.swift */, 122 | ); 123 | name = UnitTests; 124 | sourceTree = ""; 125 | }; 126 | 44A5D3AAD5AAA7622315422D48F61CDD /* Support Files */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 2E0DA2873CD8A3E6EEF8508B2AF20BA0 /* Stateful.modulemap */, 130 | 53656A91EAA43CFED94E5BCAFC07BFD6 /* Stateful-dummy.m */, 131 | E347E49A40BE2E413370E30CCBE8BD1F /* Stateful-Info.plist */, 132 | 5339D612696FC6C768DF487679645853 /* Stateful-prefix.pch */, 133 | 3E89A55749287A01367A5884FB3A2426 /* Stateful-umbrella.h */, 134 | E048771A21D9FAD1B534C47041291E5C /* Stateful-Unit-UnitTests-frameworks.sh */, 135 | 8797808B23708215C054EEAE9FBCB5BE /* Stateful-Unit-UnitTests-Info.plist */, 136 | 7EF8A05838CA951D0326865B6DE09C63 /* Stateful-Unit-UnitTests-prefix.pch */, 137 | 7A760A6669D8E0DCFFF794938B0DA2AE /* Stateful.debug.xcconfig */, 138 | 00D3DCF88F9FFF8A2E8E83B69D196DE3 /* Stateful.release.xcconfig */, 139 | 89EA5AAA1FCCBC5C1D0F90FF865B7518 /* Stateful.unit-unittests.debug.xcconfig */, 140 | 96D77C110492176AD33CEDA3985BCF69 /* Stateful.unit-unittests.release.xcconfig */, 141 | ); 142 | name = "Support Files"; 143 | path = "Example/Pods/Target Support Files/Stateful"; 144 | sourceTree = ""; 145 | }; 146 | 4DF636EA3CB042B100D265CBAEE9CA83 /* Pods-DemoApp */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 64F7736E91647FB1D500612961266F46 /* Pods-DemoApp.modulemap */, 150 | 22B064629CAE40CF72499DD6D67646C1 /* Pods-DemoApp-acknowledgements.markdown */, 151 | C3CB5CC796F6A53577ADB97FD22E398D /* Pods-DemoApp-acknowledgements.plist */, 152 | 77AA908D121ABF1F446FF239741E14A5 /* Pods-DemoApp-dummy.m */, 153 | 946B1D3001B616EC334839A46A26A4D3 /* Pods-DemoApp-frameworks.sh */, 154 | E29370E385DA63D6CAFB58EECFC6BFBB /* Pods-DemoApp-Info.plist */, 155 | 699A7073FA37A911ADA3E1967F70BE98 /* Pods-DemoApp-umbrella.h */, 156 | E604BEE3D7EE8204E2EA307754FDE881 /* Pods-DemoApp.debug.xcconfig */, 157 | A41D60470BFE3915CC345DE5CCF8BC67 /* Pods-DemoApp.release.xcconfig */, 158 | ); 159 | name = "Pods-DemoApp"; 160 | path = "Target Support Files/Pods-DemoApp"; 161 | sourceTree = ""; 162 | }; 163 | 578452D2E740E91742655AC8F1636D1F /* iOS */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */, 167 | ); 168 | name = iOS; 169 | sourceTree = ""; 170 | }; 171 | 8354AC54C2FB9C47BDA10AB8CAFE343E /* Pod */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | FDDDAD8526049EC0A9A64ECB3CE543E7 /* LICENSE */, 175 | C02174662E98E0728B0CE753001E1723 /* README.md */, 176 | CE3CFD745EE9E1A959D5385E1CC31595 /* Stateful.podspec */, 177 | ); 178 | name = Pod; 179 | sourceTree = ""; 180 | }; 181 | C8925A89FCC6A7A7E3FC80329E7EED75 /* Targets Support Files */ = { 182 | isa = PBXGroup; 183 | children = ( 184 | 4DF636EA3CB042B100D265CBAEE9CA83 /* Pods-DemoApp */, 185 | ); 186 | name = "Targets Support Files"; 187 | sourceTree = ""; 188 | }; 189 | CF1408CF629C7361332E53B88F7BD30C = { 190 | isa = PBXGroup; 191 | children = ( 192 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 193 | DB4FAAE3C2E2E85F13510B30A1754186 /* Development Pods */, 194 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, 195 | F462956FE234C2B18CA66D810DD03A1A /* Products */, 196 | C8925A89FCC6A7A7E3FC80329E7EED75 /* Targets Support Files */, 197 | ); 198 | sourceTree = ""; 199 | }; 200 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | 578452D2E740E91742655AC8F1636D1F /* iOS */, 204 | ); 205 | name = Frameworks; 206 | sourceTree = ""; 207 | }; 208 | DB4FAAE3C2E2E85F13510B30A1754186 /* Development Pods */ = { 209 | isa = PBXGroup; 210 | children = ( 211 | 0F39B3F10E74D098903E998DCCB46169 /* Stateful */, 212 | ); 213 | name = "Development Pods"; 214 | sourceTree = ""; 215 | }; 216 | F462956FE234C2B18CA66D810DD03A1A /* Products */ = { 217 | isa = PBXGroup; 218 | children = ( 219 | 4FE3A8914DCE32ADB404396D24D8F340 /* Pods-DemoApp */, 220 | E315027EF4AC86DFD061EEBD5772E16A /* Stateful */, 221 | 3B14E4C69FA39A46F04CD38F21CCCA3C /* Stateful-Unit-UnitTests */, 222 | ); 223 | name = Products; 224 | sourceTree = ""; 225 | }; 226 | /* End PBXGroup section */ 227 | 228 | /* Begin PBXHeadersBuildPhase section */ 229 | B1D9AB59900983254CE034330D7FBB25 /* Headers */ = { 230 | isa = PBXHeadersBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | 127D4ECDEFA75D4171A48DAE85EB8822 /* Pods-DemoApp-umbrella.h in Headers */, 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | }; 237 | DEBC87C1922A35E44FD58232C341410A /* Headers */ = { 238 | isa = PBXHeadersBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | F40BA4FD29305EB055F81B8121F8892D /* Stateful-umbrella.h in Headers */, 242 | ); 243 | runOnlyForDeploymentPostprocessing = 0; 244 | }; 245 | /* End PBXHeadersBuildPhase section */ 246 | 247 | /* Begin PBXNativeTarget section */ 248 | 1BC258032FFF5C240A561B274C5D07F4 /* Pods-DemoApp */ = { 249 | isa = PBXNativeTarget; 250 | buildConfigurationList = 734ED9F5DD68D5B9B43184549BA370AA /* Build configuration list for PBXNativeTarget "Pods-DemoApp" */; 251 | buildPhases = ( 252 | B1D9AB59900983254CE034330D7FBB25 /* Headers */, 253 | 152C2D483260AC5CFD5461D8130A552D /* Sources */, 254 | 7BFDF95F792224F094946C98C4A27201 /* Frameworks */, 255 | D9177F77642198AFE0490E1F447EF9F0 /* Resources */, 256 | ); 257 | buildRules = ( 258 | ); 259 | dependencies = ( 260 | 826B7B054310DA8BC189F39C13AD6379 /* PBXTargetDependency */, 261 | ); 262 | name = "Pods-DemoApp"; 263 | productName = Pods_DemoApp; 264 | productReference = 4FE3A8914DCE32ADB404396D24D8F340 /* Pods-DemoApp */; 265 | productType = "com.apple.product-type.framework"; 266 | }; 267 | 34FAD9AACC181DDC49782F1AA25A26E9 /* Stateful-Unit-UnitTests */ = { 268 | isa = PBXNativeTarget; 269 | buildConfigurationList = 25415B3D8BC317EBC5AA36218FE92258 /* Build configuration list for PBXNativeTarget "Stateful-Unit-UnitTests" */; 270 | buildPhases = ( 271 | 53482BCC828984BF6247BBA5EB9C68BE /* Sources */, 272 | 5D8F786AAD0816C537E2BCD115D2A02A /* Frameworks */, 273 | 12A98DE195AA2C6987082B42FC27431F /* Resources */, 274 | 905457AD5D49327A583B1E8E55920FD0 /* [CP] Embed Pods Frameworks */, 275 | ); 276 | buildRules = ( 277 | ); 278 | dependencies = ( 279 | A044B68F5CA377114324AFE2352DD581 /* PBXTargetDependency */, 280 | ); 281 | name = "Stateful-Unit-UnitTests"; 282 | productName = "Stateful-Unit-UnitTests"; 283 | productReference = 3B14E4C69FA39A46F04CD38F21CCCA3C /* Stateful-Unit-UnitTests */; 284 | productType = "com.apple.product-type.bundle.unit-test"; 285 | }; 286 | 576CDFDCACFD9BB02F4DF6E35C530CC7 /* Stateful */ = { 287 | isa = PBXNativeTarget; 288 | buildConfigurationList = 232599C1E454FD9C0324B562AD8AF185 /* Build configuration list for PBXNativeTarget "Stateful" */; 289 | buildPhases = ( 290 | DEBC87C1922A35E44FD58232C341410A /* Headers */, 291 | F724ACE805D9AFA9849A7D15C137F1C2 /* Sources */, 292 | 0AD5AACE8E9D614F9565836CD2AAF369 /* Frameworks */, 293 | 254C927F0CB8A820659D170780CF5E70 /* Resources */, 294 | ); 295 | buildRules = ( 296 | ); 297 | dependencies = ( 298 | ); 299 | name = Stateful; 300 | productName = Stateful; 301 | productReference = E315027EF4AC86DFD061EEBD5772E16A /* Stateful */; 302 | productType = "com.apple.product-type.framework"; 303 | }; 304 | /* End PBXNativeTarget section */ 305 | 306 | /* Begin PBXProject section */ 307 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = { 308 | isa = PBXProject; 309 | attributes = { 310 | LastSwiftUpdateCheck = 1240; 311 | LastUpgradeCheck = 1240; 312 | }; 313 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; 314 | compatibilityVersion = "Xcode 3.2"; 315 | developmentRegion = en; 316 | hasScannedForEncodings = 0; 317 | knownRegions = ( 318 | Base, 319 | en, 320 | ); 321 | mainGroup = CF1408CF629C7361332E53B88F7BD30C; 322 | productRefGroup = F462956FE234C2B18CA66D810DD03A1A /* Products */; 323 | projectDirPath = ""; 324 | projectRoot = ""; 325 | targets = ( 326 | 1BC258032FFF5C240A561B274C5D07F4 /* Pods-DemoApp */, 327 | 576CDFDCACFD9BB02F4DF6E35C530CC7 /* Stateful */, 328 | 34FAD9AACC181DDC49782F1AA25A26E9 /* Stateful-Unit-UnitTests */, 329 | ); 330 | }; 331 | /* End PBXProject section */ 332 | 333 | /* Begin PBXResourcesBuildPhase section */ 334 | 12A98DE195AA2C6987082B42FC27431F /* Resources */ = { 335 | isa = PBXResourcesBuildPhase; 336 | buildActionMask = 2147483647; 337 | files = ( 338 | ); 339 | runOnlyForDeploymentPostprocessing = 0; 340 | }; 341 | 254C927F0CB8A820659D170780CF5E70 /* Resources */ = { 342 | isa = PBXResourcesBuildPhase; 343 | buildActionMask = 2147483647; 344 | files = ( 345 | ); 346 | runOnlyForDeploymentPostprocessing = 0; 347 | }; 348 | D9177F77642198AFE0490E1F447EF9F0 /* Resources */ = { 349 | isa = PBXResourcesBuildPhase; 350 | buildActionMask = 2147483647; 351 | files = ( 352 | ); 353 | runOnlyForDeploymentPostprocessing = 0; 354 | }; 355 | /* End PBXResourcesBuildPhase section */ 356 | 357 | /* Begin PBXShellScriptBuildPhase section */ 358 | 905457AD5D49327A583B1E8E55920FD0 /* [CP] Embed Pods Frameworks */ = { 359 | isa = PBXShellScriptBuildPhase; 360 | buildActionMask = 2147483647; 361 | files = ( 362 | ); 363 | inputPaths = ( 364 | "${PODS_ROOT}/Target Support Files/Stateful/Stateful-Unit-UnitTests-frameworks.sh", 365 | "${BUILT_PRODUCTS_DIR}/Stateful/Stateful.framework", 366 | ); 367 | name = "[CP] Embed Pods Frameworks"; 368 | outputPaths = ( 369 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Stateful.framework", 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | shellPath = /bin/sh; 373 | shellScript = "\"${PODS_ROOT}/Target Support Files/Stateful/Stateful-Unit-UnitTests-frameworks.sh\"\n"; 374 | showEnvVarsInLog = 0; 375 | }; 376 | /* End PBXShellScriptBuildPhase section */ 377 | 378 | /* Begin PBXSourcesBuildPhase section */ 379 | 152C2D483260AC5CFD5461D8130A552D /* Sources */ = { 380 | isa = PBXSourcesBuildPhase; 381 | buildActionMask = 2147483647; 382 | files = ( 383 | A9A96DC55F0DE7CE101DBCD7A544914F /* Pods-DemoApp-dummy.m in Sources */, 384 | ); 385 | runOnlyForDeploymentPostprocessing = 0; 386 | }; 387 | 53482BCC828984BF6247BBA5EB9C68BE /* Sources */ = { 388 | isa = PBXSourcesBuildPhase; 389 | buildActionMask = 2147483647; 390 | files = ( 391 | B32A84AE1BB9C25C3AFB203A036B0222 /* StateMachineTests.swift in Sources */, 392 | 768A48B1E7BFB2C9E5097393839C70CA /* TransitionTests.swift in Sources */, 393 | ); 394 | runOnlyForDeploymentPostprocessing = 0; 395 | }; 396 | F724ACE805D9AFA9849A7D15C137F1C2 /* Sources */ = { 397 | isa = PBXSourcesBuildPhase; 398 | buildActionMask = 2147483647; 399 | files = ( 400 | FD57068B27FF91D243038A6C831C857C /* Stateful-dummy.m in Sources */, 401 | 38857701E2C20D62F2DC92C90594349A /* StateMachine.swift in Sources */, 402 | 04865E7A5A928C969EB03DFE1496316B /* Transition.swift in Sources */, 403 | ); 404 | runOnlyForDeploymentPostprocessing = 0; 405 | }; 406 | /* End PBXSourcesBuildPhase section */ 407 | 408 | /* Begin PBXTargetDependency section */ 409 | 826B7B054310DA8BC189F39C13AD6379 /* PBXTargetDependency */ = { 410 | isa = PBXTargetDependency; 411 | name = Stateful; 412 | target = 576CDFDCACFD9BB02F4DF6E35C530CC7 /* Stateful */; 413 | targetProxy = 550C2A718AC9EDDF4103649F4D1A223C /* PBXContainerItemProxy */; 414 | }; 415 | A044B68F5CA377114324AFE2352DD581 /* PBXTargetDependency */ = { 416 | isa = PBXTargetDependency; 417 | name = Stateful; 418 | target = 576CDFDCACFD9BB02F4DF6E35C530CC7 /* Stateful */; 419 | targetProxy = A5F85EE15518E789D48B0F4ADC5B98CD /* PBXContainerItemProxy */; 420 | }; 421 | /* End PBXTargetDependency section */ 422 | 423 | /* Begin XCBuildConfiguration section */ 424 | 11B1C7E57CDA57B25884267E6EF04A54 /* Release */ = { 425 | isa = XCBuildConfiguration; 426 | baseConfigurationReference = A41D60470BFE3915CC345DE5CCF8BC67 /* Pods-DemoApp.release.xcconfig */; 427 | buildSettings = { 428 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 429 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 430 | CLANG_ENABLE_OBJC_WEAK = NO; 431 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 432 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 433 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 434 | CURRENT_PROJECT_VERSION = 1; 435 | DEFINES_MODULE = YES; 436 | DYLIB_COMPATIBILITY_VERSION = 1; 437 | DYLIB_CURRENT_VERSION = 1; 438 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 439 | INFOPLIST_FILE = "Target Support Files/Pods-DemoApp/Pods-DemoApp-Info.plist"; 440 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 441 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 442 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 443 | MACH_O_TYPE = staticlib; 444 | MODULEMAP_FILE = "Target Support Files/Pods-DemoApp/Pods-DemoApp.modulemap"; 445 | OTHER_LDFLAGS = ""; 446 | OTHER_LIBTOOLFLAGS = ""; 447 | PODS_ROOT = "$(SRCROOT)"; 448 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 449 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 450 | SDKROOT = iphoneos; 451 | SKIP_INSTALL = YES; 452 | TARGETED_DEVICE_FAMILY = "1,2"; 453 | VALIDATE_PRODUCT = YES; 454 | VERSIONING_SYSTEM = "apple-generic"; 455 | VERSION_INFO_PREFIX = ""; 456 | }; 457 | name = Release; 458 | }; 459 | 26FECC810B49B38C63EE5AEBD100EC4D /* Debug */ = { 460 | isa = XCBuildConfiguration; 461 | baseConfigurationReference = 89EA5AAA1FCCBC5C1D0F90FF865B7518 /* Stateful.unit-unittests.debug.xcconfig */; 462 | buildSettings = { 463 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 464 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 465 | CLANG_ENABLE_OBJC_WEAK = NO; 466 | CODE_SIGNING_ALLOWED = YES; 467 | CODE_SIGNING_REQUIRED = YES; 468 | CODE_SIGN_IDENTITY = "iPhone Developer"; 469 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 470 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 471 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 472 | GCC_PREFIX_HEADER = "Target Support Files/Stateful/Stateful-Unit-UnitTests-prefix.pch"; 473 | INFOPLIST_FILE = "Target Support Files/Stateful/Stateful-Unit-UnitTests-Info.plist"; 474 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 475 | PRODUCT_NAME = "Stateful-Unit-UnitTests"; 476 | SDKROOT = iphoneos; 477 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 478 | SWIFT_VERSION = 5.0; 479 | }; 480 | name = Debug; 481 | }; 482 | 7EB085A25486324B3BB92541145CF394 /* Debug */ = { 483 | isa = XCBuildConfiguration; 484 | baseConfigurationReference = 7A760A6669D8E0DCFFF794938B0DA2AE /* Stateful.debug.xcconfig */; 485 | buildSettings = { 486 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 487 | CLANG_ENABLE_OBJC_WEAK = NO; 488 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 489 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 490 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 491 | CURRENT_PROJECT_VERSION = 1; 492 | DEFINES_MODULE = YES; 493 | DYLIB_COMPATIBILITY_VERSION = 1; 494 | DYLIB_CURRENT_VERSION = 1; 495 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 496 | GCC_PREFIX_HEADER = "Target Support Files/Stateful/Stateful-prefix.pch"; 497 | INFOPLIST_FILE = "Target Support Files/Stateful/Stateful-Info.plist"; 498 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 499 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 500 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 501 | MODULEMAP_FILE = "Target Support Files/Stateful/Stateful.modulemap"; 502 | PRODUCT_MODULE_NAME = Stateful; 503 | PRODUCT_NAME = Stateful; 504 | SDKROOT = iphoneos; 505 | SKIP_INSTALL = YES; 506 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 507 | SWIFT_VERSION = 5.0; 508 | TARGETED_DEVICE_FAMILY = "1,2"; 509 | VERSIONING_SYSTEM = "apple-generic"; 510 | VERSION_INFO_PREFIX = ""; 511 | }; 512 | name = Debug; 513 | }; 514 | 87FCA57FF7A4575EE968CD2D2FFA4F9C /* Release */ = { 515 | isa = XCBuildConfiguration; 516 | baseConfigurationReference = 00D3DCF88F9FFF8A2E8E83B69D196DE3 /* Stateful.release.xcconfig */; 517 | buildSettings = { 518 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 519 | CLANG_ENABLE_OBJC_WEAK = NO; 520 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 521 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 522 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 523 | CURRENT_PROJECT_VERSION = 1; 524 | DEFINES_MODULE = YES; 525 | DYLIB_COMPATIBILITY_VERSION = 1; 526 | DYLIB_CURRENT_VERSION = 1; 527 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 528 | GCC_PREFIX_HEADER = "Target Support Files/Stateful/Stateful-prefix.pch"; 529 | INFOPLIST_FILE = "Target Support Files/Stateful/Stateful-Info.plist"; 530 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 531 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 532 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 533 | MODULEMAP_FILE = "Target Support Files/Stateful/Stateful.modulemap"; 534 | PRODUCT_MODULE_NAME = Stateful; 535 | PRODUCT_NAME = Stateful; 536 | SDKROOT = iphoneos; 537 | SKIP_INSTALL = YES; 538 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 539 | SWIFT_VERSION = 5.0; 540 | TARGETED_DEVICE_FAMILY = "1,2"; 541 | VALIDATE_PRODUCT = YES; 542 | VERSIONING_SYSTEM = "apple-generic"; 543 | VERSION_INFO_PREFIX = ""; 544 | }; 545 | name = Release; 546 | }; 547 | 8DE5143C03248BB6CD542DE3963D6F3A /* Debug */ = { 548 | isa = XCBuildConfiguration; 549 | buildSettings = { 550 | ALWAYS_SEARCH_USER_PATHS = NO; 551 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 552 | CLANG_ANALYZER_NONNULL = YES; 553 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 554 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 555 | CLANG_CXX_LIBRARY = "libc++"; 556 | CLANG_ENABLE_MODULES = YES; 557 | CLANG_ENABLE_OBJC_ARC = YES; 558 | CLANG_ENABLE_OBJC_WEAK = YES; 559 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 560 | CLANG_WARN_BOOL_CONVERSION = YES; 561 | CLANG_WARN_COMMA = YES; 562 | CLANG_WARN_CONSTANT_CONVERSION = YES; 563 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 564 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 565 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 566 | CLANG_WARN_EMPTY_BODY = YES; 567 | CLANG_WARN_ENUM_CONVERSION = YES; 568 | CLANG_WARN_INFINITE_RECURSION = YES; 569 | CLANG_WARN_INT_CONVERSION = YES; 570 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 571 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 572 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 573 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 574 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 575 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 576 | CLANG_WARN_STRICT_PROTOTYPES = YES; 577 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 578 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 579 | CLANG_WARN_UNREACHABLE_CODE = YES; 580 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 581 | COPY_PHASE_STRIP = NO; 582 | DEBUG_INFORMATION_FORMAT = dwarf; 583 | ENABLE_STRICT_OBJC_MSGSEND = YES; 584 | ENABLE_TESTABILITY = YES; 585 | GCC_C_LANGUAGE_STANDARD = gnu11; 586 | GCC_DYNAMIC_NO_PIC = NO; 587 | GCC_NO_COMMON_BLOCKS = YES; 588 | GCC_OPTIMIZATION_LEVEL = 0; 589 | GCC_PREPROCESSOR_DEFINITIONS = ( 590 | "POD_CONFIGURATION_DEBUG=1", 591 | "DEBUG=1", 592 | "$(inherited)", 593 | ); 594 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 595 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 596 | GCC_WARN_UNDECLARED_SELECTOR = YES; 597 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 598 | GCC_WARN_UNUSED_FUNCTION = YES; 599 | GCC_WARN_UNUSED_VARIABLE = YES; 600 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 601 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 602 | MTL_FAST_MATH = YES; 603 | ONLY_ACTIVE_ARCH = YES; 604 | PRODUCT_NAME = "$(TARGET_NAME)"; 605 | STRIP_INSTALLED_PRODUCT = NO; 606 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 607 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 608 | SWIFT_VERSION = 5.0; 609 | SYMROOT = "${SRCROOT}/../build"; 610 | }; 611 | name = Debug; 612 | }; 613 | 9E406C6AAF85E580207CD97B0044DEAB /* Release */ = { 614 | isa = XCBuildConfiguration; 615 | buildSettings = { 616 | ALWAYS_SEARCH_USER_PATHS = NO; 617 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 618 | CLANG_ANALYZER_NONNULL = YES; 619 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 620 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 621 | CLANG_CXX_LIBRARY = "libc++"; 622 | CLANG_ENABLE_MODULES = YES; 623 | CLANG_ENABLE_OBJC_ARC = YES; 624 | CLANG_ENABLE_OBJC_WEAK = YES; 625 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 626 | CLANG_WARN_BOOL_CONVERSION = YES; 627 | CLANG_WARN_COMMA = YES; 628 | CLANG_WARN_CONSTANT_CONVERSION = YES; 629 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 630 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 631 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 632 | CLANG_WARN_EMPTY_BODY = YES; 633 | CLANG_WARN_ENUM_CONVERSION = YES; 634 | CLANG_WARN_INFINITE_RECURSION = YES; 635 | CLANG_WARN_INT_CONVERSION = YES; 636 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 637 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 638 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 639 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 640 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 641 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 642 | CLANG_WARN_STRICT_PROTOTYPES = YES; 643 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 644 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 645 | CLANG_WARN_UNREACHABLE_CODE = YES; 646 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 647 | COPY_PHASE_STRIP = NO; 648 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 649 | ENABLE_NS_ASSERTIONS = NO; 650 | ENABLE_STRICT_OBJC_MSGSEND = YES; 651 | GCC_C_LANGUAGE_STANDARD = gnu11; 652 | GCC_NO_COMMON_BLOCKS = YES; 653 | GCC_PREPROCESSOR_DEFINITIONS = ( 654 | "POD_CONFIGURATION_RELEASE=1", 655 | "$(inherited)", 656 | ); 657 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 658 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 659 | GCC_WARN_UNDECLARED_SELECTOR = YES; 660 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 661 | GCC_WARN_UNUSED_FUNCTION = YES; 662 | GCC_WARN_UNUSED_VARIABLE = YES; 663 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 664 | MTL_ENABLE_DEBUG_INFO = NO; 665 | MTL_FAST_MATH = YES; 666 | PRODUCT_NAME = "$(TARGET_NAME)"; 667 | STRIP_INSTALLED_PRODUCT = NO; 668 | SWIFT_COMPILATION_MODE = wholemodule; 669 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 670 | SWIFT_VERSION = 5.0; 671 | SYMROOT = "${SRCROOT}/../build"; 672 | }; 673 | name = Release; 674 | }; 675 | CE404FE118D9F22FD2246C45557C4080 /* Release */ = { 676 | isa = XCBuildConfiguration; 677 | baseConfigurationReference = 96D77C110492176AD33CEDA3985BCF69 /* Stateful.unit-unittests.release.xcconfig */; 678 | buildSettings = { 679 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 680 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 681 | CLANG_ENABLE_OBJC_WEAK = NO; 682 | CODE_SIGNING_ALLOWED = YES; 683 | CODE_SIGNING_REQUIRED = YES; 684 | CODE_SIGN_IDENTITY = "iPhone Developer"; 685 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 686 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 687 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 688 | GCC_PREFIX_HEADER = "Target Support Files/Stateful/Stateful-Unit-UnitTests-prefix.pch"; 689 | INFOPLIST_FILE = "Target Support Files/Stateful/Stateful-Unit-UnitTests-Info.plist"; 690 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 691 | PRODUCT_NAME = "Stateful-Unit-UnitTests"; 692 | SDKROOT = iphoneos; 693 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 694 | SWIFT_VERSION = 5.0; 695 | VALIDATE_PRODUCT = YES; 696 | }; 697 | name = Release; 698 | }; 699 | E11ABB5CB549E0ECA6F9E08CDA452972 /* Debug */ = { 700 | isa = XCBuildConfiguration; 701 | baseConfigurationReference = E604BEE3D7EE8204E2EA307754FDE881 /* Pods-DemoApp.debug.xcconfig */; 702 | buildSettings = { 703 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 704 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 705 | CLANG_ENABLE_OBJC_WEAK = NO; 706 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 707 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 708 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 709 | CURRENT_PROJECT_VERSION = 1; 710 | DEFINES_MODULE = YES; 711 | DYLIB_COMPATIBILITY_VERSION = 1; 712 | DYLIB_CURRENT_VERSION = 1; 713 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 714 | INFOPLIST_FILE = "Target Support Files/Pods-DemoApp/Pods-DemoApp-Info.plist"; 715 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 716 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 717 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 718 | MACH_O_TYPE = staticlib; 719 | MODULEMAP_FILE = "Target Support Files/Pods-DemoApp/Pods-DemoApp.modulemap"; 720 | OTHER_LDFLAGS = ""; 721 | OTHER_LIBTOOLFLAGS = ""; 722 | PODS_ROOT = "$(SRCROOT)"; 723 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 724 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 725 | SDKROOT = iphoneos; 726 | SKIP_INSTALL = YES; 727 | TARGETED_DEVICE_FAMILY = "1,2"; 728 | VERSIONING_SYSTEM = "apple-generic"; 729 | VERSION_INFO_PREFIX = ""; 730 | }; 731 | name = Debug; 732 | }; 733 | /* End XCBuildConfiguration section */ 734 | 735 | /* Begin XCConfigurationList section */ 736 | 232599C1E454FD9C0324B562AD8AF185 /* Build configuration list for PBXNativeTarget "Stateful" */ = { 737 | isa = XCConfigurationList; 738 | buildConfigurations = ( 739 | 7EB085A25486324B3BB92541145CF394 /* Debug */, 740 | 87FCA57FF7A4575EE968CD2D2FFA4F9C /* Release */, 741 | ); 742 | defaultConfigurationIsVisible = 0; 743 | defaultConfigurationName = Release; 744 | }; 745 | 25415B3D8BC317EBC5AA36218FE92258 /* Build configuration list for PBXNativeTarget "Stateful-Unit-UnitTests" */ = { 746 | isa = XCConfigurationList; 747 | buildConfigurations = ( 748 | 26FECC810B49B38C63EE5AEBD100EC4D /* Debug */, 749 | CE404FE118D9F22FD2246C45557C4080 /* Release */, 750 | ); 751 | defaultConfigurationIsVisible = 0; 752 | defaultConfigurationName = Release; 753 | }; 754 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { 755 | isa = XCConfigurationList; 756 | buildConfigurations = ( 757 | 8DE5143C03248BB6CD542DE3963D6F3A /* Debug */, 758 | 9E406C6AAF85E580207CD97B0044DEAB /* Release */, 759 | ); 760 | defaultConfigurationIsVisible = 0; 761 | defaultConfigurationName = Release; 762 | }; 763 | 734ED9F5DD68D5B9B43184549BA370AA /* Build configuration list for PBXNativeTarget "Pods-DemoApp" */ = { 764 | isa = XCConfigurationList; 765 | buildConfigurations = ( 766 | E11ABB5CB549E0ECA6F9E08CDA452972 /* Debug */, 767 | 11B1C7E57CDA57B25884267E6EF04A54 /* Release */, 768 | ); 769 | defaultConfigurationIsVisible = 0; 770 | defaultConfigurationName = Release; 771 | }; 772 | /* End XCConfigurationList section */ 773 | }; 774 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; 775 | } 776 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Stateful 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2018 Alberto De Bortoli 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2018 Alberto De Bortoli 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | Stateful 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_DemoApp : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_DemoApp 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # frameworks to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 19 | 20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 22 | BCSYMBOLMAP_DIR="BCSymbolMaps" 23 | 24 | 25 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 26 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 27 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 28 | 29 | # Copies and strips a vendored framework 30 | install_framework() 31 | { 32 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 33 | local source="${BUILT_PRODUCTS_DIR}/$1" 34 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 35 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 36 | elif [ -r "$1" ]; then 37 | local source="$1" 38 | fi 39 | 40 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 41 | 42 | if [ -L "${source}" ]; then 43 | echo "Symlinked..." 44 | source="$(readlink "${source}")" 45 | fi 46 | 47 | if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then 48 | # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied 49 | find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do 50 | echo "Installing $f" 51 | install_bcsymbolmap "$f" "$destination" 52 | rm "$f" 53 | done 54 | rmdir "${source}/${BCSYMBOLMAP_DIR}" 55 | fi 56 | 57 | # Use filter instead of exclude so missing patterns don't throw errors. 58 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 59 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 60 | 61 | local basename 62 | basename="$(basename -s .framework "$1")" 63 | binary="${destination}/${basename}.framework/${basename}" 64 | 65 | if ! [ -r "$binary" ]; then 66 | binary="${destination}/${basename}" 67 | elif [ -L "${binary}" ]; then 68 | echo "Destination binary is symlinked..." 69 | dirname="$(dirname "${binary}")" 70 | binary="${dirname}/$(readlink "${binary}")" 71 | fi 72 | 73 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 74 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 75 | strip_invalid_archs "$binary" 76 | fi 77 | 78 | # Resign the code if required by the build settings to avoid unstable apps 79 | code_sign_if_enabled "${destination}/$(basename "$1")" 80 | 81 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 82 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 83 | local swift_runtime_libs 84 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) 85 | for lib in $swift_runtime_libs; do 86 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 87 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 88 | code_sign_if_enabled "${destination}/${lib}" 89 | done 90 | fi 91 | } 92 | # Copies and strips a vendored dSYM 93 | install_dsym() { 94 | local source="$1" 95 | warn_missing_arch=${2:-true} 96 | if [ -r "$source" ]; then 97 | # Copy the dSYM into the targets temp dir. 98 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 99 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 100 | 101 | local basename 102 | basename="$(basename -s .dSYM "$source")" 103 | binary_name="$(ls "$source/Contents/Resources/DWARF")" 104 | binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" 105 | 106 | # Strip invalid architectures from the dSYM. 107 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then 108 | strip_invalid_archs "$binary" "$warn_missing_arch" 109 | fi 110 | if [[ $STRIP_BINARY_RETVAL == 0 ]]; then 111 | # Move the stripped file into its final destination. 112 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 113 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 114 | else 115 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 116 | mkdir -p "${DWARF_DSYM_FOLDER_PATH}" 117 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" 118 | fi 119 | fi 120 | } 121 | 122 | # Used as a return value for each invocation of `strip_invalid_archs` function. 123 | STRIP_BINARY_RETVAL=0 124 | 125 | # Strip invalid architectures 126 | strip_invalid_archs() { 127 | binary="$1" 128 | warn_missing_arch=${2:-true} 129 | # Get architectures for current target binary 130 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 131 | # Intersect them with the architectures we are building for 132 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 133 | # If there are no archs supported by this binary then warn the user 134 | if [[ -z "$intersected_archs" ]]; then 135 | if [[ "$warn_missing_arch" == "true" ]]; then 136 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 137 | fi 138 | STRIP_BINARY_RETVAL=1 139 | return 140 | fi 141 | stripped="" 142 | for arch in $binary_archs; do 143 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 144 | # Strip non-valid architectures in-place 145 | lipo -remove "$arch" -output "$binary" "$binary" 146 | stripped="$stripped $arch" 147 | fi 148 | done 149 | if [[ "$stripped" ]]; then 150 | echo "Stripped $binary of architectures:$stripped" 151 | fi 152 | STRIP_BINARY_RETVAL=0 153 | } 154 | 155 | # Copies the bcsymbolmap files of a vendored framework 156 | install_bcsymbolmap() { 157 | local bcsymbolmap_path="$1" 158 | local destination="${BUILT_PRODUCTS_DIR}" 159 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" 160 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" 161 | } 162 | 163 | # Signs a framework with the provided identity 164 | code_sign_if_enabled() { 165 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 166 | # Use the current code_sign_identity 167 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 168 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 169 | 170 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 171 | code_sign_cmd="$code_sign_cmd &" 172 | fi 173 | echo "$code_sign_cmd" 174 | eval "$code_sign_cmd" 175 | fi 176 | } 177 | 178 | if [[ "$CONFIGURATION" == "Debug" ]]; then 179 | install_framework "${BUILT_PRODUCTS_DIR}/Stateful/Stateful.framework" 180 | fi 181 | if [[ "$CONFIGURATION" == "Release" ]]; then 182 | install_framework "${BUILT_PRODUCTS_DIR}/Stateful/Stateful.framework" 183 | fi 184 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 185 | wait 186 | fi 187 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_DemoAppVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_DemoAppVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Stateful" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Stateful/Stateful.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 8 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "Stateful" 9 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 10 | PODS_BUILD_DIR = ${BUILD_DIR} 11 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 12 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 13 | PODS_ROOT = ${SRCROOT}/Pods 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_DemoApp { 2 | umbrella header "Pods-DemoApp-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Stateful" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Stateful/Stateful.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 8 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "Stateful" 9 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 10 | PODS_BUILD_DIR = ${BUILD_DIR} 11 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 12 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 13 | PODS_ROOT = ${SRCROOT}/Pods 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.2.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful-Unit-UnitTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful-Unit-UnitTests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # frameworks to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 19 | 20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 22 | BCSYMBOLMAP_DIR="BCSymbolMaps" 23 | 24 | 25 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 26 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 27 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 28 | 29 | # Copies and strips a vendored framework 30 | install_framework() 31 | { 32 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 33 | local source="${BUILT_PRODUCTS_DIR}/$1" 34 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 35 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 36 | elif [ -r "$1" ]; then 37 | local source="$1" 38 | fi 39 | 40 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 41 | 42 | if [ -L "${source}" ]; then 43 | echo "Symlinked..." 44 | source="$(readlink "${source}")" 45 | fi 46 | 47 | if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then 48 | # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied 49 | find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do 50 | echo "Installing $f" 51 | install_bcsymbolmap "$f" "$destination" 52 | rm "$f" 53 | done 54 | rmdir "${source}/${BCSYMBOLMAP_DIR}" 55 | fi 56 | 57 | # Use filter instead of exclude so missing patterns don't throw errors. 58 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 59 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 60 | 61 | local basename 62 | basename="$(basename -s .framework "$1")" 63 | binary="${destination}/${basename}.framework/${basename}" 64 | 65 | if ! [ -r "$binary" ]; then 66 | binary="${destination}/${basename}" 67 | elif [ -L "${binary}" ]; then 68 | echo "Destination binary is symlinked..." 69 | dirname="$(dirname "${binary}")" 70 | binary="${dirname}/$(readlink "${binary}")" 71 | fi 72 | 73 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 74 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 75 | strip_invalid_archs "$binary" 76 | fi 77 | 78 | # Resign the code if required by the build settings to avoid unstable apps 79 | code_sign_if_enabled "${destination}/$(basename "$1")" 80 | 81 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 82 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 83 | local swift_runtime_libs 84 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) 85 | for lib in $swift_runtime_libs; do 86 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 87 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 88 | code_sign_if_enabled "${destination}/${lib}" 89 | done 90 | fi 91 | } 92 | # Copies and strips a vendored dSYM 93 | install_dsym() { 94 | local source="$1" 95 | warn_missing_arch=${2:-true} 96 | if [ -r "$source" ]; then 97 | # Copy the dSYM into the targets temp dir. 98 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 99 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 100 | 101 | local basename 102 | basename="$(basename -s .dSYM "$source")" 103 | binary_name="$(ls "$source/Contents/Resources/DWARF")" 104 | binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" 105 | 106 | # Strip invalid architectures from the dSYM. 107 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then 108 | strip_invalid_archs "$binary" "$warn_missing_arch" 109 | fi 110 | if [[ $STRIP_BINARY_RETVAL == 0 ]]; then 111 | # Move the stripped file into its final destination. 112 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 113 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 114 | else 115 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 116 | mkdir -p "${DWARF_DSYM_FOLDER_PATH}" 117 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" 118 | fi 119 | fi 120 | } 121 | 122 | # Used as a return value for each invocation of `strip_invalid_archs` function. 123 | STRIP_BINARY_RETVAL=0 124 | 125 | # Strip invalid architectures 126 | strip_invalid_archs() { 127 | binary="$1" 128 | warn_missing_arch=${2:-true} 129 | # Get architectures for current target binary 130 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 131 | # Intersect them with the architectures we are building for 132 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 133 | # If there are no archs supported by this binary then warn the user 134 | if [[ -z "$intersected_archs" ]]; then 135 | if [[ "$warn_missing_arch" == "true" ]]; then 136 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 137 | fi 138 | STRIP_BINARY_RETVAL=1 139 | return 140 | fi 141 | stripped="" 142 | for arch in $binary_archs; do 143 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 144 | # Strip non-valid architectures in-place 145 | lipo -remove "$arch" -output "$binary" "$binary" 146 | stripped="$stripped $arch" 147 | fi 148 | done 149 | if [[ "$stripped" ]]; then 150 | echo "Stripped $binary of architectures:$stripped" 151 | fi 152 | STRIP_BINARY_RETVAL=0 153 | } 154 | 155 | # Copies the bcsymbolmap files of a vendored framework 156 | install_bcsymbolmap() { 157 | local bcsymbolmap_path="$1" 158 | local destination="${BUILT_PRODUCTS_DIR}" 159 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" 160 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" 161 | } 162 | 163 | # Signs a framework with the provided identity 164 | code_sign_if_enabled() { 165 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 166 | # Use the current code_sign_identity 167 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 168 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 169 | 170 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 171 | code_sign_cmd="$code_sign_cmd &" 172 | fi 173 | echo "$code_sign_cmd" 174 | eval "$code_sign_cmd" 175 | fi 176 | } 177 | 178 | if [[ "$CONFIGURATION" == "Debug" ]]; then 179 | install_framework "${BUILT_PRODUCTS_DIR}/Stateful/Stateful.framework" 180 | fi 181 | if [[ "$CONFIGURATION" == "Release" ]]; then 182 | install_framework "${BUILT_PRODUCTS_DIR}/Stateful/Stateful.framework" 183 | fi 184 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 185 | wait 186 | fi 187 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful-Unit-UnitTests-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Stateful : NSObject 3 | @end 4 | @implementation PodsDummy_Stateful 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double StatefulVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char StatefulVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Stateful 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 5 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful.modulemap: -------------------------------------------------------------------------------- 1 | framework module Stateful { 2 | umbrella header "Stateful-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Stateful 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 5 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful.unit-unittests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Stateful" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 6 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -framework "Stateful" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 14 | SKIP_INSTALL = YES 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Stateful/Stateful.unit-unittests.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Stateful" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 6 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "Foundation" -framework "Stateful" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 14 | SKIP_INSTALL = YES 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Example/Stateful.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 11 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 12 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 13 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 14 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 15 | B05F85C39BF124BCD754E3AD /* Pods_DemoApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC02701252211DC046BD6847 /* Pods_DemoApp.framework */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 1A6B155621447A2F6B3B5D2D /* Pods_Stateful_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Stateful_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | 22A2EFA7F5FC0B1D09494C10 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 21 | 3E007712846C3E07254B74F5 /* Pods-DemoApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoApp.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.debug.xcconfig"; sourceTree = ""; }; 22 | 3F4609420FA14AFB6451662E /* Pods-DemoApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoApp.release.xcconfig"; path = "Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.release.xcconfig"; sourceTree = ""; }; 23 | 400A75FD4773978277C3E03E /* Pods-Stateful_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Stateful_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Stateful_Tests/Pods-Stateful_Tests.release.xcconfig"; sourceTree = ""; }; 24 | 4A9959AE87D029CF6EA3E4BD /* Pods-Stateful_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Stateful_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Stateful_Tests/Pods-Stateful_Tests.debug.xcconfig"; sourceTree = ""; }; 25 | 4F3685B921C6E46600A1630D /* Example.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; name = Example.playground; path = ../Example.playground; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 26 | 4FB86E3D284E49AD00E6896B /* UnitTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UnitTests.xctestplan; sourceTree = ""; }; 27 | 607FACD01AFB9204008FA782 /* DemoApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 30 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 31 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 32 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 33 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 34 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | C94A5996231FEFF8606AD6F0 /* Stateful.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Stateful.podspec; path = ../Stateful.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 36 | D07FA21358F5C341A4E1848A /* Pods-Stateful_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Stateful_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Stateful_Example/Pods-Stateful_Example.debug.xcconfig"; sourceTree = ""; }; 37 | D561BFC1C27DD55B33B243B9 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 38 | D769B95FBC5DFF74006C201C /* Pods-Stateful_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Stateful_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Stateful_Example/Pods-Stateful_Example.release.xcconfig"; sourceTree = ""; }; 39 | DC02701252211DC046BD6847 /* Pods_DemoApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DemoApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | /* End PBXFileReference section */ 41 | 42 | /* Begin PBXFrameworksBuildPhase section */ 43 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 44 | isa = PBXFrameworksBuildPhase; 45 | buildActionMask = 2147483647; 46 | files = ( 47 | B05F85C39BF124BCD754E3AD /* Pods_DemoApp.framework in Frameworks */, 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | /* End PBXFrameworksBuildPhase section */ 52 | 53 | /* Begin PBXGroup section */ 54 | 607FACC71AFB9204008FA782 = { 55 | isa = PBXGroup; 56 | children = ( 57 | 4F3685B921C6E46600A1630D /* Example.playground */, 58 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 59 | 607FACD21AFB9204008FA782 /* Example for Stateful */, 60 | 607FACE81AFB9204008FA782 /* Tests */, 61 | 607FACD11AFB9204008FA782 /* Products */, 62 | 95CE5ED2E5BECD0F9DEC3BDE /* Pods */, 63 | 9C134F2F10BBB3BA3E886AAB /* Frameworks */, 64 | ); 65 | sourceTree = ""; 66 | }; 67 | 607FACD11AFB9204008FA782 /* Products */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | 607FACD01AFB9204008FA782 /* DemoApp.app */, 71 | ); 72 | name = Products; 73 | sourceTree = ""; 74 | }; 75 | 607FACD21AFB9204008FA782 /* Example for Stateful */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 79 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 80 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 81 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 82 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 83 | 607FACD31AFB9204008FA782 /* Supporting Files */, 84 | 4FB86E3D284E49AD00E6896B /* UnitTests.xctestplan */, 85 | ); 86 | name = "Example for Stateful"; 87 | path = Stateful; 88 | sourceTree = ""; 89 | }; 90 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 607FACD41AFB9204008FA782 /* Info.plist */, 94 | ); 95 | name = "Supporting Files"; 96 | sourceTree = ""; 97 | }; 98 | 607FACE81AFB9204008FA782 /* Tests */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 607FACE91AFB9204008FA782 /* Supporting Files */, 102 | ); 103 | path = Tests; 104 | sourceTree = ""; 105 | }; 106 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 607FACEA1AFB9204008FA782 /* Info.plist */, 110 | ); 111 | name = "Supporting Files"; 112 | sourceTree = ""; 113 | }; 114 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | C94A5996231FEFF8606AD6F0 /* Stateful.podspec */, 118 | D561BFC1C27DD55B33B243B9 /* README.md */, 119 | 22A2EFA7F5FC0B1D09494C10 /* LICENSE */, 120 | ); 121 | name = "Podspec Metadata"; 122 | sourceTree = ""; 123 | }; 124 | 95CE5ED2E5BECD0F9DEC3BDE /* Pods */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | D07FA21358F5C341A4E1848A /* Pods-Stateful_Example.debug.xcconfig */, 128 | D769B95FBC5DFF74006C201C /* Pods-Stateful_Example.release.xcconfig */, 129 | 4A9959AE87D029CF6EA3E4BD /* Pods-Stateful_Tests.debug.xcconfig */, 130 | 400A75FD4773978277C3E03E /* Pods-Stateful_Tests.release.xcconfig */, 131 | 3E007712846C3E07254B74F5 /* Pods-DemoApp.debug.xcconfig */, 132 | 3F4609420FA14AFB6451662E /* Pods-DemoApp.release.xcconfig */, 133 | ); 134 | name = Pods; 135 | sourceTree = ""; 136 | }; 137 | 9C134F2F10BBB3BA3E886AAB /* Frameworks */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 1A6B155621447A2F6B3B5D2D /* Pods_Stateful_Tests.framework */, 141 | DC02701252211DC046BD6847 /* Pods_DemoApp.framework */, 142 | ); 143 | name = Frameworks; 144 | sourceTree = ""; 145 | }; 146 | /* End PBXGroup section */ 147 | 148 | /* Begin PBXNativeTarget section */ 149 | 607FACCF1AFB9204008FA782 /* DemoApp */ = { 150 | isa = PBXNativeTarget; 151 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "DemoApp" */; 152 | buildPhases = ( 153 | 55265082CC4AADDEC9F03639 /* [CP] Check Pods Manifest.lock */, 154 | 607FACCC1AFB9204008FA782 /* Sources */, 155 | 607FACCD1AFB9204008FA782 /* Frameworks */, 156 | 607FACCE1AFB9204008FA782 /* Resources */, 157 | 5EC6F88F5547C093DB0CCDDF /* [CP] Embed Pods Frameworks */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | ); 163 | name = DemoApp; 164 | productName = Stateful; 165 | productReference = 607FACD01AFB9204008FA782 /* DemoApp.app */; 166 | productType = "com.apple.product-type.application"; 167 | }; 168 | /* End PBXNativeTarget section */ 169 | 170 | /* Begin PBXProject section */ 171 | 607FACC81AFB9204008FA782 /* Project object */ = { 172 | isa = PBXProject; 173 | attributes = { 174 | LastSwiftUpdateCheck = 0830; 175 | LastUpgradeCheck = 1010; 176 | ORGANIZATIONNAME = CocoaPods; 177 | TargetAttributes = { 178 | 607FACCF1AFB9204008FA782 = { 179 | CreatedOnToolsVersion = 6.3.1; 180 | DevelopmentTeam = ZQPG4YV673; 181 | LastSwiftMigration = 1010; 182 | }; 183 | }; 184 | }; 185 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Stateful" */; 186 | compatibilityVersion = "Xcode 3.2"; 187 | developmentRegion = English; 188 | hasScannedForEncodings = 0; 189 | knownRegions = ( 190 | English, 191 | en, 192 | Base, 193 | ); 194 | mainGroup = 607FACC71AFB9204008FA782; 195 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 196 | projectDirPath = ""; 197 | projectRoot = ""; 198 | targets = ( 199 | 607FACCF1AFB9204008FA782 /* DemoApp */, 200 | ); 201 | }; 202 | /* End PBXProject section */ 203 | 204 | /* Begin PBXResourcesBuildPhase section */ 205 | 607FACCE1AFB9204008FA782 /* Resources */ = { 206 | isa = PBXResourcesBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 210 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 211 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | }; 215 | /* End PBXResourcesBuildPhase section */ 216 | 217 | /* Begin PBXShellScriptBuildPhase section */ 218 | 55265082CC4AADDEC9F03639 /* [CP] Check Pods Manifest.lock */ = { 219 | isa = PBXShellScriptBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | ); 223 | inputFileListPaths = ( 224 | ); 225 | inputPaths = ( 226 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 227 | "${PODS_ROOT}/Manifest.lock", 228 | ); 229 | name = "[CP] Check Pods Manifest.lock"; 230 | outputFileListPaths = ( 231 | ); 232 | outputPaths = ( 233 | "$(DERIVED_FILE_DIR)/Pods-DemoApp-checkManifestLockResult.txt", 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | shellPath = /bin/sh; 237 | 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"; 238 | showEnvVarsInLog = 0; 239 | }; 240 | 5EC6F88F5547C093DB0CCDDF /* [CP] Embed Pods Frameworks */ = { 241 | isa = PBXShellScriptBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | ); 245 | inputPaths = ( 246 | "${PODS_ROOT}/Target Support Files/Pods-DemoApp/Pods-DemoApp-frameworks.sh", 247 | "${BUILT_PRODUCTS_DIR}/Stateful/Stateful.framework", 248 | ); 249 | name = "[CP] Embed Pods Frameworks"; 250 | outputPaths = ( 251 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Stateful.framework", 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | shellPath = /bin/sh; 255 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DemoApp/Pods-DemoApp-frameworks.sh\"\n"; 256 | showEnvVarsInLog = 0; 257 | }; 258 | /* End PBXShellScriptBuildPhase section */ 259 | 260 | /* Begin PBXSourcesBuildPhase section */ 261 | 607FACCC1AFB9204008FA782 /* Sources */ = { 262 | isa = PBXSourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 266 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXSourcesBuildPhase section */ 271 | 272 | /* Begin PBXVariantGroup section */ 273 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 274 | isa = PBXVariantGroup; 275 | children = ( 276 | 607FACDA1AFB9204008FA782 /* Base */, 277 | ); 278 | name = Main.storyboard; 279 | sourceTree = ""; 280 | }; 281 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 282 | isa = PBXVariantGroup; 283 | children = ( 284 | 607FACDF1AFB9204008FA782 /* Base */, 285 | ); 286 | name = LaunchScreen.xib; 287 | sourceTree = ""; 288 | }; 289 | /* End PBXVariantGroup section */ 290 | 291 | /* Begin XCBuildConfiguration section */ 292 | 607FACED1AFB9204008FA782 /* Debug */ = { 293 | isa = XCBuildConfiguration; 294 | buildSettings = { 295 | ALWAYS_SEARCH_USER_PATHS = NO; 296 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 297 | CLANG_CXX_LIBRARY = "libc++"; 298 | CLANG_ENABLE_MODULES = YES; 299 | CLANG_ENABLE_OBJC_ARC = YES; 300 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 301 | CLANG_WARN_BOOL_CONVERSION = YES; 302 | CLANG_WARN_COMMA = YES; 303 | CLANG_WARN_CONSTANT_CONVERSION = YES; 304 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 305 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 306 | CLANG_WARN_EMPTY_BODY = YES; 307 | CLANG_WARN_ENUM_CONVERSION = YES; 308 | CLANG_WARN_INFINITE_RECURSION = YES; 309 | CLANG_WARN_INT_CONVERSION = YES; 310 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 311 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 312 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 313 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 314 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 315 | CLANG_WARN_STRICT_PROTOTYPES = YES; 316 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 317 | CLANG_WARN_UNREACHABLE_CODE = YES; 318 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 319 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 320 | COPY_PHASE_STRIP = NO; 321 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 322 | ENABLE_STRICT_OBJC_MSGSEND = YES; 323 | ENABLE_TESTABILITY = YES; 324 | GCC_C_LANGUAGE_STANDARD = gnu99; 325 | GCC_DYNAMIC_NO_PIC = NO; 326 | GCC_NO_COMMON_BLOCKS = YES; 327 | GCC_OPTIMIZATION_LEVEL = 0; 328 | GCC_PREPROCESSOR_DEFINITIONS = ( 329 | "DEBUG=1", 330 | "$(inherited)", 331 | ); 332 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 333 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 334 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 335 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 336 | GCC_WARN_UNDECLARED_SELECTOR = YES; 337 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 338 | GCC_WARN_UNUSED_FUNCTION = YES; 339 | GCC_WARN_UNUSED_VARIABLE = YES; 340 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 341 | MTL_ENABLE_DEBUG_INFO = YES; 342 | ONLY_ACTIVE_ARCH = YES; 343 | SDKROOT = iphoneos; 344 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 345 | SWIFT_TREAT_WARNINGS_AS_ERRORS = YES; 346 | SWIFT_VERSION = 5.0; 347 | }; 348 | name = Debug; 349 | }; 350 | 607FACEE1AFB9204008FA782 /* Release */ = { 351 | isa = XCBuildConfiguration; 352 | buildSettings = { 353 | ALWAYS_SEARCH_USER_PATHS = NO; 354 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 355 | CLANG_CXX_LIBRARY = "libc++"; 356 | CLANG_ENABLE_MODULES = YES; 357 | CLANG_ENABLE_OBJC_ARC = YES; 358 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 359 | CLANG_WARN_BOOL_CONVERSION = YES; 360 | CLANG_WARN_COMMA = YES; 361 | CLANG_WARN_CONSTANT_CONVERSION = YES; 362 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 363 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 364 | CLANG_WARN_EMPTY_BODY = YES; 365 | CLANG_WARN_ENUM_CONVERSION = YES; 366 | CLANG_WARN_INFINITE_RECURSION = YES; 367 | CLANG_WARN_INT_CONVERSION = YES; 368 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 369 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 370 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 371 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 372 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 373 | CLANG_WARN_STRICT_PROTOTYPES = YES; 374 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 375 | CLANG_WARN_UNREACHABLE_CODE = YES; 376 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 377 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 378 | COPY_PHASE_STRIP = NO; 379 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 380 | ENABLE_NS_ASSERTIONS = NO; 381 | ENABLE_STRICT_OBJC_MSGSEND = YES; 382 | GCC_C_LANGUAGE_STANDARD = gnu99; 383 | GCC_NO_COMMON_BLOCKS = YES; 384 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 385 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 386 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 387 | GCC_WARN_UNDECLARED_SELECTOR = YES; 388 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 389 | GCC_WARN_UNUSED_FUNCTION = YES; 390 | GCC_WARN_UNUSED_VARIABLE = YES; 391 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 392 | MTL_ENABLE_DEBUG_INFO = NO; 393 | SDKROOT = iphoneos; 394 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 395 | SWIFT_TREAT_WARNINGS_AS_ERRORS = YES; 396 | SWIFT_VERSION = 5.0; 397 | VALIDATE_PRODUCT = YES; 398 | }; 399 | name = Release; 400 | }; 401 | 607FACF01AFB9204008FA782 /* Debug */ = { 402 | isa = XCBuildConfiguration; 403 | baseConfigurationReference = 3E007712846C3E07254B74F5 /* Pods-DemoApp.debug.xcconfig */; 404 | buildSettings = { 405 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 406 | DEVELOPMENT_TEAM = ZQPG4YV673; 407 | INFOPLIST_FILE = Stateful/Info.plist; 408 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 409 | MODULE_NAME = DemoApp; 410 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 411 | PRODUCT_NAME = "$(TARGET_NAME)"; 412 | }; 413 | name = Debug; 414 | }; 415 | 607FACF11AFB9204008FA782 /* Release */ = { 416 | isa = XCBuildConfiguration; 417 | baseConfigurationReference = 3F4609420FA14AFB6451662E /* Pods-DemoApp.release.xcconfig */; 418 | buildSettings = { 419 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 420 | DEVELOPMENT_TEAM = ZQPG4YV673; 421 | INFOPLIST_FILE = Stateful/Info.plist; 422 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 423 | MODULE_NAME = DemoApp; 424 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 425 | PRODUCT_NAME = "$(TARGET_NAME)"; 426 | }; 427 | name = Release; 428 | }; 429 | /* End XCBuildConfiguration section */ 430 | 431 | /* Begin XCConfigurationList section */ 432 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Stateful" */ = { 433 | isa = XCConfigurationList; 434 | buildConfigurations = ( 435 | 607FACED1AFB9204008FA782 /* Debug */, 436 | 607FACEE1AFB9204008FA782 /* Release */, 437 | ); 438 | defaultConfigurationIsVisible = 0; 439 | defaultConfigurationName = Release; 440 | }; 441 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "DemoApp" */ = { 442 | isa = XCConfigurationList; 443 | buildConfigurations = ( 444 | 607FACF01AFB9204008FA782 /* Debug */, 445 | 607FACF11AFB9204008FA782 /* Release */, 446 | ); 447 | defaultConfigurationIsVisible = 0; 448 | defaultConfigurationName = Release; 449 | }; 450 | /* End XCConfigurationList section */ 451 | }; 452 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 453 | } 454 | -------------------------------------------------------------------------------- /Example/Stateful.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Stateful.xcodeproj/xcshareddata/xcschemes/DemoApp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 34 | 35 | 36 | 37 | 47 | 49 | 55 | 56 | 57 | 58 | 64 | 66 | 72 | 73 | 74 | 75 | 77 | 78 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Example/Stateful.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Stateful.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Stateful/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Stateful 4 | // 5 | // Created by Alberto De Bortoli on 12/16/2018. 6 | // Copyright (c) 2018 albertodebortoli.website@gmail.com. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Stateful 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | return true 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Example/Stateful/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Example/Stateful/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Example/Stateful/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/Stateful/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/Stateful/UnitTests.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "A4671963-5926-4AFF-9299-2FE37E0AD873", 5 | "name" : "Configuration 1", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "codeCoverage" : { 13 | "targets" : [ 14 | { 15 | "containerPath" : "container:Pods\/Pods.xcodeproj", 16 | "identifier" : "576CDFDCACFD9BB02F4DF6E35C530CC7", 17 | "name" : "Stateful" 18 | } 19 | ] 20 | }, 21 | "targetForVariableExpansion" : { 22 | "containerPath" : "container:Stateful.xcodeproj", 23 | "identifier" : "607FACCF1AFB9204008FA782", 24 | "name" : "DemoApp" 25 | }, 26 | "threadSanitizerEnabled" : true 27 | }, 28 | "testTargets" : [ 29 | { 30 | "target" : { 31 | "containerPath" : "container:Pods\/Pods.xcodeproj", 32 | "identifier" : "34FAD9AACC181DDC49782F1AA25A26E9", 33 | "name" : "Stateful-Unit-UnitTests" 34 | } 35 | } 36 | ], 37 | "version" : 1 38 | } 39 | -------------------------------------------------------------------------------- /Example/Stateful/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Stateful 4 | // 5 | // Created by Alberto De Bortoli on 12/16/2018. 6 | // Copyright (c) 2018 albertodebortoli.website@gmail.com. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | } 17 | 18 | override func didReceiveMemoryWarning() { 19 | super.didReceiveMemoryWarning() 20 | // Dispose of any resources that can be recreated. 21 | } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Framework/Sources/StateMachine.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StateMachine.swift 3 | // Stateful 4 | // 5 | // Created by Alberto De Bortoli on 16/12/2018. 6 | // 7 | 8 | import Foundation 9 | 10 | open class StateMachine { 11 | 12 | public var enableLogging: Bool = false 13 | public var currentState: State { 14 | return { 15 | workingQueue.sync { 16 | return internalCurrentState 17 | } 18 | }() 19 | } 20 | 21 | private var internalCurrentState: State 22 | private var transitionsByEvent: [Event : [Transition]] = [:] 23 | 24 | private let lockQueue: DispatchQueue 25 | private let workingQueue: DispatchQueue 26 | private let callbackQueue: DispatchQueue 27 | 28 | public init(initialState: State, callbackQueue: DispatchQueue? = nil) { 29 | self.internalCurrentState = initialState 30 | self.lockQueue = DispatchQueue(label: "com.albertodebortoli.statemachine.queue.lock") 31 | self.workingQueue = DispatchQueue(label: "com.albertodebortoli.statemachine.queue.working") 32 | self.callbackQueue = callbackQueue ?? .main 33 | } 34 | 35 | public func add(transition: Transition) { 36 | lockQueue.sync { 37 | if let transitions = self.transitionsByEvent[transition.event] { 38 | if (transitions.filter { return $0.source == transition.source }.count > 0) { 39 | assertionFailure("Transition with event '\(transition.event)' and source '\(transition.source)' already existing.") 40 | } 41 | self.transitionsByEvent[transition.event]?.append(transition) 42 | } else { 43 | self.transitionsByEvent[transition.event] = [transition] 44 | } 45 | } 46 | } 47 | 48 | public func process(event: Event, execution: (() -> Void)? = nil, callback: TransitionBlock? = nil) { 49 | var transitions: [Transition]? 50 | lockQueue.sync { 51 | transitions = self.transitionsByEvent[event] 52 | } 53 | 54 | workingQueue.async { 55 | let performableTransitions = transitions?.filter { return $0.source == self.internalCurrentState } ?? [] 56 | 57 | if performableTransitions.count == 0 { 58 | self.callbackQueue.async { 59 | callback?(.failure) 60 | } 61 | return 62 | } 63 | 64 | assert(performableTransitions.count == 1, "Found multiple transitions with event '\(event)' and source '\(self.internalCurrentState)'.") 65 | 66 | let transition = performableTransitions.first! 67 | 68 | self.log(message: "Processing event '\(event)' from '\(self.internalCurrentState)'") 69 | self.callbackQueue.async { 70 | transition.executePreBlock() 71 | } 72 | 73 | self.log(message: "Processed pre condition for event '\(event)' from '\(transition.source)' to '\(transition.destination)'") 74 | 75 | self.callbackQueue.async { 76 | execution?() 77 | } 78 | 79 | let previousState = self.internalCurrentState 80 | self.internalCurrentState = transition.destination 81 | 82 | self.log(message: "Processed state change from '\(previousState)' to '\(transition.destination)'") 83 | self.callbackQueue.async { 84 | transition.executePostBlock() 85 | } 86 | 87 | self.log(message: "Processed post condition for event '\(event)' from '\(transition.source)' to '\(transition.destination)'") 88 | 89 | self.callbackQueue.async { 90 | callback?(.success) 91 | } 92 | } 93 | } 94 | 95 | private func log(message: String) { 96 | if self.enableLogging { 97 | print("[Stateful 🦜] \(message)") 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /Framework/Sources/Transition.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Transition.swift 3 | // Stateful 4 | // 5 | // Created by Alberto De Bortoli on 16/12/2018. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum TransitionResult { 11 | case success 12 | case failure 13 | } 14 | 15 | public typealias ExecutionBlock = (() -> Void) 16 | public typealias TransitionBlock = ((TransitionResult) -> Void) 17 | 18 | public struct Transition { 19 | 20 | public let event: Event 21 | public let source: State 22 | public let destination: State 23 | let preBlock: ExecutionBlock? 24 | let postBlock: ExecutionBlock? 25 | 26 | public init(with event: Event, 27 | from: State, 28 | to: State, 29 | preBlock: ExecutionBlock? = nil, 30 | postBlock: ExecutionBlock? = nil) { 31 | self.event = event 32 | self.source = from 33 | self.destination = to 34 | self.preBlock = preBlock 35 | self.postBlock = postBlock 36 | } 37 | 38 | func executePreBlock() { 39 | preBlock?() 40 | } 41 | 42 | func executePostBlock() { 43 | postBlock?() 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | ruby '3.0.2' 2 | 3 | source 'https://rubygems.org' 4 | 5 | gem 'cocoapods', '~> 1.11.2' 6 | gem 'fastlane', '~> 2.206.2' 7 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (3.0.5) 5 | rexml 6 | activesupport (6.1.6) 7 | concurrent-ruby (~> 1.0, >= 1.0.2) 8 | i18n (>= 1.6, < 2) 9 | minitest (>= 5.1) 10 | tzinfo (~> 2.0) 11 | zeitwerk (~> 2.3) 12 | addressable (2.8.0) 13 | public_suffix (>= 2.0.2, < 5.0) 14 | algoliasearch (1.27.5) 15 | httpclient (~> 2.8, >= 2.8.3) 16 | json (>= 1.5.1) 17 | artifactory (3.0.15) 18 | atomos (0.1.3) 19 | aws-eventstream (1.2.0) 20 | aws-partitions (1.595.0) 21 | aws-sdk-core (3.131.1) 22 | aws-eventstream (~> 1, >= 1.0.2) 23 | aws-partitions (~> 1, >= 1.525.0) 24 | aws-sigv4 (~> 1.1) 25 | jmespath (~> 1, >= 1.6.1) 26 | aws-sdk-kms (1.57.0) 27 | aws-sdk-core (~> 3, >= 3.127.0) 28 | aws-sigv4 (~> 1.1) 29 | aws-sdk-s3 (1.114.0) 30 | aws-sdk-core (~> 3, >= 3.127.0) 31 | aws-sdk-kms (~> 1) 32 | aws-sigv4 (~> 1.4) 33 | aws-sigv4 (1.5.0) 34 | aws-eventstream (~> 1, >= 1.0.2) 35 | babosa (1.0.4) 36 | claide (1.1.0) 37 | cocoapods (1.11.3) 38 | addressable (~> 2.8) 39 | claide (>= 1.0.2, < 2.0) 40 | cocoapods-core (= 1.11.3) 41 | cocoapods-deintegrate (>= 1.0.3, < 2.0) 42 | cocoapods-downloader (>= 1.4.0, < 2.0) 43 | cocoapods-plugins (>= 1.0.0, < 2.0) 44 | cocoapods-search (>= 1.0.0, < 2.0) 45 | cocoapods-trunk (>= 1.4.0, < 2.0) 46 | cocoapods-try (>= 1.1.0, < 2.0) 47 | colored2 (~> 3.1) 48 | escape (~> 0.0.4) 49 | fourflusher (>= 2.3.0, < 3.0) 50 | gh_inspector (~> 1.0) 51 | molinillo (~> 0.8.0) 52 | nap (~> 1.0) 53 | ruby-macho (>= 1.0, < 3.0) 54 | xcodeproj (>= 1.21.0, < 2.0) 55 | cocoapods-core (1.11.3) 56 | activesupport (>= 5.0, < 7) 57 | addressable (~> 2.8) 58 | algoliasearch (~> 1.0) 59 | concurrent-ruby (~> 1.1) 60 | fuzzy_match (~> 2.0.4) 61 | nap (~> 1.0) 62 | netrc (~> 0.11) 63 | public_suffix (~> 4.0) 64 | typhoeus (~> 1.0) 65 | cocoapods-deintegrate (1.0.5) 66 | cocoapods-downloader (1.6.3) 67 | cocoapods-plugins (1.0.0) 68 | nap 69 | cocoapods-search (1.0.1) 70 | cocoapods-trunk (1.6.0) 71 | nap (>= 0.8, < 2.0) 72 | netrc (~> 0.11) 73 | cocoapods-try (1.2.0) 74 | colored (1.2) 75 | colored2 (3.1.2) 76 | commander (4.6.0) 77 | highline (~> 2.0.0) 78 | concurrent-ruby (1.1.10) 79 | declarative (0.0.20) 80 | digest-crc (0.6.4) 81 | rake (>= 12.0.0, < 14.0.0) 82 | domain_name (0.5.20190701) 83 | unf (>= 0.0.5, < 1.0.0) 84 | dotenv (2.7.6) 85 | emoji_regex (3.2.3) 86 | escape (0.0.4) 87 | ethon (0.15.0) 88 | ffi (>= 1.15.0) 89 | excon (0.92.3) 90 | faraday (1.10.0) 91 | faraday-em_http (~> 1.0) 92 | faraday-em_synchrony (~> 1.0) 93 | faraday-excon (~> 1.1) 94 | faraday-httpclient (~> 1.0) 95 | faraday-multipart (~> 1.0) 96 | faraday-net_http (~> 1.0) 97 | faraday-net_http_persistent (~> 1.0) 98 | faraday-patron (~> 1.0) 99 | faraday-rack (~> 1.0) 100 | faraday-retry (~> 1.0) 101 | ruby2_keywords (>= 0.0.4) 102 | faraday-cookie_jar (0.0.7) 103 | faraday (>= 0.8.0) 104 | http-cookie (~> 1.0.0) 105 | faraday-em_http (1.0.0) 106 | faraday-em_synchrony (1.0.0) 107 | faraday-excon (1.1.0) 108 | faraday-httpclient (1.0.1) 109 | faraday-multipart (1.0.3) 110 | multipart-post (>= 1.2, < 3) 111 | faraday-net_http (1.0.1) 112 | faraday-net_http_persistent (1.2.0) 113 | faraday-patron (1.0.0) 114 | faraday-rack (1.0.0) 115 | faraday-retry (1.0.3) 116 | faraday_middleware (1.2.0) 117 | faraday (~> 1.0) 118 | fastimage (2.2.6) 119 | fastlane (2.206.2) 120 | CFPropertyList (>= 2.3, < 4.0.0) 121 | addressable (>= 2.8, < 3.0.0) 122 | artifactory (~> 3.0) 123 | aws-sdk-s3 (~> 1.0) 124 | babosa (>= 1.0.3, < 2.0.0) 125 | bundler (>= 1.12.0, < 3.0.0) 126 | colored 127 | commander (~> 4.6) 128 | dotenv (>= 2.1.1, < 3.0.0) 129 | emoji_regex (>= 0.1, < 4.0) 130 | excon (>= 0.71.0, < 1.0.0) 131 | faraday (~> 1.0) 132 | faraday-cookie_jar (~> 0.0.6) 133 | faraday_middleware (~> 1.0) 134 | fastimage (>= 2.1.0, < 3.0.0) 135 | gh_inspector (>= 1.1.2, < 2.0.0) 136 | google-apis-androidpublisher_v3 (~> 0.3) 137 | google-apis-playcustomapp_v1 (~> 0.1) 138 | google-cloud-storage (~> 1.31) 139 | highline (~> 2.0) 140 | json (< 3.0.0) 141 | jwt (>= 2.1.0, < 3) 142 | mini_magick (>= 4.9.4, < 5.0.0) 143 | multipart-post (~> 2.0.0) 144 | naturally (~> 2.2) 145 | optparse (~> 0.1.1) 146 | plist (>= 3.1.0, < 4.0.0) 147 | rubyzip (>= 2.0.0, < 3.0.0) 148 | security (= 0.1.3) 149 | simctl (~> 1.6.3) 150 | terminal-notifier (>= 2.0.0, < 3.0.0) 151 | terminal-table (>= 1.4.5, < 2.0.0) 152 | tty-screen (>= 0.6.3, < 1.0.0) 153 | tty-spinner (>= 0.8.0, < 1.0.0) 154 | word_wrap (~> 1.0.0) 155 | xcodeproj (>= 1.13.0, < 2.0.0) 156 | xcpretty (~> 0.3.0) 157 | xcpretty-travis-formatter (>= 0.0.3) 158 | ffi (1.15.5) 159 | fourflusher (2.3.1) 160 | fuzzy_match (2.0.4) 161 | gh_inspector (1.1.3) 162 | google-apis-androidpublisher_v3 (0.21.0) 163 | google-apis-core (>= 0.4, < 2.a) 164 | google-apis-core (0.5.0) 165 | addressable (~> 2.5, >= 2.5.1) 166 | googleauth (>= 0.16.2, < 2.a) 167 | httpclient (>= 2.8.1, < 3.a) 168 | mini_mime (~> 1.0) 169 | representable (~> 3.0) 170 | retriable (>= 2.0, < 4.a) 171 | rexml 172 | webrick 173 | google-apis-iamcredentials_v1 (0.10.0) 174 | google-apis-core (>= 0.4, < 2.a) 175 | google-apis-playcustomapp_v1 (0.7.0) 176 | google-apis-core (>= 0.4, < 2.a) 177 | google-apis-storage_v1 (0.14.0) 178 | google-apis-core (>= 0.4, < 2.a) 179 | google-cloud-core (1.6.0) 180 | google-cloud-env (~> 1.0) 181 | google-cloud-errors (~> 1.0) 182 | google-cloud-env (1.6.0) 183 | faraday (>= 0.17.3, < 3.0) 184 | google-cloud-errors (1.2.0) 185 | google-cloud-storage (1.36.2) 186 | addressable (~> 2.8) 187 | digest-crc (~> 0.4) 188 | google-apis-iamcredentials_v1 (~> 0.1) 189 | google-apis-storage_v1 (~> 0.1) 190 | google-cloud-core (~> 1.6) 191 | googleauth (>= 0.16.2, < 2.a) 192 | mini_mime (~> 1.0) 193 | googleauth (1.1.3) 194 | faraday (>= 0.17.3, < 3.a) 195 | jwt (>= 1.4, < 3.0) 196 | memoist (~> 0.16) 197 | multi_json (~> 1.11) 198 | os (>= 0.9, < 2.0) 199 | signet (>= 0.16, < 2.a) 200 | highline (2.0.3) 201 | http-cookie (1.0.5) 202 | domain_name (~> 0.5) 203 | httpclient (2.8.3) 204 | i18n (1.10.0) 205 | concurrent-ruby (~> 1.0) 206 | jmespath (1.6.1) 207 | json (2.6.2) 208 | jwt (2.3.0) 209 | memoist (0.16.2) 210 | mini_magick (4.11.0) 211 | mini_mime (1.1.2) 212 | minitest (5.15.0) 213 | molinillo (0.8.0) 214 | multi_json (1.15.0) 215 | multipart-post (2.0.0) 216 | nanaimo (0.3.0) 217 | nap (1.1.0) 218 | naturally (2.2.1) 219 | netrc (0.11.0) 220 | optparse (0.1.1) 221 | os (1.1.4) 222 | plist (3.6.0) 223 | public_suffix (4.0.7) 224 | rake (13.0.6) 225 | representable (3.2.0) 226 | declarative (< 0.1.0) 227 | trailblazer-option (>= 0.1.1, < 0.2.0) 228 | uber (< 0.2.0) 229 | retriable (3.1.2) 230 | rexml (3.2.5) 231 | rouge (2.0.7) 232 | ruby-macho (2.5.1) 233 | ruby2_keywords (0.0.5) 234 | rubyzip (2.3.2) 235 | security (0.1.3) 236 | signet (0.16.1) 237 | addressable (~> 2.8) 238 | faraday (>= 0.17.5, < 3.0) 239 | jwt (>= 1.5, < 3.0) 240 | multi_json (~> 1.10) 241 | simctl (1.6.8) 242 | CFPropertyList 243 | naturally 244 | terminal-notifier (2.0.0) 245 | terminal-table (1.8.0) 246 | unicode-display_width (~> 1.1, >= 1.1.1) 247 | trailblazer-option (0.1.2) 248 | tty-cursor (0.7.1) 249 | tty-screen (0.8.1) 250 | tty-spinner (0.9.3) 251 | tty-cursor (~> 0.7) 252 | typhoeus (1.4.0) 253 | ethon (>= 0.9.0) 254 | tzinfo (2.0.4) 255 | concurrent-ruby (~> 1.0) 256 | uber (0.1.0) 257 | unf (0.1.4) 258 | unf_ext 259 | unf_ext (0.0.8.2) 260 | unicode-display_width (1.8.0) 261 | webrick (1.7.0) 262 | word_wrap (1.0.0) 263 | xcodeproj (1.21.0) 264 | CFPropertyList (>= 2.3.3, < 4.0) 265 | atomos (~> 0.1.3) 266 | claide (>= 1.0.2, < 2.0) 267 | colored2 (~> 3.1) 268 | nanaimo (~> 0.3.0) 269 | rexml (~> 3.2.4) 270 | xcpretty (0.3.0) 271 | rouge (~> 2.0.7) 272 | xcpretty-travis-formatter (1.0.1) 273 | xcpretty (~> 0.2, >= 0.0.7) 274 | zeitwerk (2.5.4) 275 | 276 | PLATFORMS 277 | arm64-darwin-21 278 | x86_64-darwin-19 279 | 280 | DEPENDENCIES 281 | cocoapods (~> 1.11.2) 282 | fastlane (~> 2.206.2) 283 | 284 | RUBY VERSION 285 | ruby 3.0.2p107 286 | 287 | BUNDLED WITH 288 | 2.2.22 289 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Alberto De Bortoli 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.5 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "Stateful", 7 | platforms: [.iOS(.v13)], 8 | products: [ 9 | .library( 10 | name: "Stateful", 11 | targets: ["Stateful"]) 12 | ], 13 | targets: [ 14 | .target( 15 | name: "Stateful", 16 | path: "Framework/Sources"), 17 | .testTarget( 18 | name: "StatefulTests", 19 | dependencies: ["Stateful"], 20 | path: "Tests/Sources") 21 | ] 22 | ) 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Stateful 🦜 2 | 3 | [![Build Status](https://travis-ci.org/albertodebortoli/Stateful.svg?branch=master)](https://travis-ci.org/albertodebortoli/Stateful) 4 | [![Version](https://img.shields.io/cocoapods/v/Stateful.svg?style=flat)](https://cocoapods.org/pods/Stateful) 5 | [![License](https://img.shields.io/cocoapods/l/Stateful.svg?style=flat)](https://cocoapods.org/pods/Stateful) 6 | [![Platform](https://img.shields.io/cocoapods/p/Stateful.svg?style=flat)](https://cocoapods.org/pods/Stateful) 7 | 8 | The easiest state machine in Swift. 9 | 10 | Stateful is a minimalistic, thread-safe, non-boilerplate and super easy to use state machine in Swift. 11 | 12 | ## Example 13 | 14 | - define the events and statuses you need. E.g.: 15 | 16 | ```swift 17 | enum EventType { 18 | case start 19 | case pause 20 | } 21 | 22 | enum StateType { 23 | case idle 24 | case started 25 | } 26 | ``` 27 | 28 | - create a state machine with the initial state (you might want to retain it in a property) 29 | 30 | ```swift 31 | let stateMachine = StateMachine(initialState: .idle) 32 | ``` 33 | 34 | `StateMachine` will use the main queue to execute the transition pre and post blocks but you can optionally provide a custom one. 35 | 36 | ```swift 37 | let dispatchQueue = DispatchQueue(label: "com.albertodebortoli.someSerialCallbackQueue") 38 | let stateMachine = StateMachine(initialState: StateType.idle, callbackQueue: dispatchQueue) 39 | ``` 40 | 41 | - create transitions and add them to the state machine (the state machine will automatically recognize the new statuses) 42 | 43 | ```swift 44 | let t1 = Transition(with: .start, 45 | from: .idle, 46 | to: .started) 47 | 48 | let t2 = Transition(with: .pause, 49 | from: .started, 50 | to: .idle, 51 | preBlock: { 52 | print("Going to move from \(StateType.started) to \(StateType.idle)!") 53 | }, postBlock: { 54 | print("Just moved from \(StateType.started) to \(StateType.idle)!") 55 | }) 56 | 57 | stateMachine.add(transition: t1) 58 | stateMachine.add(transition: t2) 59 | ``` 60 | 61 | - process events like so 62 | 63 | ```swift 64 | stateMachine.process(event: .start) 65 | stateMachine.process(event: .pause, callback: { result in 66 | switch result { 67 | case .success: 68 | print("Event 'pause' was processed") 69 | case .failure: 70 | print("Event 'pause' cannot currently be processed.") 71 | } 72 | }) 73 | ``` 74 | 75 | ### Logging 76 | 77 | You can optionally enable logging to print extra state change information on the console 78 | 79 | ```swift 80 | stateMachine.enableLogging = true 81 | ``` 82 | 83 | Example: 84 | 85 | ``` 86 | [Stateful 🦜]: Processing event 'start' from 'idle' 87 | [Stateful 🦜]: Processed pre condition for event 'start' from 'idle' to 'started' 88 | [Stateful 🦜]: Processed state change from 'idle' to 'started' 89 | [Stateful 🦜]: Processed post condition for event 'start' from 'idle' to 'started' 90 | [Stateful 🦜]: Processing event 'stop' from 'started' 91 | [Stateful 🦜]: Processed pre condition for event 'stop' from 'started' to 'idle' 92 | [Stateful 🦜]: Processed state change from 'started' to 'idle' 93 | [Stateful 🦜]: Processed post condition for event 'stop' from 'started' to 'idle' 94 | ``` 95 | 96 | ## Installation 97 | 98 | Stateful is available through [CocoaPods](https://cocoapods.org). To install 99 | it, simply add the following line to your Podfile: 100 | 101 | ```ruby 102 | pod 'Stateful' 103 | ``` 104 | 105 | ## Author 106 | 107 | Alberto De Bortoli, albertodebortoli.website@gmail.com 108 | 109 | ## License 110 | 111 | Stateful is available under the MIT license. See the LICENSE file for more info. 112 | -------------------------------------------------------------------------------- /Stateful.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint Stateful.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'Stateful' 11 | s.version = ENV['LIB_VERSION'] 12 | s.summary = 'The easiest state machine in Swift' 13 | s.description = <<-DESC 14 | A minimalistic, thread-safe, non-boilerplate and super easy to use state machine in Swift. 15 | DESC 16 | 17 | s.homepage = 'https://github.com/albertodebortoli/Stateful' 18 | s.license = { :type => 'MIT', :file => 'LICENSE' } 19 | s.author = { 'Alberto De Bortoli' => 'albertodebortoli.com' } 20 | s.source = { :git => 'https://github.com/albertodebortoli/Stateful.git', :tag => s.version.to_s } 21 | s.social_media_url = 'https://twitter.com/albertodebo' 22 | 23 | s.ios.deployment_target = '13.0' 24 | s.swift_version = '5.0' 25 | 26 | s.source_files = 'Framework/Sources/**/*.swift' 27 | s.frameworks = 'Foundation' 28 | 29 | s.test_spec 'UnitTests' do |test_spec| 30 | test_spec.source_files = 'Tests/Sources/**/*.swift' 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /Tests/Sources/StateMachineTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StateMachineTests.swift 3 | // Stateful 4 | // 5 | // Created by Alberto De Bortoli on 16/12/2018. 6 | // 7 | 8 | import XCTest 9 | @testable import Stateful 10 | 11 | class StateMachineTests: XCTestCase { 12 | 13 | typealias TransitionDefault = Transition 14 | typealias StateMachineDefault = StateMachine 15 | 16 | enum EventType { 17 | case e1 18 | case e2 19 | } 20 | 21 | enum StateType { 22 | case idle 23 | case started 24 | case running 25 | case completed 26 | } 27 | 28 | var stateMachine: StateMachine! 29 | 30 | override func setUp() { 31 | super.setUp() 32 | stateMachine = StateMachineDefault(initialState: .idle) 33 | stateMachine.enableLogging = true 34 | } 35 | 36 | override func tearDown() { 37 | stateMachine = nil 38 | super.tearDown() 39 | } 40 | 41 | func test_Creation() { 42 | XCTAssertEqual(stateMachine.currentState, .idle) 43 | } 44 | 45 | func test_SingleTransition() { 46 | stateMachine.process(event: .e1) 47 | XCTAssertEqual(stateMachine.currentState, .idle) 48 | 49 | let transition = TransitionDefault(with: .e1, from: .idle, to: .started) 50 | stateMachine.add(transition: transition) 51 | stateMachine.process(event: .e1) 52 | XCTAssertEqual(stateMachine.currentState, .started) 53 | } 54 | 55 | func test_MultipleTransistions() { 56 | stateMachine.process(event: .e1) 57 | XCTAssertEqual(stateMachine.currentState, .idle) 58 | 59 | let transition1 = TransitionDefault(with: .e1, from: .idle, to: .started) 60 | stateMachine.add(transition: transition1) 61 | let transition2 = TransitionDefault(with: .e2, from: .started, to: .idle) 62 | stateMachine.add(transition: transition2) 63 | let transition3 = TransitionDefault(with: .e1, from: .started, to: .idle) 64 | stateMachine.add(transition: transition3) 65 | 66 | stateMachine.process(event: .e1) 67 | XCTAssertEqual(stateMachine.currentState, .started) 68 | stateMachine.process(event: .e2) 69 | XCTAssertEqual(stateMachine.currentState, .idle) 70 | stateMachine.process(event: .e1) 71 | XCTAssertEqual(stateMachine.currentState, .started) 72 | stateMachine.process(event: .e1) 73 | XCTAssertEqual(stateMachine.currentState, .idle) 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Tests/Sources/TransitionTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TransitionTests.swift 3 | // Stateful 4 | // 5 | // Created by Alberto De Bortoli on 16/12/2018. 6 | // 7 | 8 | import XCTest 9 | @testable import Stateful 10 | 11 | class TransitionTests: XCTestCase { 12 | 13 | func test_Creation() { 14 | let event = "event" 15 | let from = "from" 16 | let to = "to" 17 | let transition = Transition(with: event, from: from, to: to) 18 | XCTAssertEqual(transition.event, event) 19 | XCTAssertEqual(transition.source, from) 20 | XCTAssertEqual(transition.destination, to) 21 | } 22 | 23 | func test_Callback() { 24 | let expectation1 = XCTestExpectation(description: #function) 25 | let expectation2 = XCTestExpectation(description: #function) 26 | let transition = Transition(with: "event", from: "from", to: "to", preBlock: { 27 | expectation1.fulfill() 28 | }, postBlock: { 29 | expectation2.fulfill() 30 | }) 31 | transition.executePreBlock() 32 | wait(for: [expectation1], timeout: 2) 33 | transition.executePostBlock() 34 | wait(for: [expectation2], timeout: 2) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | default_platform :ios 2 | 3 | platform :ios do 4 | 5 | before_all do 6 | ensure_bundle_exec 7 | $test_output_folder = "fastlane/test_output" 8 | $derived_data_folder = "./derived_data" 9 | $workspace_filename = "Example/Stateful.xcworkspace" 10 | $common_test_xcargs = "COMPILER_INDEX_STORE_ENABLE=NO" 11 | end 12 | 13 | lane :unit_tests_cocoapods do |parameters| 14 | UI.user_error! "Missing parameter 'device'" unless parameters.has_key?(:device) 15 | device = parameters[:device] 16 | run_tests( 17 | workspace: $workspace_filename, 18 | scheme: "DemoApp", 19 | testplan: "UnitTests", 20 | device: device, 21 | code_coverage: true, 22 | result_bundle: true, 23 | concurrent_workers: 1, 24 | xcargs: $common_test_xcargs, 25 | derived_data_path: $derived_data_folder 26 | ) 27 | end 28 | 29 | lane :unit_tests_spm do |parameters| 30 | UI.user_error! "Missing parameter 'device'" unless parameters.has_key?(:device) 31 | device = parameters[:device] 32 | run_tests( 33 | package_path: "./", 34 | scheme: "Stateful", 35 | device: device, 36 | code_coverage: true, 37 | result_bundle: true, 38 | concurrent_workers: 1, 39 | xcargs: $common_test_xcargs, 40 | derived_data_path: $derived_data_folder, 41 | output_directory: $test_output_folder 42 | ) 43 | end 44 | 45 | end 46 | -------------------------------------------------------------------------------- /fastlane/README.md: -------------------------------------------------------------------------------- 1 | fastlane documentation 2 | ---- 3 | 4 | # Installation 5 | 6 | Make sure you have the latest version of the Xcode command line tools installed: 7 | 8 | ```sh 9 | xcode-select --install 10 | ``` 11 | 12 | For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) 13 | 14 | # Available Actions 15 | 16 | ## iOS 17 | 18 | ### ios unit_tests_cocoapods 19 | 20 | ```sh 21 | [bundle exec] fastlane ios unit_tests_cocoapods 22 | ``` 23 | 24 | 25 | 26 | ### ios unit_tests_spm 27 | 28 | ```sh 29 | [bundle exec] fastlane ios unit_tests_spm 30 | ``` 31 | 32 | 33 | 34 | ---- 35 | 36 | This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. 37 | 38 | More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). 39 | 40 | The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). 41 | -------------------------------------------------------------------------------- /fastlane/report.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | --------------------------------------------------------------------------------