├── .gitignore ├── .swift-version ├── Example ├── SwiftWebVCExample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── myles.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── myles.xcuserdatad │ │ └── xcschemes │ │ ├── SwiftWebVCExample.xcscheme │ │ └── xcschememanagement.plist └── SwiftWebVCExample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── LICENSE ├── README.md ├── SwiftWebVC.podspec ├── SwiftWebVC ├── Resources │ └── Media.xcassets │ │ ├── Contents.json │ │ ├── SwiftWebVCActivityChrome.imageset │ │ ├── Contents.json │ │ ├── SwiftWebVCActivityChrome.png │ │ ├── SwiftWebVCActivityChrome@2x.png │ │ └── SwiftWebVCActivityChrome@3x.png │ │ ├── SwiftWebVCActivitySafari.imageset │ │ ├── Contents.json │ │ ├── SwiftWebVCActivitySafari.png │ │ ├── SwiftWebVCActivitySafari@2x.png │ │ └── SwiftWebVCActivitySafari@3x.png │ │ ├── SwiftWebVCBack.imageset │ │ ├── Contents.json │ │ ├── SwiftWebVCBack.png │ │ ├── SwiftWebVCBack@2x.png │ │ └── SwiftWebVCBack@3x.png │ │ ├── SwiftWebVCDismiss.imageset │ │ ├── Contents.json │ │ ├── SwiftWebVCDismiss.png │ │ ├── SwiftWebVCDismiss@2x.png │ │ └── SwiftWebVCDismiss@3x.png │ │ ├── SwiftWebVCDismissAlt.imageset │ │ ├── Contents.json │ │ ├── SwiftWebVCDismissAlt.png │ │ ├── SwiftWebVCDismissAlt@2x.png │ │ └── SwiftWebVCDismissAlt@3x.png │ │ └── SwiftWebVCNext.imageset │ │ ├── Contents.json │ │ ├── SwiftWebVCNext.png │ │ ├── SwiftWebVCNext@2x.png │ │ └── SwiftWebVCNext@3x.png ├── Strings │ ├── da.lproj │ │ └── SwiftWebVC.strings │ ├── de.lproj │ │ └── SwiftWebVC.strings │ ├── en.lproj │ │ └── SwiftWebVC.strings │ ├── es-ES.lproj │ │ └── SwiftWebVC.strings │ ├── es.lproj │ │ └── SwiftWebVC.strings │ ├── fr.lproj │ │ └── SwiftWebVC.strings │ ├── ja.lproj │ │ └── SwiftWebVC.strings │ ├── pt.lproj │ │ └── SwiftWebVC.strings │ ├── vi.lproj │ │ └── SwiftWebVC.strings │ ├── zh-Hans.lproj │ │ └── SwiftWebVC.strings │ └── zh-Hant.lproj │ │ └── SwiftWebVC.strings ├── SwiftModalWebVC.swift ├── SwiftWebVC.swift ├── SwiftWebVCActivity.swift ├── SwiftWebVCActivityChrome.swift └── SwiftWebVCActivitySafari.swift └── SwiftWebVCFramework ├── SwiftWebVCFramework.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── SwiftWebVC.xcscheme └── SwiftWebVCFramework ├── Info.plist └── SwiftWebVCFramework.h /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/macos,swift 3 | 4 | ### macOS ### 5 | *.DS_Store 6 | .AppleDouble 7 | .LSOverride 8 | 9 | # Icon must end with two \r 10 | Icon 11 | 12 | 13 | # Thumbnails 14 | ._* 15 | # Files that might appear in the root of a volume 16 | .DocumentRevisions-V100 17 | .fseventsd 18 | .Spotlight-V100 19 | .TemporaryItems 20 | .Trashes 21 | .VolumeIcon.icns 22 | .com.apple.timemachine.donotpresent 23 | # Directories potentially created on remote AFP share 24 | .AppleDB 25 | .AppleDesktop 26 | Network Trash Folder 27 | Temporary Items 28 | .apdisk 29 | 30 | 31 | ### Swift ### 32 | # Xcode 33 | # 34 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 35 | 36 | ## Build generated 37 | build/ 38 | DerivedData/ 39 | 40 | ## Various settings 41 | *.pbxuser 42 | !default.pbxuser 43 | *.mode1v3 44 | !default.mode1v3 45 | *.mode2v3 46 | !default.mode2v3 47 | *.perspectivev3 48 | !default.perspectivev3 49 | xcuserdata/ 50 | 51 | ## Other 52 | *.moved-aside 53 | *.xcuserstate 54 | 55 | ## Obj-C/Swift specific 56 | *.hmap 57 | *.ipa 58 | *.dSYM.zip 59 | *.dSYM 60 | 61 | ## Playgrounds 62 | timeline.xctimeline 63 | playground.xcworkspace 64 | 65 | # Swift Package Manager 66 | # 67 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 68 | # Packages/ 69 | .build/ 70 | 71 | # CocoaPods 72 | # 73 | # We recommend against adding the Pods directory to your .gitignore. However 74 | # you should judge for yourself, the pros and cons are mentioned at: 75 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 76 | # 77 | # Pods/ 78 | 79 | # Carthage 80 | # 81 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 82 | # Carthage/Checkouts 83 | 84 | Carthage/Build 85 | 86 | # fastlane 87 | # 88 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 89 | # screenshots whenever they are needed. 90 | # For more information about the recommended setup visit: 91 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 92 | 93 | fastlane/report.xml 94 | fastlane/Preview.html 95 | fastlane/screenshots 96 | fastlane/test_output 97 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.0 2 | -------------------------------------------------------------------------------- /Example/SwiftWebVCExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0055F7A61E259F1A000ECD54 /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0055F7931E259F1A000ECD54 /* Media.xcassets */; }; 11 | 0055F7A71E259F1A000ECD54 /* SwiftWebVC.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0055F7951E259F1A000ECD54 /* SwiftWebVC.strings */; }; 12 | 0055F7A81E259F1A000ECD54 /* SwiftModalWebVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0055F7A11E259F1A000ECD54 /* SwiftModalWebVC.swift */; }; 13 | 0055F7A91E259F1A000ECD54 /* SwiftWebVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0055F7A21E259F1A000ECD54 /* SwiftWebVC.swift */; }; 14 | 0055F7AA1E259F1A000ECD54 /* SwiftWebVCActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0055F7A31E259F1A000ECD54 /* SwiftWebVCActivity.swift */; }; 15 | 0055F7AB1E259F1A000ECD54 /* SwiftWebVCActivityChrome.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0055F7A41E259F1A000ECD54 /* SwiftWebVCActivityChrome.swift */; }; 16 | 0055F7AC1E259F1A000ECD54 /* SwiftWebVCActivitySafari.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0055F7A51E259F1A000ECD54 /* SwiftWebVCActivitySafari.swift */; }; 17 | 00FFF8591E09977500015C59 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00FFF8581E09977500015C59 /* AppDelegate.swift */; }; 18 | 00FFF85B1E09977500015C59 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00FFF85A1E09977500015C59 /* ViewController.swift */; }; 19 | 00FFF85E1E09977500015C59 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 00FFF85C1E09977500015C59 /* Main.storyboard */; }; 20 | 00FFF8601E09977500015C59 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 00FFF85F1E09977500015C59 /* Assets.xcassets */; }; 21 | 00FFF8631E09977500015C59 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 00FFF8611E09977500015C59 /* LaunchScreen.storyboard */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXFileReference section */ 25 | 0055F7931E259F1A000ECD54 /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Media.xcassets; sourceTree = ""; }; 26 | 0055F7961E259F1A000ECD54 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/SwiftWebVC.strings; sourceTree = ""; }; 27 | 0055F7971E259F1A000ECD54 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/SwiftWebVC.strings; sourceTree = ""; }; 28 | 0055F7981E259F1A000ECD54 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/SwiftWebVC.strings; sourceTree = ""; }; 29 | 0055F7991E259F1A000ECD54 /* es-ES */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-ES"; path = "es-ES.lproj/SwiftWebVC.strings"; sourceTree = ""; }; 30 | 0055F79A1E259F1A000ECD54 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/SwiftWebVC.strings; sourceTree = ""; }; 31 | 0055F79B1E259F1A000ECD54 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/SwiftWebVC.strings; sourceTree = ""; }; 32 | 0055F79C1E259F1A000ECD54 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/SwiftWebVC.strings; sourceTree = ""; }; 33 | 0055F79D1E259F1A000ECD54 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/SwiftWebVC.strings; sourceTree = ""; }; 34 | 0055F79E1E259F1A000ECD54 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/SwiftWebVC.strings; sourceTree = ""; }; 35 | 0055F79F1E259F1A000ECD54 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/SwiftWebVC.strings"; sourceTree = ""; }; 36 | 0055F7A01E259F1A000ECD54 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/SwiftWebVC.strings"; sourceTree = ""; }; 37 | 0055F7A11E259F1A000ECD54 /* SwiftModalWebVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftModalWebVC.swift; sourceTree = ""; }; 38 | 0055F7A21E259F1A000ECD54 /* SwiftWebVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftWebVC.swift; sourceTree = ""; }; 39 | 0055F7A31E259F1A000ECD54 /* SwiftWebVCActivity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftWebVCActivity.swift; sourceTree = ""; }; 40 | 0055F7A41E259F1A000ECD54 /* SwiftWebVCActivityChrome.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftWebVCActivityChrome.swift; sourceTree = ""; }; 41 | 0055F7A51E259F1A000ECD54 /* SwiftWebVCActivitySafari.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftWebVCActivitySafari.swift; sourceTree = ""; }; 42 | 00FFF8551E09977500015C59 /* SwiftWebVCExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftWebVCExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 00FFF8581E09977500015C59 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 44 | 00FFF85A1E09977500015C59 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 45 | 00FFF85D1E09977500015C59 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 00FFF85F1E09977500015C59 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | 00FFF8621E09977500015C59 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | 00FFF8641E09977500015C59 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | 00FFF8521E09977500015C59 /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | /* End PBXFrameworksBuildPhase section */ 60 | 61 | /* Begin PBXGroup section */ 62 | 0055F7911E259F1A000ECD54 /* SwiftWebVC */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 0055F7921E259F1A000ECD54 /* Resources */, 66 | 0055F7941E259F1A000ECD54 /* Strings */, 67 | 0055F7A11E259F1A000ECD54 /* SwiftModalWebVC.swift */, 68 | 0055F7A21E259F1A000ECD54 /* SwiftWebVC.swift */, 69 | 0055F7A31E259F1A000ECD54 /* SwiftWebVCActivity.swift */, 70 | 0055F7A41E259F1A000ECD54 /* SwiftWebVCActivityChrome.swift */, 71 | 0055F7A51E259F1A000ECD54 /* SwiftWebVCActivitySafari.swift */, 72 | ); 73 | name = SwiftWebVC; 74 | path = ../SwiftWebVC; 75 | sourceTree = ""; 76 | }; 77 | 0055F7921E259F1A000ECD54 /* Resources */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 0055F7931E259F1A000ECD54 /* Media.xcassets */, 81 | ); 82 | path = Resources; 83 | sourceTree = ""; 84 | }; 85 | 0055F7941E259F1A000ECD54 /* Strings */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 0055F7951E259F1A000ECD54 /* SwiftWebVC.strings */, 89 | ); 90 | path = Strings; 91 | sourceTree = ""; 92 | }; 93 | 00FFF84C1E09977500015C59 = { 94 | isa = PBXGroup; 95 | children = ( 96 | 00FFF8571E09977500015C59 /* SwiftWebVCExample */, 97 | 0055F7911E259F1A000ECD54 /* SwiftWebVC */, 98 | 00FFF8561E09977500015C59 /* Products */, 99 | ); 100 | sourceTree = ""; 101 | }; 102 | 00FFF8561E09977500015C59 /* Products */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 00FFF8551E09977500015C59 /* SwiftWebVCExample.app */, 106 | ); 107 | name = Products; 108 | sourceTree = ""; 109 | }; 110 | 00FFF8571E09977500015C59 /* SwiftWebVCExample */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 00FFF8581E09977500015C59 /* AppDelegate.swift */, 114 | 00FFF85A1E09977500015C59 /* ViewController.swift */, 115 | 00FFF85C1E09977500015C59 /* Main.storyboard */, 116 | 00FFF85F1E09977500015C59 /* Assets.xcassets */, 117 | 00FFF8611E09977500015C59 /* LaunchScreen.storyboard */, 118 | 00FFF8641E09977500015C59 /* Info.plist */, 119 | ); 120 | path = SwiftWebVCExample; 121 | sourceTree = ""; 122 | }; 123 | /* End PBXGroup section */ 124 | 125 | /* Begin PBXNativeTarget section */ 126 | 00FFF8541E09977500015C59 /* SwiftWebVCExample */ = { 127 | isa = PBXNativeTarget; 128 | buildConfigurationList = 00FFF8671E09977500015C59 /* Build configuration list for PBXNativeTarget "SwiftWebVCExample" */; 129 | buildPhases = ( 130 | 00FFF8511E09977500015C59 /* Sources */, 131 | 00FFF8521E09977500015C59 /* Frameworks */, 132 | 00FFF8531E09977500015C59 /* Resources */, 133 | ); 134 | buildRules = ( 135 | ); 136 | dependencies = ( 137 | ); 138 | name = SwiftWebVCExample; 139 | productName = SwiftWebVCExample; 140 | productReference = 00FFF8551E09977500015C59 /* SwiftWebVCExample.app */; 141 | productType = "com.apple.product-type.application"; 142 | }; 143 | /* End PBXNativeTarget section */ 144 | 145 | /* Begin PBXProject section */ 146 | 00FFF84D1E09977500015C59 /* Project object */ = { 147 | isa = PBXProject; 148 | attributes = { 149 | LastSwiftUpdateCheck = 0820; 150 | LastUpgradeCheck = 0920; 151 | ORGANIZATIONNAME = "Myles Ringle"; 152 | TargetAttributes = { 153 | 00FFF8541E09977500015C59 = { 154 | CreatedOnToolsVersion = 8.2.1; 155 | LastSwiftMigration = 0920; 156 | ProvisioningStyle = Automatic; 157 | }; 158 | }; 159 | }; 160 | buildConfigurationList = 00FFF8501E09977500015C59 /* Build configuration list for PBXProject "SwiftWebVCExample" */; 161 | compatibilityVersion = "Xcode 3.2"; 162 | developmentRegion = English; 163 | hasScannedForEncodings = 0; 164 | knownRegions = ( 165 | en, 166 | Base, 167 | da, 168 | de, 169 | "es-ES", 170 | es, 171 | fr, 172 | ja, 173 | pt, 174 | vi, 175 | "zh-Hans", 176 | "zh-Hant", 177 | ); 178 | mainGroup = 00FFF84C1E09977500015C59; 179 | productRefGroup = 00FFF8561E09977500015C59 /* Products */; 180 | projectDirPath = ""; 181 | projectRoot = ""; 182 | targets = ( 183 | 00FFF8541E09977500015C59 /* SwiftWebVCExample */, 184 | ); 185 | }; 186 | /* End PBXProject section */ 187 | 188 | /* Begin PBXResourcesBuildPhase section */ 189 | 00FFF8531E09977500015C59 /* Resources */ = { 190 | isa = PBXResourcesBuildPhase; 191 | buildActionMask = 2147483647; 192 | files = ( 193 | 0055F7A71E259F1A000ECD54 /* SwiftWebVC.strings in Resources */, 194 | 00FFF8631E09977500015C59 /* LaunchScreen.storyboard in Resources */, 195 | 00FFF8601E09977500015C59 /* Assets.xcassets in Resources */, 196 | 0055F7A61E259F1A000ECD54 /* Media.xcassets in Resources */, 197 | 00FFF85E1E09977500015C59 /* Main.storyboard in Resources */, 198 | ); 199 | runOnlyForDeploymentPostprocessing = 0; 200 | }; 201 | /* End PBXResourcesBuildPhase section */ 202 | 203 | /* Begin PBXSourcesBuildPhase section */ 204 | 00FFF8511E09977500015C59 /* Sources */ = { 205 | isa = PBXSourcesBuildPhase; 206 | buildActionMask = 2147483647; 207 | files = ( 208 | 0055F7AB1E259F1A000ECD54 /* SwiftWebVCActivityChrome.swift in Sources */, 209 | 0055F7A81E259F1A000ECD54 /* SwiftModalWebVC.swift in Sources */, 210 | 00FFF85B1E09977500015C59 /* ViewController.swift in Sources */, 211 | 0055F7AC1E259F1A000ECD54 /* SwiftWebVCActivitySafari.swift in Sources */, 212 | 00FFF8591E09977500015C59 /* AppDelegate.swift in Sources */, 213 | 0055F7A91E259F1A000ECD54 /* SwiftWebVC.swift in Sources */, 214 | 0055F7AA1E259F1A000ECD54 /* SwiftWebVCActivity.swift in Sources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | /* End PBXSourcesBuildPhase section */ 219 | 220 | /* Begin PBXVariantGroup section */ 221 | 0055F7951E259F1A000ECD54 /* SwiftWebVC.strings */ = { 222 | isa = PBXVariantGroup; 223 | children = ( 224 | 0055F7961E259F1A000ECD54 /* da */, 225 | 0055F7971E259F1A000ECD54 /* de */, 226 | 0055F7981E259F1A000ECD54 /* en */, 227 | 0055F7991E259F1A000ECD54 /* es-ES */, 228 | 0055F79A1E259F1A000ECD54 /* es */, 229 | 0055F79B1E259F1A000ECD54 /* fr */, 230 | 0055F79C1E259F1A000ECD54 /* ja */, 231 | 0055F79D1E259F1A000ECD54 /* pt */, 232 | 0055F79E1E259F1A000ECD54 /* vi */, 233 | 0055F79F1E259F1A000ECD54 /* zh-Hans */, 234 | 0055F7A01E259F1A000ECD54 /* zh-Hant */, 235 | ); 236 | name = SwiftWebVC.strings; 237 | sourceTree = ""; 238 | }; 239 | 00FFF85C1E09977500015C59 /* Main.storyboard */ = { 240 | isa = PBXVariantGroup; 241 | children = ( 242 | 00FFF85D1E09977500015C59 /* Base */, 243 | ); 244 | name = Main.storyboard; 245 | sourceTree = ""; 246 | }; 247 | 00FFF8611E09977500015C59 /* LaunchScreen.storyboard */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | 00FFF8621E09977500015C59 /* Base */, 251 | ); 252 | name = LaunchScreen.storyboard; 253 | sourceTree = ""; 254 | }; 255 | /* End PBXVariantGroup section */ 256 | 257 | /* Begin XCBuildConfiguration section */ 258 | 00FFF8651E09977500015C59 /* Debug */ = { 259 | isa = XCBuildConfiguration; 260 | buildSettings = { 261 | ALWAYS_SEARCH_USER_PATHS = NO; 262 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 263 | CLANG_ANALYZER_NONNULL = YES; 264 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 265 | CLANG_CXX_LIBRARY = "libc++"; 266 | CLANG_ENABLE_MODULES = YES; 267 | CLANG_ENABLE_OBJC_ARC = YES; 268 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 269 | CLANG_WARN_BOOL_CONVERSION = YES; 270 | CLANG_WARN_COMMA = YES; 271 | CLANG_WARN_CONSTANT_CONVERSION = YES; 272 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 273 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 274 | CLANG_WARN_EMPTY_BODY = YES; 275 | CLANG_WARN_ENUM_CONVERSION = YES; 276 | CLANG_WARN_INFINITE_RECURSION = YES; 277 | CLANG_WARN_INT_CONVERSION = YES; 278 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 279 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 280 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 281 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 282 | CLANG_WARN_STRICT_PROTOTYPES = YES; 283 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 284 | CLANG_WARN_UNREACHABLE_CODE = YES; 285 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 286 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 287 | COPY_PHASE_STRIP = NO; 288 | DEBUG_INFORMATION_FORMAT = dwarf; 289 | ENABLE_STRICT_OBJC_MSGSEND = YES; 290 | ENABLE_TESTABILITY = YES; 291 | GCC_C_LANGUAGE_STANDARD = gnu99; 292 | GCC_DYNAMIC_NO_PIC = NO; 293 | GCC_NO_COMMON_BLOCKS = YES; 294 | GCC_OPTIMIZATION_LEVEL = 0; 295 | GCC_PREPROCESSOR_DEFINITIONS = ( 296 | "DEBUG=1", 297 | "$(inherited)", 298 | ); 299 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 300 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 301 | GCC_WARN_UNDECLARED_SELECTOR = YES; 302 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 303 | GCC_WARN_UNUSED_FUNCTION = YES; 304 | GCC_WARN_UNUSED_VARIABLE = YES; 305 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 306 | MTL_ENABLE_DEBUG_INFO = YES; 307 | ONLY_ACTIVE_ARCH = YES; 308 | SDKROOT = iphoneos; 309 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 310 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 311 | TARGETED_DEVICE_FAMILY = "1,2"; 312 | }; 313 | name = Debug; 314 | }; 315 | 00FFF8661E09977500015C59 /* Release */ = { 316 | isa = XCBuildConfiguration; 317 | buildSettings = { 318 | ALWAYS_SEARCH_USER_PATHS = NO; 319 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 320 | CLANG_ANALYZER_NONNULL = YES; 321 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 322 | CLANG_CXX_LIBRARY = "libc++"; 323 | CLANG_ENABLE_MODULES = YES; 324 | CLANG_ENABLE_OBJC_ARC = YES; 325 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 326 | CLANG_WARN_BOOL_CONVERSION = YES; 327 | CLANG_WARN_COMMA = YES; 328 | CLANG_WARN_CONSTANT_CONVERSION = YES; 329 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 330 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 331 | CLANG_WARN_EMPTY_BODY = YES; 332 | CLANG_WARN_ENUM_CONVERSION = YES; 333 | CLANG_WARN_INFINITE_RECURSION = YES; 334 | CLANG_WARN_INT_CONVERSION = YES; 335 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 336 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 337 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 338 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 339 | CLANG_WARN_STRICT_PROTOTYPES = YES; 340 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 341 | CLANG_WARN_UNREACHABLE_CODE = YES; 342 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 343 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 344 | COPY_PHASE_STRIP = NO; 345 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 346 | ENABLE_NS_ASSERTIONS = NO; 347 | ENABLE_STRICT_OBJC_MSGSEND = YES; 348 | GCC_C_LANGUAGE_STANDARD = gnu99; 349 | GCC_NO_COMMON_BLOCKS = YES; 350 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 351 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 352 | GCC_WARN_UNDECLARED_SELECTOR = YES; 353 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 354 | GCC_WARN_UNUSED_FUNCTION = YES; 355 | GCC_WARN_UNUSED_VARIABLE = YES; 356 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 357 | MTL_ENABLE_DEBUG_INFO = NO; 358 | SDKROOT = iphoneos; 359 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 360 | TARGETED_DEVICE_FAMILY = "1,2"; 361 | VALIDATE_PRODUCT = YES; 362 | }; 363 | name = Release; 364 | }; 365 | 00FFF8681E09977500015C59 /* Debug */ = { 366 | isa = XCBuildConfiguration; 367 | buildSettings = { 368 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 369 | INFOPLIST_FILE = SwiftWebVCExample/Info.plist; 370 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 371 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 372 | PRODUCT_BUNDLE_IDENTIFIER = com.swiftweb.SwiftWebVCExample; 373 | PRODUCT_NAME = "$(TARGET_NAME)"; 374 | SWIFT_VERSION = 4.0; 375 | }; 376 | name = Debug; 377 | }; 378 | 00FFF8691E09977500015C59 /* Release */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 382 | INFOPLIST_FILE = SwiftWebVCExample/Info.plist; 383 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 384 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 385 | PRODUCT_BUNDLE_IDENTIFIER = com.swiftweb.SwiftWebVCExample; 386 | PRODUCT_NAME = "$(TARGET_NAME)"; 387 | SWIFT_VERSION = 4.0; 388 | }; 389 | name = Release; 390 | }; 391 | /* End XCBuildConfiguration section */ 392 | 393 | /* Begin XCConfigurationList section */ 394 | 00FFF8501E09977500015C59 /* Build configuration list for PBXProject "SwiftWebVCExample" */ = { 395 | isa = XCConfigurationList; 396 | buildConfigurations = ( 397 | 00FFF8651E09977500015C59 /* Debug */, 398 | 00FFF8661E09977500015C59 /* Release */, 399 | ); 400 | defaultConfigurationIsVisible = 0; 401 | defaultConfigurationName = Release; 402 | }; 403 | 00FFF8671E09977500015C59 /* Build configuration list for PBXNativeTarget "SwiftWebVCExample" */ = { 404 | isa = XCConfigurationList; 405 | buildConfigurations = ( 406 | 00FFF8681E09977500015C59 /* Debug */, 407 | 00FFF8691E09977500015C59 /* Release */, 408 | ); 409 | defaultConfigurationIsVisible = 0; 410 | defaultConfigurationName = Release; 411 | }; 412 | /* End XCConfigurationList section */ 413 | }; 414 | rootObject = 00FFF84D1E09977500015C59 /* Project object */; 415 | } 416 | -------------------------------------------------------------------------------- /Example/SwiftWebVCExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/SwiftWebVCExample.xcodeproj/project.xcworkspace/xcuserdata/myles.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/Example/SwiftWebVCExample.xcodeproj/project.xcworkspace/xcuserdata/myles.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Example/SwiftWebVCExample.xcodeproj/xcuserdata/myles.xcuserdatad/xcschemes/SwiftWebVCExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /Example/SwiftWebVCExample.xcodeproj/xcuserdata/myles.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SwiftWebVCExample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 00FFF8541E09977500015C59 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/SwiftWebVCExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SwiftWebVCExample 4 | // 5 | // Created by Myles Ringle on 20/12/2016. 6 | // Copyright © 2016 Myles Ringle. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/SwiftWebVCExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Example/SwiftWebVCExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/SwiftWebVCExample/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 | 32 | 40 | 48 | 54 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /Example/SwiftWebVCExample/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 | 0.4.2 19 | CFBundleVersion 20 | 0.4.2.0 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Example/SwiftWebVCExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SwiftWebVCExample 4 | // 5 | // Created by Myles Ringle on 20/12/2016. 6 | // Copyright © 2016 Myles Ringle. 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 | // MARK: Push 24 | @IBAction func push() { 25 | let webVC = SwiftWebVC(urlString: "https://www.google.com") 26 | webVC.delegate = self 27 | self.navigationController?.pushViewController(webVC, animated: true) 28 | } 29 | 30 | // MARK: Modal 31 | @IBAction func presentModalWithDefaultTheme() { 32 | let webVC = SwiftModalWebVC(urlString: "www.google.com") 33 | self.present(webVC, animated: true, completion: nil) 34 | } 35 | 36 | @IBAction func presentModalWithLightBlackTheme() { 37 | let webVC = SwiftModalWebVC(urlString: "https://www.google.com", theme: .lightBlack, dismissButtonStyle: .cross) 38 | self.present(webVC, animated: true, completion: nil) 39 | } 40 | 41 | @IBAction func presentModalWithDarkTheme() { 42 | let webVC = SwiftModalWebVC(urlString: "https://www.google.com", theme: .dark, dismissButtonStyle: .arrow) 43 | self.present(webVC, animated: true, completion: nil) 44 | } 45 | 46 | } 47 | 48 | extension ViewController: SwiftWebVCDelegate { 49 | 50 | func didStartLoading() { 51 | print("Started loading.") 52 | } 53 | 54 | func didFinishLoading(success: Bool) { 55 | print("Finished loading. Success: \(success).") 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Myles Ringle 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwiftWebVC 2 | 3 | SwiftWebVC is a simple inline browser for your Swift iOS app. 4 | 5 | ![SwiftWebVC](https://cloud.githubusercontent.com/assets/6603912/8509772/e1a1f2b6-22b0-11e5-878d-273b5b17b95a.png) 6 | 7 | **SwiftWebVC features:** 8 | 9 | * iPhone and iPad distinct UIs 10 | * Full landscape orientation support 11 | * Back, forward, stop/refresh and share buttons 12 | * Open in Safari and Chrome UIActivities 13 | * Navbar title set to the currently visible web page 14 | * Talks with `setNetworkActivityIndicatorVisible` 15 | * 3 different themes to choose from when presented modally 16 | 17 | ![SwiftWebVC](https://cloud.githubusercontent.com/assets/6603912/8509773/e1a33ab8-22b0-11e5-93e4-c671934f55e5.png) 18 | 19 | ## Installation 20 | 21 | **CocoaPods** 22 | 23 | * SwiftWebVC is available through [CocoaPods](http://cocoapods.org). To install 24 | it, simply add the following line to your Podfile: 25 | 26 | ```ruby 27 | pod 'SwiftWebVC' 28 | ``` 29 | 30 | **Carthage** 31 | 32 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. 33 | 34 | You can install Carthage with [Homebrew](http://brew.sh/) using the following command: 35 | 36 | ```bash 37 | $ brew update 38 | $ brew install carthage 39 | ``` 40 | 41 | To integrate SwiftWebVC into your Xcode project using Carthage, specify it in your `Cartfile`: 42 | 43 | ```ogdl 44 | github "meismyles/SwiftWebVC" 45 | ``` 46 | 47 | Run `carthage update` to build the framework and drag the built `SwiftWebVC.framework` into your Xcode project. 48 | 49 | **Manual** 50 | 51 | * Add the `SwiftWebVC/` folder into your project. 52 | 53 | ## Usage 54 | 55 | Just like any UIViewController, SwiftWebVC can be pushed into a UINavigationController stack: 56 | 57 | ```swift 58 | let webVC = SwiftWebVC(urlString: "http://google.com") 59 | self.navigationController?.pushViewController(webVC, animated: true) 60 | ``` 61 | 62 | It can be presented modally using `SwiftModalWebVC`: 63 | 64 | ```swift 65 | let webVC = SwiftModalWebVC(urlString: "http://google.com") 66 | self.present(webVC, animated: true, completion: nil) 67 | ``` 68 | 69 | ### Options 70 | 71 | The share button can be disabled by passing a flag in to the constructor to specify this: 72 | ```swift 73 | let webVC = SwiftWebVC(urlString: "http://google.com", sharingEnabled: false) 74 | ``` 75 | The same principal applies for the modal implementation also: 76 | ```swift 77 | let webVC = SwiftModalWebVC(urlString: "http://google.com", sharingEnabled: false) 78 | ``` 79 | 80 | #### Modal Options Only 81 | Themes may be chosen for the modal implementation. The default theme is `Light-Blue`. Other modal themes `Light-Black` and `Dark` may be chosen using one of the following instead: 82 | 83 | ```swift 84 | let webVC = SwiftModalWebVC(urlString: "http://google.com", theme: .lightBlack) 85 | let webVC = SwiftModalWebVC(urlString: "http://google.com", theme: .dark) 86 | ``` 87 | 88 | 89 | 90 | ## Delegate (Start/Finish Loading Callbacks) 91 | 92 | SwiftWebVC also includes a delegate protocol that allows you to implement `didStartLoading` and `didFinishLoading` functions to determine when loading starts and finishes. 93 | 94 | _Note: This is currently only implemented for `SwiftWebVC`, **not** `SwiftModalWebVC`._ 95 | 96 | To implement this, after declaring your instance of `SwiftWebVC`, set it's delegate and implement the callback functions. For example: 97 | 98 | **Inititalisation** 99 | 100 | ```swift 101 | let webVC = SwiftWebVC(urlString: "https://www.google.com") 102 | webVC.delegate = self 103 | self.navigationController?.pushViewController(webVC, animated: true) 104 | ``` 105 | 106 | **Delegate Implementation** 107 | ```swift 108 | extension ViewController: SwiftWebVCDelegate { 109 | 110 | func didStartLoading() { 111 | print("Started loading.") 112 | } 113 | 114 | func didFinishLoading(success: Bool) { 115 | print("Finished loading. Success: \(success).") 116 | } 117 | } 118 | ``` 119 | 120 | ### SwiftWebVCActivity 121 | 122 | Starting in iOS 6 Apple uses `UIActivity` to let you show additional sharing methods in share sheets. `SwiftWebVC` comes with "Open in Safari" and "Open in Chrome" activities. You can easily add your own activity by subclassing `SwiftWebVCActivity` which takes care of a few things automatically for you. Have a look at the Safari and Chrome activities for implementation examples.Typed 123 | 124 | 125 | ## Credits 126 | 127 | SwiftWebVC is a Swift implementation of [Sam Vermette's SVWebViewController](https://github.com/samvermette/SVWebViewController/). Code transcription, updates and changes were carried out by Myles Ringle. The original SVWebViewController was brought to you by [Sam Vermette](http://samvermette.com) and [contributors to the project](https://github.com/samvermette/SVWebViewController/contributors). 128 | 129 | If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/meismyles/SwiftWebVC/issues/new). If you're using SwiftWebVC in your project, attribution is always appreciated. 130 | 131 | Thanks to [Icons8](https://icons8.com/) for the images. 132 | -------------------------------------------------------------------------------- /SwiftWebVC.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint SwiftWebVC.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 http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'SwiftWebVC' 11 | s.version = '0.4.2' 12 | s.summary = 'SwiftWebVC is a simple inline browser for your Swift iOS app.' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | 22 | SwiftWebVC is a simple inline browser for your Swift iOS app. 23 | 24 | SwiftWebVC features: 25 | * iPhone and iPad distinct UIs 26 | * Full landscape orientation support 27 | * Back, forward, stop/refresh and share buttons 28 | * Open in Safari and Chrome UIActivities 29 | * Navbar title set to the currently visible web page 30 | * Talks with setNetworkActivityIndicatorVisible 31 | * 3 different themes to choose from when presented modally 32 | DESC 33 | 34 | s.homepage = 'https://github.com/meismyles/SwiftWebVC' 35 | s.screenshots = 'https://cloud.githubusercontent.com/assets/6603912/8509772/e1a1f2b6-22b0-11e5-878d-273b5b17b95a.png', 'https://cloud.githubusercontent.com/assets/6603912/8509773/e1a33ab8-22b0-11e5-93e4-c671934f55e5.png' 36 | s.license = { :type => 'MIT', :file => 'LICENSE' } 37 | s.author = { 'Myles Ringle' => 'meismyles@gmail.com' } 38 | s.source = { :git => 'https://github.com/meismyles/SwiftWebVC.git', :tag => s.version.to_s } 39 | # s.social_media_url = 'https://twitter.com/' 40 | 41 | s.ios.deployment_target = '8.0' 42 | 43 | s.source_files = 'SwiftWebVC/**/*.swift' 44 | 45 | s.resources = 'SwiftWebVC/Resources/*' 46 | s.resource_bundles = { 47 | 'SwiftWebVCResources' => ['SwiftWebVC/Resources/*'] 48 | } 49 | 50 | # s.public_header_files = 'Pod/Classes/**/*.h' 51 | # s.frameworks = 'UIKit', 'MapKit' 52 | # s.dependency 'AFNetworking', '~> 2.3' 53 | end 54 | -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivityChrome.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "SwiftWebVCActivityChrome.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "SwiftWebVCActivityChrome@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "SwiftWebVCActivityChrome@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivityChrome.imageset/SwiftWebVCActivityChrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivityChrome.imageset/SwiftWebVCActivityChrome.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivityChrome.imageset/SwiftWebVCActivityChrome@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivityChrome.imageset/SwiftWebVCActivityChrome@2x.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivityChrome.imageset/SwiftWebVCActivityChrome@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivityChrome.imageset/SwiftWebVCActivityChrome@3x.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivitySafari.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "SwiftWebVCActivitySafari.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "SwiftWebVCActivitySafari@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "SwiftWebVCActivitySafari@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivitySafari.imageset/SwiftWebVCActivitySafari.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivitySafari.imageset/SwiftWebVCActivitySafari.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivitySafari.imageset/SwiftWebVCActivitySafari@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivitySafari.imageset/SwiftWebVCActivitySafari@2x.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivitySafari.imageset/SwiftWebVCActivitySafari@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCActivitySafari.imageset/SwiftWebVCActivitySafari@3x.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCBack.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "SwiftWebVCBack.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "SwiftWebVCBack@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "SwiftWebVCBack@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCBack.imageset/SwiftWebVCBack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCBack.imageset/SwiftWebVCBack.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCBack.imageset/SwiftWebVCBack@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCBack.imageset/SwiftWebVCBack@2x.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCBack.imageset/SwiftWebVCBack@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCBack.imageset/SwiftWebVCBack@3x.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismiss.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "SwiftWebVCDismiss.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "SwiftWebVCDismiss@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "SwiftWebVCDismiss@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismiss.imageset/SwiftWebVCDismiss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismiss.imageset/SwiftWebVCDismiss.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismiss.imageset/SwiftWebVCDismiss@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismiss.imageset/SwiftWebVCDismiss@2x.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismiss.imageset/SwiftWebVCDismiss@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismiss.imageset/SwiftWebVCDismiss@3x.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismissAlt.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "SwiftWebVCDismissAlt.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "SwiftWebVCDismissAlt@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "SwiftWebVCDismissAlt@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismissAlt.imageset/SwiftWebVCDismissAlt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismissAlt.imageset/SwiftWebVCDismissAlt.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismissAlt.imageset/SwiftWebVCDismissAlt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismissAlt.imageset/SwiftWebVCDismissAlt@2x.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismissAlt.imageset/SwiftWebVCDismissAlt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCDismissAlt.imageset/SwiftWebVCDismissAlt@3x.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCNext.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "SwiftWebVCNext.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "SwiftWebVCNext@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "SwiftWebVCNext@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCNext.imageset/SwiftWebVCNext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCNext.imageset/SwiftWebVCNext.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCNext.imageset/SwiftWebVCNext@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCNext.imageset/SwiftWebVCNext@2x.png -------------------------------------------------------------------------------- /SwiftWebVC/Resources/Media.xcassets/SwiftWebVCNext.imageset/SwiftWebVCNext@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meismyles/SwiftWebVC/9272aecce4ac6d4bcb69eaafe633d6c61d7622ff/SwiftWebVC/Resources/Media.xcassets/SwiftWebVCNext.imageset/SwiftWebVCNext@3x.png -------------------------------------------------------------------------------- /SwiftWebVC/Strings/da.lproj/SwiftWebVC.strings: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Anders Fogh Eriksen 2 | "Open in Safari" = "Åbn i Safari"; 3 | "Open in Chrome" = "Åbn i Chrome"; 4 | "Copy Link" = "Kopier Link"; 5 | "Mail Link to this Page" = "Mail Link til denne side"; -------------------------------------------------------------------------------- /SwiftWebVC/Strings/de.lproj/SwiftWebVC.strings: -------------------------------------------------------------------------------- 1 | "Open in Safari" = "In Safari öffnen"; 2 | "Open in Chrome" = "In Chrome öffnen"; -------------------------------------------------------------------------------- /SwiftWebVC/Strings/en.lproj/SwiftWebVC.strings: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Alex Ruperez 2 | "Open in Safari" = "Open in Safari"; 3 | "Open in Chrome" = "Open in Chrome"; -------------------------------------------------------------------------------- /SwiftWebVC/Strings/es-ES.lproj/SwiftWebVC.strings: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Alex Ruperez 2 | "Open in Safari" = "Abrir en Safari"; 3 | "Open in Chrome" = "Abrir en Chrome"; -------------------------------------------------------------------------------- /SwiftWebVC/Strings/es.lproj/SwiftWebVC.strings: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Alex Ruperez 2 | "Open in Safari" = "Abrir en Safari"; 3 | "Open in Chrome" = "Abrir en Chrome"; -------------------------------------------------------------------------------- /SwiftWebVC/Strings/fr.lproj/SwiftWebVC.strings: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Benjamin Michotte 2 | "Open in Safari" = "Ouvrir dans Safari"; 3 | "Open in Chrome" = "Ouvrir dans Chrome"; -------------------------------------------------------------------------------- /SwiftWebVC/Strings/ja.lproj/SwiftWebVC.strings: -------------------------------------------------------------------------------- 1 | "Open in Safari" = "Safariで開く"; 2 | "Open in Chrome" = "Chromeで開く"; 3 | -------------------------------------------------------------------------------- /SwiftWebVC/Strings/pt.lproj/SwiftWebVC.strings: -------------------------------------------------------------------------------- 1 | "Open in Safari" = "Abrir no Safari"; 2 | "Open in Chrome" = "Abrir no Chrome"; -------------------------------------------------------------------------------- /SwiftWebVC/Strings/vi.lproj/SwiftWebVC.strings: -------------------------------------------------------------------------------- 1 | "Open in Safari" = "Mở bằng Safari"; 2 | "Open in Chrome" = "Mở bằng Chrome"; 3 | -------------------------------------------------------------------------------- /SwiftWebVC/Strings/zh-Hans.lproj/SwiftWebVC.strings: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 James Stout 2 | "Open in Safari" = "在Safari中打开"; 3 | "Open in Chrome" = "在Chrome中打开"; 4 | "Copy Link" = "复制网页链接"; 5 | "Mail Link to this Page" = "以电邮传送此页链接"; 6 | "Cancel"="取消"; 7 | -------------------------------------------------------------------------------- /SwiftWebVC/Strings/zh-Hant.lproj/SwiftWebVC.strings: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 James Stout 2 | "Open in Safari" = "打開Safari"; 3 | "Open in Chrome" = "打開Chrome"; -------------------------------------------------------------------------------- /SwiftWebVC/SwiftModalWebVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftModalWebVC.swift 3 | // 4 | // Created by Myles Ringle on 24/06/2015. 5 | // Transcribed from code used in SVWebViewController. 6 | // Copyright (c) 2015 Myles Ringle & Oliver Letterer. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class SwiftModalWebVC: UINavigationController { 12 | 13 | public enum SwiftModalWebVCTheme { 14 | case lightBlue, lightBlack, dark 15 | } 16 | public enum SwiftModalWebVCDismissButtonStyle { 17 | case arrow, cross 18 | } 19 | 20 | weak var webViewDelegate: UIWebViewDelegate? = nil 21 | 22 | public convenience init(urlString: String, sharingEnabled: Bool = true) { 23 | var urlString = urlString 24 | if !urlString.hasPrefix("https://") && !urlString.hasPrefix("http://") { 25 | urlString = "https://"+urlString 26 | } 27 | self.init(pageURL: URL(string: urlString)!, sharingEnabled: sharingEnabled) 28 | } 29 | 30 | public convenience init(urlString: String, theme: SwiftModalWebVCTheme, dismissButtonStyle: SwiftModalWebVCDismissButtonStyle, sharingEnabled: Bool = true) { 31 | self.init(pageURL: URL(string: urlString)!, theme: theme, dismissButtonStyle: dismissButtonStyle, sharingEnabled: sharingEnabled) 32 | } 33 | 34 | public convenience init(pageURL: URL, sharingEnabled: Bool = true) { 35 | self.init(request: URLRequest(url: pageURL), sharingEnabled: sharingEnabled) 36 | } 37 | 38 | public convenience init(pageURL: URL, theme: SwiftModalWebVCTheme, dismissButtonStyle: SwiftModalWebVCDismissButtonStyle, sharingEnabled: Bool = true) { 39 | self.init(request: URLRequest(url: pageURL), theme: theme, dismissButtonStyle: dismissButtonStyle, sharingEnabled: sharingEnabled) 40 | } 41 | 42 | public init(request: URLRequest, theme: SwiftModalWebVCTheme = .lightBlue, dismissButtonStyle: SwiftModalWebVCDismissButtonStyle = .arrow, sharingEnabled: Bool = true) { 43 | let webViewController = SwiftWebVC(aRequest: request) 44 | webViewController.sharingEnabled = sharingEnabled 45 | webViewController.storedStatusColor = UINavigationBar.appearance().barStyle 46 | 47 | let dismissButtonImageName = (dismissButtonStyle == .arrow) ? "SwiftWebVCDismiss" : "SwiftWebVCDismissAlt" 48 | let doneButton = UIBarButtonItem(image: SwiftWebVC.bundledImage(named: dismissButtonImageName), 49 | style: UIBarButtonItemStyle.plain, 50 | target: webViewController, 51 | action: #selector(SwiftWebVC.doneButtonTapped)) 52 | 53 | switch theme { 54 | case .lightBlue: 55 | doneButton.tintColor = nil 56 | webViewController.buttonColor = nil 57 | webViewController.titleColor = UIColor.black 58 | UINavigationBar.appearance().barStyle = UIBarStyle.default 59 | case .lightBlack: 60 | doneButton.tintColor = UIColor.darkGray 61 | webViewController.buttonColor = UIColor.darkGray 62 | webViewController.titleColor = UIColor.black 63 | UINavigationBar.appearance().barStyle = UIBarStyle.default 64 | case .dark: 65 | doneButton.tintColor = UIColor.white 66 | webViewController.buttonColor = UIColor.white 67 | webViewController.titleColor = UIColor.groupTableViewBackground 68 | UINavigationBar.appearance().barStyle = UIBarStyle.black 69 | } 70 | 71 | if (UIDevice.current.userInterfaceIdiom == UIUserInterfaceIdiom.pad) { 72 | webViewController.navigationItem.leftBarButtonItem = doneButton 73 | } 74 | else { 75 | webViewController.navigationItem.rightBarButtonItem = doneButton 76 | } 77 | super.init(rootViewController: webViewController) 78 | } 79 | 80 | override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { 81 | super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) 82 | } 83 | 84 | required public init(coder aDecoder: NSCoder) { 85 | fatalError("init(coder:) has not been implemented") 86 | } 87 | 88 | override public func viewWillAppear(_ animated: Bool) { 89 | super.viewWillAppear(false) 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /SwiftWebVC/SwiftWebVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftWebVC.swift 3 | // 4 | // Created by Myles Ringle on 24/06/2015. 5 | // Transcribed from code used in SVWebViewController. 6 | // Copyright (c) 2015 Myles Ringle & Sam Vermette. All rights reserved. 7 | // 8 | 9 | import WebKit 10 | 11 | public protocol SwiftWebVCDelegate: class { 12 | func didStartLoading() 13 | func didFinishLoading(success: Bool) 14 | } 15 | 16 | public class SwiftWebVC: UIViewController { 17 | 18 | public weak var delegate: SwiftWebVCDelegate? 19 | var storedStatusColor: UIBarStyle? 20 | var buttonColor: UIColor? = nil 21 | var titleColor: UIColor? = nil 22 | var closing: Bool! = false 23 | 24 | lazy var backBarButtonItem: UIBarButtonItem = { 25 | var tempBackBarButtonItem = UIBarButtonItem(image: SwiftWebVC.bundledImage(named: "SwiftWebVCBack"), 26 | style: UIBarButtonItemStyle.plain, 27 | target: self, 28 | action: #selector(SwiftWebVC.goBackTapped(_:))) 29 | tempBackBarButtonItem.width = 18.0 30 | tempBackBarButtonItem.tintColor = self.buttonColor 31 | return tempBackBarButtonItem 32 | }() 33 | 34 | lazy var forwardBarButtonItem: UIBarButtonItem = { 35 | var tempForwardBarButtonItem = UIBarButtonItem(image: SwiftWebVC.bundledImage(named: "SwiftWebVCNext"), 36 | style: UIBarButtonItemStyle.plain, 37 | target: self, 38 | action: #selector(SwiftWebVC.goForwardTapped(_:))) 39 | tempForwardBarButtonItem.width = 18.0 40 | tempForwardBarButtonItem.tintColor = self.buttonColor 41 | return tempForwardBarButtonItem 42 | }() 43 | 44 | lazy var refreshBarButtonItem: UIBarButtonItem = { 45 | var tempRefreshBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.refresh, 46 | target: self, 47 | action: #selector(SwiftWebVC.reloadTapped(_:))) 48 | tempRefreshBarButtonItem.tintColor = self.buttonColor 49 | return tempRefreshBarButtonItem 50 | }() 51 | 52 | lazy var stopBarButtonItem: UIBarButtonItem = { 53 | var tempStopBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.stop, 54 | target: self, 55 | action: #selector(SwiftWebVC.stopTapped(_:))) 56 | tempStopBarButtonItem.tintColor = self.buttonColor 57 | return tempStopBarButtonItem 58 | }() 59 | 60 | lazy var actionBarButtonItem: UIBarButtonItem = { 61 | var tempActionBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.action, 62 | target: self, 63 | action: #selector(SwiftWebVC.actionButtonTapped(_:))) 64 | tempActionBarButtonItem.tintColor = self.buttonColor 65 | return tempActionBarButtonItem 66 | }() 67 | 68 | 69 | lazy var webView: WKWebView = { 70 | var tempWebView = WKWebView(frame: UIScreen.main.bounds) 71 | tempWebView.uiDelegate = self 72 | tempWebView.navigationDelegate = self 73 | return tempWebView; 74 | }() 75 | 76 | var request: URLRequest! 77 | 78 | var navBarTitle: UILabel! 79 | 80 | var sharingEnabled = true 81 | 82 | //////////////////////////////////////////////// 83 | 84 | deinit { 85 | webView.stopLoading() 86 | UIApplication.shared.isNetworkActivityIndicatorVisible = false 87 | webView.uiDelegate = nil; 88 | webView.navigationDelegate = nil; 89 | } 90 | 91 | public convenience init(urlString: String, sharingEnabled: Bool = true) { 92 | var urlString = urlString 93 | if !urlString.hasPrefix("https://") && !urlString.hasPrefix("http://") { 94 | urlString = "https://"+urlString 95 | } 96 | self.init(pageURL: URL(string: urlString)!, sharingEnabled: sharingEnabled) 97 | } 98 | 99 | public convenience init(pageURL: URL, sharingEnabled: Bool = true) { 100 | self.init(aRequest: URLRequest(url: pageURL), sharingEnabled: sharingEnabled) 101 | } 102 | 103 | public convenience init(aRequest: URLRequest, sharingEnabled: Bool = true) { 104 | self.init() 105 | self.sharingEnabled = sharingEnabled 106 | self.request = aRequest 107 | } 108 | 109 | func loadRequest(_ request: URLRequest) { 110 | webView.load(request) 111 | } 112 | 113 | //////////////////////////////////////////////// 114 | // View Lifecycle 115 | 116 | override public func loadView() { 117 | view = webView 118 | loadRequest(request) 119 | } 120 | 121 | override public func viewDidLoad() { 122 | super.viewDidLoad() 123 | } 124 | 125 | override public func viewWillAppear(_ animated: Bool) { 126 | assert(self.navigationController != nil, "SVWebViewController needs to be contained in a UINavigationController. If you are presenting SVWebViewController modally, use SVModalWebViewController instead.") 127 | 128 | updateToolbarItems() 129 | navBarTitle = UILabel() 130 | navBarTitle.backgroundColor = UIColor.clear 131 | if presentingViewController == nil { 132 | if let titleAttributes = navigationController!.navigationBar.titleTextAttributes { 133 | navBarTitle.textColor = titleAttributes[.foregroundColor] as? UIColor 134 | } 135 | } 136 | else { 137 | navBarTitle.textColor = self.titleColor 138 | } 139 | navBarTitle.shadowOffset = CGSize(width: 0, height: 1); 140 | navBarTitle.font = UIFont(name: "HelveticaNeue-Medium", size: 17.0) 141 | navBarTitle.textAlignment = .center 142 | navigationItem.titleView = navBarTitle; 143 | 144 | super.viewWillAppear(true) 145 | 146 | if (UIDevice.current.userInterfaceIdiom == UIUserInterfaceIdiom.phone) { 147 | self.navigationController?.setToolbarHidden(false, animated: false) 148 | } 149 | else if (UIDevice.current.userInterfaceIdiom == UIUserInterfaceIdiom.pad) { 150 | self.navigationController?.setToolbarHidden(true, animated: true) 151 | } 152 | } 153 | 154 | override public func viewWillDisappear(_ animated: Bool) { 155 | super.viewWillDisappear(true) 156 | 157 | if (UIDevice.current.userInterfaceIdiom == UIUserInterfaceIdiom.phone) { 158 | self.navigationController?.setToolbarHidden(true, animated: true) 159 | } 160 | } 161 | 162 | override public func viewDidDisappear(_ animated: Bool) { 163 | super.viewDidDisappear(true) 164 | UIApplication.shared.isNetworkActivityIndicatorVisible = false 165 | } 166 | 167 | //////////////////////////////////////////////// 168 | // Toolbar 169 | 170 | func updateToolbarItems() { 171 | backBarButtonItem.isEnabled = webView.canGoBack 172 | forwardBarButtonItem.isEnabled = webView.canGoForward 173 | 174 | let refreshStopBarButtonItem: UIBarButtonItem = webView.isLoading ? stopBarButtonItem : refreshBarButtonItem 175 | 176 | let fixedSpace: UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.fixedSpace, target: nil, action: nil) 177 | let flexibleSpace: UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.flexibleSpace, target: nil, action: nil) 178 | 179 | if (UIDevice.current.userInterfaceIdiom == UIUserInterfaceIdiom.pad) { 180 | 181 | let toolbarWidth: CGFloat = 250.0 182 | fixedSpace.width = 35.0 183 | 184 | let items: NSArray = sharingEnabled ? [fixedSpace, refreshStopBarButtonItem, fixedSpace, backBarButtonItem, fixedSpace, forwardBarButtonItem, fixedSpace, actionBarButtonItem] : [fixedSpace, refreshStopBarButtonItem, fixedSpace, backBarButtonItem, fixedSpace, forwardBarButtonItem] 185 | 186 | let toolbar: UIToolbar = UIToolbar(frame: CGRect(x: 0.0, y: 0.0, width: toolbarWidth, height: 44.0)) 187 | if !closing { 188 | toolbar.items = items as? [UIBarButtonItem] 189 | if presentingViewController == nil { 190 | toolbar.barTintColor = navigationController!.navigationBar.barTintColor 191 | } 192 | else { 193 | toolbar.barStyle = navigationController!.navigationBar.barStyle 194 | } 195 | toolbar.tintColor = navigationController!.navigationBar.tintColor 196 | } 197 | navigationItem.rightBarButtonItems = items.reverseObjectEnumerator().allObjects as? [UIBarButtonItem] 198 | 199 | } 200 | else { 201 | let items: NSArray = sharingEnabled ? [fixedSpace, backBarButtonItem, flexibleSpace, forwardBarButtonItem, flexibleSpace, refreshStopBarButtonItem, flexibleSpace, actionBarButtonItem, fixedSpace] : [fixedSpace, backBarButtonItem, flexibleSpace, forwardBarButtonItem, flexibleSpace, refreshStopBarButtonItem, fixedSpace] 202 | 203 | if let navigationController = navigationController, !closing { 204 | if presentingViewController == nil { 205 | navigationController.toolbar.barTintColor = navigationController.navigationBar.barTintColor 206 | } 207 | else { 208 | navigationController.toolbar.barStyle = navigationController.navigationBar.barStyle 209 | } 210 | navigationController.toolbar.tintColor = navigationController.navigationBar.tintColor 211 | toolbarItems = items as? [UIBarButtonItem] 212 | } 213 | } 214 | } 215 | 216 | 217 | //////////////////////////////////////////////// 218 | // Target Actions 219 | 220 | @objc func goBackTapped(_ sender: UIBarButtonItem) { 221 | webView.goBack() 222 | } 223 | 224 | @objc func goForwardTapped(_ sender: UIBarButtonItem) { 225 | webView.goForward() 226 | } 227 | 228 | @objc func reloadTapped(_ sender: UIBarButtonItem) { 229 | webView.reload() 230 | } 231 | 232 | @objc func stopTapped(_ sender: UIBarButtonItem) { 233 | webView.stopLoading() 234 | updateToolbarItems() 235 | } 236 | 237 | @objc func actionButtonTapped(_ sender: AnyObject) { 238 | 239 | if let url: URL = ((webView.url != nil) ? webView.url : request.url) { 240 | let activities: NSArray = [SwiftWebVCActivitySafari(), SwiftWebVCActivityChrome()] 241 | 242 | if url.absoluteString.hasPrefix("file:///") { 243 | let dc: UIDocumentInteractionController = UIDocumentInteractionController(url: url) 244 | dc.presentOptionsMenu(from: view.bounds, in: view, animated: true) 245 | } 246 | else { 247 | let activityController: UIActivityViewController = UIActivityViewController(activityItems: [url], applicationActivities: activities as? [UIActivity]) 248 | 249 | if floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_7_1 && UIDevice.current.userInterfaceIdiom == UIUserInterfaceIdiom.pad { 250 | let ctrl: UIPopoverPresentationController = activityController.popoverPresentationController! 251 | ctrl.sourceView = view 252 | ctrl.barButtonItem = sender as? UIBarButtonItem 253 | } 254 | 255 | present(activityController, animated: true, completion: nil) 256 | } 257 | } 258 | } 259 | 260 | //////////////////////////////////////////////// 261 | 262 | @objc func doneButtonTapped() { 263 | closing = true 264 | UINavigationBar.appearance().barStyle = storedStatusColor! 265 | self.dismiss(animated: true, completion: nil) 266 | } 267 | 268 | // MARK: - Class Methods 269 | 270 | /// Helper function to get image within SwiftWebVCResources bundle 271 | /// 272 | /// - parameter named: The name of the image in the SwiftWebVCResources bundle 273 | class func bundledImage(named: String) -> UIImage? { 274 | let image = UIImage(named: named) 275 | if image == nil { 276 | return UIImage(named: named, in: Bundle(for: SwiftWebVC.classForCoder()), compatibleWith: nil) 277 | } // Replace MyBasePodClass with yours 278 | return image 279 | } 280 | 281 | } 282 | 283 | extension SwiftWebVC: WKUIDelegate { 284 | 285 | // Add any desired WKUIDelegate methods here: https://developer.apple.com/reference/webkit/wkuidelegate 286 | 287 | } 288 | 289 | extension SwiftWebVC: WKNavigationDelegate { 290 | 291 | public func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) { 292 | self.delegate?.didStartLoading() 293 | UIApplication.shared.isNetworkActivityIndicatorVisible = true 294 | updateToolbarItems() 295 | } 296 | 297 | public func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { 298 | self.delegate?.didFinishLoading(success: true) 299 | UIApplication.shared.isNetworkActivityIndicatorVisible = false 300 | 301 | webView.evaluateJavaScript("document.title", completionHandler: {(response, error) in 302 | self.navBarTitle.text = response as! String? 303 | self.navBarTitle.sizeToFit() 304 | self.updateToolbarItems() 305 | }) 306 | 307 | } 308 | 309 | public func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) { 310 | self.delegate?.didFinishLoading(success: false) 311 | UIApplication.shared.isNetworkActivityIndicatorVisible = false 312 | updateToolbarItems() 313 | } 314 | 315 | public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { 316 | 317 | let url = navigationAction.request.url 318 | 319 | let hostAddress = navigationAction.request.url?.host 320 | 321 | if (navigationAction.targetFrame == nil) { 322 | if UIApplication.shared.canOpenURL(url!) { 323 | UIApplication.shared.openURL(url!) 324 | } 325 | } 326 | 327 | // To connnect app store 328 | if hostAddress == "itunes.apple.com" { 329 | if UIApplication.shared.canOpenURL(navigationAction.request.url!) { 330 | UIApplication.shared.openURL(navigationAction.request.url!) 331 | decisionHandler(.cancel) 332 | return 333 | } 334 | } 335 | 336 | let url_elements = url!.absoluteString.components(separatedBy: ":") 337 | 338 | switch url_elements[0] { 339 | case "tel": 340 | openCustomApp(urlScheme: "telprompt://", additional_info: url_elements[1]) 341 | decisionHandler(.cancel) 342 | 343 | case "sms": 344 | openCustomApp(urlScheme: "sms://", additional_info: url_elements[1]) 345 | decisionHandler(.cancel) 346 | 347 | case "mailto": 348 | openCustomApp(urlScheme: "mailto://", additional_info: url_elements[1]) 349 | decisionHandler(.cancel) 350 | 351 | default: 352 | //print("Default") 353 | break 354 | } 355 | 356 | decisionHandler(.allow) 357 | 358 | } 359 | 360 | func openCustomApp(urlScheme: String, additional_info:String){ 361 | 362 | if let requestUrl: URL = URL(string:"\(urlScheme)"+"\(additional_info)") { 363 | let application:UIApplication = UIApplication.shared 364 | if application.canOpenURL(requestUrl) { 365 | application.openURL(requestUrl) 366 | } 367 | } 368 | } 369 | } 370 | -------------------------------------------------------------------------------- /SwiftWebVC/SwiftWebVCActivity.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftWebVCActivity.swift 3 | // 4 | // Created by Myles Ringle on 24/06/2015. 5 | // Transcribed from code used in SVWebViewController. 6 | // Copyright (c) 2015 Myles Ringle & Sam Vermette. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | class SwiftWebVCActivity: UIActivity { 13 | 14 | var URLToOpen: URL? 15 | var schemePrefix: String? 16 | 17 | override var activityType : UIActivityType? { 18 | let typeArray = "\(type(of: self))".components(separatedBy: ".") 19 | let _type: String = typeArray[typeArray.count-1] 20 | return UIActivityType(rawValue: _type) 21 | } 22 | 23 | override var activityImage : UIImage { 24 | if let type = activityType?.rawValue { 25 | return SwiftWebVC.bundledImage(named: "\(type)")! 26 | } 27 | else{ 28 | assert(false, "Unknow type") 29 | return UIImage() 30 | } 31 | } 32 | 33 | override func prepare(withActivityItems activityItems: [Any]) { 34 | for activityItem in activityItems { 35 | if activityItem is URL { 36 | URLToOpen = activityItem as? URL 37 | } 38 | } 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /SwiftWebVC/SwiftWebVCActivityChrome.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftWebVCActivityChrome.swift 3 | // 4 | // Created by Myles Ringle on 24/06/2015. 5 | // Transcribed from code used in SVWebViewController. 6 | // Copyright (c) 2015 Myles Ringle & Sam Vermette. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SwiftWebVCActivityChrome : SwiftWebVCActivity { 12 | 13 | override var activityTitle : String { 14 | return NSLocalizedString("Open in Chrome", tableName: "SwiftWebVC", comment: "") 15 | } 16 | 17 | override func canPerform(withActivityItems activityItems: [Any]) -> Bool { 18 | for activityItem in activityItems { 19 | if activityItem is URL, UIApplication.shared.canOpenURL(URL(string: "googlechrome://")!) { 20 | return true; 21 | } 22 | } 23 | return false; 24 | } 25 | 26 | override func perform() { 27 | let inputURL: URL! = URLToOpen as URL! 28 | let scheme: String! = inputURL.scheme 29 | 30 | // Replace the URL Scheme with the Chrome equivalent. 31 | var chromeScheme: String? = nil; 32 | if scheme == "http" { 33 | chromeScheme = "googlechrome" 34 | } 35 | else if scheme == "https" { 36 | chromeScheme = "googlechromes" 37 | } 38 | 39 | // Proceed only if a valid Google Chrome URI Scheme is available. 40 | if chromeScheme != nil { 41 | let absoluteString: NSString! = inputURL!.absoluteString as NSString! 42 | let rangeForScheme: NSRange! = absoluteString.range(of: ":") 43 | let urlNoScheme: String! = absoluteString.substring(from: rangeForScheme.location) 44 | let chromeURLString: String! = chromeScheme!+urlNoScheme 45 | let chromeURL: URL! = URL(string: chromeURLString) 46 | 47 | // Open the URL with Chrome. 48 | UIApplication.shared.openURL(chromeURL) 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /SwiftWebVC/SwiftWebVCActivitySafari.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftWebVCActivitySafari.swift 3 | // 4 | // Created by Myles Ringle on 24/06/2015. 5 | // Transcribed from code used in SVWebViewController. 6 | // Copyright (c) 2015 Myles Ringle & Sam Vermette. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SwiftWebVCActivitySafari : SwiftWebVCActivity { 12 | 13 | override var activityTitle : String { 14 | return NSLocalizedString("Open in Safari", tableName: "SwiftWebVC", comment: "") 15 | } 16 | 17 | override func canPerform(withActivityItems activityItems: [Any]) -> Bool { 18 | for activityItem in activityItems { 19 | if let activityItem = activityItem as? URL, UIApplication.shared.canOpenURL(activityItem) { 20 | return true 21 | } 22 | } 23 | return false 24 | } 25 | 26 | override func perform() { 27 | let completed: Bool = UIApplication.shared.openURL(URLToOpen! as URL) 28 | activityDidFinish(completed) 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /SwiftWebVCFramework/SwiftWebVCFramework.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B91D24E81E5CFE6E000F9BF1 /* SwiftWebVCFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = B91D24E61E5CFE6E000F9BF1 /* SwiftWebVCFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | B9C1B7FB1E5E4518001B0A2D /* SwiftModalWebVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C1B7F21E5E442F001B0A2D /* SwiftModalWebVC.swift */; }; 12 | B9C1B7FC1E5E4518001B0A2D /* SwiftWebVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C1B7F31E5E442F001B0A2D /* SwiftWebVC.swift */; }; 13 | B9C1B7FD1E5E4518001B0A2D /* SwiftWebVCActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C1B7F41E5E442F001B0A2D /* SwiftWebVCActivity.swift */; }; 14 | B9C1B7FE1E5E4518001B0A2D /* SwiftWebVCActivityChrome.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C1B7F51E5E442F001B0A2D /* SwiftWebVCActivityChrome.swift */; }; 15 | B9C1B7FF1E5E4518001B0A2D /* SwiftWebVCActivitySafari.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C1B7F61E5E442F001B0A2D /* SwiftWebVCActivitySafari.swift */; }; 16 | B9C1B8001E5E4525001B0A2D /* SwiftWebVC.strings in Resources */ = {isa = PBXBuildFile; fileRef = B9C1B7E61E5E442F001B0A2D /* SwiftWebVC.strings */; }; 17 | B9C1B8011E5E452B001B0A2D /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B9C1B7E41E5E442F001B0A2D /* Media.xcassets */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | B91D24E31E5CFE6E000F9BF1 /* SwiftWebVC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftWebVC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | B91D24E61E5CFE6E000F9BF1 /* SwiftWebVCFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftWebVCFramework.h; sourceTree = ""; }; 23 | B91D24E71E5CFE6E000F9BF1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 24 | B9C1B7E41E5E442F001B0A2D /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Media.xcassets; sourceTree = ""; }; 25 | B9C1B7E71E5E442F001B0A2D /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/SwiftWebVC.strings; sourceTree = ""; }; 26 | B9C1B7E81E5E442F001B0A2D /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/SwiftWebVC.strings; sourceTree = ""; }; 27 | B9C1B7E91E5E442F001B0A2D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/SwiftWebVC.strings; sourceTree = ""; }; 28 | B9C1B7EA1E5E442F001B0A2D /* es-ES */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-ES"; path = "es-ES.lproj/SwiftWebVC.strings"; sourceTree = ""; }; 29 | B9C1B7EB1E5E442F001B0A2D /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/SwiftWebVC.strings; sourceTree = ""; }; 30 | B9C1B7EC1E5E442F001B0A2D /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/SwiftWebVC.strings; sourceTree = ""; }; 31 | B9C1B7ED1E5E442F001B0A2D /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/SwiftWebVC.strings; sourceTree = ""; }; 32 | B9C1B7EE1E5E442F001B0A2D /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/SwiftWebVC.strings; sourceTree = ""; }; 33 | B9C1B7EF1E5E442F001B0A2D /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/SwiftWebVC.strings; sourceTree = ""; }; 34 | B9C1B7F01E5E442F001B0A2D /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/SwiftWebVC.strings"; sourceTree = ""; }; 35 | B9C1B7F11E5E442F001B0A2D /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/SwiftWebVC.strings"; sourceTree = ""; }; 36 | B9C1B7F21E5E442F001B0A2D /* SwiftModalWebVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftModalWebVC.swift; sourceTree = ""; }; 37 | B9C1B7F31E5E442F001B0A2D /* SwiftWebVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftWebVC.swift; sourceTree = ""; }; 38 | B9C1B7F41E5E442F001B0A2D /* SwiftWebVCActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftWebVCActivity.swift; sourceTree = ""; }; 39 | B9C1B7F51E5E442F001B0A2D /* SwiftWebVCActivityChrome.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftWebVCActivityChrome.swift; sourceTree = ""; }; 40 | B9C1B7F61E5E442F001B0A2D /* SwiftWebVCActivitySafari.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftWebVCActivitySafari.swift; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | B91D24DF1E5CFE6E000F9BF1 /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | /* End PBXFrameworksBuildPhase section */ 52 | 53 | /* Begin PBXGroup section */ 54 | B91D24D91E5CFE6E000F9BF1 = { 55 | isa = PBXGroup; 56 | children = ( 57 | B9C1B7E21E5E442F001B0A2D /* SwiftWebVC */, 58 | B91D24E51E5CFE6E000F9BF1 /* SwiftWebVCFramework */, 59 | B91D24E41E5CFE6E000F9BF1 /* Products */, 60 | ); 61 | sourceTree = ""; 62 | }; 63 | B91D24E41E5CFE6E000F9BF1 /* Products */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | B91D24E31E5CFE6E000F9BF1 /* SwiftWebVC.framework */, 67 | ); 68 | name = Products; 69 | sourceTree = ""; 70 | }; 71 | B91D24E51E5CFE6E000F9BF1 /* SwiftWebVCFramework */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | B91D24E61E5CFE6E000F9BF1 /* SwiftWebVCFramework.h */, 75 | B91D24E71E5CFE6E000F9BF1 /* Info.plist */, 76 | ); 77 | path = SwiftWebVCFramework; 78 | sourceTree = ""; 79 | }; 80 | B9C1B7E21E5E442F001B0A2D /* SwiftWebVC */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | B9C1B7E31E5E442F001B0A2D /* Resources */, 84 | B9C1B7E51E5E442F001B0A2D /* Strings */, 85 | B9C1B7F21E5E442F001B0A2D /* SwiftModalWebVC.swift */, 86 | B9C1B7F31E5E442F001B0A2D /* SwiftWebVC.swift */, 87 | B9C1B7F41E5E442F001B0A2D /* SwiftWebVCActivity.swift */, 88 | B9C1B7F51E5E442F001B0A2D /* SwiftWebVCActivityChrome.swift */, 89 | B9C1B7F61E5E442F001B0A2D /* SwiftWebVCActivitySafari.swift */, 90 | ); 91 | name = SwiftWebVC; 92 | path = ../SwiftWebVC; 93 | sourceTree = ""; 94 | }; 95 | B9C1B7E31E5E442F001B0A2D /* Resources */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | B9C1B7E41E5E442F001B0A2D /* Media.xcassets */, 99 | ); 100 | path = Resources; 101 | sourceTree = ""; 102 | }; 103 | B9C1B7E51E5E442F001B0A2D /* Strings */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | B9C1B7E61E5E442F001B0A2D /* SwiftWebVC.strings */, 107 | ); 108 | path = Strings; 109 | sourceTree = ""; 110 | }; 111 | /* End PBXGroup section */ 112 | 113 | /* Begin PBXHeadersBuildPhase section */ 114 | B91D24E01E5CFE6E000F9BF1 /* Headers */ = { 115 | isa = PBXHeadersBuildPhase; 116 | buildActionMask = 2147483647; 117 | files = ( 118 | B91D24E81E5CFE6E000F9BF1 /* SwiftWebVCFramework.h in Headers */, 119 | ); 120 | runOnlyForDeploymentPostprocessing = 0; 121 | }; 122 | /* End PBXHeadersBuildPhase section */ 123 | 124 | /* Begin PBXNativeTarget section */ 125 | B91D24E21E5CFE6E000F9BF1 /* SwiftWebVC */ = { 126 | isa = PBXNativeTarget; 127 | buildConfigurationList = B91D24EB1E5CFE6E000F9BF1 /* Build configuration list for PBXNativeTarget "SwiftWebVC" */; 128 | buildPhases = ( 129 | B91D24DE1E5CFE6E000F9BF1 /* Sources */, 130 | B91D24DF1E5CFE6E000F9BF1 /* Frameworks */, 131 | B91D24E01E5CFE6E000F9BF1 /* Headers */, 132 | B91D24E11E5CFE6E000F9BF1 /* Resources */, 133 | ); 134 | buildRules = ( 135 | ); 136 | dependencies = ( 137 | ); 138 | name = SwiftWebVC; 139 | productName = SwiftWebVCFramework; 140 | productReference = B91D24E31E5CFE6E000F9BF1 /* SwiftWebVC.framework */; 141 | productType = "com.apple.product-type.framework"; 142 | }; 143 | /* End PBXNativeTarget section */ 144 | 145 | /* Begin PBXProject section */ 146 | B91D24DA1E5CFE6E000F9BF1 /* Project object */ = { 147 | isa = PBXProject; 148 | attributes = { 149 | LastUpgradeCheck = 0820; 150 | TargetAttributes = { 151 | B91D24E21E5CFE6E000F9BF1 = { 152 | CreatedOnToolsVersion = 8.2.1; 153 | ProvisioningStyle = Automatic; 154 | }; 155 | }; 156 | }; 157 | buildConfigurationList = B91D24DD1E5CFE6E000F9BF1 /* Build configuration list for PBXProject "SwiftWebVCFramework" */; 158 | compatibilityVersion = "Xcode 3.2"; 159 | developmentRegion = English; 160 | hasScannedForEncodings = 0; 161 | knownRegions = ( 162 | en, 163 | da, 164 | de, 165 | "es-ES", 166 | es, 167 | fr, 168 | ja, 169 | pt, 170 | vi, 171 | "zh-Hans", 172 | "zh-Hant", 173 | ); 174 | mainGroup = B91D24D91E5CFE6E000F9BF1; 175 | productRefGroup = B91D24E41E5CFE6E000F9BF1 /* Products */; 176 | projectDirPath = ""; 177 | projectRoot = ""; 178 | targets = ( 179 | B91D24E21E5CFE6E000F9BF1 /* SwiftWebVC */, 180 | ); 181 | }; 182 | /* End PBXProject section */ 183 | 184 | /* Begin PBXResourcesBuildPhase section */ 185 | B91D24E11E5CFE6E000F9BF1 /* Resources */ = { 186 | isa = PBXResourcesBuildPhase; 187 | buildActionMask = 2147483647; 188 | files = ( 189 | B9C1B8011E5E452B001B0A2D /* Media.xcassets in Resources */, 190 | B9C1B8001E5E4525001B0A2D /* SwiftWebVC.strings in Resources */, 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | }; 194 | /* End PBXResourcesBuildPhase section */ 195 | 196 | /* Begin PBXSourcesBuildPhase section */ 197 | B91D24DE1E5CFE6E000F9BF1 /* Sources */ = { 198 | isa = PBXSourcesBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | B9C1B7FB1E5E4518001B0A2D /* SwiftModalWebVC.swift in Sources */, 202 | B9C1B7FC1E5E4518001B0A2D /* SwiftWebVC.swift in Sources */, 203 | B9C1B7FD1E5E4518001B0A2D /* SwiftWebVCActivity.swift in Sources */, 204 | B9C1B7FE1E5E4518001B0A2D /* SwiftWebVCActivityChrome.swift in Sources */, 205 | B9C1B7FF1E5E4518001B0A2D /* SwiftWebVCActivitySafari.swift in Sources */, 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | }; 209 | /* End PBXSourcesBuildPhase section */ 210 | 211 | /* Begin PBXVariantGroup section */ 212 | B9C1B7E61E5E442F001B0A2D /* SwiftWebVC.strings */ = { 213 | isa = PBXVariantGroup; 214 | children = ( 215 | B9C1B7E71E5E442F001B0A2D /* da */, 216 | B9C1B7E81E5E442F001B0A2D /* de */, 217 | B9C1B7E91E5E442F001B0A2D /* en */, 218 | B9C1B7EA1E5E442F001B0A2D /* es-ES */, 219 | B9C1B7EB1E5E442F001B0A2D /* es */, 220 | B9C1B7EC1E5E442F001B0A2D /* fr */, 221 | B9C1B7ED1E5E442F001B0A2D /* ja */, 222 | B9C1B7EE1E5E442F001B0A2D /* pt */, 223 | B9C1B7EF1E5E442F001B0A2D /* vi */, 224 | B9C1B7F01E5E442F001B0A2D /* zh-Hans */, 225 | B9C1B7F11E5E442F001B0A2D /* zh-Hant */, 226 | ); 227 | name = SwiftWebVC.strings; 228 | sourceTree = ""; 229 | }; 230 | /* End PBXVariantGroup section */ 231 | 232 | /* Begin XCBuildConfiguration section */ 233 | B91D24E91E5CFE6E000F9BF1 /* Debug */ = { 234 | isa = XCBuildConfiguration; 235 | buildSettings = { 236 | ALWAYS_SEARCH_USER_PATHS = NO; 237 | CLANG_ANALYZER_NONNULL = YES; 238 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 239 | CLANG_CXX_LIBRARY = "libc++"; 240 | CLANG_ENABLE_MODULES = YES; 241 | CLANG_ENABLE_OBJC_ARC = YES; 242 | CLANG_WARN_BOOL_CONVERSION = YES; 243 | CLANG_WARN_CONSTANT_CONVERSION = YES; 244 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 245 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 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_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 279 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 280 | TARGETED_DEVICE_FAMILY = "1,2"; 281 | VERSIONING_SYSTEM = "apple-generic"; 282 | VERSION_INFO_PREFIX = ""; 283 | }; 284 | name = Debug; 285 | }; 286 | B91D24EA1E5CFE6E000F9BF1 /* Release */ = { 287 | isa = XCBuildConfiguration; 288 | buildSettings = { 289 | ALWAYS_SEARCH_USER_PATHS = NO; 290 | CLANG_ANALYZER_NONNULL = YES; 291 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 292 | CLANG_CXX_LIBRARY = "libc++"; 293 | CLANG_ENABLE_MODULES = YES; 294 | CLANG_ENABLE_OBJC_ARC = YES; 295 | CLANG_WARN_BOOL_CONVERSION = YES; 296 | CLANG_WARN_CONSTANT_CONVERSION = YES; 297 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 298 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 299 | CLANG_WARN_EMPTY_BODY = YES; 300 | CLANG_WARN_ENUM_CONVERSION = YES; 301 | CLANG_WARN_INFINITE_RECURSION = YES; 302 | CLANG_WARN_INT_CONVERSION = YES; 303 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 304 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 305 | CLANG_WARN_UNREACHABLE_CODE = YES; 306 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 307 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 308 | COPY_PHASE_STRIP = NO; 309 | CURRENT_PROJECT_VERSION = 1; 310 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 311 | ENABLE_NS_ASSERTIONS = NO; 312 | ENABLE_STRICT_OBJC_MSGSEND = YES; 313 | GCC_C_LANGUAGE_STANDARD = gnu99; 314 | GCC_NO_COMMON_BLOCKS = YES; 315 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 316 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 317 | GCC_WARN_UNDECLARED_SELECTOR = YES; 318 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 319 | GCC_WARN_UNUSED_FUNCTION = YES; 320 | GCC_WARN_UNUSED_VARIABLE = YES; 321 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 322 | MTL_ENABLE_DEBUG_INFO = NO; 323 | SDKROOT = iphoneos; 324 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 325 | TARGETED_DEVICE_FAMILY = "1,2"; 326 | VALIDATE_PRODUCT = YES; 327 | VERSIONING_SYSTEM = "apple-generic"; 328 | VERSION_INFO_PREFIX = ""; 329 | }; 330 | name = Release; 331 | }; 332 | B91D24EC1E5CFE6E000F9BF1 /* Debug */ = { 333 | isa = XCBuildConfiguration; 334 | buildSettings = { 335 | CODE_SIGN_IDENTITY = ""; 336 | DEFINES_MODULE = YES; 337 | DYLIB_COMPATIBILITY_VERSION = 1; 338 | DYLIB_CURRENT_VERSION = 1; 339 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 340 | INFOPLIST_FILE = SwiftWebVCFramework/Info.plist; 341 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 342 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 343 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 344 | PRODUCT_BUNDLE_IDENTIFIER = com.swiftweb.SwiftWebVCFramework; 345 | PRODUCT_NAME = "$(TARGET_NAME)"; 346 | SKIP_INSTALL = YES; 347 | SWIFT_VERSION = 3.0; 348 | }; 349 | name = Debug; 350 | }; 351 | B91D24ED1E5CFE6E000F9BF1 /* Release */ = { 352 | isa = XCBuildConfiguration; 353 | buildSettings = { 354 | CODE_SIGN_IDENTITY = ""; 355 | DEFINES_MODULE = YES; 356 | DYLIB_COMPATIBILITY_VERSION = 1; 357 | DYLIB_CURRENT_VERSION = 1; 358 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 359 | INFOPLIST_FILE = SwiftWebVCFramework/Info.plist; 360 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 361 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 362 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 363 | PRODUCT_BUNDLE_IDENTIFIER = com.swiftweb.SwiftWebVCFramework; 364 | PRODUCT_NAME = "$(TARGET_NAME)"; 365 | SKIP_INSTALL = YES; 366 | SWIFT_VERSION = 3.0; 367 | }; 368 | name = Release; 369 | }; 370 | /* End XCBuildConfiguration section */ 371 | 372 | /* Begin XCConfigurationList section */ 373 | B91D24DD1E5CFE6E000F9BF1 /* Build configuration list for PBXProject "SwiftWebVCFramework" */ = { 374 | isa = XCConfigurationList; 375 | buildConfigurations = ( 376 | B91D24E91E5CFE6E000F9BF1 /* Debug */, 377 | B91D24EA1E5CFE6E000F9BF1 /* Release */, 378 | ); 379 | defaultConfigurationIsVisible = 0; 380 | defaultConfigurationName = Release; 381 | }; 382 | B91D24EB1E5CFE6E000F9BF1 /* Build configuration list for PBXNativeTarget "SwiftWebVC" */ = { 383 | isa = XCConfigurationList; 384 | buildConfigurations = ( 385 | B91D24EC1E5CFE6E000F9BF1 /* Debug */, 386 | B91D24ED1E5CFE6E000F9BF1 /* Release */, 387 | ); 388 | defaultConfigurationIsVisible = 0; 389 | defaultConfigurationName = Release; 390 | }; 391 | /* End XCConfigurationList section */ 392 | }; 393 | rootObject = B91D24DA1E5CFE6E000F9BF1 /* Project object */; 394 | } 395 | -------------------------------------------------------------------------------- /SwiftWebVCFramework/SwiftWebVCFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftWebVCFramework/SwiftWebVCFramework.xcodeproj/xcshareddata/xcschemes/SwiftWebVC.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /SwiftWebVCFramework/SwiftWebVCFramework/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 | 0.4.1 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /SwiftWebVCFramework/SwiftWebVCFramework/SwiftWebVCFramework.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftWebVCFramework.h 3 | // SwiftWebVCFramework 4 | // 5 | // Created by Megan Williams on 2/21/17. 6 | // 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for SwiftWebVCFramework. 12 | FOUNDATION_EXPORT double SwiftWebVCFrameworkVersionNumber; 13 | 14 | //! Project version string for SwiftWebVCFramework. 15 | FOUNDATION_EXPORT const unsigned char SwiftWebVCFrameworkVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | --------------------------------------------------------------------------------