├── .gitignore ├── .swift-version ├── .swift_version ├── Example ├── PSHTMLView.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── PSHTMLView-Example.xcscheme ├── PSHTMLView.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── PSHTMLView │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── PSHTMLInTableViewController.swift ├── Podfile ├── Podfile.lock └── Pods │ ├── Local Podspecs │ └── PSHTMLView.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ └── project.pbxproj │ └── Target Support Files │ ├── PSHTMLView │ ├── Info.plist │ ├── PSHTMLView-dummy.m │ ├── PSHTMLView-prefix.pch │ ├── PSHTMLView-umbrella.h │ ├── PSHTMLView.modulemap │ └── PSHTMLView.xcconfig │ └── Pods-PSHTMLView_Example │ ├── Info.plist │ ├── Pods-PSHTMLView_Example-acknowledgements.markdown │ ├── Pods-PSHTMLView_Example-acknowledgements.plist │ ├── Pods-PSHTMLView_Example-dummy.m │ ├── Pods-PSHTMLView_Example-frameworks.sh │ ├── Pods-PSHTMLView_Example-resources.sh │ ├── Pods-PSHTMLView_Example-umbrella.h │ ├── Pods-PSHTMLView_Example.debug.xcconfig │ ├── Pods-PSHTMLView_Example.modulemap │ └── Pods-PSHTMLView_Example.release.xcconfig ├── LICENSE ├── PSHTMLView.podspec ├── PSHTMLView ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ └── PSHTMLView.swift ├── README.md ├── Screenshots └── screenshot1.png └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.0 2 | -------------------------------------------------------------------------------- /.swift_version: -------------------------------------------------------------------------------- 1 | 4.2 2 | -------------------------------------------------------------------------------- /Example/PSHTMLView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 11 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 12 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 13 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 14 | 68B0A4A0D58393A8FDE79428 /* Pods_PSHTMLView_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AD99146AC26D8F7282A45A6 /* Pods_PSHTMLView_Example.framework */; }; 15 | A5F714731FC7B3610035EE24 /* PSHTMLInTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5F714711FC7B3610035EE24 /* PSHTMLInTableViewController.swift */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 2AD99146AC26D8F7282A45A6 /* Pods_PSHTMLView_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PSHTMLView_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | 4E90642270D1CA0C319D4860 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 21 | 607FACD01AFB9204008FA782 /* PSHTMLView_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PSHTMLView_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 23 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 24 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 25 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 26 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 27 | 86E74CED34EC913D52EC86BC /* Pods-PSHTMLView_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PSHTMLView_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example.debug.xcconfig"; sourceTree = ""; }; 28 | 95AD481137BA434681F07397 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 29 | A5F714711FC7B3610035EE24 /* PSHTMLInTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PSHTMLInTableViewController.swift; sourceTree = ""; }; 30 | DA1644A1FEFF1F249EBB3B41 /* PSHTMLView.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = PSHTMLView.podspec; path = ../PSHTMLView.podspec; sourceTree = ""; }; 31 | F22299E5DA2D277A2633DFC4 /* Pods-PSHTMLView_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PSHTMLView_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example.release.xcconfig"; sourceTree = ""; }; 32 | /* End PBXFileReference section */ 33 | 34 | /* Begin PBXFrameworksBuildPhase section */ 35 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 36 | isa = PBXFrameworksBuildPhase; 37 | buildActionMask = 2147483647; 38 | files = ( 39 | 68B0A4A0D58393A8FDE79428 /* Pods_PSHTMLView_Example.framework in Frameworks */, 40 | ); 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | /* End PBXFrameworksBuildPhase section */ 44 | 45 | /* Begin PBXGroup section */ 46 | 607FACC71AFB9204008FA782 = { 47 | isa = PBXGroup; 48 | children = ( 49 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 50 | 607FACD21AFB9204008FA782 /* Example for PSHTMLView */, 51 | 607FACD11AFB9204008FA782 /* Products */, 52 | FF3BF395FE65A614659D4327 /* Pods */, 53 | E21DAEE118C5CDEFF4224551 /* Frameworks */, 54 | ); 55 | sourceTree = ""; 56 | }; 57 | 607FACD11AFB9204008FA782 /* Products */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | 607FACD01AFB9204008FA782 /* PSHTMLView_Example.app */, 61 | ); 62 | name = Products; 63 | sourceTree = ""; 64 | }; 65 | 607FACD21AFB9204008FA782 /* Example for PSHTMLView */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | A5F714711FC7B3610035EE24 /* PSHTMLInTableViewController.swift */, 69 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 70 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 71 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 72 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 73 | 607FACD31AFB9204008FA782 /* Supporting Files */, 74 | ); 75 | name = "Example for PSHTMLView"; 76 | path = PSHTMLView; 77 | sourceTree = ""; 78 | }; 79 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 607FACD41AFB9204008FA782 /* Info.plist */, 83 | ); 84 | name = "Supporting Files"; 85 | sourceTree = ""; 86 | }; 87 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | DA1644A1FEFF1F249EBB3B41 /* PSHTMLView.podspec */, 91 | 95AD481137BA434681F07397 /* README.md */, 92 | 4E90642270D1CA0C319D4860 /* LICENSE */, 93 | ); 94 | name = "Podspec Metadata"; 95 | sourceTree = ""; 96 | }; 97 | E21DAEE118C5CDEFF4224551 /* Frameworks */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 2AD99146AC26D8F7282A45A6 /* Pods_PSHTMLView_Example.framework */, 101 | ); 102 | name = Frameworks; 103 | sourceTree = ""; 104 | }; 105 | FF3BF395FE65A614659D4327 /* Pods */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 86E74CED34EC913D52EC86BC /* Pods-PSHTMLView_Example.debug.xcconfig */, 109 | F22299E5DA2D277A2633DFC4 /* Pods-PSHTMLView_Example.release.xcconfig */, 110 | ); 111 | name = Pods; 112 | sourceTree = ""; 113 | }; 114 | /* End PBXGroup section */ 115 | 116 | /* Begin PBXNativeTarget section */ 117 | 607FACCF1AFB9204008FA782 /* PSHTMLView_Example */ = { 118 | isa = PBXNativeTarget; 119 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "PSHTMLView_Example" */; 120 | buildPhases = ( 121 | EC94A8142AF2DA8B09F48F7B /* [CP] Check Pods Manifest.lock */, 122 | 607FACCC1AFB9204008FA782 /* Sources */, 123 | 607FACCD1AFB9204008FA782 /* Frameworks */, 124 | 607FACCE1AFB9204008FA782 /* Resources */, 125 | BD30D29C724410D3406E50AB /* [CP] Embed Pods Frameworks */, 126 | 011E0DAC8CB136CF420F00A7 /* [CP] Copy Pods Resources */, 127 | ); 128 | buildRules = ( 129 | ); 130 | dependencies = ( 131 | ); 132 | name = PSHTMLView_Example; 133 | productName = PSHTMLView; 134 | productReference = 607FACD01AFB9204008FA782 /* PSHTMLView_Example.app */; 135 | productType = "com.apple.product-type.application"; 136 | }; 137 | /* End PBXNativeTarget section */ 138 | 139 | /* Begin PBXProject section */ 140 | 607FACC81AFB9204008FA782 /* Project object */ = { 141 | isa = PBXProject; 142 | attributes = { 143 | LastSwiftUpdateCheck = 0830; 144 | LastUpgradeCheck = 1000; 145 | ORGANIZATIONNAME = CocoaPods; 146 | TargetAttributes = { 147 | 607FACCF1AFB9204008FA782 = { 148 | CreatedOnToolsVersion = 6.3.1; 149 | LastSwiftMigration = 1000; 150 | }; 151 | }; 152 | }; 153 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "PSHTMLView" */; 154 | compatibilityVersion = "Xcode 3.2"; 155 | developmentRegion = English; 156 | hasScannedForEncodings = 0; 157 | knownRegions = ( 158 | en, 159 | Base, 160 | ); 161 | mainGroup = 607FACC71AFB9204008FA782; 162 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 163 | projectDirPath = ""; 164 | projectRoot = ""; 165 | targets = ( 166 | 607FACCF1AFB9204008FA782 /* PSHTMLView_Example */, 167 | ); 168 | }; 169 | /* End PBXProject section */ 170 | 171 | /* Begin PBXResourcesBuildPhase section */ 172 | 607FACCE1AFB9204008FA782 /* Resources */ = { 173 | isa = PBXResourcesBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 177 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 178 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 179 | ); 180 | runOnlyForDeploymentPostprocessing = 0; 181 | }; 182 | /* End PBXResourcesBuildPhase section */ 183 | 184 | /* Begin PBXShellScriptBuildPhase section */ 185 | 011E0DAC8CB136CF420F00A7 /* [CP] Copy Pods Resources */ = { 186 | isa = PBXShellScriptBuildPhase; 187 | buildActionMask = 2147483647; 188 | files = ( 189 | ); 190 | inputPaths = ( 191 | ); 192 | name = "[CP] Copy Pods Resources"; 193 | outputPaths = ( 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | shellPath = /bin/sh; 197 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example-resources.sh\"\n"; 198 | showEnvVarsInLog = 0; 199 | }; 200 | BD30D29C724410D3406E50AB /* [CP] Embed Pods Frameworks */ = { 201 | isa = PBXShellScriptBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | ); 205 | inputPaths = ( 206 | "${SRCROOT}/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example-frameworks.sh", 207 | "${BUILT_PRODUCTS_DIR}/PSHTMLView/PSHTMLView.framework", 208 | ); 209 | name = "[CP] Embed Pods Frameworks"; 210 | outputPaths = ( 211 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PSHTMLView.framework", 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | shellPath = /bin/sh; 215 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example-frameworks.sh\"\n"; 216 | showEnvVarsInLog = 0; 217 | }; 218 | EC94A8142AF2DA8B09F48F7B /* [CP] Check Pods Manifest.lock */ = { 219 | isa = PBXShellScriptBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | ); 223 | inputPaths = ( 224 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 225 | "${PODS_ROOT}/Manifest.lock", 226 | ); 227 | name = "[CP] Check Pods Manifest.lock"; 228 | outputPaths = ( 229 | "$(DERIVED_FILE_DIR)/Pods-PSHTMLView_Example-checkManifestLockResult.txt", 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | shellPath = /bin/sh; 233 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 234 | showEnvVarsInLog = 0; 235 | }; 236 | /* End PBXShellScriptBuildPhase section */ 237 | 238 | /* Begin PBXSourcesBuildPhase section */ 239 | 607FACCC1AFB9204008FA782 /* Sources */ = { 240 | isa = PBXSourcesBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 244 | A5F714731FC7B3610035EE24 /* PSHTMLInTableViewController.swift in Sources */, 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | /* End PBXSourcesBuildPhase section */ 249 | 250 | /* Begin PBXVariantGroup section */ 251 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 252 | isa = PBXVariantGroup; 253 | children = ( 254 | 607FACDA1AFB9204008FA782 /* Base */, 255 | ); 256 | name = Main.storyboard; 257 | sourceTree = ""; 258 | }; 259 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 260 | isa = PBXVariantGroup; 261 | children = ( 262 | 607FACDF1AFB9204008FA782 /* Base */, 263 | ); 264 | name = LaunchScreen.xib; 265 | sourceTree = ""; 266 | }; 267 | /* End PBXVariantGroup section */ 268 | 269 | /* Begin XCBuildConfiguration section */ 270 | 607FACED1AFB9204008FA782 /* Debug */ = { 271 | isa = XCBuildConfiguration; 272 | buildSettings = { 273 | ALWAYS_SEARCH_USER_PATHS = NO; 274 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 275 | CLANG_CXX_LIBRARY = "libc++"; 276 | CLANG_ENABLE_MODULES = YES; 277 | CLANG_ENABLE_OBJC_ARC = YES; 278 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 279 | CLANG_WARN_BOOL_CONVERSION = YES; 280 | CLANG_WARN_COMMA = YES; 281 | CLANG_WARN_CONSTANT_CONVERSION = YES; 282 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 283 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 284 | CLANG_WARN_EMPTY_BODY = YES; 285 | CLANG_WARN_ENUM_CONVERSION = YES; 286 | CLANG_WARN_INFINITE_RECURSION = YES; 287 | CLANG_WARN_INT_CONVERSION = YES; 288 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 289 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 290 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 291 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 292 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 293 | CLANG_WARN_STRICT_PROTOTYPES = YES; 294 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 295 | CLANG_WARN_UNREACHABLE_CODE = YES; 296 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 297 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 298 | COPY_PHASE_STRIP = NO; 299 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 300 | ENABLE_STRICT_OBJC_MSGSEND = YES; 301 | ENABLE_TESTABILITY = YES; 302 | GCC_C_LANGUAGE_STANDARD = gnu99; 303 | GCC_DYNAMIC_NO_PIC = NO; 304 | GCC_NO_COMMON_BLOCKS = YES; 305 | GCC_OPTIMIZATION_LEVEL = 0; 306 | GCC_PREPROCESSOR_DEFINITIONS = ( 307 | "DEBUG=1", 308 | "$(inherited)", 309 | ); 310 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 311 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 312 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 313 | GCC_WARN_UNDECLARED_SELECTOR = YES; 314 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 315 | GCC_WARN_UNUSED_FUNCTION = YES; 316 | GCC_WARN_UNUSED_VARIABLE = YES; 317 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 318 | MTL_ENABLE_DEBUG_INFO = YES; 319 | ONLY_ACTIVE_ARCH = YES; 320 | SDKROOT = iphoneos; 321 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 322 | }; 323 | name = Debug; 324 | }; 325 | 607FACEE1AFB9204008FA782 /* Release */ = { 326 | isa = XCBuildConfiguration; 327 | buildSettings = { 328 | ALWAYS_SEARCH_USER_PATHS = NO; 329 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 330 | CLANG_CXX_LIBRARY = "libc++"; 331 | CLANG_ENABLE_MODULES = YES; 332 | CLANG_ENABLE_OBJC_ARC = YES; 333 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 334 | CLANG_WARN_BOOL_CONVERSION = YES; 335 | CLANG_WARN_COMMA = YES; 336 | CLANG_WARN_CONSTANT_CONVERSION = YES; 337 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 338 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 339 | CLANG_WARN_EMPTY_BODY = YES; 340 | CLANG_WARN_ENUM_CONVERSION = YES; 341 | CLANG_WARN_INFINITE_RECURSION = YES; 342 | CLANG_WARN_INT_CONVERSION = YES; 343 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 344 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 345 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 346 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 347 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 348 | CLANG_WARN_STRICT_PROTOTYPES = YES; 349 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 350 | CLANG_WARN_UNREACHABLE_CODE = YES; 351 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 352 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 353 | COPY_PHASE_STRIP = NO; 354 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 355 | ENABLE_NS_ASSERTIONS = NO; 356 | ENABLE_STRICT_OBJC_MSGSEND = YES; 357 | GCC_C_LANGUAGE_STANDARD = gnu99; 358 | GCC_NO_COMMON_BLOCKS = YES; 359 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 360 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 361 | GCC_WARN_UNDECLARED_SELECTOR = YES; 362 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 363 | GCC_WARN_UNUSED_FUNCTION = YES; 364 | GCC_WARN_UNUSED_VARIABLE = YES; 365 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 366 | MTL_ENABLE_DEBUG_INFO = NO; 367 | SDKROOT = iphoneos; 368 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 369 | VALIDATE_PRODUCT = YES; 370 | }; 371 | name = Release; 372 | }; 373 | 607FACF01AFB9204008FA782 /* Debug */ = { 374 | isa = XCBuildConfiguration; 375 | baseConfigurationReference = 86E74CED34EC913D52EC86BC /* Pods-PSHTMLView_Example.debug.xcconfig */; 376 | buildSettings = { 377 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 378 | INFOPLIST_FILE = PSHTMLView/Info.plist; 379 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 380 | MODULE_NAME = ExampleApp; 381 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 382 | PRODUCT_NAME = "$(TARGET_NAME)"; 383 | SWIFT_VERSION = 4.2; 384 | }; 385 | name = Debug; 386 | }; 387 | 607FACF11AFB9204008FA782 /* Release */ = { 388 | isa = XCBuildConfiguration; 389 | baseConfigurationReference = F22299E5DA2D277A2633DFC4 /* Pods-PSHTMLView_Example.release.xcconfig */; 390 | buildSettings = { 391 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 392 | INFOPLIST_FILE = PSHTMLView/Info.plist; 393 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 394 | MODULE_NAME = ExampleApp; 395 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 396 | PRODUCT_NAME = "$(TARGET_NAME)"; 397 | SWIFT_VERSION = 4.2; 398 | }; 399 | name = Release; 400 | }; 401 | /* End XCBuildConfiguration section */ 402 | 403 | /* Begin XCConfigurationList section */ 404 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "PSHTMLView" */ = { 405 | isa = XCConfigurationList; 406 | buildConfigurations = ( 407 | 607FACED1AFB9204008FA782 /* Debug */, 408 | 607FACEE1AFB9204008FA782 /* Release */, 409 | ); 410 | defaultConfigurationIsVisible = 0; 411 | defaultConfigurationName = Release; 412 | }; 413 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "PSHTMLView_Example" */ = { 414 | isa = XCConfigurationList; 415 | buildConfigurations = ( 416 | 607FACF01AFB9204008FA782 /* Debug */, 417 | 607FACF11AFB9204008FA782 /* Release */, 418 | ); 419 | defaultConfigurationIsVisible = 0; 420 | defaultConfigurationName = Release; 421 | }; 422 | /* End XCConfigurationList section */ 423 | }; 424 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 425 | } 426 | -------------------------------------------------------------------------------- /Example/PSHTMLView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/PSHTMLView.xcodeproj/xcshareddata/xcschemes/PSHTMLView-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/PSHTMLView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/PSHTMLView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/PSHTMLView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // PSHTMLView 4 | // 5 | // Created by Vugla on 11/24/2017. 6 | // Copyright (c) 2017 Vugla. 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: [UIApplication.LaunchOptionsKey: 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 throttle down OpenGL ES frame rates. 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 inactive 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/PSHTMLView/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/PSHTMLView/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 39 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /Example/PSHTMLView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/PSHTMLView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/PSHTMLView/PSHTMLInTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HTMLInTableViewController.swift 3 | // PSHTMLView 4 | // 5 | // Created by Predrag Samardzic on 23/11/2017. 6 | // Copyright © 2017 Predrag Samardzic. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SafariServices 11 | import WebKit 12 | import MessageUI 13 | import PSHTMLView 14 | 15 | class PSHTMLCell: UITableViewCell { 16 | @IBOutlet weak var htmlView : PSHTMLView! 17 | } 18 | 19 | class PSHTMLInTableViewController: UIViewController { 20 | 21 | @IBOutlet weak var progressView: UIProgressView! 22 | @IBOutlet weak var tableView: UITableView! 23 | 24 | lazy private var htmlCell: PSHTMLCell = { [weak self] in 25 | var cell = self?.tableView.dequeueReusableCell(withIdentifier: "HTMLCell") as! PSHTMLCell 26 | cell.htmlView.delegate = self 27 | return cell 28 | }() 29 | 30 | override func viewDidLoad() { 31 | super.viewDidLoad() 32 | setupTable() 33 | loadData() 34 | } 35 | 36 | func setupTable() { 37 | tableView.rowHeight = UITableView.automaticDimension 38 | tableView.estimatedRowHeight = 300 39 | tableView.tableFooterView = UIView() 40 | } 41 | 42 | func loadData() { 43 | 44 | //loading html 45 | let html = """ 46 | 47 | 48 | Your Title Here 49 | 50 | 51 |
52 |
53 | Link Name 54 | is a link to another nifty site 55 |

This is a Header

56 |

This is a Medium Header

57 | Send me mail at 58 | predragsamardzic13@gmail.com. 59 |

This is a new paragraph! 60 |

This is a new paragraph! 61 |
This is a new sentence without a paragraph break, in bold italics. 62 |


63 | 64 | 65 | """ 66 | progressView.isHidden = false 67 | progressView.setProgress(0, animated: false) 68 | htmlCell.htmlView.html = html 69 | 70 | //adding custom script - action when image clicked 71 | //adding observer and handling callback in delegate method handleScriptMessage 72 | let script = "var imgElement = document.getElementById(\"myImage\"); imgElement.onclick = function(e) { window.webkit.messageHandlers.\(PSHTMLViewScriptMessage.HandlerName.onImageClicked.rawValue).postMessage(e.currentTarget.getAttribute(\"src\")); };" 73 | htmlCell.htmlView.addScript(script, observeMessageWithName: .onImageClicked) 74 | } 75 | 76 | } 77 | 78 | extension PSHTMLInTableViewController : UITableViewDataSource, UITableViewDelegate { 79 | 80 | func numberOfSections(in tableView: UITableView) -> Int { 81 | return 1 82 | } 83 | 84 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 85 | return 4 86 | } 87 | 88 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 89 | switch indexPath.row { 90 | case 1: 91 | return htmlCell 92 | default: 93 | return tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) 94 | } 95 | } 96 | 97 | } 98 | 99 | extension PSHTMLInTableViewController: PSHTMLViewDelegate { 100 | func shouldNavigate(for navigationAction: WKNavigationAction) -> Bool { 101 | if navigationAction.navigationType == .linkActivated, let url = navigationAction.request.url { 102 | //example of intercepting link and launching ios mail app (should work on real device) 103 | if url.absoluteString.hasPrefix("mailto:") { 104 | if MFMailComposeViewController.canSendMail() { 105 | //todo send mail 106 | let composeVC = MFMailComposeViewController() 107 | composeVC.mailComposeDelegate = self 108 | if let recipient = url.absoluteString.components(separatedBy: ":").last { 109 | composeVC.setToRecipients([recipient]) 110 | } 111 | composeVC.setSubject("Hello!") 112 | composeVC.setMessageBody("Hello, this webview was useful!", isHTML: false) 113 | self.present(composeVC, animated: true, completion: nil) 114 | } else { 115 | //example of calling javascript from swift (note that alert shown is native one tnx to WKUIDelegate, will show in simulator) 116 | htmlCell.htmlView.webView.evaluateJavaScript("alert(\"Mail services are not available\");") 117 | } 118 | return false 119 | } 120 | //intentinally openining all other links in Safari 121 | let svc = SFSafariViewController(url: url) 122 | present(svc, animated: true, completion: nil) 123 | return false 124 | } 125 | return true 126 | } 127 | 128 | func presentAlert(_ alertController: UIAlertController) { 129 | present(alertController, animated: true) 130 | } 131 | 132 | func heightChanged(height: CGFloat) { 133 | print(height) 134 | tableView.reloadData() 135 | } 136 | 137 | func handleScriptMessage(_ message: WKScriptMessage) { 138 | //opening image link in safari when clicked 139 | if message.name == PSHTMLViewScriptMessage.HandlerName.onImageClicked.rawValue { 140 | if let urlString = message.body as? String, let url = URL(string: urlString) { 141 | let svc = SFSafariViewController(url: url) 142 | present(svc, animated: true, completion: nil) 143 | } 144 | } 145 | } 146 | 147 | func loadingProgress(progress: Float) { 148 | progressView.isHidden = progress == 1 149 | progressView.setProgress(progress, animated: true) 150 | } 151 | 152 | func didFinishLoad() { 153 | progressView.setProgress(0, animated: false) 154 | } 155 | 156 | } 157 | 158 | extension PSHTMLInTableViewController: MFMailComposeViewControllerDelegate { 159 | func mailComposeController(_ controller: MFMailComposeViewController, 160 | didFinishWith result: MFMailComposeResult, error: Error?) { 161 | controller.dismiss(animated: true, completion: nil) 162 | } 163 | } 164 | 165 | extension PSHTMLViewScriptMessage.HandlerName { 166 | static let onImageClicked = PSHTMLViewScriptMessage.HandlerName("onImageClicked") 167 | } 168 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'PSHTMLView_Example' do 4 | pod 'PSHTMLView', :path => '../' 5 | end 6 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - PSHTMLView (0.1.5) 3 | 4 | DEPENDENCIES: 5 | - PSHTMLView (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | PSHTMLView: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | PSHTMLView: 2acbebb3b48a9c06ba1106dc0aacc6e792387bc4 13 | 14 | PODFILE CHECKSUM: 3749efc15dd78de2e9a6cb6d2717c4f115b483bc 15 | 16 | COCOAPODS: 1.3.1 17 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/PSHTMLView.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PSHTMLView", 3 | "version": "0.1.5", 4 | "summary": "WKWebView wrapper for using in UITableView and UIScrollView", 5 | "description": "PSHTMLView is a non scrollable WKWebView wrapper, adapt for using in UITableView and UIScrollView.", 6 | "homepage": "https://github.com/Vugla/PSHTMLView", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "Vugla": "predragsamardzic@msn.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/Vugla/PSHTMLView.git", 16 | "tag": "0.1.5" 17 | }, 18 | "platforms": { 19 | "ios": "9.0" 20 | }, 21 | "source_files": "PSHTMLView/Classes/**/*" 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - PSHTMLView (0.1.5) 3 | 4 | DEPENDENCIES: 5 | - PSHTMLView (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | PSHTMLView: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | PSHTMLView: 2acbebb3b48a9c06ba1106dc0aacc6e792387bc4 13 | 14 | PODFILE CHECKSUM: 3749efc15dd78de2e9a6cb6d2717c4f115b483bc 15 | 16 | COCOAPODS: 1.3.1 17 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3EB6092D1449883B50CFA505239FAD4F /* PSHTMLView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC3E8A2BCC8ECFA09738323BE6F4390F /* PSHTMLView.swift */; }; 11 | 6E4673AD326C19367F62B52C0DFF5DB6 /* Pods-PSHTMLView_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEE874CEA89918C2320F242F23A3ABD /* Pods-PSHTMLView_Example-dummy.m */; }; 12 | 7C4EA4BB3385B08E3ABB8CADD37E6D04 /* Pods-PSHTMLView_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7FDD785F69B087257DA2390D9F0B1C53 /* Pods-PSHTMLView_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 8D151A3072B268BF9A61FEC0BB3BF724 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 14 | 90B3274FCBC5A43769DF131241D77AAD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 15 | A866371F4BCF8D5D201DF7434D370E76 /* PSHTMLView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0321CD86EE29E449B7CFF608B7D6DE89 /* PSHTMLView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | BD345C25A7A738092700431C6047EC50 /* PSHTMLView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 78FF54DB326B4F93C6A35DCC0636705A /* PSHTMLView-dummy.m */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 95E9D61F79B1FF7555210E9A77754330 /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = F670BF12A1BD44148176B7B23DE5767E; 25 | remoteInfo = PSHTMLView; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 0321CD86EE29E449B7CFF608B7D6DE89 /* PSHTMLView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PSHTMLView-umbrella.h"; sourceTree = ""; }; 31 | 1125D59DA67F03B6C0727E941539FEBD /* Pods-PSHTMLView_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-PSHTMLView_Example-acknowledgements.markdown"; sourceTree = ""; }; 32 | 1DBFBD50594948B888CEC7EB1910944A /* Pods-PSHTMLView_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-PSHTMLView_Example-acknowledgements.plist"; sourceTree = ""; }; 33 | 299DADC939549952B7CBFFA5A60D8C95 /* Pods-PSHTMLView_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PSHTMLView_Example.debug.xcconfig"; sourceTree = ""; }; 34 | 29E8B3C2BD96C2ACFA07B49D8F209254 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | 2E8DE57294C36C763AFC40C3685EABED /* Pods-PSHTMLView_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-PSHTMLView_Example-frameworks.sh"; sourceTree = ""; }; 36 | 4DDAC3198F61CE335A649927990A6DA5 /* PSHTMLView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PSHTMLView.xcconfig; sourceTree = ""; }; 37 | 523DBC410117F1FD87450D508801BDCD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 39 | 7627A310240A3EF0D8151E4F3AC3BBC7 /* PSHTMLView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PSHTMLView-prefix.pch"; sourceTree = ""; }; 40 | 78FF54DB326B4F93C6A35DCC0636705A /* PSHTMLView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PSHTMLView-dummy.m"; sourceTree = ""; }; 41 | 79BF8894BA5399B35357F8C1285E246F /* PSHTMLView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = PSHTMLView.modulemap; sourceTree = ""; }; 42 | 7FDD785F69B087257DA2390D9F0B1C53 /* Pods-PSHTMLView_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-PSHTMLView_Example-umbrella.h"; sourceTree = ""; }; 43 | 8DBEE2A9946F47C8BAE5C84BB0C09C5D /* PSHTMLView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PSHTMLView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 45 | 9BEE874CEA89918C2320F242F23A3ABD /* Pods-PSHTMLView_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-PSHTMLView_Example-dummy.m"; sourceTree = ""; }; 46 | BCE8B91E2108418328FFDE461BFD20F7 /* Pods-PSHTMLView_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PSHTMLView_Example.release.xcconfig"; sourceTree = ""; }; 47 | C995B536B3E3FC75CEA11A5540E06905 /* Pods_PSHTMLView_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PSHTMLView_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | D3BE097E68CCDB25B2974FE8AB7D6133 /* Pods-PSHTMLView_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-PSHTMLView_Example.modulemap"; sourceTree = ""; }; 49 | DC3E8A2BCC8ECFA09738323BE6F4390F /* PSHTMLView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PSHTMLView.swift; path = PSHTMLView/Classes/PSHTMLView.swift; sourceTree = ""; }; 50 | EEB84E73C5A047BA5D5BD203286CC9D9 /* Pods-PSHTMLView_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-PSHTMLView_Example-resources.sh"; sourceTree = ""; }; 51 | /* End PBXFileReference section */ 52 | 53 | /* Begin PBXFrameworksBuildPhase section */ 54 | 353813A8C289E3DAAF9DCBCB6BEDB237 /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | 90B3274FCBC5A43769DF131241D77AAD /* Foundation.framework in Frameworks */, 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | CB29A02FBE37946805B7827A5C733B62 /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 8D151A3072B268BF9A61FEC0BB3BF724 /* Foundation.framework in Frameworks */, 67 | ); 68 | runOnlyForDeploymentPostprocessing = 0; 69 | }; 70 | /* End PBXFrameworksBuildPhase section */ 71 | 72 | /* Begin PBXGroup section */ 73 | 28519B74A7A90B51472DC903A3C8974A /* Support Files */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 29E8B3C2BD96C2ACFA07B49D8F209254 /* Info.plist */, 77 | 79BF8894BA5399B35357F8C1285E246F /* PSHTMLView.modulemap */, 78 | 4DDAC3198F61CE335A649927990A6DA5 /* PSHTMLView.xcconfig */, 79 | 78FF54DB326B4F93C6A35DCC0636705A /* PSHTMLView-dummy.m */, 80 | 7627A310240A3EF0D8151E4F3AC3BBC7 /* PSHTMLView-prefix.pch */, 81 | 0321CD86EE29E449B7CFF608B7D6DE89 /* PSHTMLView-umbrella.h */, 82 | ); 83 | name = "Support Files"; 84 | path = "Example/Pods/Target Support Files/PSHTMLView"; 85 | sourceTree = ""; 86 | }; 87 | 2D332FCADAA7F5A4A22179182A4A4352 /* Products */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | C995B536B3E3FC75CEA11A5540E06905 /* Pods_PSHTMLView_Example.framework */, 91 | 8DBEE2A9946F47C8BAE5C84BB0C09C5D /* PSHTMLView.framework */, 92 | ); 93 | name = Products; 94 | sourceTree = ""; 95 | }; 96 | 5F5EF2CA07BE10E06759E87F649C214B /* PSHTMLView */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | DC3E8A2BCC8ECFA09738323BE6F4390F /* PSHTMLView.swift */, 100 | 28519B74A7A90B51472DC903A3C8974A /* Support Files */, 101 | ); 102 | name = PSHTMLView; 103 | path = ../..; 104 | sourceTree = ""; 105 | }; 106 | 788B0F3F7D0FDA529112E678F4BADC1C /* Pods-PSHTMLView_Example */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 523DBC410117F1FD87450D508801BDCD /* Info.plist */, 110 | D3BE097E68CCDB25B2974FE8AB7D6133 /* Pods-PSHTMLView_Example.modulemap */, 111 | 1125D59DA67F03B6C0727E941539FEBD /* Pods-PSHTMLView_Example-acknowledgements.markdown */, 112 | 1DBFBD50594948B888CEC7EB1910944A /* Pods-PSHTMLView_Example-acknowledgements.plist */, 113 | 9BEE874CEA89918C2320F242F23A3ABD /* Pods-PSHTMLView_Example-dummy.m */, 114 | 2E8DE57294C36C763AFC40C3685EABED /* Pods-PSHTMLView_Example-frameworks.sh */, 115 | EEB84E73C5A047BA5D5BD203286CC9D9 /* Pods-PSHTMLView_Example-resources.sh */, 116 | 7FDD785F69B087257DA2390D9F0B1C53 /* Pods-PSHTMLView_Example-umbrella.h */, 117 | 299DADC939549952B7CBFFA5A60D8C95 /* Pods-PSHTMLView_Example.debug.xcconfig */, 118 | BCE8B91E2108418328FFDE461BFD20F7 /* Pods-PSHTMLView_Example.release.xcconfig */, 119 | ); 120 | name = "Pods-PSHTMLView_Example"; 121 | path = "Target Support Files/Pods-PSHTMLView_Example"; 122 | sourceTree = ""; 123 | }; 124 | 7DB346D0F39D3F0E887471402A8071AB = { 125 | isa = PBXGroup; 126 | children = ( 127 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 128 | 9C2093A0C073D3B9B1F5A301BB4E4046 /* Development Pods */, 129 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 130 | 2D332FCADAA7F5A4A22179182A4A4352 /* Products */, 131 | 7E780B7037727EA1C6E71DA9315359A1 /* Targets Support Files */, 132 | ); 133 | sourceTree = ""; 134 | }; 135 | 7E780B7037727EA1C6E71DA9315359A1 /* Targets Support Files */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 788B0F3F7D0FDA529112E678F4BADC1C /* Pods-PSHTMLView_Example */, 139 | ); 140 | name = "Targets Support Files"; 141 | sourceTree = ""; 142 | }; 143 | 9C2093A0C073D3B9B1F5A301BB4E4046 /* Development Pods */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 5F5EF2CA07BE10E06759E87F649C214B /* PSHTMLView */, 147 | ); 148 | name = "Development Pods"; 149 | sourceTree = ""; 150 | }; 151 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | D35AF013A5F0BAD4F32504907A52519E /* iOS */, 155 | ); 156 | name = Frameworks; 157 | sourceTree = ""; 158 | }; 159 | D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, 163 | ); 164 | name = iOS; 165 | sourceTree = ""; 166 | }; 167 | /* End PBXGroup section */ 168 | 169 | /* Begin PBXHeadersBuildPhase section */ 170 | F37FECD004D27F4D7DA322ECEAB796D5 /* Headers */ = { 171 | isa = PBXHeadersBuildPhase; 172 | buildActionMask = 2147483647; 173 | files = ( 174 | 7C4EA4BB3385B08E3ABB8CADD37E6D04 /* Pods-PSHTMLView_Example-umbrella.h in Headers */, 175 | ); 176 | runOnlyForDeploymentPostprocessing = 0; 177 | }; 178 | F76B2ACFD8B12D09C43E9FFF535F15E1 /* Headers */ = { 179 | isa = PBXHeadersBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | A866371F4BCF8D5D201DF7434D370E76 /* PSHTMLView-umbrella.h in Headers */, 183 | ); 184 | runOnlyForDeploymentPostprocessing = 0; 185 | }; 186 | /* End PBXHeadersBuildPhase section */ 187 | 188 | /* Begin PBXNativeTarget section */ 189 | AB92C6F4C4B4D79BDF9B8CB97B099316 /* Pods-PSHTMLView_Example */ = { 190 | isa = PBXNativeTarget; 191 | buildConfigurationList = 869649421A80672D17B8202C3E0774B9 /* Build configuration list for PBXNativeTarget "Pods-PSHTMLView_Example" */; 192 | buildPhases = ( 193 | D23C9471EA5A42816C75BC5C01F6A0CE /* Sources */, 194 | 353813A8C289E3DAAF9DCBCB6BEDB237 /* Frameworks */, 195 | F37FECD004D27F4D7DA322ECEAB796D5 /* Headers */, 196 | ); 197 | buildRules = ( 198 | ); 199 | dependencies = ( 200 | 360399FFE304B9F62CCC8858B3C5C140 /* PBXTargetDependency */, 201 | ); 202 | name = "Pods-PSHTMLView_Example"; 203 | productName = "Pods-PSHTMLView_Example"; 204 | productReference = C995B536B3E3FC75CEA11A5540E06905 /* Pods_PSHTMLView_Example.framework */; 205 | productType = "com.apple.product-type.framework"; 206 | }; 207 | F670BF12A1BD44148176B7B23DE5767E /* PSHTMLView */ = { 208 | isa = PBXNativeTarget; 209 | buildConfigurationList = 764C99AAA202A6A075DD7C61C19A0436 /* Build configuration list for PBXNativeTarget "PSHTMLView" */; 210 | buildPhases = ( 211 | 27733A485D02E14FF28FB4C279D69A4E /* Sources */, 212 | CB29A02FBE37946805B7827A5C733B62 /* Frameworks */, 213 | F76B2ACFD8B12D09C43E9FFF535F15E1 /* Headers */, 214 | ); 215 | buildRules = ( 216 | ); 217 | dependencies = ( 218 | ); 219 | name = PSHTMLView; 220 | productName = PSHTMLView; 221 | productReference = 8DBEE2A9946F47C8BAE5C84BB0C09C5D /* PSHTMLView.framework */; 222 | productType = "com.apple.product-type.framework"; 223 | }; 224 | /* End PBXNativeTarget section */ 225 | 226 | /* Begin PBXProject section */ 227 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 228 | isa = PBXProject; 229 | attributes = { 230 | LastSwiftUpdateCheck = 0830; 231 | LastUpgradeCheck = 1000; 232 | TargetAttributes = { 233 | F670BF12A1BD44148176B7B23DE5767E = { 234 | LastSwiftMigration = 1000; 235 | }; 236 | }; 237 | }; 238 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 239 | compatibilityVersion = "Xcode 3.2"; 240 | developmentRegion = English; 241 | hasScannedForEncodings = 0; 242 | knownRegions = ( 243 | en, 244 | ); 245 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 246 | productRefGroup = 2D332FCADAA7F5A4A22179182A4A4352 /* Products */; 247 | projectDirPath = ""; 248 | projectRoot = ""; 249 | targets = ( 250 | AB92C6F4C4B4D79BDF9B8CB97B099316 /* Pods-PSHTMLView_Example */, 251 | F670BF12A1BD44148176B7B23DE5767E /* PSHTMLView */, 252 | ); 253 | }; 254 | /* End PBXProject section */ 255 | 256 | /* Begin PBXSourcesBuildPhase section */ 257 | 27733A485D02E14FF28FB4C279D69A4E /* Sources */ = { 258 | isa = PBXSourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | BD345C25A7A738092700431C6047EC50 /* PSHTMLView-dummy.m in Sources */, 262 | 3EB6092D1449883B50CFA505239FAD4F /* PSHTMLView.swift in Sources */, 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | D23C9471EA5A42816C75BC5C01F6A0CE /* Sources */ = { 267 | isa = PBXSourcesBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | 6E4673AD326C19367F62B52C0DFF5DB6 /* Pods-PSHTMLView_Example-dummy.m in Sources */, 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | /* End PBXSourcesBuildPhase section */ 275 | 276 | /* Begin PBXTargetDependency section */ 277 | 360399FFE304B9F62CCC8858B3C5C140 /* PBXTargetDependency */ = { 278 | isa = PBXTargetDependency; 279 | name = PSHTMLView; 280 | target = F670BF12A1BD44148176B7B23DE5767E /* PSHTMLView */; 281 | targetProxy = 95E9D61F79B1FF7555210E9A77754330 /* PBXContainerItemProxy */; 282 | }; 283 | /* End PBXTargetDependency section */ 284 | 285 | /* Begin XCBuildConfiguration section */ 286 | 20C42EB745A71BDDC0E3C973934AD4B9 /* Debug */ = { 287 | isa = XCBuildConfiguration; 288 | baseConfigurationReference = 4DDAC3198F61CE335A649927990A6DA5 /* PSHTMLView.xcconfig */; 289 | buildSettings = { 290 | CODE_SIGN_IDENTITY = ""; 291 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 292 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 293 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 294 | CURRENT_PROJECT_VERSION = 1; 295 | DEFINES_MODULE = YES; 296 | DYLIB_COMPATIBILITY_VERSION = 1; 297 | DYLIB_CURRENT_VERSION = 1; 298 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 299 | GCC_PREFIX_HEADER = "Target Support Files/PSHTMLView/PSHTMLView-prefix.pch"; 300 | INFOPLIST_FILE = "Target Support Files/PSHTMLView/Info.plist"; 301 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 302 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 303 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 304 | MODULEMAP_FILE = "Target Support Files/PSHTMLView/PSHTMLView.modulemap"; 305 | PRODUCT_NAME = PSHTMLView; 306 | SDKROOT = iphoneos; 307 | SKIP_INSTALL = YES; 308 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 309 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 310 | SWIFT_VERSION = 4.2; 311 | TARGETED_DEVICE_FAMILY = "1,2"; 312 | VERSIONING_SYSTEM = "apple-generic"; 313 | VERSION_INFO_PREFIX = ""; 314 | }; 315 | name = Debug; 316 | }; 317 | 33DA7F43A1D2FA3C74A8C8FC246E1FA6 /* Debug */ = { 318 | isa = XCBuildConfiguration; 319 | buildSettings = { 320 | ALWAYS_SEARCH_USER_PATHS = NO; 321 | CLANG_ANALYZER_NONNULL = YES; 322 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 324 | CLANG_CXX_LIBRARY = "libc++"; 325 | CLANG_ENABLE_MODULES = YES; 326 | CLANG_ENABLE_OBJC_ARC = YES; 327 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 328 | CLANG_WARN_BOOL_CONVERSION = YES; 329 | CLANG_WARN_COMMA = YES; 330 | CLANG_WARN_CONSTANT_CONVERSION = YES; 331 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 333 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 334 | CLANG_WARN_EMPTY_BODY = YES; 335 | CLANG_WARN_ENUM_CONVERSION = YES; 336 | CLANG_WARN_INFINITE_RECURSION = YES; 337 | CLANG_WARN_INT_CONVERSION = YES; 338 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 339 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 340 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 342 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 343 | CLANG_WARN_STRICT_PROTOTYPES = YES; 344 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 345 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 346 | CLANG_WARN_UNREACHABLE_CODE = YES; 347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 348 | CODE_SIGNING_REQUIRED = NO; 349 | COPY_PHASE_STRIP = NO; 350 | DEBUG_INFORMATION_FORMAT = dwarf; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | ENABLE_TESTABILITY = YES; 353 | GCC_C_LANGUAGE_STANDARD = gnu11; 354 | GCC_DYNAMIC_NO_PIC = NO; 355 | GCC_NO_COMMON_BLOCKS = YES; 356 | GCC_OPTIMIZATION_LEVEL = 0; 357 | GCC_PREPROCESSOR_DEFINITIONS = ( 358 | "POD_CONFIGURATION_DEBUG=1", 359 | "DEBUG=1", 360 | "$(inherited)", 361 | ); 362 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 363 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 364 | GCC_WARN_UNDECLARED_SELECTOR = YES; 365 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 366 | GCC_WARN_UNUSED_FUNCTION = YES; 367 | GCC_WARN_UNUSED_VARIABLE = YES; 368 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 369 | MTL_ENABLE_DEBUG_INFO = YES; 370 | ONLY_ACTIVE_ARCH = YES; 371 | PRODUCT_NAME = "$(TARGET_NAME)"; 372 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 373 | STRIP_INSTALLED_PRODUCT = NO; 374 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 375 | SWIFT_VERSION = 4.2; 376 | SYMROOT = "${SRCROOT}/../build"; 377 | }; 378 | name = Debug; 379 | }; 380 | 731DC216E1A58545B559F6E0A2418060 /* Release */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | ALWAYS_SEARCH_USER_PATHS = NO; 384 | CLANG_ANALYZER_NONNULL = YES; 385 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 386 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 387 | CLANG_CXX_LIBRARY = "libc++"; 388 | CLANG_ENABLE_MODULES = YES; 389 | CLANG_ENABLE_OBJC_ARC = YES; 390 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 391 | CLANG_WARN_BOOL_CONVERSION = YES; 392 | CLANG_WARN_COMMA = YES; 393 | CLANG_WARN_CONSTANT_CONVERSION = YES; 394 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 395 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 396 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 397 | CLANG_WARN_EMPTY_BODY = YES; 398 | CLANG_WARN_ENUM_CONVERSION = YES; 399 | CLANG_WARN_INFINITE_RECURSION = YES; 400 | CLANG_WARN_INT_CONVERSION = YES; 401 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 402 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 403 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 404 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 405 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 406 | CLANG_WARN_STRICT_PROTOTYPES = YES; 407 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 408 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 409 | CLANG_WARN_UNREACHABLE_CODE = YES; 410 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 411 | CODE_SIGNING_REQUIRED = NO; 412 | COPY_PHASE_STRIP = NO; 413 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 414 | ENABLE_NS_ASSERTIONS = NO; 415 | ENABLE_STRICT_OBJC_MSGSEND = YES; 416 | GCC_C_LANGUAGE_STANDARD = gnu11; 417 | GCC_NO_COMMON_BLOCKS = YES; 418 | GCC_PREPROCESSOR_DEFINITIONS = ( 419 | "POD_CONFIGURATION_RELEASE=1", 420 | "$(inherited)", 421 | ); 422 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 423 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 424 | GCC_WARN_UNDECLARED_SELECTOR = YES; 425 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 426 | GCC_WARN_UNUSED_FUNCTION = YES; 427 | GCC_WARN_UNUSED_VARIABLE = YES; 428 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 429 | MTL_ENABLE_DEBUG_INFO = NO; 430 | PRODUCT_NAME = "$(TARGET_NAME)"; 431 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 432 | STRIP_INSTALLED_PRODUCT = NO; 433 | SWIFT_VERSION = 4.2; 434 | SYMROOT = "${SRCROOT}/../build"; 435 | }; 436 | name = Release; 437 | }; 438 | 7341F2CD6ED2973B9AE8E0E16F4D97AF /* Release */ = { 439 | isa = XCBuildConfiguration; 440 | baseConfigurationReference = 4DDAC3198F61CE335A649927990A6DA5 /* PSHTMLView.xcconfig */; 441 | buildSettings = { 442 | CODE_SIGN_IDENTITY = ""; 443 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 444 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 445 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 446 | CURRENT_PROJECT_VERSION = 1; 447 | DEFINES_MODULE = YES; 448 | DYLIB_COMPATIBILITY_VERSION = 1; 449 | DYLIB_CURRENT_VERSION = 1; 450 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 451 | GCC_PREFIX_HEADER = "Target Support Files/PSHTMLView/PSHTMLView-prefix.pch"; 452 | INFOPLIST_FILE = "Target Support Files/PSHTMLView/Info.plist"; 453 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 454 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 455 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 456 | MODULEMAP_FILE = "Target Support Files/PSHTMLView/PSHTMLView.modulemap"; 457 | PRODUCT_NAME = PSHTMLView; 458 | SDKROOT = iphoneos; 459 | SKIP_INSTALL = YES; 460 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 461 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 462 | SWIFT_VERSION = 4.2; 463 | TARGETED_DEVICE_FAMILY = "1,2"; 464 | VALIDATE_PRODUCT = YES; 465 | VERSIONING_SYSTEM = "apple-generic"; 466 | VERSION_INFO_PREFIX = ""; 467 | }; 468 | name = Release; 469 | }; 470 | A4BB1D03A855E3CCFCAA13E9E247A80E /* Release */ = { 471 | isa = XCBuildConfiguration; 472 | baseConfigurationReference = BCE8B91E2108418328FFDE461BFD20F7 /* Pods-PSHTMLView_Example.release.xcconfig */; 473 | buildSettings = { 474 | CODE_SIGN_IDENTITY = ""; 475 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 476 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 477 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 478 | CURRENT_PROJECT_VERSION = 1; 479 | DEFINES_MODULE = YES; 480 | DYLIB_COMPATIBILITY_VERSION = 1; 481 | DYLIB_CURRENT_VERSION = 1; 482 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 483 | INFOPLIST_FILE = "Target Support Files/Pods-PSHTMLView_Example/Info.plist"; 484 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 485 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 487 | MACH_O_TYPE = staticlib; 488 | MODULEMAP_FILE = "Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example.modulemap"; 489 | OTHER_LDFLAGS = ""; 490 | OTHER_LIBTOOLFLAGS = ""; 491 | PODS_ROOT = "$(SRCROOT)"; 492 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 493 | PRODUCT_NAME = Pods_PSHTMLView_Example; 494 | SDKROOT = iphoneos; 495 | SKIP_INSTALL = YES; 496 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 497 | TARGETED_DEVICE_FAMILY = "1,2"; 498 | VALIDATE_PRODUCT = YES; 499 | VERSIONING_SYSTEM = "apple-generic"; 500 | VERSION_INFO_PREFIX = ""; 501 | }; 502 | name = Release; 503 | }; 504 | F5031F201FF02C42993C57B0B3BF45BD /* Debug */ = { 505 | isa = XCBuildConfiguration; 506 | baseConfigurationReference = 299DADC939549952B7CBFFA5A60D8C95 /* Pods-PSHTMLView_Example.debug.xcconfig */; 507 | buildSettings = { 508 | CODE_SIGN_IDENTITY = ""; 509 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 510 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 511 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 512 | CURRENT_PROJECT_VERSION = 1; 513 | DEFINES_MODULE = YES; 514 | DYLIB_COMPATIBILITY_VERSION = 1; 515 | DYLIB_CURRENT_VERSION = 1; 516 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 517 | INFOPLIST_FILE = "Target Support Files/Pods-PSHTMLView_Example/Info.plist"; 518 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 519 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 520 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 521 | MACH_O_TYPE = staticlib; 522 | MODULEMAP_FILE = "Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example.modulemap"; 523 | OTHER_LDFLAGS = ""; 524 | OTHER_LIBTOOLFLAGS = ""; 525 | PODS_ROOT = "$(SRCROOT)"; 526 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 527 | PRODUCT_NAME = Pods_PSHTMLView_Example; 528 | SDKROOT = iphoneos; 529 | SKIP_INSTALL = YES; 530 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 531 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 532 | TARGETED_DEVICE_FAMILY = "1,2"; 533 | VERSIONING_SYSTEM = "apple-generic"; 534 | VERSION_INFO_PREFIX = ""; 535 | }; 536 | name = Debug; 537 | }; 538 | /* End XCBuildConfiguration section */ 539 | 540 | /* Begin XCConfigurationList section */ 541 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 542 | isa = XCConfigurationList; 543 | buildConfigurations = ( 544 | 33DA7F43A1D2FA3C74A8C8FC246E1FA6 /* Debug */, 545 | 731DC216E1A58545B559F6E0A2418060 /* Release */, 546 | ); 547 | defaultConfigurationIsVisible = 0; 548 | defaultConfigurationName = Release; 549 | }; 550 | 764C99AAA202A6A075DD7C61C19A0436 /* Build configuration list for PBXNativeTarget "PSHTMLView" */ = { 551 | isa = XCConfigurationList; 552 | buildConfigurations = ( 553 | 20C42EB745A71BDDC0E3C973934AD4B9 /* Debug */, 554 | 7341F2CD6ED2973B9AE8E0E16F4D97AF /* Release */, 555 | ); 556 | defaultConfigurationIsVisible = 0; 557 | defaultConfigurationName = Release; 558 | }; 559 | 869649421A80672D17B8202C3E0774B9 /* Build configuration list for PBXNativeTarget "Pods-PSHTMLView_Example" */ = { 560 | isa = XCConfigurationList; 561 | buildConfigurations = ( 562 | F5031F201FF02C42993C57B0B3BF45BD /* Debug */, 563 | A4BB1D03A855E3CCFCAA13E9E247A80E /* Release */, 564 | ); 565 | defaultConfigurationIsVisible = 0; 566 | defaultConfigurationName = Release; 567 | }; 568 | /* End XCConfigurationList section */ 569 | }; 570 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 571 | } 572 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PSHTMLView/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.1.5 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PSHTMLView/PSHTMLView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_PSHTMLView : NSObject 3 | @end 4 | @implementation PodsDummy_PSHTMLView 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PSHTMLView/PSHTMLView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PSHTMLView/PSHTMLView-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double PSHTMLViewVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char PSHTMLViewVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PSHTMLView/PSHTMLView.modulemap: -------------------------------------------------------------------------------- 1 | framework module PSHTMLView { 2 | umbrella header "PSHTMLView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PSHTMLView/PSHTMLView.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/PSHTMLView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-PSHTMLView_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## PSHTMLView 5 | 6 | Copyright (c) 2017 Vugla 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2017 Vugla <predragsamardzic@msn.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | PSHTMLView 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_PSHTMLView_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_PSHTMLView_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 10 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 11 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 12 | 13 | install_framework() 14 | { 15 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 16 | local source="${BUILT_PRODUCTS_DIR}/$1" 17 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 18 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 19 | elif [ -r "$1" ]; then 20 | local source="$1" 21 | fi 22 | 23 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 24 | 25 | if [ -L "${source}" ]; then 26 | echo "Symlinked..." 27 | source="$(readlink "${source}")" 28 | fi 29 | 30 | # Use filter instead of exclude so missing patterns don't throw errors. 31 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 32 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 33 | 34 | local basename 35 | basename="$(basename -s .framework "$1")" 36 | binary="${destination}/${basename}.framework/${basename}" 37 | if ! [ -r "$binary" ]; then 38 | binary="${destination}/${basename}" 39 | fi 40 | 41 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 42 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 43 | strip_invalid_archs "$binary" 44 | fi 45 | 46 | # Resign the code if required by the build settings to avoid unstable apps 47 | code_sign_if_enabled "${destination}/$(basename "$1")" 48 | 49 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 50 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 51 | local swift_runtime_libs 52 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 53 | for lib in $swift_runtime_libs; do 54 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 55 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 56 | code_sign_if_enabled "${destination}/${lib}" 57 | done 58 | fi 59 | } 60 | 61 | # Copies the dSYM of a vendored framework 62 | install_dsym() { 63 | local source="$1" 64 | if [ -r "$source" ]; then 65 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" 66 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" 67 | fi 68 | } 69 | 70 | # Signs a framework with the provided identity 71 | code_sign_if_enabled() { 72 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 73 | # Use the current code_sign_identitiy 74 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 75 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 76 | 77 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 78 | code_sign_cmd="$code_sign_cmd &" 79 | fi 80 | echo "$code_sign_cmd" 81 | eval "$code_sign_cmd" 82 | fi 83 | } 84 | 85 | # Strip invalid architectures 86 | strip_invalid_archs() { 87 | binary="$1" 88 | # Get architectures for current file 89 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 90 | stripped="" 91 | for arch in $archs; do 92 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 93 | # Strip non-valid architectures in-place 94 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 95 | stripped="$stripped $arch" 96 | fi 97 | done 98 | if [[ "$stripped" ]]; then 99 | echo "Stripped $binary of architectures:$stripped" 100 | fi 101 | } 102 | 103 | 104 | if [[ "$CONFIGURATION" == "Debug" ]]; then 105 | install_framework "${BUILT_PRODUCTS_DIR}/PSHTMLView/PSHTMLView.framework" 106 | fi 107 | if [[ "$CONFIGURATION" == "Release" ]]; then 108 | install_framework "${BUILT_PRODUCTS_DIR}/PSHTMLView/PSHTMLView.framework" 109 | fi 110 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 111 | wait 112 | fi 113 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 12 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 13 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 14 | 15 | case "${TARGETED_DEVICE_FAMILY}" in 16 | 1,2) 17 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 18 | ;; 19 | 1) 20 | TARGET_DEVICE_ARGS="--target-device iphone" 21 | ;; 22 | 2) 23 | TARGET_DEVICE_ARGS="--target-device ipad" 24 | ;; 25 | 3) 26 | TARGET_DEVICE_ARGS="--target-device tv" 27 | ;; 28 | 4) 29 | TARGET_DEVICE_ARGS="--target-device watch" 30 | ;; 31 | *) 32 | TARGET_DEVICE_ARGS="--target-device mac" 33 | ;; 34 | esac 35 | 36 | install_resource() 37 | { 38 | if [[ "$1" = /* ]] ; then 39 | RESOURCE_PATH="$1" 40 | else 41 | RESOURCE_PATH="${PODS_ROOT}/$1" 42 | fi 43 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 44 | cat << EOM 45 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 46 | EOM 47 | exit 1 48 | fi 49 | case $RESOURCE_PATH in 50 | *.storyboard) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.xib) 55 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 56 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 57 | ;; 58 | *.framework) 59 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 60 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 61 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 62 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 63 | ;; 64 | *.xcdatamodel) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 67 | ;; 68 | *.xcdatamodeld) 69 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 70 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 71 | ;; 72 | *.xcmappingmodel) 73 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 74 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 75 | ;; 76 | *.xcassets) 77 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 78 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 79 | ;; 80 | *) 81 | echo "$RESOURCE_PATH" || true 82 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 83 | ;; 84 | esac 85 | } 86 | 87 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 89 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 90 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 91 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 92 | fi 93 | rm -f "$RESOURCES_TO_COPY" 94 | 95 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 96 | then 97 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 98 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 99 | while read line; do 100 | if [[ $line != "${PODS_ROOT}*" ]]; then 101 | XCASSET_FILES+=("$line") 102 | fi 103 | done <<<"$OTHER_XCASSETS" 104 | 105 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 106 | fi 107 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_PSHTMLView_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_PSHTMLView_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/PSHTMLView" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/PSHTMLView/PSHTMLView.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "PSHTMLView" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_PSHTMLView_Example { 2 | umbrella header "Pods-PSHTMLView_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-PSHTMLView_Example/Pods-PSHTMLView_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/PSHTMLView" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/PSHTMLView/PSHTMLView.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "PSHTMLView" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Vugla 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 | -------------------------------------------------------------------------------- /PSHTMLView.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint PSHTMLView.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 = 'PSHTMLView' 11 | s.version = '0.2.3' 12 | s.summary = 'WKWebView wrapper for using in UITableView and UIScrollView' 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 | PSHTMLView is a non scrollable WKWebView wrapper, adapt for using in UITableView and UIScrollView. 22 | DESC 23 | 24 | s.homepage = 'https://github.com/Vugla/PSHTMLView' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'Vugla' => 'predragsamardzic@msn.com' } 28 | s.source = { :git => 'https://github.com/Vugla/PSHTMLView.git', :tag => s.version.to_s } 29 | 30 | s.ios.deployment_target = '9.0' 31 | 32 | s.source_files = 'PSHTMLView/Classes/**/*' 33 | 34 | # s.resource_bundles = { 35 | # 'PSHTMLView' => ['PSHTMLView/Assets/*.png'] 36 | # } 37 | 38 | # s.public_header_files = 'Pod/Classes/**/*.h' 39 | # s.frameworks = 'UIKit', 'MapKit' 40 | end 41 | -------------------------------------------------------------------------------- /PSHTMLView/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vugla/PSHTMLView/fdaa014b386c40ab9b872d09115863948e689c02/PSHTMLView/Assets/.gitkeep -------------------------------------------------------------------------------- /PSHTMLView/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vugla/PSHTMLView/fdaa014b386c40ab9b872d09115863948e689c02/PSHTMLView/Classes/.gitkeep -------------------------------------------------------------------------------- /PSHTMLView/Classes/PSHTMLView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HTMLView.swift 3 | // PSHTMLView 4 | // 5 | // Created by Predrag Samardzic on 23/11/2017. 6 | // Copyright © 2017 Predrag Samardzic. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import WebKit 11 | 12 | public protocol PSHTMLViewDelegate: class { 13 | func presentAlert(_ alertController: UIAlertController) 14 | func heightChanged(height: CGFloat) 15 | func shouldNavigate(for navigationAction: WKNavigationAction) -> Bool 16 | func handleScriptMessage(_ message: WKScriptMessage) 17 | func loadingProgress(progress: Float) 18 | func didFinishLoad() 19 | } 20 | 21 | public class PSHTMLView: UIView { 22 | 23 | let webViewKeyPathsToObserve = ["estimatedProgress"] 24 | var webViewHeightConstraint: NSLayoutConstraint! 25 | 26 | public var baseUrl:URL? = nil { 27 | didSet { 28 | webView.loadHTMLString(html ?? "", baseURL: baseUrl) 29 | } 30 | } 31 | public weak var delegate: PSHTMLViewDelegate? 32 | public var webView: WKWebView! { 33 | didSet { 34 | addSubview(webView) 35 | webView.translatesAutoresizingMaskIntoConstraints = false 36 | webView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true 37 | webView.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true 38 | webView.topAnchor.constraint(equalTo: topAnchor).isActive = true 39 | webView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true 40 | webViewHeightConstraint = webView.heightAnchor.constraint(equalToConstant: self.bounds.height) 41 | webViewHeightConstraint.isActive = true 42 | webView.scrollView.isScrollEnabled = false 43 | webView.allowsBackForwardNavigationGestures = false 44 | webView.contentMode = .scaleToFill 45 | webView.navigationDelegate = self 46 | webView.uiDelegate = self 47 | webView.scrollView.delaysContentTouches = false 48 | // webView.scrollView.decelerationRate = .normal 49 | webView.scrollView.delegate = self 50 | } 51 | } 52 | public var html: String? { 53 | didSet { 54 | webView.loadHTMLString(html ?? "", baseURL: baseUrl) 55 | } 56 | } 57 | 58 | public override init(frame: CGRect) { 59 | super.init(frame: frame) 60 | commonInit() 61 | } 62 | 63 | required public init?(coder aDecoder: NSCoder) { 64 | super.init(coder: aDecoder) 65 | commonInit() 66 | } 67 | 68 | private func commonInit() { 69 | 70 | let controller = WKUserContentController() 71 | addDefaultScripts(controller: controller) 72 | 73 | let config = WKWebViewConfiguration() 74 | config.userContentController = controller 75 | 76 | webView = WKWebView(frame: CGRect.zero, configuration: config) 77 | 78 | for keyPath in webViewKeyPathsToObserve { 79 | webView.addObserver(self, forKeyPath: keyPath, options: .new, context: nil) 80 | } 81 | } 82 | 83 | deinit { 84 | for keyPath in webViewKeyPathsToObserve { 85 | webView.removeObserver(self, forKeyPath: keyPath) 86 | } 87 | } 88 | 89 | override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { 90 | guard let keyPath = keyPath else { return } 91 | 92 | switch keyPath { 93 | 94 | case "estimatedProgress": 95 | delegate?.loadingProgress(progress: Float(webView.estimatedProgress)) 96 | 97 | default: 98 | break 99 | } 100 | } 101 | 102 | private func addDefaultScripts(controller: WKUserContentController) { 103 | controller.addUserScript(PSHTMLViewScripts.viewportScript) 104 | controller.addUserScript(PSHTMLViewScripts.disableSelectionScript) 105 | controller.addUserScript(PSHTMLViewScripts.disableCalloutScript) 106 | controller.addUserScript(PSHTMLViewScripts.addToOnloadScript) 107 | 108 | //add contentHeight script and handler 109 | controller.add(self, name: PSHTMLViewScriptMessage.HandlerName.onContentHeightChange.rawValue) 110 | controller.addUserScript(PSHTMLViewScripts.heigthOnLoadScript) 111 | controller.addUserScript(PSHTMLViewScripts.heigthOnResizeScript) 112 | } 113 | 114 | public func addScript(_ scriptString: String, observeMessageWithName: PSHTMLViewScriptMessage.HandlerName? = nil) { 115 | webView.configuration.userContentController.addUserScript(WKUserScript(source: scriptString, injectionTime: .atDocumentEnd, forMainFrameOnly: true)) 116 | if let observeMessageWithName = observeMessageWithName { webView.configuration.userContentController.add(self, name: observeMessageWithName.rawValue) 117 | } 118 | } 119 | 120 | } 121 | 122 | extension PSHTMLView: WKNavigationDelegate { 123 | 124 | public func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { 125 | delegate?.didFinishLoad() 126 | } 127 | 128 | public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { 129 | if let delegate = delegate { 130 | return decisionHandler(delegate.shouldNavigate(for: navigationAction) ? .allow : .cancel) 131 | } 132 | return decisionHandler(.allow) 133 | } 134 | } 135 | 136 | extension PSHTMLView: WKScriptMessageHandler { 137 | public func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { 138 | if message.name == PSHTMLViewScriptMessage.HandlerName.onContentHeightChange.rawValue { 139 | guard let responseDict = message.body as? [String:Any], let height = responseDict["height"] as? Float, webViewHeightConstraint.constant != CGFloat(height) else { 140 | return 141 | } 142 | webViewHeightConstraint.constant = CGFloat(height) 143 | delegate?.heightChanged(height: CGFloat(height)) 144 | } 145 | delegate?.handleScriptMessage(message) 146 | } 147 | 148 | 149 | } 150 | 151 | extension PSHTMLView: WKUIDelegate { 152 | /// Handle javascript:alert(...) 153 | public func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping () -> Void) { 154 | 155 | let alertController = UIAlertController(title: nil, message: message, preferredStyle: .alert) 156 | 157 | let okAction = UIAlertAction(title: NSLocalizedString("OK", comment: ""), style: .default) { _ in 158 | completionHandler() 159 | } 160 | 161 | alertController.addAction(okAction) 162 | 163 | delegate?.presentAlert(alertController) 164 | } 165 | 166 | /// Handle javascript:confirm(...) 167 | public func webView(_ webView: WKWebView, runJavaScriptConfirmPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping (Bool) -> Void) { 168 | 169 | let alertController = UIAlertController(title: nil, message: message, preferredStyle: .alert) 170 | 171 | let okAction = UIAlertAction(title: NSLocalizedString("OK", comment: ""), style: .default) { _ in 172 | completionHandler(true) 173 | } 174 | 175 | let cancelAction = UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel) { _ in 176 | completionHandler(false) 177 | } 178 | 179 | alertController.addAction(okAction) 180 | alertController.addAction(cancelAction) 181 | 182 | delegate?.presentAlert(alertController) 183 | } 184 | 185 | /// Handle javascript:prompt(...) 186 | public func webView(_ webView: WKWebView, runJavaScriptTextInputPanelWithPrompt prompt: String, defaultText: String?, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping (String?) -> Void) { 187 | 188 | let alertController = UIAlertController(title: nil, message: prompt, preferredStyle: .alert) 189 | 190 | alertController.addTextField { (textField) in 191 | textField.text = defaultText 192 | } 193 | 194 | let okAction = UIAlertAction(title: NSLocalizedString("OK", comment: ""), style: .default) { action in 195 | let textField = alertController.textFields![0] as UITextField 196 | completionHandler(textField.text) 197 | } 198 | 199 | let cancelAction = UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel) { _ in 200 | completionHandler(nil) 201 | } 202 | 203 | alertController.addAction(okAction) 204 | alertController.addAction(cancelAction) 205 | 206 | delegate?.presentAlert(alertController) 207 | } 208 | 209 | 210 | } 211 | 212 | extension PSHTMLView: UIScrollViewDelegate { 213 | public func viewForZooming(in scrollView: UIScrollView) -> UIView? { 214 | return nil 215 | } 216 | public func scrollViewWillBeginZooming(_ scrollView: UIScrollView, with view: UIView?) { 217 | scrollView.pinchGestureRecognizer?.isEnabled = false 218 | } 219 | } 220 | 221 | struct PSHTMLViewScripts { 222 | //strings 223 | private static let viewportScriptString = "var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width'); meta.setAttribute('initial-scale', '1.0'); meta.setAttribute('maximum-scale', '1.0'); meta.setAttribute('minimum-scale', '1.0'); meta.setAttribute('user-scalable', 'no'); document.getElementsByTagName('head')[0].appendChild(meta);" 224 | private static let disableSelectionScriptString = "document.documentElement.style.webkitUserSelect='none';" 225 | private static let disableCalloutScriptString = "document.documentElement.style.webkitTouchCallout='none';" 226 | private static let addToOnloadScriptString = "function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } } addLoadEvent(nameOfSomeFunctionToRunOnPageLoad); addLoadEvent(function() { }); " 227 | private static let heigthOnLoadScriptString = "window.onload= function () {window.webkit.messageHandlers.\(PSHTMLViewScriptMessage.HandlerName.onContentHeightChange.rawValue).postMessage({justLoaded:true,height: document.body.offsetHeight});};" 228 | private static let heigthOnResizeScriptString = "function incrementCounter() {window.webkit.messageHandlers.\(PSHTMLViewScriptMessage.HandlerName.onContentHeightChange.rawValue).postMessage({height: document.body.offsetHeight});}; document.body.onresize = incrementCounter;" 229 | 230 | static let getContentHeightScriptString = "document.body.offsetHeight" 231 | 232 | 233 | //scripts 234 | static let viewportScript = WKUserScript(source: viewportScriptString, injectionTime: .atDocumentEnd, forMainFrameOnly: true) 235 | static let disableSelectionScript = WKUserScript(source: disableSelectionScriptString, injectionTime: .atDocumentEnd, forMainFrameOnly: true) 236 | static let disableCalloutScript = WKUserScript(source: disableCalloutScriptString, injectionTime: .atDocumentEnd, forMainFrameOnly: true) 237 | static let addToOnloadScript = WKUserScript(source: addToOnloadScriptString, injectionTime: .atDocumentEnd, forMainFrameOnly: true) 238 | static let heigthOnLoadScript = WKUserScript(source: heigthOnLoadScriptString, injectionTime: .atDocumentEnd, forMainFrameOnly: true) 239 | static let heigthOnResizeScript = WKUserScript(source: heigthOnResizeScriptString, injectionTime: .atDocumentEnd, forMainFrameOnly: true) 240 | 241 | } 242 | 243 | public struct PSHTMLViewScriptMessage { 244 | public struct HandlerName : RawRepresentable, Equatable, Hashable, Comparable { 245 | public var rawValue: String 246 | 247 | public var hashValue: Int 248 | 249 | public static func <(lhs: PSHTMLViewScriptMessage.HandlerName, rhs: PSHTMLViewScriptMessage.HandlerName) -> Bool { 250 | return lhs.rawValue == rhs.rawValue 251 | } 252 | 253 | public init(_ rawValue: String) { 254 | self.rawValue = rawValue 255 | self.hashValue = rawValue.hashValue 256 | } 257 | public init(rawValue: String) { 258 | self.rawValue = rawValue 259 | self.hashValue = rawValue.hashValue 260 | } 261 | } 262 | } 263 | 264 | extension PSHTMLViewScriptMessage.HandlerName { 265 | public static let onContentHeightChange = PSHTMLViewScriptMessage.HandlerName("onContentHeightChange") 266 | } 267 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PSHTMLView 2 | 3 | [![Version](https://img.shields.io/cocoapods/v/PSHTMLView.svg?style=flat)](http://cocoapods.org/pods/PSHTMLView) 4 | [![License](https://img.shields.io/cocoapods/l/PSHTMLView.svg?style=flat)](http://cocoapods.org/pods/PSHTMLView) 5 | [![Platform](https://img.shields.io/cocoapods/p/PSHTMLView.svg?style=flat)](http://cocoapods.org/pods/PSHTMLView) 6 | 7 | ![Alt text](Screenshots/screenshot1.png?raw=true) 8 | 9 | ## Example 10 | 11 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 12 | 13 | ## Requirements 14 | 15 | iOS 9+ 16 | 17 | ## Installation 18 | 19 | PSHTMLView is available through [CocoaPods](http://cocoapods.org). To install 20 | it, simply add the following line to your Podfile: 21 | 22 | ```ruby 23 | pod 'PSHTMLView' 24 | ``` 25 | 26 | ## Author 27 | 28 | Vugla, predragsamardzic@msn.com 29 | 30 | ## License 31 | 32 | PSHTMLView is available under the MIT license. See the LICENSE file for more info. 33 | -------------------------------------------------------------------------------- /Screenshots/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vugla/PSHTMLView/fdaa014b386c40ab9b872d09115863948e689c02/Screenshots/screenshot1.png -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------