{"_id":"5673014406b19d0d00106919","user":"5654ea8be0d82b0d00ab5747","category":{"_id":"567301169d4c060d009da8b3","pages":["5673014406b19d0d00106919","567301539d4c060d009da8b4","56730163fc60740d00be8ab7"],"project":"5672fc989996590d00c22c65","version":"5672fc989996590d00c22c68","__v":3,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-17T18:38:14.940Z","from_sync":false,"order":0,"slug":"getting-started","title":"Getting Started"},"version":{"_id":"5672fc989996590d00c22c68","__v":7,"project":"5672fc989996590d00c22c65","createdAt":"2015-12-17T18:19:04.699Z","releaseDate":"2015-12-17T18:19:04.699Z","categories":["5672fc999996590d00c22c69","567301169d4c060d009da8b3","56730183547bee0d00997d1a","5673018a06b19d0d0010691b","567301b53054630d00fe9288","567400638565060d009a86fb","5674017bf79ca90d00ad2f67"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.5.0","version":"2.5.0"},"project":"5672fc989996590d00c22c65","__v":8,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-17T18:39:00.994Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Operations is a Swift 2.0 framework for iOS 8+, Mac OS X 10.10+, watchOS 2+ and tvOS 9+. It has no 3rd party dependencies and builds directly from source. \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Extension API Compatibility\"\n}\n[/block]\nThe project contains two Xcode projects, `Operations.xcodeproj` builds frameworks suitable for embedding into an application. `Operations_ExtensionCompatible.xcodeproj` builds extension API compatible frameworks for iOS, tvOS and OS X. These builds are missing some functionality however which cannot be made compatible.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Importing\"\n}\n[/block]\nAll platforms and flavors have the same module name, which can be imported into your Swift code like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import Operations\",\n      \"language\": \"swift\",\n      \"name\": \"import\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"CocoaPods\"\n}\n[/block]\nOperations is available via [CocoaPods](http://cocoapods.org/pods/Operations). Add the following to your `Podfile`:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"use_frameworks!\\n\\npod 'Operations'\",\n      \"language\": \"ruby\",\n      \"name\": \"Podfile\"\n    }\n  ]\n}\n[/block]\nBy default, CocoaPods will install a framework suitable for usage in an application. If building an app extension, use the Extension subspec like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"use_frameworks!\\n\\npod 'Operations/Extension'\",\n      \"language\": \"ruby\",\n      \"name\": \"Podfile\"\n    }\n  ]\n}\n[/block]\nIf your app is health focused, you may find the `HealthCapability` useful. This type imports HealthKit and so is not included by default. It is available via a subspec instead:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"use_frameworks!\\n\\npod 'Operations/+Health'\",\n      \"language\": \"ruby\",\n      \"name\": \"Podfile\"\n    }\n  ]\n}\n[/block]\nIf your app supports iOS 8, and you wise to perform operations using the ABAddressBook framework, such as adding people to group, or even creating groups, there is a subspec for you. This subspec also includes operations for use with the Contacts framework. Unfortunately at the moment it has not been possible to unite these two under one type system.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"use_frameworks!\\n\\npod 'Operations/+AddressBook'\",\n      \"language\": \"ruby\",\n      \"name\": \"Podfile\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Carthage\"\n}\n[/block]\nCarthage can be used to fetch and download the Operations framework. Add the following to your `Cartfile`:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"github 'danthorpe/Operations'\",\n      \"language\": \"text\",\n      \"name\": \"Cartfile\"\n    }\n  ]\n}\n[/block]\nUnfortunately at the moment, it is only possible to fetch & build the standard application framework. If you need the extension API compatible version, you will need to resort to other methods such as CocoaPods.","excerpt":"","slug":"installing","type":"basic","title":"Installing"}
Operations is a Swift 2.0 framework for iOS 8+, Mac OS X 10.10+, watchOS 2+ and tvOS 9+. It has no 3rd party dependencies and builds directly from source. [block:api-header] { "type": "basic", "title": "Extension API Compatibility" } [/block] The project contains two Xcode projects, `Operations.xcodeproj` builds frameworks suitable for embedding into an application. `Operations_ExtensionCompatible.xcodeproj` builds extension API compatible frameworks for iOS, tvOS and OS X. These builds are missing some functionality however which cannot be made compatible. [block:api-header] { "type": "basic", "title": "Importing" } [/block] All platforms and flavors have the same module name, which can be imported into your Swift code like this: [block:code] { "codes": [ { "code": "import Operations", "language": "swift", "name": "import" } ] } [/block] [block:api-header] { "type": "basic", "title": "CocoaPods" } [/block] Operations is available via [CocoaPods](http://cocoapods.org/pods/Operations). Add the following to your `Podfile`: [block:code] { "codes": [ { "code": "use_frameworks!\n\npod 'Operations'", "language": "ruby", "name": "Podfile" } ] } [/block] By default, CocoaPods will install a framework suitable for usage in an application. If building an app extension, use the Extension subspec like this: [block:code] { "codes": [ { "code": "use_frameworks!\n\npod 'Operations/Extension'", "language": "ruby", "name": "Podfile" } ] } [/block] If your app is health focused, you may find the `HealthCapability` useful. This type imports HealthKit and so is not included by default. It is available via a subspec instead: [block:code] { "codes": [ { "code": "use_frameworks!\n\npod 'Operations/+Health'", "language": "ruby", "name": "Podfile" } ] } [/block] If your app supports iOS 8, and you wise to perform operations using the ABAddressBook framework, such as adding people to group, or even creating groups, there is a subspec for you. This subspec also includes operations for use with the Contacts framework. Unfortunately at the moment it has not been possible to unite these two under one type system. [block:code] { "codes": [ { "code": "use_frameworks!\n\npod 'Operations/+AddressBook'", "language": "ruby", "name": "Podfile" } ] } [/block] [block:api-header] { "type": "basic", "title": "Carthage" } [/block] Carthage can be used to fetch and download the Operations framework. Add the following to your `Cartfile`: [block:code] { "codes": [ { "code": "github 'danthorpe/Operations'", "language": "text", "name": "Cartfile" } ] } [/block] Unfortunately at the moment, it is only possible to fetch & build the standard application framework. If you need the extension API compatible version, you will need to resort to other methods such as CocoaPods.