├── .gitignore ├── .travis.yml ├── Example ├── Example.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Example.xcscheme ├── Example │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── ViewController.swift │ └── kitten.jpeg └── ExampleTests │ ├── ExampleTests.swift │ └── Info.plist ├── JSQActivityKit.podspec ├── JSQActivityKit.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── WorkspaceSettings.xcsettings ├── JSQActivityKit ├── JSQActivityKit.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── JSQActivityKit.xcscheme ├── JSQActivityKit │ ├── Info.plist │ ├── InstagramActivity.swift │ ├── JSQActivityKit.h │ ├── JSQInstagram.xcassets │ │ ├── Contents.json │ │ └── instagram.imageset │ │ │ ├── Contents.json │ │ │ ├── instagram.png │ │ │ ├── instagram@2x.png │ │ │ ├── instagram@2x~ipad.png │ │ │ ├── instagram@3x.png │ │ │ └── instagram~ipad.png │ ├── JSQSafari.xcassets │ │ ├── Contents.json │ │ └── safari.imageset │ │ │ ├── Contents.json │ │ │ ├── safari.png │ │ │ ├── safari@2x.png │ │ │ ├── safari@2x~ipad.png │ │ │ ├── safari@3x.png │ │ │ └── safari~iPad.png │ └── SafariActivity.swift └── JSQActivityKitTests │ ├── Info.plist │ └── JSQActivityKitTests.swift ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Xcode 4 | build/ 5 | *.pbxuser 6 | !default.pbxuser 7 | *.mode1v3 8 | !default.mode1v3 9 | *.mode2v3 10 | !default.mode2v3 11 | *.perspectivev3 12 | !default.perspectivev3 13 | xcuserdata 14 | *.xccheckout 15 | *.moved-aside 16 | DerivedData 17 | *.hmap 18 | *.ipa 19 | *.xcuserstate 20 | 21 | # Docs 22 | _docs/ 23 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode7 2 | 3 | language: objective-c 4 | 5 | # before_install: 6 | # - brew update 7 | # - if brew outdated | grep -qx xctool; then brew upgrade xctool; fi 8 | 9 | script: 10 | - xcodebuild clean build -workspace JSQActivityKit.xcworkspace -scheme Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO 11 | - xcodebuild clean build test -project JSQActivityKit/JSQActivityKit.xcodeproj -scheme JSQActivityKit -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO 12 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 884477471B081F7700EC3A9B /* JSQActivityKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 884477441B081F6000EC3A9B /* JSQActivityKit.framework */; }; 11 | 884477481B081F7700EC3A9B /* JSQActivityKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 884477441B081F6000EC3A9B /* JSQActivityKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 12 | 886AE2B81B084AD40051D47B /* kitten.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 886AE2B71B084AD40051D47B /* kitten.jpeg */; }; 13 | 88FE29821B08088B00A11178 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88FE29811B08088B00A11178 /* AppDelegate.swift */; }; 14 | 88FE29841B08088B00A11178 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88FE29831B08088B00A11178 /* ViewController.swift */; }; 15 | 88FE29871B08088B00A11178 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 88FE29851B08088B00A11178 /* Main.storyboard */; }; 16 | 88FE29891B08088B00A11178 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 88FE29881B08088B00A11178 /* Images.xcassets */; }; 17 | 88FE298C1B08088B00A11178 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88FE298A1B08088B00A11178 /* LaunchScreen.xib */; }; 18 | 88FE29981B08088B00A11178 /* ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88FE29971B08088B00A11178 /* ExampleTests.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 884477431B081F6000EC3A9B /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 8844773E1B081F6000EC3A9B /* JSQActivityKit.xcodeproj */; 25 | proxyType = 2; 26 | remoteGlobalIDString = 88FE29561B0806C200A11178; 27 | remoteInfo = JSQActivityKit; 28 | }; 29 | 884477451B081F6000EC3A9B /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 8844773E1B081F6000EC3A9B /* JSQActivityKit.xcodeproj */; 32 | proxyType = 2; 33 | remoteGlobalIDString = 88FE29611B0806C200A11178; 34 | remoteInfo = JSQActivityKitTests; 35 | }; 36 | 884477491B081F7700EC3A9B /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = 8844773E1B081F6000EC3A9B /* JSQActivityKit.xcodeproj */; 39 | proxyType = 1; 40 | remoteGlobalIDString = 88FE29551B0806C200A11178; 41 | remoteInfo = JSQActivityKit; 42 | }; 43 | 88FE29921B08088B00A11178 /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = 88FE29741B08088B00A11178 /* Project object */; 46 | proxyType = 1; 47 | remoteGlobalIDString = 88FE297B1B08088B00A11178; 48 | remoteInfo = Example; 49 | }; 50 | /* End PBXContainerItemProxy section */ 51 | 52 | /* Begin PBXCopyFilesBuildPhase section */ 53 | 8844773D1B081DFB00EC3A9B /* Embed Frameworks */ = { 54 | isa = PBXCopyFilesBuildPhase; 55 | buildActionMask = 2147483647; 56 | dstPath = ""; 57 | dstSubfolderSpec = 10; 58 | files = ( 59 | 884477481B081F7700EC3A9B /* JSQActivityKit.framework in Embed Frameworks */, 60 | ); 61 | name = "Embed Frameworks"; 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | /* End PBXCopyFilesBuildPhase section */ 65 | 66 | /* Begin PBXFileReference section */ 67 | 8844773E1B081F6000EC3A9B /* JSQActivityKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = JSQActivityKit.xcodeproj; path = ../JSQActivityKit/JSQActivityKit.xcodeproj; sourceTree = ""; }; 68 | 886AE2B71B084AD40051D47B /* kitten.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = kitten.jpeg; sourceTree = ""; }; 69 | 88FE297C1B08088B00A11178 /* ActivityKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ActivityKit.app; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | 88FE29801B08088B00A11178 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 71 | 88FE29811B08088B00A11178 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 72 | 88FE29831B08088B00A11178 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 73 | 88FE29861B08088B00A11178 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 74 | 88FE29881B08088B00A11178 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 75 | 88FE298B1B08088B00A11178 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 76 | 88FE29911B08088B00A11178 /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 77 | 88FE29961B08088B00A11178 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 78 | 88FE29971B08088B00A11178 /* ExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleTests.swift; sourceTree = ""; }; 79 | /* End PBXFileReference section */ 80 | 81 | /* Begin PBXFrameworksBuildPhase section */ 82 | 88FE29791B08088B00A11178 /* Frameworks */ = { 83 | isa = PBXFrameworksBuildPhase; 84 | buildActionMask = 2147483647; 85 | files = ( 86 | 884477471B081F7700EC3A9B /* JSQActivityKit.framework in Frameworks */, 87 | ); 88 | runOnlyForDeploymentPostprocessing = 0; 89 | }; 90 | 88FE298E1B08088B00A11178 /* Frameworks */ = { 91 | isa = PBXFrameworksBuildPhase; 92 | buildActionMask = 2147483647; 93 | files = ( 94 | ); 95 | runOnlyForDeploymentPostprocessing = 0; 96 | }; 97 | /* End PBXFrameworksBuildPhase section */ 98 | 99 | /* Begin PBXGroup section */ 100 | 8844773F1B081F6000EC3A9B /* Products */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 884477441B081F6000EC3A9B /* JSQActivityKit.framework */, 104 | 884477461B081F6000EC3A9B /* JSQActivityKitTests.xctest */, 105 | ); 106 | name = Products; 107 | sourceTree = ""; 108 | }; 109 | 88FE29731B08088B00A11178 = { 110 | isa = PBXGroup; 111 | children = ( 112 | 88FE297E1B08088B00A11178 /* Example */, 113 | 88FE29941B08088B00A11178 /* ExampleTests */, 114 | 88FE297D1B08088B00A11178 /* Products */, 115 | 8844773E1B081F6000EC3A9B /* JSQActivityKit.xcodeproj */, 116 | ); 117 | sourceTree = ""; 118 | }; 119 | 88FE297D1B08088B00A11178 /* Products */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 88FE297C1B08088B00A11178 /* ActivityKit.app */, 123 | 88FE29911B08088B00A11178 /* ExampleTests.xctest */, 124 | ); 125 | name = Products; 126 | sourceTree = ""; 127 | }; 128 | 88FE297E1B08088B00A11178 /* Example */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 88FE29811B08088B00A11178 /* AppDelegate.swift */, 132 | 88FE29881B08088B00A11178 /* Images.xcassets */, 133 | 886AE2B71B084AD40051D47B /* kitten.jpeg */, 134 | 88FE298A1B08088B00A11178 /* LaunchScreen.xib */, 135 | 88FE29851B08088B00A11178 /* Main.storyboard */, 136 | 88FE297F1B08088B00A11178 /* Supporting Files */, 137 | 88FE29831B08088B00A11178 /* ViewController.swift */, 138 | ); 139 | path = Example; 140 | sourceTree = ""; 141 | }; 142 | 88FE297F1B08088B00A11178 /* Supporting Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 88FE29801B08088B00A11178 /* Info.plist */, 146 | ); 147 | name = "Supporting Files"; 148 | sourceTree = ""; 149 | }; 150 | 88FE29941B08088B00A11178 /* ExampleTests */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 88FE29971B08088B00A11178 /* ExampleTests.swift */, 154 | 88FE29951B08088B00A11178 /* Supporting Files */, 155 | ); 156 | path = ExampleTests; 157 | sourceTree = ""; 158 | }; 159 | 88FE29951B08088B00A11178 /* Supporting Files */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 88FE29961B08088B00A11178 /* Info.plist */, 163 | ); 164 | name = "Supporting Files"; 165 | sourceTree = ""; 166 | }; 167 | /* End PBXGroup section */ 168 | 169 | /* Begin PBXNativeTarget section */ 170 | 88FE297B1B08088B00A11178 /* Example */ = { 171 | isa = PBXNativeTarget; 172 | buildConfigurationList = 88FE299B1B08088B00A11178 /* Build configuration list for PBXNativeTarget "Example" */; 173 | buildPhases = ( 174 | 88FE29781B08088B00A11178 /* Sources */, 175 | 88FE29791B08088B00A11178 /* Frameworks */, 176 | 88FE297A1B08088B00A11178 /* Resources */, 177 | 8844773D1B081DFB00EC3A9B /* Embed Frameworks */, 178 | ); 179 | buildRules = ( 180 | ); 181 | dependencies = ( 182 | 8844774A1B081F7700EC3A9B /* PBXTargetDependency */, 183 | ); 184 | name = Example; 185 | productName = Example; 186 | productReference = 88FE297C1B08088B00A11178 /* ActivityKit.app */; 187 | productType = "com.apple.product-type.application"; 188 | }; 189 | 88FE29901B08088B00A11178 /* ExampleTests */ = { 190 | isa = PBXNativeTarget; 191 | buildConfigurationList = 88FE299E1B08088B00A11178 /* Build configuration list for PBXNativeTarget "ExampleTests" */; 192 | buildPhases = ( 193 | 88FE298D1B08088B00A11178 /* Sources */, 194 | 88FE298E1B08088B00A11178 /* Frameworks */, 195 | 88FE298F1B08088B00A11178 /* Resources */, 196 | ); 197 | buildRules = ( 198 | ); 199 | dependencies = ( 200 | 88FE29931B08088B00A11178 /* PBXTargetDependency */, 201 | ); 202 | name = ExampleTests; 203 | productName = ExampleTests; 204 | productReference = 88FE29911B08088B00A11178 /* ExampleTests.xctest */; 205 | productType = "com.apple.product-type.bundle.unit-test"; 206 | }; 207 | /* End PBXNativeTarget section */ 208 | 209 | /* Begin PBXProject section */ 210 | 88FE29741B08088B00A11178 /* Project object */ = { 211 | isa = PBXProject; 212 | attributes = { 213 | LastSwiftUpdateCheck = 0700; 214 | LastUpgradeCheck = 0700; 215 | ORGANIZATIONNAME = "Hexed Bits"; 216 | TargetAttributes = { 217 | 88FE297B1B08088B00A11178 = { 218 | CreatedOnToolsVersion = 6.3.1; 219 | }; 220 | 88FE29901B08088B00A11178 = { 221 | CreatedOnToolsVersion = 6.3.1; 222 | TestTargetID = 88FE297B1B08088B00A11178; 223 | }; 224 | }; 225 | }; 226 | buildConfigurationList = 88FE29771B08088B00A11178 /* Build configuration list for PBXProject "Example" */; 227 | compatibilityVersion = "Xcode 3.2"; 228 | developmentRegion = English; 229 | hasScannedForEncodings = 0; 230 | knownRegions = ( 231 | en, 232 | Base, 233 | ); 234 | mainGroup = 88FE29731B08088B00A11178; 235 | productRefGroup = 88FE297D1B08088B00A11178 /* Products */; 236 | projectDirPath = ""; 237 | projectReferences = ( 238 | { 239 | ProductGroup = 8844773F1B081F6000EC3A9B /* Products */; 240 | ProjectRef = 8844773E1B081F6000EC3A9B /* JSQActivityKit.xcodeproj */; 241 | }, 242 | ); 243 | projectRoot = ""; 244 | targets = ( 245 | 88FE297B1B08088B00A11178 /* Example */, 246 | 88FE29901B08088B00A11178 /* ExampleTests */, 247 | ); 248 | }; 249 | /* End PBXProject section */ 250 | 251 | /* Begin PBXReferenceProxy section */ 252 | 884477441B081F6000EC3A9B /* JSQActivityKit.framework */ = { 253 | isa = PBXReferenceProxy; 254 | fileType = wrapper.framework; 255 | path = JSQActivityKit.framework; 256 | remoteRef = 884477431B081F6000EC3A9B /* PBXContainerItemProxy */; 257 | sourceTree = BUILT_PRODUCTS_DIR; 258 | }; 259 | 884477461B081F6000EC3A9B /* JSQActivityKitTests.xctest */ = { 260 | isa = PBXReferenceProxy; 261 | fileType = wrapper.cfbundle; 262 | path = JSQActivityKitTests.xctest; 263 | remoteRef = 884477451B081F6000EC3A9B /* PBXContainerItemProxy */; 264 | sourceTree = BUILT_PRODUCTS_DIR; 265 | }; 266 | /* End PBXReferenceProxy section */ 267 | 268 | /* Begin PBXResourcesBuildPhase section */ 269 | 88FE297A1B08088B00A11178 /* Resources */ = { 270 | isa = PBXResourcesBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | 88FE29871B08088B00A11178 /* Main.storyboard in Resources */, 274 | 88FE298C1B08088B00A11178 /* LaunchScreen.xib in Resources */, 275 | 886AE2B81B084AD40051D47B /* kitten.jpeg in Resources */, 276 | 88FE29891B08088B00A11178 /* Images.xcassets in Resources */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | 88FE298F1B08088B00A11178 /* Resources */ = { 281 | isa = PBXResourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | }; 287 | /* End PBXResourcesBuildPhase section */ 288 | 289 | /* Begin PBXSourcesBuildPhase section */ 290 | 88FE29781B08088B00A11178 /* Sources */ = { 291 | isa = PBXSourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 88FE29841B08088B00A11178 /* ViewController.swift in Sources */, 295 | 88FE29821B08088B00A11178 /* AppDelegate.swift in Sources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | 88FE298D1B08088B00A11178 /* Sources */ = { 300 | isa = PBXSourcesBuildPhase; 301 | buildActionMask = 2147483647; 302 | files = ( 303 | 88FE29981B08088B00A11178 /* ExampleTests.swift in Sources */, 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | /* End PBXSourcesBuildPhase section */ 308 | 309 | /* Begin PBXTargetDependency section */ 310 | 8844774A1B081F7700EC3A9B /* PBXTargetDependency */ = { 311 | isa = PBXTargetDependency; 312 | name = JSQActivityKit; 313 | targetProxy = 884477491B081F7700EC3A9B /* PBXContainerItemProxy */; 314 | }; 315 | 88FE29931B08088B00A11178 /* PBXTargetDependency */ = { 316 | isa = PBXTargetDependency; 317 | target = 88FE297B1B08088B00A11178 /* Example */; 318 | targetProxy = 88FE29921B08088B00A11178 /* PBXContainerItemProxy */; 319 | }; 320 | /* End PBXTargetDependency section */ 321 | 322 | /* Begin PBXVariantGroup section */ 323 | 88FE29851B08088B00A11178 /* Main.storyboard */ = { 324 | isa = PBXVariantGroup; 325 | children = ( 326 | 88FE29861B08088B00A11178 /* Base */, 327 | ); 328 | name = Main.storyboard; 329 | sourceTree = ""; 330 | }; 331 | 88FE298A1B08088B00A11178 /* LaunchScreen.xib */ = { 332 | isa = PBXVariantGroup; 333 | children = ( 334 | 88FE298B1B08088B00A11178 /* Base */, 335 | ); 336 | name = LaunchScreen.xib; 337 | sourceTree = ""; 338 | }; 339 | /* End PBXVariantGroup section */ 340 | 341 | /* Begin XCBuildConfiguration section */ 342 | 88FE29991B08088B00A11178 /* Debug */ = { 343 | isa = XCBuildConfiguration; 344 | buildSettings = { 345 | ALWAYS_SEARCH_USER_PATHS = NO; 346 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 347 | CLANG_CXX_LIBRARY = "libc++"; 348 | CLANG_ENABLE_MODULES = YES; 349 | CLANG_ENABLE_OBJC_ARC = YES; 350 | CLANG_WARN_BOOL_CONVERSION = YES; 351 | CLANG_WARN_CONSTANT_CONVERSION = YES; 352 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 353 | CLANG_WARN_EMPTY_BODY = YES; 354 | CLANG_WARN_ENUM_CONVERSION = YES; 355 | CLANG_WARN_INT_CONVERSION = YES; 356 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 357 | CLANG_WARN_UNREACHABLE_CODE = YES; 358 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 359 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 360 | COPY_PHASE_STRIP = NO; 361 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 362 | ENABLE_STRICT_OBJC_MSGSEND = YES; 363 | ENABLE_TESTABILITY = YES; 364 | GCC_C_LANGUAGE_STANDARD = gnu99; 365 | GCC_DYNAMIC_NO_PIC = NO; 366 | GCC_NO_COMMON_BLOCKS = YES; 367 | GCC_OPTIMIZATION_LEVEL = 0; 368 | GCC_PREPROCESSOR_DEFINITIONS = ( 369 | "DEBUG=1", 370 | "$(inherited)", 371 | ); 372 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 380 | MTL_ENABLE_DEBUG_INFO = YES; 381 | ONLY_ACTIVE_ARCH = YES; 382 | PRODUCT_NAME = ActivityKit; 383 | SDKROOT = iphoneos; 384 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 385 | TARGETED_DEVICE_FAMILY = "1,2"; 386 | }; 387 | name = Debug; 388 | }; 389 | 88FE299A1B08088B00A11178 /* Release */ = { 390 | isa = XCBuildConfiguration; 391 | buildSettings = { 392 | ALWAYS_SEARCH_USER_PATHS = NO; 393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 394 | CLANG_CXX_LIBRARY = "libc++"; 395 | CLANG_ENABLE_MODULES = YES; 396 | CLANG_ENABLE_OBJC_ARC = YES; 397 | CLANG_WARN_BOOL_CONVERSION = YES; 398 | CLANG_WARN_CONSTANT_CONVERSION = YES; 399 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 400 | CLANG_WARN_EMPTY_BODY = YES; 401 | CLANG_WARN_ENUM_CONVERSION = YES; 402 | CLANG_WARN_INT_CONVERSION = YES; 403 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 404 | CLANG_WARN_UNREACHABLE_CODE = YES; 405 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 406 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 407 | COPY_PHASE_STRIP = NO; 408 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 409 | ENABLE_NS_ASSERTIONS = NO; 410 | ENABLE_STRICT_OBJC_MSGSEND = YES; 411 | GCC_C_LANGUAGE_STANDARD = gnu99; 412 | GCC_NO_COMMON_BLOCKS = YES; 413 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 414 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 415 | GCC_WARN_UNDECLARED_SELECTOR = YES; 416 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 417 | GCC_WARN_UNUSED_FUNCTION = YES; 418 | GCC_WARN_UNUSED_VARIABLE = YES; 419 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 420 | MTL_ENABLE_DEBUG_INFO = NO; 421 | PRODUCT_NAME = ActivityKit; 422 | SDKROOT = iphoneos; 423 | TARGETED_DEVICE_FAMILY = "1,2"; 424 | VALIDATE_PRODUCT = YES; 425 | }; 426 | name = Release; 427 | }; 428 | 88FE299C1B08088B00A11178 /* Debug */ = { 429 | isa = XCBuildConfiguration; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | INFOPLIST_FILE = Example/Info.plist; 433 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 434 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 435 | PRODUCT_BUNDLE_IDENTIFIER = "com.hexedbits.$(PRODUCT_NAME:rfc1034identifier)"; 436 | PRODUCT_NAME = ActivityKit; 437 | }; 438 | name = Debug; 439 | }; 440 | 88FE299D1B08088B00A11178 /* Release */ = { 441 | isa = XCBuildConfiguration; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | INFOPLIST_FILE = Example/Info.plist; 445 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 446 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 447 | PRODUCT_BUNDLE_IDENTIFIER = "com.hexedbits.$(PRODUCT_NAME:rfc1034identifier)"; 448 | PRODUCT_NAME = ActivityKit; 449 | }; 450 | name = Release; 451 | }; 452 | 88FE299F1B08088B00A11178 /* Debug */ = { 453 | isa = XCBuildConfiguration; 454 | buildSettings = { 455 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 456 | GCC_PREPROCESSOR_DEFINITIONS = ( 457 | "DEBUG=1", 458 | "$(inherited)", 459 | ); 460 | INFOPLIST_FILE = ExampleTests/Info.plist; 461 | LD_RUNPATH_SEARCH_PATHS = "$(inherited)"; 462 | PRODUCT_BUNDLE_IDENTIFIER = "com.hexedbits.$(PRODUCT_NAME:rfc1034identifier)"; 463 | PRODUCT_NAME = "$(TARGET_NAME)"; 464 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ActivityKit.app/ActivityKit"; 465 | }; 466 | name = Debug; 467 | }; 468 | 88FE29A01B08088B00A11178 /* Release */ = { 469 | isa = XCBuildConfiguration; 470 | buildSettings = { 471 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 472 | INFOPLIST_FILE = ExampleTests/Info.plist; 473 | LD_RUNPATH_SEARCH_PATHS = "$(inherited)"; 474 | PRODUCT_BUNDLE_IDENTIFIER = "com.hexedbits.$(PRODUCT_NAME:rfc1034identifier)"; 475 | PRODUCT_NAME = "$(TARGET_NAME)"; 476 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ActivityKit.app/ActivityKit"; 477 | }; 478 | name = Release; 479 | }; 480 | /* End XCBuildConfiguration section */ 481 | 482 | /* Begin XCConfigurationList section */ 483 | 88FE29771B08088B00A11178 /* Build configuration list for PBXProject "Example" */ = { 484 | isa = XCConfigurationList; 485 | buildConfigurations = ( 486 | 88FE29991B08088B00A11178 /* Debug */, 487 | 88FE299A1B08088B00A11178 /* Release */, 488 | ); 489 | defaultConfigurationIsVisible = 0; 490 | defaultConfigurationName = Release; 491 | }; 492 | 88FE299B1B08088B00A11178 /* Build configuration list for PBXNativeTarget "Example" */ = { 493 | isa = XCConfigurationList; 494 | buildConfigurations = ( 495 | 88FE299C1B08088B00A11178 /* Debug */, 496 | 88FE299D1B08088B00A11178 /* Release */, 497 | ); 498 | defaultConfigurationIsVisible = 0; 499 | defaultConfigurationName = Release; 500 | }; 501 | 88FE299E1B08088B00A11178 /* Build configuration list for PBXNativeTarget "ExampleTests" */ = { 502 | isa = XCConfigurationList; 503 | buildConfigurations = ( 504 | 88FE299F1B08088B00A11178 /* Debug */, 505 | 88FE29A01B08088B00A11178 /* Release */, 506 | ); 507 | defaultConfigurationIsVisible = 0; 508 | defaultConfigurationName = Release; 509 | }; 510 | /* End XCConfigurationList section */ 511 | }; 512 | rootObject = 88FE29741B08088B00A11178 /* Project object */; 513 | } 514 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Jesse Squires 3 | // http://www.jessesquires.com 4 | // 5 | // 6 | // Documentation 7 | // http://www.jessesquires.com/JSQActivityKit 8 | // 9 | // 10 | // GitHub 11 | // https://github.com/jessesquires/JSQActivityKit 12 | // 13 | // 14 | // License 15 | // Copyright (c) 2015 Jesse Squires 16 | // Released under an MIT license: http://opensource.org/licenses/MIT 17 | // 18 | 19 | import UIKit 20 | 21 | @UIApplicationMain 22 | class AppDelegate: UIResponder, UIApplicationDelegate { 23 | 24 | var window: UIWindow? 25 | 26 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 27 | return true 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /Example/Example/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Example/Example/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 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Example/Example/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 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Example/Example/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Jesse Squires 3 | // http://www.jessesquires.com 4 | // 5 | // 6 | // Documentation 7 | // http://www.jessesquires.com/JSQActivityKit 8 | // 9 | // 10 | // GitHub 11 | // https://github.com/jessesquires/JSQActivityKit 12 | // 13 | // 14 | // License 15 | // Copyright (c) 2015 Jesse Squires 16 | // Released under an MIT license: http://opensource.org/licenses/MIT 17 | // 18 | 19 | import UIKit 20 | 21 | import JSQActivityKit 22 | 23 | 24 | class ViewController: UITableViewController { 25 | 26 | override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { 27 | tableView.deselectRowAtIndexPath(indexPath, animated: true) 28 | 29 | var items = [AnyObject]() 30 | var activities = [UIActivity]() 31 | 32 | switch indexPath.row { 33 | case 0: 34 | items.append(NSURL(string: "http://jessesquires.com")!) 35 | activities.append(SafariActivity()) 36 | case 1: 37 | items.append(UIImage(named: "kitten.jpeg")!) 38 | items.append("#Kittens of Instagram.\nhttp://placekitten.com/g/600/600") 39 | activities.append(InstagramActivity(presenter: { (controller: UIDocumentInteractionController) in 40 | controller.presentOpenInMenuFromRect(tableView.cellForRowAtIndexPath(indexPath)!.frame, inView: tableView, animated: true) 41 | })) 42 | 43 | default: break 44 | } 45 | 46 | print("Selected \(activities.first)...") 47 | 48 | let controller = UIActivityViewController(activityItems: items, applicationActivities: activities) 49 | controller.popoverPresentationController?.sourceView = tableView 50 | controller.popoverPresentationController?.sourceRect = tableView.cellForRowAtIndexPath(indexPath)!.frame 51 | controller.completionWithItemsHandler = { (type: String?, completed: Bool, returnedItems: [AnyObject]?, error: NSError?) -> Void in 52 | print("Type = \(type)") 53 | print("Completed = \(completed)") 54 | print("ReturnedItems = \(returnedItems)") 55 | print("Error = \(error)") 56 | } 57 | 58 | presentViewController(controller, animated: true, completion: nil) 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Example/Example/kitten.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessesquires/JSQActivityKit/d2c14aee41e6ca022747d45b0596c68462f3e4f3/Example/Example/kitten.jpeg -------------------------------------------------------------------------------- /Example/ExampleTests/ExampleTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Jesse Squires 3 | // http://www.jessesquires.com 4 | // 5 | // 6 | // Documentation 7 | // http://www.jessesquires.com/JSQActivityKit 8 | // 9 | // 10 | // GitHub 11 | // https://github.com/jessesquires/JSQActivityKit 12 | // 13 | // 14 | // License 15 | // Copyright (c) 2015 Jesse Squires 16 | // Released under an MIT license: http://opensource.org/licenses/MIT 17 | // 18 | 19 | import UIKit 20 | import XCTest 21 | 22 | class ExampleTests: XCTestCase { 23 | 24 | override func setUp() { 25 | super.setUp() 26 | } 27 | 28 | override func tearDown() { 29 | super.tearDown() 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /Example/ExampleTests/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 | -------------------------------------------------------------------------------- /JSQActivityKit.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'JSQActivityKit' 3 | s.version = '1.0.2' 4 | s.license = 'MIT' 5 | 6 | s.summary = 'Swift UIActivities for iOS' 7 | s.homepage = 'https://github.com/jessesquires/JSQActivityKit' 8 | s.documentation_url = 'http://jessesquires.com/JSQActivityKit' 9 | 10 | s.social_media_url = 'https://twitter.com/jesse_squires' 11 | s.authors = { 'Jesse Squires' => 'jesse.squires.developer@gmail.com' } 12 | 13 | s.source = { :git => 'https://github.com/jessesquires/JSQActivityKit.git', :tag => s.version } 14 | s.source_files = 'JSQActivityKit/JSQActivityKit/*.swift' 15 | s.resources = 'JSQActivityKit/JSQActivityKit/*.xcassets' 16 | 17 | s.platform = :ios, '8.0' 18 | s.frameworks = 'UIKit' 19 | s.requires_arc = true 20 | end 21 | -------------------------------------------------------------------------------- /JSQActivityKit.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /JSQActivityKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 88A635C31B9E3042005D0158 /* JSQActivityKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 88A635C21B9E3042005D0158 /* JSQActivityKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 88A635CA1B9E3042005D0158 /* JSQActivityKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88A635BF1B9E3042005D0158 /* JSQActivityKit.framework */; }; 12 | 88A635CF1B9E3042005D0158 /* JSQActivityKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88A635CE1B9E3042005D0158 /* JSQActivityKitTests.swift */; }; 13 | 88A635DC1B9E3BE8005D0158 /* InstagramActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88A635DA1B9E3BE8005D0158 /* InstagramActivity.swift */; }; 14 | 88A635DD1B9E3BE8005D0158 /* SafariActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88A635DB1B9E3BE8005D0158 /* SafariActivity.swift */; }; 15 | 88A635DF1B9E3C60005D0158 /* JSQSafari.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 88A635DE1B9E3C60005D0158 /* JSQSafari.xcassets */; }; 16 | 88A635E11B9E3C71005D0158 /* JSQInstagram.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 88A635E01B9E3C71005D0158 /* JSQInstagram.xcassets */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 88A635CB1B9E3042005D0158 /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 88A635B61B9E3042005D0158 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 88A635BE1B9E3042005D0158; 25 | remoteInfo = JSQActivityKit; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 88A635BF1B9E3042005D0158 /* JSQActivityKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JSQActivityKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 88A635C21B9E3042005D0158 /* JSQActivityKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSQActivityKit.h; sourceTree = ""; }; 32 | 88A635C41B9E3042005D0158 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | 88A635C91B9E3042005D0158 /* JSQActivityKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JSQActivityKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 88A635CE1B9E3042005D0158 /* JSQActivityKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSQActivityKitTests.swift; sourceTree = ""; }; 35 | 88A635D01B9E3042005D0158 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | 88A635DA1B9E3BE8005D0158 /* InstagramActivity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InstagramActivity.swift; sourceTree = ""; }; 37 | 88A635DB1B9E3BE8005D0158 /* SafariActivity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SafariActivity.swift; sourceTree = ""; }; 38 | 88A635DE1B9E3C60005D0158 /* JSQSafari.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = JSQSafari.xcassets; sourceTree = ""; }; 39 | 88A635E01B9E3C71005D0158 /* JSQInstagram.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = JSQInstagram.xcassets; sourceTree = ""; }; 40 | /* End PBXFileReference section */ 41 | 42 | /* Begin PBXFrameworksBuildPhase section */ 43 | 88A635BB1B9E3042005D0158 /* Frameworks */ = { 44 | isa = PBXFrameworksBuildPhase; 45 | buildActionMask = 2147483647; 46 | files = ( 47 | ); 48 | runOnlyForDeploymentPostprocessing = 0; 49 | }; 50 | 88A635C61B9E3042005D0158 /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | 88A635CA1B9E3042005D0158 /* JSQActivityKit.framework in Frameworks */, 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXFrameworksBuildPhase section */ 59 | 60 | /* Begin PBXGroup section */ 61 | 88A635B51B9E3042005D0158 = { 62 | isa = PBXGroup; 63 | children = ( 64 | 88A635C11B9E3042005D0158 /* JSQActivityKit */, 65 | 88A635CD1B9E3042005D0158 /* JSQActivityKitTests */, 66 | 88A635C01B9E3042005D0158 /* Products */, 67 | ); 68 | sourceTree = ""; 69 | }; 70 | 88A635C01B9E3042005D0158 /* Products */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 88A635BF1B9E3042005D0158 /* JSQActivityKit.framework */, 74 | 88A635C91B9E3042005D0158 /* JSQActivityKitTests.xctest */, 75 | ); 76 | name = Products; 77 | sourceTree = ""; 78 | }; 79 | 88A635C11B9E3042005D0158 /* JSQActivityKit */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 88A635C41B9E3042005D0158 /* Info.plist */, 83 | 88A635DA1B9E3BE8005D0158 /* InstagramActivity.swift */, 84 | 88A635C21B9E3042005D0158 /* JSQActivityKit.h */, 85 | 88A635E01B9E3C71005D0158 /* JSQInstagram.xcassets */, 86 | 88A635DE1B9E3C60005D0158 /* JSQSafari.xcassets */, 87 | 88A635DB1B9E3BE8005D0158 /* SafariActivity.swift */, 88 | ); 89 | path = JSQActivityKit; 90 | sourceTree = ""; 91 | }; 92 | 88A635CD1B9E3042005D0158 /* JSQActivityKitTests */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 88A635CE1B9E3042005D0158 /* JSQActivityKitTests.swift */, 96 | 88A635D01B9E3042005D0158 /* Info.plist */, 97 | ); 98 | path = JSQActivityKitTests; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXHeadersBuildPhase section */ 104 | 88A635BC1B9E3042005D0158 /* Headers */ = { 105 | isa = PBXHeadersBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | 88A635C31B9E3042005D0158 /* JSQActivityKit.h in Headers */, 109 | ); 110 | runOnlyForDeploymentPostprocessing = 0; 111 | }; 112 | /* End PBXHeadersBuildPhase section */ 113 | 114 | /* Begin PBXNativeTarget section */ 115 | 88A635BE1B9E3042005D0158 /* JSQActivityKit */ = { 116 | isa = PBXNativeTarget; 117 | buildConfigurationList = 88A635D31B9E3042005D0158 /* Build configuration list for PBXNativeTarget "JSQActivityKit" */; 118 | buildPhases = ( 119 | 88A635BA1B9E3042005D0158 /* Sources */, 120 | 88A635BB1B9E3042005D0158 /* Frameworks */, 121 | 88A635BC1B9E3042005D0158 /* Headers */, 122 | 88A635BD1B9E3042005D0158 /* Resources */, 123 | ); 124 | buildRules = ( 125 | ); 126 | dependencies = ( 127 | ); 128 | name = JSQActivityKit; 129 | productName = JSQActivityKit; 130 | productReference = 88A635BF1B9E3042005D0158 /* JSQActivityKit.framework */; 131 | productType = "com.apple.product-type.framework"; 132 | }; 133 | 88A635C81B9E3042005D0158 /* JSQActivityKitTests */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = 88A635D61B9E3042005D0158 /* Build configuration list for PBXNativeTarget "JSQActivityKitTests" */; 136 | buildPhases = ( 137 | 88A635C51B9E3042005D0158 /* Sources */, 138 | 88A635C61B9E3042005D0158 /* Frameworks */, 139 | 88A635C71B9E3042005D0158 /* Resources */, 140 | ); 141 | buildRules = ( 142 | ); 143 | dependencies = ( 144 | 88A635CC1B9E3042005D0158 /* PBXTargetDependency */, 145 | ); 146 | name = JSQActivityKitTests; 147 | productName = JSQActivityKitTests; 148 | productReference = 88A635C91B9E3042005D0158 /* JSQActivityKitTests.xctest */; 149 | productType = "com.apple.product-type.bundle.unit-test"; 150 | }; 151 | /* End PBXNativeTarget section */ 152 | 153 | /* Begin PBXProject section */ 154 | 88A635B61B9E3042005D0158 /* Project object */ = { 155 | isa = PBXProject; 156 | attributes = { 157 | LastSwiftUpdateCheck = 0700; 158 | LastUpgradeCheck = 0800; 159 | ORGANIZATIONNAME = "Hexed Bits"; 160 | TargetAttributes = { 161 | 88A635BE1B9E3042005D0158 = { 162 | CreatedOnToolsVersion = 7.0; 163 | }; 164 | 88A635C81B9E3042005D0158 = { 165 | CreatedOnToolsVersion = 7.0; 166 | }; 167 | }; 168 | }; 169 | buildConfigurationList = 88A635B91B9E3042005D0158 /* Build configuration list for PBXProject "JSQActivityKit" */; 170 | compatibilityVersion = "Xcode 3.2"; 171 | developmentRegion = English; 172 | hasScannedForEncodings = 0; 173 | knownRegions = ( 174 | en, 175 | ); 176 | mainGroup = 88A635B51B9E3042005D0158; 177 | productRefGroup = 88A635C01B9E3042005D0158 /* Products */; 178 | projectDirPath = ""; 179 | projectRoot = ""; 180 | targets = ( 181 | 88A635BE1B9E3042005D0158 /* JSQActivityKit */, 182 | 88A635C81B9E3042005D0158 /* JSQActivityKitTests */, 183 | ); 184 | }; 185 | /* End PBXProject section */ 186 | 187 | /* Begin PBXResourcesBuildPhase section */ 188 | 88A635BD1B9E3042005D0158 /* Resources */ = { 189 | isa = PBXResourcesBuildPhase; 190 | buildActionMask = 2147483647; 191 | files = ( 192 | 88A635DF1B9E3C60005D0158 /* JSQSafari.xcassets in Resources */, 193 | 88A635E11B9E3C71005D0158 /* JSQInstagram.xcassets in Resources */, 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | }; 197 | 88A635C71B9E3042005D0158 /* Resources */ = { 198 | isa = PBXResourcesBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | }; 204 | /* End PBXResourcesBuildPhase section */ 205 | 206 | /* Begin PBXSourcesBuildPhase section */ 207 | 88A635BA1B9E3042005D0158 /* Sources */ = { 208 | isa = PBXSourcesBuildPhase; 209 | buildActionMask = 2147483647; 210 | files = ( 211 | 88A635DD1B9E3BE8005D0158 /* SafariActivity.swift in Sources */, 212 | 88A635DC1B9E3BE8005D0158 /* InstagramActivity.swift in Sources */, 213 | ); 214 | runOnlyForDeploymentPostprocessing = 0; 215 | }; 216 | 88A635C51B9E3042005D0158 /* Sources */ = { 217 | isa = PBXSourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | 88A635CF1B9E3042005D0158 /* JSQActivityKitTests.swift in Sources */, 221 | ); 222 | runOnlyForDeploymentPostprocessing = 0; 223 | }; 224 | /* End PBXSourcesBuildPhase section */ 225 | 226 | /* Begin PBXTargetDependency section */ 227 | 88A635CC1B9E3042005D0158 /* PBXTargetDependency */ = { 228 | isa = PBXTargetDependency; 229 | target = 88A635BE1B9E3042005D0158 /* JSQActivityKit */; 230 | targetProxy = 88A635CB1B9E3042005D0158 /* PBXContainerItemProxy */; 231 | }; 232 | /* End PBXTargetDependency section */ 233 | 234 | /* Begin XCBuildConfiguration section */ 235 | 88A635D11B9E3042005D0158 /* Debug */ = { 236 | isa = XCBuildConfiguration; 237 | buildSettings = { 238 | ALWAYS_SEARCH_USER_PATHS = NO; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BOOL_CONVERSION = YES; 244 | CLANG_WARN_CONSTANT_CONVERSION = YES; 245 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 246 | CLANG_WARN_EMPTY_BODY = YES; 247 | CLANG_WARN_ENUM_CONVERSION = YES; 248 | CLANG_WARN_INFINITE_RECURSION = YES; 249 | CLANG_WARN_INT_CONVERSION = YES; 250 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 251 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 252 | CLANG_WARN_UNREACHABLE_CODE = YES; 253 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 254 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 255 | COPY_PHASE_STRIP = NO; 256 | CURRENT_PROJECT_VERSION = 1; 257 | DEBUG_INFORMATION_FORMAT = dwarf; 258 | ENABLE_STRICT_OBJC_MSGSEND = YES; 259 | ENABLE_TESTABILITY = YES; 260 | GCC_C_LANGUAGE_STANDARD = gnu99; 261 | GCC_DYNAMIC_NO_PIC = NO; 262 | GCC_NO_COMMON_BLOCKS = YES; 263 | GCC_OPTIMIZATION_LEVEL = 0; 264 | GCC_PREPROCESSOR_DEFINITIONS = ( 265 | "DEBUG=1", 266 | "$(inherited)", 267 | ); 268 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 269 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 270 | GCC_WARN_UNDECLARED_SELECTOR = YES; 271 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 272 | GCC_WARN_UNUSED_FUNCTION = YES; 273 | GCC_WARN_UNUSED_VARIABLE = YES; 274 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 275 | MTL_ENABLE_DEBUG_INFO = YES; 276 | ONLY_ACTIVE_ARCH = YES; 277 | SDKROOT = iphoneos; 278 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VERSIONING_SYSTEM = "apple-generic"; 281 | VERSION_INFO_PREFIX = ""; 282 | }; 283 | name = Debug; 284 | }; 285 | 88A635D21B9E3042005D0158 /* Release */ = { 286 | isa = XCBuildConfiguration; 287 | buildSettings = { 288 | ALWAYS_SEARCH_USER_PATHS = NO; 289 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 290 | CLANG_CXX_LIBRARY = "libc++"; 291 | CLANG_ENABLE_MODULES = YES; 292 | CLANG_ENABLE_OBJC_ARC = YES; 293 | CLANG_WARN_BOOL_CONVERSION = YES; 294 | CLANG_WARN_CONSTANT_CONVERSION = YES; 295 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 296 | CLANG_WARN_EMPTY_BODY = YES; 297 | CLANG_WARN_ENUM_CONVERSION = YES; 298 | CLANG_WARN_INFINITE_RECURSION = YES; 299 | CLANG_WARN_INT_CONVERSION = YES; 300 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 301 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 302 | CLANG_WARN_UNREACHABLE_CODE = YES; 303 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 304 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 305 | COPY_PHASE_STRIP = NO; 306 | CURRENT_PROJECT_VERSION = 1; 307 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 308 | ENABLE_NS_ASSERTIONS = NO; 309 | ENABLE_STRICT_OBJC_MSGSEND = YES; 310 | GCC_C_LANGUAGE_STANDARD = gnu99; 311 | GCC_NO_COMMON_BLOCKS = YES; 312 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 313 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 314 | GCC_WARN_UNDECLARED_SELECTOR = YES; 315 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 316 | GCC_WARN_UNUSED_FUNCTION = YES; 317 | GCC_WARN_UNUSED_VARIABLE = YES; 318 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 319 | MTL_ENABLE_DEBUG_INFO = NO; 320 | SDKROOT = iphoneos; 321 | TARGETED_DEVICE_FAMILY = "1,2"; 322 | VALIDATE_PRODUCT = YES; 323 | VERSIONING_SYSTEM = "apple-generic"; 324 | VERSION_INFO_PREFIX = ""; 325 | }; 326 | name = Release; 327 | }; 328 | 88A635D41B9E3042005D0158 /* Debug */ = { 329 | isa = XCBuildConfiguration; 330 | buildSettings = { 331 | CLANG_ENABLE_MODULES = YES; 332 | DEFINES_MODULE = YES; 333 | DYLIB_COMPATIBILITY_VERSION = 1; 334 | DYLIB_CURRENT_VERSION = 1; 335 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 336 | INFOPLIST_FILE = JSQActivityKit/Info.plist; 337 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 338 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 339 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 340 | PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.JSQActivityKit; 341 | PRODUCT_NAME = "$(TARGET_NAME)"; 342 | SKIP_INSTALL = YES; 343 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 344 | }; 345 | name = Debug; 346 | }; 347 | 88A635D51B9E3042005D0158 /* Release */ = { 348 | isa = XCBuildConfiguration; 349 | buildSettings = { 350 | CLANG_ENABLE_MODULES = YES; 351 | DEFINES_MODULE = YES; 352 | DYLIB_COMPATIBILITY_VERSION = 1; 353 | DYLIB_CURRENT_VERSION = 1; 354 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 355 | INFOPLIST_FILE = JSQActivityKit/Info.plist; 356 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 357 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 358 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 359 | PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.JSQActivityKit; 360 | PRODUCT_NAME = "$(TARGET_NAME)"; 361 | SKIP_INSTALL = YES; 362 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 363 | }; 364 | name = Release; 365 | }; 366 | 88A635D71B9E3042005D0158 /* Debug */ = { 367 | isa = XCBuildConfiguration; 368 | buildSettings = { 369 | INFOPLIST_FILE = JSQActivityKitTests/Info.plist; 370 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 371 | PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.JSQActivityKitTests; 372 | PRODUCT_NAME = "$(TARGET_NAME)"; 373 | }; 374 | name = Debug; 375 | }; 376 | 88A635D81B9E3042005D0158 /* Release */ = { 377 | isa = XCBuildConfiguration; 378 | buildSettings = { 379 | INFOPLIST_FILE = JSQActivityKitTests/Info.plist; 380 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 381 | PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.JSQActivityKitTests; 382 | PRODUCT_NAME = "$(TARGET_NAME)"; 383 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 384 | }; 385 | name = Release; 386 | }; 387 | /* End XCBuildConfiguration section */ 388 | 389 | /* Begin XCConfigurationList section */ 390 | 88A635B91B9E3042005D0158 /* Build configuration list for PBXProject "JSQActivityKit" */ = { 391 | isa = XCConfigurationList; 392 | buildConfigurations = ( 393 | 88A635D11B9E3042005D0158 /* Debug */, 394 | 88A635D21B9E3042005D0158 /* Release */, 395 | ); 396 | defaultConfigurationIsVisible = 0; 397 | defaultConfigurationName = Release; 398 | }; 399 | 88A635D31B9E3042005D0158 /* Build configuration list for PBXNativeTarget "JSQActivityKit" */ = { 400 | isa = XCConfigurationList; 401 | buildConfigurations = ( 402 | 88A635D41B9E3042005D0158 /* Debug */, 403 | 88A635D51B9E3042005D0158 /* Release */, 404 | ); 405 | defaultConfigurationIsVisible = 0; 406 | defaultConfigurationName = Release; 407 | }; 408 | 88A635D61B9E3042005D0158 /* Build configuration list for PBXNativeTarget "JSQActivityKitTests" */ = { 409 | isa = XCConfigurationList; 410 | buildConfigurations = ( 411 | 88A635D71B9E3042005D0158 /* Debug */, 412 | 88A635D81B9E3042005D0158 /* Release */, 413 | ); 414 | defaultConfigurationIsVisible = 0; 415 | defaultConfigurationName = Release; 416 | }; 417 | /* End XCConfigurationList section */ 418 | }; 419 | rootObject = 88A635B61B9E3042005D0158 /* Project object */; 420 | } 421 | -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit.xcodeproj/xcshareddata/xcschemes/JSQActivityKit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 90 | 91 | 92 | 93 | 95 | 96 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/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.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/InstagramActivity.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Jesse Squires 3 | // http://www.jessesquires.com 4 | // 5 | // 6 | // Documentation 7 | // http://www.jessesquires.com/JSQActivityKit 8 | // 9 | // 10 | // GitHub 11 | // https://github.com/jessesquires/JSQActivityKit 12 | // 13 | // 14 | // License 15 | // Copyright (c) 2015 Jesse Squires 16 | // Released under an MIT license: http://opensource.org/licenses/MIT 17 | // 18 | 19 | import UIKit 20 | 21 | 22 | /// An Instagram sharing activity subclass of `UIActivity`. 23 | public final class InstagramActivity: UIActivity, UIDocumentInteractionControllerDelegate { 24 | 25 | // MARK: Typealiases 26 | 27 | /** 28 | A closure that presents a document interaction controller. 29 | 30 | - returns: The document interaction controller to present. 31 | */ 32 | public typealias DocumentInteractionControllerPresenter = (UIDocumentInteractionController) -> Void 33 | 34 | // MARK: Properties 35 | 36 | private let title: String 37 | 38 | private let presenter: DocumentInteractionControllerPresenter 39 | 40 | private var documentInteractionController: UIDocumentInteractionController? 41 | 42 | private var imageData: NSData? 43 | 44 | private var caption: String? 45 | 46 | // MARK: Initialization 47 | 48 | /** 49 | Constructs a new `InstagramActivity` instance with the specified title and presenter. 50 | 51 | - parameter title: The title to display for the activity. 52 | - parameter presenter: The closure to call to present the document interaction controller. 53 | 54 | - returns: A new `InstagramActivity` instance. 55 | */ 56 | public init(title: String = "Instagram", presenter: DocumentInteractionControllerPresenter) { 57 | self.title = title 58 | self.presenter = presenter 59 | } 60 | 61 | // MARK: UIActivity overrides 62 | 63 | /// :nodoc: 64 | public override class func activityCategory() -> UIActivityCategory { 65 | return .Share 66 | } 67 | 68 | /// :nodoc: 69 | public override func activityTitle() -> String? { 70 | return title 71 | } 72 | 73 | /// :nodoc: 74 | public override func activityType() -> String? { 75 | return "com.instagram.exclusivegram" 76 | } 77 | 78 | /// :nodoc: 79 | public override func activityImage() -> UIImage? { 80 | return UIImage(named: "instagram", inBundle: NSBundle(forClass: InstagramActivity.self), compatibleWithTraitCollection: nil) 81 | } 82 | 83 | /// :nodoc: 84 | public override func canPerformWithActivityItems(activityItems: [AnyObject]) -> Bool { 85 | return UIApplication.sharedApplication().canOpenURL(NSURL(string: "instagram://app")!) 86 | && activityItems.filter { $0 is UIImage || $0 is NSData }.count != 0 87 | } 88 | 89 | /// :nodoc: 90 | public override func prepareWithActivityItems(activityItems: [AnyObject]) { 91 | for item in activityItems { 92 | if let image = item as? UIImage { 93 | imageData = UIImageJPEGRepresentation(image, 1.0) 94 | } 95 | else if let data = item as? NSData, let image = UIImage(data: data, scale: 1.0) { 96 | imageData = UIImageJPEGRepresentation(image, 1.0) 97 | } 98 | else if let text = item as? String { 99 | caption = text 100 | } 101 | } 102 | } 103 | 104 | /// :nodoc: 105 | public override func performActivity() { 106 | let path = NSString(string: NSTemporaryDirectory()).stringByAppendingPathComponent("instagram.igo") 107 | guard NSFileManager.defaultManager().createFileAtPath(path, contents: imageData, attributes: nil) else { 108 | activityDidFinish(false) 109 | return 110 | } 111 | 112 | documentInteractionController = UIDocumentInteractionController(URL: NSURL(fileURLWithPath: path)) 113 | documentInteractionController?.UTI = activityType() 114 | documentInteractionController?.delegate = self 115 | if let caption = caption { 116 | documentInteractionController?.annotation = [ "InstagramCaption" : caption ] 117 | } 118 | 119 | if let documentInteractionController = documentInteractionController { 120 | presenter(documentInteractionController) 121 | } 122 | } 123 | 124 | // MARK: Document interaction controller delegate 125 | 126 | /// :nodoc: 127 | public func documentInteractionControllerDidDismissOpenInMenu(controller: UIDocumentInteractionController) { 128 | activityDidFinish(true) 129 | } 130 | 131 | } 132 | -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQActivityKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Jesse Squires 3 | // http://www.jessesquires.com 4 | // 5 | // 6 | // Documentation 7 | // http://www.jessesquires.com/JSQActivityKit 8 | // 9 | // 10 | // GitHub 11 | // https://github.com/jessesquires/JSQActivityKit 12 | // 13 | // 14 | // License 15 | // Copyright (c) 2015 Jesse Squires 16 | // Released under an MIT license: http://opensource.org/licenses/MIT 17 | // 18 | 19 | #import 20 | 21 | FOUNDATION_EXPORT double JSQActivityKitVersionNumber; 22 | 23 | FOUNDATION_EXPORT const unsigned char JSQActivityKitVersionString[]; 24 | -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/instagram.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "instagram.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "instagram@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "filename" : "instagram@3x.png", 16 | "scale" : "3x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "filename" : "instagram~ipad.png", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "filename" : "instagram@2x~ipad.png", 26 | "scale" : "2x" 27 | } 28 | ], 29 | "info" : { 30 | "version" : 1, 31 | "author" : "xcode" 32 | }, 33 | "properties" : { 34 | "template-rendering-intent" : "original" 35 | } 36 | } -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/instagram.imageset/instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessesquires/JSQActivityKit/d2c14aee41e6ca022747d45b0596c68462f3e4f3/JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/instagram.imageset/instagram.png -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/instagram.imageset/instagram@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessesquires/JSQActivityKit/d2c14aee41e6ca022747d45b0596c68462f3e4f3/JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/instagram.imageset/instagram@2x.png -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/instagram.imageset/instagram@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessesquires/JSQActivityKit/d2c14aee41e6ca022747d45b0596c68462f3e4f3/JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/instagram.imageset/instagram@2x~ipad.png -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/instagram.imageset/instagram@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessesquires/JSQActivityKit/d2c14aee41e6ca022747d45b0596c68462f3e4f3/JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/instagram.imageset/instagram@3x.png -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/instagram.imageset/instagram~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessesquires/JSQActivityKit/d2c14aee41e6ca022747d45b0596c68462f3e4f3/JSQActivityKit/JSQActivityKit/JSQInstagram.xcassets/instagram.imageset/instagram~ipad.png -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/safari.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "safari.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "safari@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "filename" : "safari@3x.png", 16 | "scale" : "3x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "filename" : "safari~iPad.png", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "filename" : "safari@2x~ipad.png", 26 | "scale" : "2x" 27 | } 28 | ], 29 | "info" : { 30 | "version" : 1, 31 | "author" : "xcode" 32 | }, 33 | "properties" : { 34 | "template-rendering-intent" : "template" 35 | } 36 | } -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/safari.imageset/safari.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessesquires/JSQActivityKit/d2c14aee41e6ca022747d45b0596c68462f3e4f3/JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/safari.imageset/safari.png -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/safari.imageset/safari@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessesquires/JSQActivityKit/d2c14aee41e6ca022747d45b0596c68462f3e4f3/JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/safari.imageset/safari@2x.png -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/safari.imageset/safari@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessesquires/JSQActivityKit/d2c14aee41e6ca022747d45b0596c68462f3e4f3/JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/safari.imageset/safari@2x~ipad.png -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/safari.imageset/safari@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessesquires/JSQActivityKit/d2c14aee41e6ca022747d45b0596c68462f3e4f3/JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/safari.imageset/safari@3x.png -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/safari.imageset/safari~iPad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessesquires/JSQActivityKit/d2c14aee41e6ca022747d45b0596c68462f3e4f3/JSQActivityKit/JSQActivityKit/JSQSafari.xcassets/safari.imageset/safari~iPad.png -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKit/SafariActivity.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Jesse Squires 3 | // http://www.jessesquires.com 4 | // 5 | // 6 | // Documentation 7 | // http://www.jessesquires.com/JSQActivityKit 8 | // 9 | // 10 | // GitHub 11 | // https://github.com/jessesquires/JSQActivityKit 12 | // 13 | // 14 | // License 15 | // Copyright (c) 2015 Jesse Squires 16 | // Released under an MIT license: http://opensource.org/licenses/MIT 17 | // 18 | 19 | import UIKit 20 | 21 | 22 | /// A Safari action activity subclass of `UIActivity`. 23 | public final class SafariActivity: UIActivity { 24 | 25 | // MARK: Properties 26 | 27 | private let title: String 28 | 29 | private var url: NSURL? 30 | 31 | // MARK: Initialization 32 | 33 | /** 34 | Constructs a new `SafariActivity` instance with the specified title. 35 | 36 | - parameter title: The title to display for the activity. 37 | 38 | - returns: A new `SafariActivity` instance. 39 | */ 40 | public init(title: String = "Open In Safari") { 41 | self.title = title 42 | } 43 | 44 | // MARK: UIActivity overrides 45 | 46 | /// :nodoc: 47 | public override class func activityCategory() -> UIActivityCategory { 48 | return .Action 49 | } 50 | 51 | /// :nodoc: 52 | public override func activityTitle() -> String? { 53 | return title 54 | } 55 | 56 | /// :nodoc: 57 | public override func activityType() -> String? { 58 | return String(SafariActivity.self) 59 | } 60 | 61 | /// :nodoc: 62 | public override func activityImage() -> UIImage? { 63 | return UIImage(named: "safari", inBundle: NSBundle(forClass: SafariActivity.self), compatibleWithTraitCollection: nil) 64 | } 65 | 66 | /// :nodoc: 67 | public override func canPerformWithActivityItems(activityItems: [AnyObject]) -> Bool { 68 | return activityItems.filter { item -> Bool in 69 | guard let url = item as? NSURL else { return false } 70 | return UIApplication.sharedApplication().canOpenURL(url) 71 | }.count != 0 72 | } 73 | 74 | /// :nodoc: 75 | public override func prepareWithActivityItems(activityItems: [AnyObject]) { 76 | url = activityItems.filter { $0 is NSURL }.first as? NSURL 77 | } 78 | 79 | /// :nodoc: 80 | public override func performActivity() { 81 | var completed = false 82 | 83 | if let url = url { 84 | completed = UIApplication.sharedApplication().openURL(url) 85 | } 86 | 87 | activityDidFinish(completed) 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKitTests/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 | -------------------------------------------------------------------------------- /JSQActivityKit/JSQActivityKitTests/JSQActivityKitTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Jesse Squires 3 | // http://www.jessesquires.com 4 | // 5 | // 6 | // Documentation 7 | // http://www.jessesquires.com/JSQActivityKit 8 | // 9 | // 10 | // GitHub 11 | // https://github.com/jessesquires/JSQActivityKit 12 | // 13 | // 14 | // License 15 | // Copyright (c) 2015 Jesse Squires 16 | // Released under an MIT license: http://opensource.org/licenses/MIT 17 | // 18 | 19 | import UIKit 20 | import XCTest 21 | 22 | import JSQActivityKit 23 | 24 | 25 | class JSQActivityKitTests: XCTestCase { 26 | 27 | func test_SafariActivityInit() { 28 | let safari = SafariActivity() 29 | 30 | XCTAssertEqual(safari.activityTitle(), "Open In Safari") 31 | XCTAssertEqual(safari.activityType(), String(SafariActivity.self)) 32 | XCTAssertEqual(SafariActivity.activityCategory(), UIActivityCategory.Action) 33 | XCTAssertNotNil(safari.activityImage()) 34 | } 35 | 36 | func test_InstagramActivityInit() { 37 | let insta = InstagramActivity { (controller) -> Void in 38 | // do nothing 39 | } 40 | 41 | XCTAssertEqual(insta.activityTitle(), "Instagram") 42 | XCTAssertEqual(insta.activityType(), "com.instagram.exclusivegram") 43 | XCTAssertEqual(InstagramActivity.activityCategory(), UIActivityCategory.Share) 44 | XCTAssertNotNil(insta.activityImage()) 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jesse Squires 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 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/) 2 | 3 | # :warning: DEPRECATED :warning: 4 | 5 | This library is no longer necessary, and thus no longer supported or developed. 6 | 7 | ## JSQActivityKit 8 | 9 | [![Build Status](https://secure.travis-ci.org/jessesquires/JSQActivityKit.svg)](http://travis-ci.org/jessesquires/JSQActivityKit) [![Version Status](https://img.shields.io/cocoapods/v/JSQActivityKit.svg)][podLink] [![license MIT](https://img.shields.io/cocoapods/l/JSQActivityKit.svg)][mitLink] [![Platform](https://img.shields.io/cocoapods/p/JSQActivityKit.svg)][docsLink] [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 10 | 11 | *Swift UIActivities for iOS* 12 | 13 | ## About 14 | 15 | A Swift framework of [`UIActivity`](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIActivity_Class/index.html) classes for sharing and performing actions with [`UIActivityViewController`](http://nshipster.com/uiactivityviewcontroller/). 16 | 17 | Current activities: 18 | 19 | * Safari 20 | * Instagram 21 | 22 | ## Requirements 23 | 24 | * iOS 8+ 25 | * Swift 2.0 26 | 27 | ## Installation 28 | 29 | #### [CocoaPods](http://cocoapods.org) (recommended) 30 | 31 | ````ruby 32 | use_frameworks! 33 | 34 | # For latest release in cocoapods 35 | pod 'JSQActivityKit' 36 | 37 | # Feeling adventurous? Get the latest on develop 38 | pod 'JSQActivityKit', :git => 'https://github.com/jessesquires/JSQActivityKit.git', :branch => 'develop' 39 | ```` 40 | 41 | #### [Carthage](https://github.com/Carthage/Carthage) 42 | 43 | ````bash 44 | github "jessesquires/JSQActivityKit" 45 | ```` 46 | 47 | ## Documentation 48 | 49 | Read the [docs][docsLink]. Generated with [jazzy](https://github.com/realm/jazzy). Hosted by [GitHub Pages](https://pages.github.com). 50 | 51 | More information on the [gh-pages](https://github.com/jessesquires/JSQActivityKit/tree/gh-pages) branch. 52 | 53 | ## Getting Started 54 | 55 | ````swift 56 | import JSQActivityKit 57 | ```` 58 | 59 | See the included example app, open `JSQActivityKit.xcworkspace`. 60 | 61 | ## Contribute 62 | 63 | Please follow these sweet [contribution guidelines](https://github.com/jessesquires/HowToContribute). 64 | 65 | ## Credits 66 | 67 | Created and maintained by [**@jesse_squires**](https://twitter.com/jesse_squires). 68 | 69 | ## License 70 | 71 | `JSQActivityKit` is released under an [MIT License][mitLink]. See `LICENSE` for details. 72 | 73 | >**Copyright © 2015 Jesse Squires.** 74 | 75 | *Please provide attribution, it is greatly appreciated.* 76 | 77 | [docsLink]:http://www.jessesquires.com/JSQActivityKit 78 | [podLink]:https://cocoapods.org/pods/JSQActivityKit 79 | [mitLink]:http://opensource.org/licenses/MIT 80 | --------------------------------------------------------------------------------