├── .gitignore ├── .travis.yml ├── Example ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ ├── BetterSwiftJSBridge.podspec.json │ │ ├── JSBridgeKit.podspec.json │ │ └── SwiftJSBridge.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── Target Support Files │ │ ├── JSBridgeKit │ │ ├── Info.plist │ │ ├── JSBridgeKit-dummy.m │ │ ├── JSBridgeKit-prefix.pch │ │ ├── JSBridgeKit-umbrella.h │ │ ├── JSBridgeKit.modulemap │ │ └── JSBridgeKit.xcconfig │ │ ├── Pods-SwiftJSBridge_Example │ │ ├── Info.plist │ │ ├── Pods-SwiftJSBridge_Example-acknowledgements.markdown │ │ ├── Pods-SwiftJSBridge_Example-acknowledgements.plist │ │ ├── Pods-SwiftJSBridge_Example-dummy.m │ │ ├── Pods-SwiftJSBridge_Example-frameworks.sh │ │ ├── Pods-SwiftJSBridge_Example-resources.sh │ │ ├── Pods-SwiftJSBridge_Example-umbrella.h │ │ ├── Pods-SwiftJSBridge_Example.debug.xcconfig │ │ ├── Pods-SwiftJSBridge_Example.modulemap │ │ └── Pods-SwiftJSBridge_Example.release.xcconfig │ │ └── Pods-SwiftJSBridge_Tests │ │ ├── Info.plist │ │ ├── Pods-SwiftJSBridge_Tests-acknowledgements.markdown │ │ ├── Pods-SwiftJSBridge_Tests-acknowledgements.plist │ │ ├── Pods-SwiftJSBridge_Tests-dummy.m │ │ ├── Pods-SwiftJSBridge_Tests-frameworks.sh │ │ ├── Pods-SwiftJSBridge_Tests-resources.sh │ │ ├── Pods-SwiftJSBridge_Tests-umbrella.h │ │ ├── Pods-SwiftJSBridge_Tests.debug.xcconfig │ │ ├── Pods-SwiftJSBridge_Tests.modulemap │ │ └── Pods-SwiftJSBridge_Tests.release.xcconfig ├── SwiftJSBridge.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── SwiftJSBridge-Example.xcscheme ├── SwiftJSBridge.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── SwiftJSBridge │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── Tests │ ├── Info.plist │ └── Tests.swift ├── JSBridgeKit.podspec ├── JSBridgeKit ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── JSFile.swift │ ├── SwiftJSBridge.swift │ ├── SwiftJSBridgeProtocol.swift │ ├── UIWebViewJSBridge.swift │ ├── WebKitJSBridge.swift │ └── WebView.swift ├── LICENSE ├── README.md └── _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 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/SwiftJSBridge.xcworkspace -scheme SwiftJSBridge-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'SwiftJSBridge_Example' do 4 | pod 'JSBridgeKit', :path => '../' 5 | 6 | target 'SwiftJSBridge_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - JSBridgeKit (0.1.7) 3 | 4 | DEPENDENCIES: 5 | - JSBridgeKit (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | JSBridgeKit: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | JSBridgeKit: b3cfb8c11aeaa15cff1ad8dac267ff8f0f0a2944 13 | 14 | PODFILE CHECKSUM: 8bde9a8076ecd61d9717d87228910ce1c9d04c19 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/BetterSwiftJSBridge.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BetterSwiftJSBridge", 3 | "version": "0.1.6", 4 | "summary": "BetterSwiftJSBridge is a handy JavaScript Bridge, written in Swift, support WKWebView and UIWebView.", 5 | "description": "BetterSwiftJSBridge is a handy JavaScript Bridge, written in Swift, support WKWebView and UIWebView.", 6 | "homepage": "https://github.com/hhfa008/SwiftJSBridge", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "hhfa008": "hhfa008@gmail.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/hhfa008/SwiftJSBridge.git", 16 | "tag": "0.1.6" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "swift_version": "4.1", 22 | "source_files": "SwiftJSBridge/Classes/**/*" 23 | } 24 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/JSBridgeKit.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JSBridgeKit", 3 | "version": "0.1.7", 4 | "summary": "BetterSwiftJSBridge is a handy JavaScript Bridge, written in Swift, support WKWebView and UIWebView.", 5 | "description": "BetterSwiftJSBridge is a handy JavaScript Bridge, written in Swift, support WKWebView and UIWebView.", 6 | "homepage": "https://github.com/hhfa008/SwiftJSBridge", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "hhfa008": "hhfa008@gmail.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/hhfa008/SwiftJSBridge.git", 16 | "tag": "0.1.7" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "swift_version": "4.1", 22 | "source_files": "JSBridgeKit/Classes/**/*" 23 | } 24 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/SwiftJSBridge.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SwiftJSBridge", 3 | "version": "0.1.0", 4 | "summary": "A short description of SwiftJSBridge.", 5 | "description": "TODO: Add long description of the pod here.", 6 | "homepage": "https://github.com/hhfa008/SwiftJSBridge", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "hhfa008": "hhfa008@gmail.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/hhfa008/SwiftJSBridge.git", 16 | "tag": "0.1.0" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "source_files": "SwiftJSBridge/Classes/**/*" 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - JSBridgeKit (0.1.7) 3 | 4 | DEPENDENCIES: 5 | - JSBridgeKit (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | JSBridgeKit: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | JSBridgeKit: b3cfb8c11aeaa15cff1ad8dac267ff8f0f0a2944 13 | 14 | PODFILE CHECKSUM: 8bde9a8076ecd61d9717d87228910ce1c9d04c19 15 | 16 | COCOAPODS: 1.5.3 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 | 0FBA53DB469E3B77DA7D2F746E3F5E98 /* Pods-SwiftJSBridge_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DF352C1D29FD8980F9EC8F37A957FFC8 /* Pods-SwiftJSBridge_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 1E67E66401DA584674A87CC4A7888193 /* WebKitJSBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = F24BB6CA0B1964D344CEE7DA9960916B /* WebKitJSBridge.swift */; }; 12 | 202F6A085B11C394AE616AFAE5A8C390 /* JSBridgeKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F8F24A680C30217F10D28FA819D258D9 /* JSBridgeKit-dummy.m */; }; 13 | 235F5D456A4EBB5B90D3BDE99A6B5104 /* SwiftJSBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC5E11C5D311046F0B3D4E6F03F66F62 /* SwiftJSBridge.swift */; }; 14 | 2B50ED07DB8D23229942161577228D3A /* WebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEB836510E519E8DCF5A1C1157E3AF5A /* WebView.swift */; }; 15 | 36C9C69DAC2D5463ED90C803B1F0C6BB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; 16 | 40283BD056C25B718997E3EC277FF8D5 /* JSBridgeKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B5549E53D563443AE7C091BE62DCD6C2 /* JSBridgeKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | 4959205B71705D94F82800AA7DAD54BA /* UIWebViewJSBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6870AF30A11625E94910512B37FCB703 /* UIWebViewJSBridge.swift */; }; 18 | 499C810410200DFDC41FAC5EAF304BA9 /* Pods-SwiftJSBridge_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 63AC3FB98FA2CEF5C11187A8E2D82909 /* Pods-SwiftJSBridge_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 19 | 76C61C0A2E42C750A52CBD902453D027 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; 20 | 8AD77F3C53F53BC578A5A49294628756 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; 21 | C28555ED2AFFB1E967ADD508FB18449D /* SwiftJSBridgeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = FECD67A00D052F98B8DBC3B07F3A0D68 /* SwiftJSBridgeProtocol.swift */; }; 22 | D9D433C4BB55B766D3EBA1EEA1E410EA /* Pods-SwiftJSBridge_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C349F1A5174AE57D26743F4986C0E5D /* Pods-SwiftJSBridge_Example-dummy.m */; }; 23 | E47EBB0ACFF9A90CB943D9B38735C951 /* JSFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FB23C782C8B89ED225D3BE8821FA5E7 /* JSFile.swift */; }; 24 | F462D7AB998AE0C50A82BC4A9D615286 /* Pods-SwiftJSBridge_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 76CD775381A82CC34951793022E5E088 /* Pods-SwiftJSBridge_Tests-dummy.m */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 268862E04622834CAE398EF9027578CA /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 6708B89F66D68194125CCC417AFDC2A0; 33 | remoteInfo = JSBridgeKit; 34 | }; 35 | 640DDEF036B7D38F85DAD818BCE5B879 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = CC1FBDD11F832632D21357BF990405F6; 40 | remoteInfo = "Pods-SwiftJSBridge_Example"; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 0B966F9D05A717E00ECE53D05FDC28F0 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; 46 | 1012786214CA7C3EF3ECE45383E544CB /* JSBridgeKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JSBridgeKit-prefix.pch"; sourceTree = ""; }; 47 | 1068BF9CB875D53F6AE14655E08E09F3 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | 1708E085929B435471BC175241556380 /* Pods-SwiftJSBridge_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftJSBridge_Tests-resources.sh"; sourceTree = ""; }; 49 | 1BE1A51C2FBDA7D58ABB55610F3C910C /* Pods_SwiftJSBridge_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwiftJSBridge_Tests.framework; path = "Pods-SwiftJSBridge_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 36378839AE6FDE81C66E18B7243FA6FC /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; 51 | 3E37F0470314D1A9900A84F5945B2AB6 /* Pods-SwiftJSBridge_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftJSBridge_Example-acknowledgements.markdown"; sourceTree = ""; }; 52 | 45BDC5EC2BDA41965AFAA476B0E19C69 /* JSBridgeKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = JSBridgeKit.framework; path = JSBridgeKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 46B61A199B6586E9B6B0C6048798AC55 /* Pods-SwiftJSBridge_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwiftJSBridge_Tests.modulemap"; sourceTree = ""; }; 54 | 477F8DC34B3D0742895F5F6EEA9D0185 /* Pods-SwiftJSBridge_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftJSBridge_Tests.release.xcconfig"; sourceTree = ""; }; 55 | 49D2DD61D5A7EDE688E3051C17DE8D25 /* JSBridgeKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = JSBridgeKit.xcconfig; sourceTree = ""; }; 56 | 50A862947382DC0B0365ECF620F12BD5 /* Pods_SwiftJSBridge_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwiftJSBridge_Example.framework; path = "Pods-SwiftJSBridge_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 58 | 63AC3FB98FA2CEF5C11187A8E2D82909 /* Pods-SwiftJSBridge_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftJSBridge_Example-umbrella.h"; sourceTree = ""; }; 59 | 6870AF30A11625E94910512B37FCB703 /* UIWebViewJSBridge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UIWebViewJSBridge.swift; path = JSBridgeKit/Classes/UIWebViewJSBridge.swift; sourceTree = ""; }; 60 | 687261C1F0678EDE97B6B6632E378F46 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | 6FB23C782C8B89ED225D3BE8821FA5E7 /* JSFile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSFile.swift; path = JSBridgeKit/Classes/JSFile.swift; sourceTree = ""; }; 62 | 76CD775381A82CC34951793022E5E088 /* Pods-SwiftJSBridge_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwiftJSBridge_Tests-dummy.m"; sourceTree = ""; }; 63 | 79AB7AEB56E3559DCA7DF23E63DAB0D9 /* Pods-SwiftJSBridge_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftJSBridge_Tests-frameworks.sh"; sourceTree = ""; }; 64 | 7C66C785C52456ECC5E225DA7AB895C0 /* Pods-SwiftJSBridge_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftJSBridge_Tests-acknowledgements.plist"; sourceTree = ""; }; 65 | 84B7410E16DB180F0FC2CE64C735AF6A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | 9073480DF19A61A231FE9F5DA814F080 /* JSBridgeKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = JSBridgeKit.modulemap; sourceTree = ""; }; 67 | 909D8479C760BFA465B0D7AA40D392BC /* Pods-SwiftJSBridge_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftJSBridge_Tests-acknowledgements.markdown"; sourceTree = ""; }; 68 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 69 | 9B9CF61F838C7DCD3CA0427697273E5A /* Pods-SwiftJSBridge_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftJSBridge_Tests.debug.xcconfig"; sourceTree = ""; }; 70 | 9C349F1A5174AE57D26743F4986C0E5D /* Pods-SwiftJSBridge_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwiftJSBridge_Example-dummy.m"; sourceTree = ""; }; 71 | B5549E53D563443AE7C091BE62DCD6C2 /* JSBridgeKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JSBridgeKit-umbrella.h"; sourceTree = ""; }; 72 | BC5E11C5D311046F0B3D4E6F03F66F62 /* SwiftJSBridge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftJSBridge.swift; path = JSBridgeKit/Classes/SwiftJSBridge.swift; sourceTree = ""; }; 73 | C58D74DF9A8229DF667B5E0A0D106A35 /* Pods-SwiftJSBridge_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftJSBridge_Example-frameworks.sh"; sourceTree = ""; }; 74 | C938F8E397A697DB5E8AFA75D20E80B1 /* JSBridgeKit.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = JSBridgeKit.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 75 | D5684A6D3EB98FDB5CEC3B64056027A7 /* Pods-SwiftJSBridge_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftJSBridge_Example-resources.sh"; sourceTree = ""; }; 76 | DD5BCC44910B3C0C789052C279D9CD74 /* Pods-SwiftJSBridge_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwiftJSBridge_Example.modulemap"; sourceTree = ""; }; 77 | DEB836510E519E8DCF5A1C1157E3AF5A /* WebView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WebView.swift; path = JSBridgeKit/Classes/WebView.swift; sourceTree = ""; }; 78 | DF352C1D29FD8980F9EC8F37A957FFC8 /* Pods-SwiftJSBridge_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftJSBridge_Tests-umbrella.h"; sourceTree = ""; }; 79 | F24BB6CA0B1964D344CEE7DA9960916B /* WebKitJSBridge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WebKitJSBridge.swift; path = JSBridgeKit/Classes/WebKitJSBridge.swift; sourceTree = ""; }; 80 | F41CAE20ABD18EF124671BDC2A32013F /* Pods-SwiftJSBridge_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftJSBridge_Example.release.xcconfig"; sourceTree = ""; }; 81 | F8F24A680C30217F10D28FA819D258D9 /* JSBridgeKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "JSBridgeKit-dummy.m"; sourceTree = ""; }; 82 | F90273285D913160D9B487A64CF40F88 /* Pods-SwiftJSBridge_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftJSBridge_Example.debug.xcconfig"; sourceTree = ""; }; 83 | F9A9C8A97FC0A3E554A7B0A7A994743F /* Pods-SwiftJSBridge_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftJSBridge_Example-acknowledgements.plist"; sourceTree = ""; }; 84 | FECD67A00D052F98B8DBC3B07F3A0D68 /* SwiftJSBridgeProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftJSBridgeProtocol.swift; path = JSBridgeKit/Classes/SwiftJSBridgeProtocol.swift; sourceTree = ""; }; 85 | /* End PBXFileReference section */ 86 | 87 | /* Begin PBXFrameworksBuildPhase section */ 88 | 0CDFE6B507C324184CED886B2928EC73 /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | 76C61C0A2E42C750A52CBD902453D027 /* Foundation.framework in Frameworks */, 93 | ); 94 | runOnlyForDeploymentPostprocessing = 0; 95 | }; 96 | 73119BFC5D36FBDE86BB70345197551E /* Frameworks */ = { 97 | isa = PBXFrameworksBuildPhase; 98 | buildActionMask = 2147483647; 99 | files = ( 100 | 36C9C69DAC2D5463ED90C803B1F0C6BB /* Foundation.framework in Frameworks */, 101 | ); 102 | runOnlyForDeploymentPostprocessing = 0; 103 | }; 104 | B245B99C4CD7B8836FB03DE242099C04 /* Frameworks */ = { 105 | isa = PBXFrameworksBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | 8AD77F3C53F53BC578A5A49294628756 /* Foundation.framework in Frameworks */, 109 | ); 110 | runOnlyForDeploymentPostprocessing = 0; 111 | }; 112 | /* End PBXFrameworksBuildPhase section */ 113 | 114 | /* Begin PBXGroup section */ 115 | 0C375636F3FA661F60CE427A2A01E8D2 /* JSBridgeKit */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 6FB23C782C8B89ED225D3BE8821FA5E7 /* JSFile.swift */, 119 | BC5E11C5D311046F0B3D4E6F03F66F62 /* SwiftJSBridge.swift */, 120 | FECD67A00D052F98B8DBC3B07F3A0D68 /* SwiftJSBridgeProtocol.swift */, 121 | 6870AF30A11625E94910512B37FCB703 /* UIWebViewJSBridge.swift */, 122 | F24BB6CA0B1964D344CEE7DA9960916B /* WebKitJSBridge.swift */, 123 | DEB836510E519E8DCF5A1C1157E3AF5A /* WebView.swift */, 124 | 2A91688B1AA8981F3D1AF686EBD9F401 /* Pod */, 125 | 62F12C054BABBAE0A3131A8309ED1DDD /* Support Files */, 126 | ); 127 | name = JSBridgeKit; 128 | path = ../..; 129 | sourceTree = ""; 130 | }; 131 | 2A91688B1AA8981F3D1AF686EBD9F401 /* Pod */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | C938F8E397A697DB5E8AFA75D20E80B1 /* JSBridgeKit.podspec */, 135 | 36378839AE6FDE81C66E18B7243FA6FC /* LICENSE */, 136 | 0B966F9D05A717E00ECE53D05FDC28F0 /* README.md */, 137 | ); 138 | name = Pod; 139 | sourceTree = ""; 140 | }; 141 | 3311C6FB5551ED02688AAC5200F9A8DE /* Products */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | 45BDC5EC2BDA41965AFAA476B0E19C69 /* JSBridgeKit.framework */, 145 | 50A862947382DC0B0365ECF620F12BD5 /* Pods_SwiftJSBridge_Example.framework */, 146 | 1BE1A51C2FBDA7D58ABB55610F3C910C /* Pods_SwiftJSBridge_Tests.framework */, 147 | ); 148 | name = Products; 149 | sourceTree = ""; 150 | }; 151 | 5B2C9719F5BC0065967B11AE82DF7AB6 /* Targets Support Files */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 6380D182371A252BE381920D389141ED /* Pods-SwiftJSBridge_Example */, 155 | F7C2A229BD3DF2D39F33CCEE02E94D86 /* Pods-SwiftJSBridge_Tests */, 156 | ); 157 | name = "Targets Support Files"; 158 | sourceTree = ""; 159 | }; 160 | 5E0D919E635D23B70123790B8308F8EF /* iOS */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */, 164 | ); 165 | name = iOS; 166 | sourceTree = ""; 167 | }; 168 | 62F12C054BABBAE0A3131A8309ED1DDD /* Support Files */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 1068BF9CB875D53F6AE14655E08E09F3 /* Info.plist */, 172 | 9073480DF19A61A231FE9F5DA814F080 /* JSBridgeKit.modulemap */, 173 | 49D2DD61D5A7EDE688E3051C17DE8D25 /* JSBridgeKit.xcconfig */, 174 | F8F24A680C30217F10D28FA819D258D9 /* JSBridgeKit-dummy.m */, 175 | 1012786214CA7C3EF3ECE45383E544CB /* JSBridgeKit-prefix.pch */, 176 | B5549E53D563443AE7C091BE62DCD6C2 /* JSBridgeKit-umbrella.h */, 177 | ); 178 | name = "Support Files"; 179 | path = "Example/Pods/Target Support Files/JSBridgeKit"; 180 | sourceTree = ""; 181 | }; 182 | 6380D182371A252BE381920D389141ED /* Pods-SwiftJSBridge_Example */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | 687261C1F0678EDE97B6B6632E378F46 /* Info.plist */, 186 | DD5BCC44910B3C0C789052C279D9CD74 /* Pods-SwiftJSBridge_Example.modulemap */, 187 | 3E37F0470314D1A9900A84F5945B2AB6 /* Pods-SwiftJSBridge_Example-acknowledgements.markdown */, 188 | F9A9C8A97FC0A3E554A7B0A7A994743F /* Pods-SwiftJSBridge_Example-acknowledgements.plist */, 189 | 9C349F1A5174AE57D26743F4986C0E5D /* Pods-SwiftJSBridge_Example-dummy.m */, 190 | C58D74DF9A8229DF667B5E0A0D106A35 /* Pods-SwiftJSBridge_Example-frameworks.sh */, 191 | D5684A6D3EB98FDB5CEC3B64056027A7 /* Pods-SwiftJSBridge_Example-resources.sh */, 192 | 63AC3FB98FA2CEF5C11187A8E2D82909 /* Pods-SwiftJSBridge_Example-umbrella.h */, 193 | F90273285D913160D9B487A64CF40F88 /* Pods-SwiftJSBridge_Example.debug.xcconfig */, 194 | F41CAE20ABD18EF124671BDC2A32013F /* Pods-SwiftJSBridge_Example.release.xcconfig */, 195 | ); 196 | name = "Pods-SwiftJSBridge_Example"; 197 | path = "Target Support Files/Pods-SwiftJSBridge_Example"; 198 | sourceTree = ""; 199 | }; 200 | 7DB346D0F39D3F0E887471402A8071AB = { 201 | isa = PBXGroup; 202 | children = ( 203 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 204 | BBE6F4F87C77B353A123533A8E8E2DA4 /* Development Pods */, 205 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 206 | 3311C6FB5551ED02688AAC5200F9A8DE /* Products */, 207 | 5B2C9719F5BC0065967B11AE82DF7AB6 /* Targets Support Files */, 208 | ); 209 | sourceTree = ""; 210 | }; 211 | BBE6F4F87C77B353A123533A8E8E2DA4 /* Development Pods */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | 0C375636F3FA661F60CE427A2A01E8D2 /* JSBridgeKit */, 215 | ); 216 | name = "Development Pods"; 217 | sourceTree = ""; 218 | }; 219 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 220 | isa = PBXGroup; 221 | children = ( 222 | 5E0D919E635D23B70123790B8308F8EF /* iOS */, 223 | ); 224 | name = Frameworks; 225 | sourceTree = ""; 226 | }; 227 | F7C2A229BD3DF2D39F33CCEE02E94D86 /* Pods-SwiftJSBridge_Tests */ = { 228 | isa = PBXGroup; 229 | children = ( 230 | 84B7410E16DB180F0FC2CE64C735AF6A /* Info.plist */, 231 | 46B61A199B6586E9B6B0C6048798AC55 /* Pods-SwiftJSBridge_Tests.modulemap */, 232 | 909D8479C760BFA465B0D7AA40D392BC /* Pods-SwiftJSBridge_Tests-acknowledgements.markdown */, 233 | 7C66C785C52456ECC5E225DA7AB895C0 /* Pods-SwiftJSBridge_Tests-acknowledgements.plist */, 234 | 76CD775381A82CC34951793022E5E088 /* Pods-SwiftJSBridge_Tests-dummy.m */, 235 | 79AB7AEB56E3559DCA7DF23E63DAB0D9 /* Pods-SwiftJSBridge_Tests-frameworks.sh */, 236 | 1708E085929B435471BC175241556380 /* Pods-SwiftJSBridge_Tests-resources.sh */, 237 | DF352C1D29FD8980F9EC8F37A957FFC8 /* Pods-SwiftJSBridge_Tests-umbrella.h */, 238 | 9B9CF61F838C7DCD3CA0427697273E5A /* Pods-SwiftJSBridge_Tests.debug.xcconfig */, 239 | 477F8DC34B3D0742895F5F6EEA9D0185 /* Pods-SwiftJSBridge_Tests.release.xcconfig */, 240 | ); 241 | name = "Pods-SwiftJSBridge_Tests"; 242 | path = "Target Support Files/Pods-SwiftJSBridge_Tests"; 243 | sourceTree = ""; 244 | }; 245 | /* End PBXGroup section */ 246 | 247 | /* Begin PBXHeadersBuildPhase section */ 248 | 588B00E8DCF13CE5479E0855968FF04B /* Headers */ = { 249 | isa = PBXHeadersBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | 0FBA53DB469E3B77DA7D2F746E3F5E98 /* Pods-SwiftJSBridge_Tests-umbrella.h in Headers */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | 727325724EAD2501FD1A16DD3E40B463 /* Headers */ = { 257 | isa = PBXHeadersBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | 40283BD056C25B718997E3EC277FF8D5 /* JSBridgeKit-umbrella.h in Headers */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | C90305F9640A361E92BFF1F38CDA9288 /* Headers */ = { 265 | isa = PBXHeadersBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | 499C810410200DFDC41FAC5EAF304BA9 /* Pods-SwiftJSBridge_Example-umbrella.h in Headers */, 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | }; 272 | /* End PBXHeadersBuildPhase section */ 273 | 274 | /* Begin PBXNativeTarget section */ 275 | 017F68DBF944D4F9AEA380D1F65700B8 /* Pods-SwiftJSBridge_Tests */ = { 276 | isa = PBXNativeTarget; 277 | buildConfigurationList = 0965D9501E10AC566E49340FF80D4045 /* Build configuration list for PBXNativeTarget "Pods-SwiftJSBridge_Tests" */; 278 | buildPhases = ( 279 | F913380C2D7175EF964B5BA0B2F02EDC /* Sources */, 280 | 73119BFC5D36FBDE86BB70345197551E /* Frameworks */, 281 | 588B00E8DCF13CE5479E0855968FF04B /* Headers */, 282 | ); 283 | buildRules = ( 284 | ); 285 | dependencies = ( 286 | 7381EA15E12A7C55E33C3E70A8DDDB9D /* PBXTargetDependency */, 287 | ); 288 | name = "Pods-SwiftJSBridge_Tests"; 289 | productName = "Pods-SwiftJSBridge_Tests"; 290 | productReference = 1BE1A51C2FBDA7D58ABB55610F3C910C /* Pods_SwiftJSBridge_Tests.framework */; 291 | productType = "com.apple.product-type.framework"; 292 | }; 293 | 6708B89F66D68194125CCC417AFDC2A0 /* JSBridgeKit */ = { 294 | isa = PBXNativeTarget; 295 | buildConfigurationList = 6C6C2265B5BD1B77737355948D611071 /* Build configuration list for PBXNativeTarget "JSBridgeKit" */; 296 | buildPhases = ( 297 | D229D8FC22E63B5D27A01401D11CF9E7 /* Sources */, 298 | 0CDFE6B507C324184CED886B2928EC73 /* Frameworks */, 299 | 727325724EAD2501FD1A16DD3E40B463 /* Headers */, 300 | ); 301 | buildRules = ( 302 | ); 303 | dependencies = ( 304 | ); 305 | name = JSBridgeKit; 306 | productName = JSBridgeKit; 307 | productReference = 45BDC5EC2BDA41965AFAA476B0E19C69 /* JSBridgeKit.framework */; 308 | productType = "com.apple.product-type.framework"; 309 | }; 310 | CC1FBDD11F832632D21357BF990405F6 /* Pods-SwiftJSBridge_Example */ = { 311 | isa = PBXNativeTarget; 312 | buildConfigurationList = 0C77881F1E105FAA4B15F78D0C9AD159 /* Build configuration list for PBXNativeTarget "Pods-SwiftJSBridge_Example" */; 313 | buildPhases = ( 314 | 03E4FEA0492258F5398329245BA4780A /* Sources */, 315 | B245B99C4CD7B8836FB03DE242099C04 /* Frameworks */, 316 | C90305F9640A361E92BFF1F38CDA9288 /* Headers */, 317 | ); 318 | buildRules = ( 319 | ); 320 | dependencies = ( 321 | 23740BF8EA2DD599E00B3F9255416940 /* PBXTargetDependency */, 322 | ); 323 | name = "Pods-SwiftJSBridge_Example"; 324 | productName = "Pods-SwiftJSBridge_Example"; 325 | productReference = 50A862947382DC0B0365ECF620F12BD5 /* Pods_SwiftJSBridge_Example.framework */; 326 | productType = "com.apple.product-type.framework"; 327 | }; 328 | /* End PBXNativeTarget section */ 329 | 330 | /* Begin PBXProject section */ 331 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 332 | isa = PBXProject; 333 | attributes = { 334 | LastSwiftUpdateCheck = 0930; 335 | LastUpgradeCheck = 0930; 336 | }; 337 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 338 | compatibilityVersion = "Xcode 3.2"; 339 | developmentRegion = English; 340 | hasScannedForEncodings = 0; 341 | knownRegions = ( 342 | en, 343 | ); 344 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 345 | productRefGroup = 3311C6FB5551ED02688AAC5200F9A8DE /* Products */; 346 | projectDirPath = ""; 347 | projectRoot = ""; 348 | targets = ( 349 | 6708B89F66D68194125CCC417AFDC2A0 /* JSBridgeKit */, 350 | CC1FBDD11F832632D21357BF990405F6 /* Pods-SwiftJSBridge_Example */, 351 | 017F68DBF944D4F9AEA380D1F65700B8 /* Pods-SwiftJSBridge_Tests */, 352 | ); 353 | }; 354 | /* End PBXProject section */ 355 | 356 | /* Begin PBXSourcesBuildPhase section */ 357 | 03E4FEA0492258F5398329245BA4780A /* Sources */ = { 358 | isa = PBXSourcesBuildPhase; 359 | buildActionMask = 2147483647; 360 | files = ( 361 | D9D433C4BB55B766D3EBA1EEA1E410EA /* Pods-SwiftJSBridge_Example-dummy.m in Sources */, 362 | ); 363 | runOnlyForDeploymentPostprocessing = 0; 364 | }; 365 | D229D8FC22E63B5D27A01401D11CF9E7 /* Sources */ = { 366 | isa = PBXSourcesBuildPhase; 367 | buildActionMask = 2147483647; 368 | files = ( 369 | 202F6A085B11C394AE616AFAE5A8C390 /* JSBridgeKit-dummy.m in Sources */, 370 | E47EBB0ACFF9A90CB943D9B38735C951 /* JSFile.swift in Sources */, 371 | 235F5D456A4EBB5B90D3BDE99A6B5104 /* SwiftJSBridge.swift in Sources */, 372 | C28555ED2AFFB1E967ADD508FB18449D /* SwiftJSBridgeProtocol.swift in Sources */, 373 | 4959205B71705D94F82800AA7DAD54BA /* UIWebViewJSBridge.swift in Sources */, 374 | 1E67E66401DA584674A87CC4A7888193 /* WebKitJSBridge.swift in Sources */, 375 | 2B50ED07DB8D23229942161577228D3A /* WebView.swift in Sources */, 376 | ); 377 | runOnlyForDeploymentPostprocessing = 0; 378 | }; 379 | F913380C2D7175EF964B5BA0B2F02EDC /* Sources */ = { 380 | isa = PBXSourcesBuildPhase; 381 | buildActionMask = 2147483647; 382 | files = ( 383 | F462D7AB998AE0C50A82BC4A9D615286 /* Pods-SwiftJSBridge_Tests-dummy.m in Sources */, 384 | ); 385 | runOnlyForDeploymentPostprocessing = 0; 386 | }; 387 | /* End PBXSourcesBuildPhase section */ 388 | 389 | /* Begin PBXTargetDependency section */ 390 | 23740BF8EA2DD599E00B3F9255416940 /* PBXTargetDependency */ = { 391 | isa = PBXTargetDependency; 392 | name = JSBridgeKit; 393 | target = 6708B89F66D68194125CCC417AFDC2A0 /* JSBridgeKit */; 394 | targetProxy = 268862E04622834CAE398EF9027578CA /* PBXContainerItemProxy */; 395 | }; 396 | 7381EA15E12A7C55E33C3E70A8DDDB9D /* PBXTargetDependency */ = { 397 | isa = PBXTargetDependency; 398 | name = "Pods-SwiftJSBridge_Example"; 399 | target = CC1FBDD11F832632D21357BF990405F6 /* Pods-SwiftJSBridge_Example */; 400 | targetProxy = 640DDEF036B7D38F85DAD818BCE5B879 /* PBXContainerItemProxy */; 401 | }; 402 | /* End PBXTargetDependency section */ 403 | 404 | /* Begin XCBuildConfiguration section */ 405 | 106F36FD957359EC02A80231F40AC544 /* Release */ = { 406 | isa = XCBuildConfiguration; 407 | baseConfigurationReference = 477F8DC34B3D0742895F5F6EEA9D0185 /* Pods-SwiftJSBridge_Tests.release.xcconfig */; 408 | buildSettings = { 409 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 410 | CODE_SIGN_IDENTITY = ""; 411 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 412 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 413 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 414 | CURRENT_PROJECT_VERSION = 1; 415 | DEFINES_MODULE = YES; 416 | DYLIB_COMPATIBILITY_VERSION = 1; 417 | DYLIB_CURRENT_VERSION = 1; 418 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 419 | INFOPLIST_FILE = "Target Support Files/Pods-SwiftJSBridge_Tests/Info.plist"; 420 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 421 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 422 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 423 | MACH_O_TYPE = staticlib; 424 | MODULEMAP_FILE = "Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests.modulemap"; 425 | OTHER_LDFLAGS = ""; 426 | OTHER_LIBTOOLFLAGS = ""; 427 | PODS_ROOT = "$(SRCROOT)"; 428 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 429 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 430 | SDKROOT = iphoneos; 431 | SKIP_INSTALL = YES; 432 | TARGETED_DEVICE_FAMILY = "1,2"; 433 | VALIDATE_PRODUCT = YES; 434 | VERSIONING_SYSTEM = "apple-generic"; 435 | VERSION_INFO_PREFIX = ""; 436 | }; 437 | name = Release; 438 | }; 439 | 1EE19F5DD95931924296F637BF18BD8F /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | buildSettings = { 442 | ALWAYS_SEARCH_USER_PATHS = NO; 443 | CLANG_ANALYZER_NONNULL = YES; 444 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 445 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 446 | CLANG_CXX_LIBRARY = "libc++"; 447 | CLANG_ENABLE_MODULES = YES; 448 | CLANG_ENABLE_OBJC_ARC = YES; 449 | CLANG_ENABLE_OBJC_WEAK = YES; 450 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 451 | CLANG_WARN_BOOL_CONVERSION = YES; 452 | CLANG_WARN_COMMA = YES; 453 | CLANG_WARN_CONSTANT_CONVERSION = YES; 454 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 455 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 456 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 457 | CLANG_WARN_EMPTY_BODY = YES; 458 | CLANG_WARN_ENUM_CONVERSION = YES; 459 | CLANG_WARN_INFINITE_RECURSION = YES; 460 | CLANG_WARN_INT_CONVERSION = YES; 461 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 462 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 463 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 464 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 465 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 466 | CLANG_WARN_STRICT_PROTOTYPES = YES; 467 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 468 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 469 | CLANG_WARN_UNREACHABLE_CODE = YES; 470 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 471 | CODE_SIGNING_ALLOWED = NO; 472 | CODE_SIGNING_REQUIRED = NO; 473 | COPY_PHASE_STRIP = NO; 474 | DEBUG_INFORMATION_FORMAT = dwarf; 475 | ENABLE_STRICT_OBJC_MSGSEND = YES; 476 | ENABLE_TESTABILITY = YES; 477 | GCC_C_LANGUAGE_STANDARD = gnu11; 478 | GCC_DYNAMIC_NO_PIC = NO; 479 | GCC_NO_COMMON_BLOCKS = YES; 480 | GCC_OPTIMIZATION_LEVEL = 0; 481 | GCC_PREPROCESSOR_DEFINITIONS = ( 482 | "POD_CONFIGURATION_DEBUG=1", 483 | "DEBUG=1", 484 | "$(inherited)", 485 | ); 486 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 487 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 488 | GCC_WARN_UNDECLARED_SELECTOR = YES; 489 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 490 | GCC_WARN_UNUSED_FUNCTION = YES; 491 | GCC_WARN_UNUSED_VARIABLE = YES; 492 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 493 | MTL_ENABLE_DEBUG_INFO = YES; 494 | ONLY_ACTIVE_ARCH = YES; 495 | PRODUCT_NAME = "$(TARGET_NAME)"; 496 | STRIP_INSTALLED_PRODUCT = NO; 497 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 498 | SYMROOT = "${SRCROOT}/../build"; 499 | }; 500 | name = Debug; 501 | }; 502 | 2956B6EAF63D7740A158624E8BF07C3B /* Debug */ = { 503 | isa = XCBuildConfiguration; 504 | baseConfigurationReference = 49D2DD61D5A7EDE688E3051C17DE8D25 /* JSBridgeKit.xcconfig */; 505 | buildSettings = { 506 | CODE_SIGN_IDENTITY = ""; 507 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 508 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 509 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 510 | CURRENT_PROJECT_VERSION = 1; 511 | DEFINES_MODULE = YES; 512 | DYLIB_COMPATIBILITY_VERSION = 1; 513 | DYLIB_CURRENT_VERSION = 1; 514 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 515 | GCC_PREFIX_HEADER = "Target Support Files/JSBridgeKit/JSBridgeKit-prefix.pch"; 516 | INFOPLIST_FILE = "Target Support Files/JSBridgeKit/Info.plist"; 517 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 518 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 519 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 520 | MODULEMAP_FILE = "Target Support Files/JSBridgeKit/JSBridgeKit.modulemap"; 521 | PRODUCT_MODULE_NAME = JSBridgeKit; 522 | PRODUCT_NAME = JSBridgeKit; 523 | SDKROOT = iphoneos; 524 | SKIP_INSTALL = YES; 525 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 526 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 527 | SWIFT_VERSION = 4.1; 528 | TARGETED_DEVICE_FAMILY = "1,2"; 529 | VERSIONING_SYSTEM = "apple-generic"; 530 | VERSION_INFO_PREFIX = ""; 531 | }; 532 | name = Debug; 533 | }; 534 | 36EFCBEEC9B9531A9E932D90A168463F /* Release */ = { 535 | isa = XCBuildConfiguration; 536 | baseConfigurationReference = 49D2DD61D5A7EDE688E3051C17DE8D25 /* JSBridgeKit.xcconfig */; 537 | buildSettings = { 538 | CODE_SIGN_IDENTITY = ""; 539 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 540 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 541 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 542 | CURRENT_PROJECT_VERSION = 1; 543 | DEFINES_MODULE = YES; 544 | DYLIB_COMPATIBILITY_VERSION = 1; 545 | DYLIB_CURRENT_VERSION = 1; 546 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 547 | GCC_PREFIX_HEADER = "Target Support Files/JSBridgeKit/JSBridgeKit-prefix.pch"; 548 | INFOPLIST_FILE = "Target Support Files/JSBridgeKit/Info.plist"; 549 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 550 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 551 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 552 | MODULEMAP_FILE = "Target Support Files/JSBridgeKit/JSBridgeKit.modulemap"; 553 | PRODUCT_MODULE_NAME = JSBridgeKit; 554 | PRODUCT_NAME = JSBridgeKit; 555 | SDKROOT = iphoneos; 556 | SKIP_INSTALL = YES; 557 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 558 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 559 | SWIFT_VERSION = 4.1; 560 | TARGETED_DEVICE_FAMILY = "1,2"; 561 | VALIDATE_PRODUCT = YES; 562 | VERSIONING_SYSTEM = "apple-generic"; 563 | VERSION_INFO_PREFIX = ""; 564 | }; 565 | name = Release; 566 | }; 567 | 385F4B2A667E0250091AE0C795C5912A /* Debug */ = { 568 | isa = XCBuildConfiguration; 569 | baseConfigurationReference = F90273285D913160D9B487A64CF40F88 /* Pods-SwiftJSBridge_Example.debug.xcconfig */; 570 | buildSettings = { 571 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 572 | CODE_SIGN_IDENTITY = ""; 573 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 574 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 575 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 576 | CURRENT_PROJECT_VERSION = 1; 577 | DEFINES_MODULE = YES; 578 | DYLIB_COMPATIBILITY_VERSION = 1; 579 | DYLIB_CURRENT_VERSION = 1; 580 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 581 | INFOPLIST_FILE = "Target Support Files/Pods-SwiftJSBridge_Example/Info.plist"; 582 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 583 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 584 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 585 | MACH_O_TYPE = staticlib; 586 | MODULEMAP_FILE = "Target Support Files/Pods-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example.modulemap"; 587 | OTHER_LDFLAGS = ""; 588 | OTHER_LIBTOOLFLAGS = ""; 589 | PODS_ROOT = "$(SRCROOT)"; 590 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 591 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 592 | SDKROOT = iphoneos; 593 | SKIP_INSTALL = YES; 594 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 595 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 596 | TARGETED_DEVICE_FAMILY = "1,2"; 597 | VERSIONING_SYSTEM = "apple-generic"; 598 | VERSION_INFO_PREFIX = ""; 599 | }; 600 | name = Debug; 601 | }; 602 | DBE1E046874E02E3C6E8D1AC61358C0E /* Debug */ = { 603 | isa = XCBuildConfiguration; 604 | baseConfigurationReference = 9B9CF61F838C7DCD3CA0427697273E5A /* Pods-SwiftJSBridge_Tests.debug.xcconfig */; 605 | buildSettings = { 606 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 607 | CODE_SIGN_IDENTITY = ""; 608 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 609 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 610 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 611 | CURRENT_PROJECT_VERSION = 1; 612 | DEFINES_MODULE = YES; 613 | DYLIB_COMPATIBILITY_VERSION = 1; 614 | DYLIB_CURRENT_VERSION = 1; 615 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 616 | INFOPLIST_FILE = "Target Support Files/Pods-SwiftJSBridge_Tests/Info.plist"; 617 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 618 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 619 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 620 | MACH_O_TYPE = staticlib; 621 | MODULEMAP_FILE = "Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests.modulemap"; 622 | OTHER_LDFLAGS = ""; 623 | OTHER_LIBTOOLFLAGS = ""; 624 | PODS_ROOT = "$(SRCROOT)"; 625 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 626 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 627 | SDKROOT = iphoneos; 628 | SKIP_INSTALL = YES; 629 | TARGETED_DEVICE_FAMILY = "1,2"; 630 | VERSIONING_SYSTEM = "apple-generic"; 631 | VERSION_INFO_PREFIX = ""; 632 | }; 633 | name = Debug; 634 | }; 635 | E4BBE6A9FE4BE595E4E915E92EDC7985 /* Release */ = { 636 | isa = XCBuildConfiguration; 637 | baseConfigurationReference = F41CAE20ABD18EF124671BDC2A32013F /* Pods-SwiftJSBridge_Example.release.xcconfig */; 638 | buildSettings = { 639 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 640 | CODE_SIGN_IDENTITY = ""; 641 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 642 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 643 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 644 | CURRENT_PROJECT_VERSION = 1; 645 | DEFINES_MODULE = YES; 646 | DYLIB_COMPATIBILITY_VERSION = 1; 647 | DYLIB_CURRENT_VERSION = 1; 648 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 649 | INFOPLIST_FILE = "Target Support Files/Pods-SwiftJSBridge_Example/Info.plist"; 650 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 651 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 652 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 653 | MACH_O_TYPE = staticlib; 654 | MODULEMAP_FILE = "Target Support Files/Pods-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example.modulemap"; 655 | OTHER_LDFLAGS = ""; 656 | OTHER_LIBTOOLFLAGS = ""; 657 | PODS_ROOT = "$(SRCROOT)"; 658 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 659 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 660 | SDKROOT = iphoneos; 661 | SKIP_INSTALL = YES; 662 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 663 | TARGETED_DEVICE_FAMILY = "1,2"; 664 | VALIDATE_PRODUCT = YES; 665 | VERSIONING_SYSTEM = "apple-generic"; 666 | VERSION_INFO_PREFIX = ""; 667 | }; 668 | name = Release; 669 | }; 670 | F4568DEE257655D290C2B9CEAB37C934 /* Release */ = { 671 | isa = XCBuildConfiguration; 672 | buildSettings = { 673 | ALWAYS_SEARCH_USER_PATHS = NO; 674 | CLANG_ANALYZER_NONNULL = YES; 675 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 676 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 677 | CLANG_CXX_LIBRARY = "libc++"; 678 | CLANG_ENABLE_MODULES = YES; 679 | CLANG_ENABLE_OBJC_ARC = YES; 680 | CLANG_ENABLE_OBJC_WEAK = YES; 681 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 682 | CLANG_WARN_BOOL_CONVERSION = YES; 683 | CLANG_WARN_COMMA = YES; 684 | CLANG_WARN_CONSTANT_CONVERSION = YES; 685 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 686 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 687 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 688 | CLANG_WARN_EMPTY_BODY = YES; 689 | CLANG_WARN_ENUM_CONVERSION = YES; 690 | CLANG_WARN_INFINITE_RECURSION = YES; 691 | CLANG_WARN_INT_CONVERSION = YES; 692 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 693 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 694 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 695 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 696 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 697 | CLANG_WARN_STRICT_PROTOTYPES = YES; 698 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 699 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 700 | CLANG_WARN_UNREACHABLE_CODE = YES; 701 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 702 | CODE_SIGNING_ALLOWED = NO; 703 | CODE_SIGNING_REQUIRED = NO; 704 | COPY_PHASE_STRIP = NO; 705 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 706 | ENABLE_NS_ASSERTIONS = NO; 707 | ENABLE_STRICT_OBJC_MSGSEND = YES; 708 | GCC_C_LANGUAGE_STANDARD = gnu11; 709 | GCC_NO_COMMON_BLOCKS = YES; 710 | GCC_PREPROCESSOR_DEFINITIONS = ( 711 | "POD_CONFIGURATION_RELEASE=1", 712 | "$(inherited)", 713 | ); 714 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 715 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 716 | GCC_WARN_UNDECLARED_SELECTOR = YES; 717 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 718 | GCC_WARN_UNUSED_FUNCTION = YES; 719 | GCC_WARN_UNUSED_VARIABLE = YES; 720 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 721 | MTL_ENABLE_DEBUG_INFO = NO; 722 | PRODUCT_NAME = "$(TARGET_NAME)"; 723 | STRIP_INSTALLED_PRODUCT = NO; 724 | SYMROOT = "${SRCROOT}/../build"; 725 | }; 726 | name = Release; 727 | }; 728 | /* End XCBuildConfiguration section */ 729 | 730 | /* Begin XCConfigurationList section */ 731 | 0965D9501E10AC566E49340FF80D4045 /* Build configuration list for PBXNativeTarget "Pods-SwiftJSBridge_Tests" */ = { 732 | isa = XCConfigurationList; 733 | buildConfigurations = ( 734 | DBE1E046874E02E3C6E8D1AC61358C0E /* Debug */, 735 | 106F36FD957359EC02A80231F40AC544 /* Release */, 736 | ); 737 | defaultConfigurationIsVisible = 0; 738 | defaultConfigurationName = Release; 739 | }; 740 | 0C77881F1E105FAA4B15F78D0C9AD159 /* Build configuration list for PBXNativeTarget "Pods-SwiftJSBridge_Example" */ = { 741 | isa = XCConfigurationList; 742 | buildConfigurations = ( 743 | 385F4B2A667E0250091AE0C795C5912A /* Debug */, 744 | E4BBE6A9FE4BE595E4E915E92EDC7985 /* Release */, 745 | ); 746 | defaultConfigurationIsVisible = 0; 747 | defaultConfigurationName = Release; 748 | }; 749 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 750 | isa = XCConfigurationList; 751 | buildConfigurations = ( 752 | 1EE19F5DD95931924296F637BF18BD8F /* Debug */, 753 | F4568DEE257655D290C2B9CEAB37C934 /* Release */, 754 | ); 755 | defaultConfigurationIsVisible = 0; 756 | defaultConfigurationName = Release; 757 | }; 758 | 6C6C2265B5BD1B77737355948D611071 /* Build configuration list for PBXNativeTarget "JSBridgeKit" */ = { 759 | isa = XCConfigurationList; 760 | buildConfigurations = ( 761 | 2956B6EAF63D7740A158624E8BF07C3B /* Debug */, 762 | 36EFCBEEC9B9531A9E932D90A168463F /* Release */, 763 | ); 764 | defaultConfigurationIsVisible = 0; 765 | defaultConfigurationName = Release; 766 | }; 767 | /* End XCConfigurationList section */ 768 | }; 769 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 770 | } 771 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JSBridgeKit/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.7 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JSBridgeKit/JSBridgeKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_JSBridgeKit : NSObject 3 | @end 4 | @implementation PodsDummy_JSBridgeKit 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JSBridgeKit/JSBridgeKit-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/JSBridgeKit/JSBridgeKit-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 JSBridgeKitVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char JSBridgeKitVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JSBridgeKit/JSBridgeKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module JSBridgeKit { 2 | umbrella header "JSBridgeKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JSBridgeKit/JSBridgeKit.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/JSBridgeKit 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_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-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## JSBridgeKit 5 | 6 | Copyright (c) 2018 hhfa008 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-SwiftJSBridge_Example/Pods-SwiftJSBridge_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) 2018 hhfa008 <hhfa008@gmail.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 | JSBridgeKit 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-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SwiftJSBridge_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SwiftJSBridge_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | 145 | if [[ "$CONFIGURATION" == "Debug" ]]; then 146 | install_framework "${BUILT_PRODUCTS_DIR}/JSBridgeKit/JSBridgeKit.framework" 147 | fi 148 | if [[ "$CONFIGURATION" == "Release" ]]; then 149 | install_framework "${BUILT_PRODUCTS_DIR}/JSBridgeKit/JSBridgeKit.framework" 150 | fi 151 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 152 | wait 153 | fi 154 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | 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 60 | 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} 61 | ;; 62 | *.xib) 63 | 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 64 | 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} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | 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}" 115 | else 116 | 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}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Example/Pods-SwiftJSBridge_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_SwiftJSBridge_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_SwiftJSBridge_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JSBridgeKit" 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}/JSBridgeKit/JSBridgeKit.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "JSBridgeKit" 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-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SwiftJSBridge_Example { 2 | umbrella header "Pods-SwiftJSBridge_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JSBridgeKit" 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}/JSBridgeKit/JSBridgeKit.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "JSBridgeKit" 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-SwiftJSBridge_Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | 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-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests-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 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SwiftJSBridge_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SwiftJSBridge_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 145 | wait 146 | fi 147 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | 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 60 | 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} 61 | ;; 62 | *.xib) 63 | 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 64 | 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} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | 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}" 115 | else 116 | 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}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests-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_SwiftJSBridge_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_SwiftJSBridge_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JSBridgeKit" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/JSBridgeKit/JSBridgeKit.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SwiftJSBridge_Tests { 2 | umbrella header "Pods-SwiftJSBridge_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JSBridgeKit" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/JSBridgeKit/JSBridgeKit.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/SwiftJSBridge.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 445A26DA245B1B63C8BC7243 /* Pods_SwiftJSBridge_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53E243C291D8D5C21D99A94D /* Pods_SwiftJSBridge_Example.framework */; }; 11 | 4D6856D127FF2FB2069C86CB /* Pods_SwiftJSBridge_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95835669623A212F294DB67B /* Pods_SwiftJSBridge_Tests.framework */; }; 12 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 13 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 14 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 15 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 16 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 17 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 18 | F3779A4C20DE15BF005F8F17 /* test.html in Resources */ = {isa = PBXBuildFile; fileRef = F3779A4B20DE15BF005F8F17 /* test.html */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 27 | remoteInfo = SwiftJSBridge; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 4CDC09B4D844D28BD1D9C3FE /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 33 | 53E243C291D8D5C21D99A94D /* Pods_SwiftJSBridge_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftJSBridge_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 607FACD01AFB9204008FA782 /* SwiftJSBridge_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftJSBridge_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 38 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 39 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 40 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 41 | 607FACE51AFB9204008FA782 /* SwiftJSBridge_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftJSBridge_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 44 | 8A5286C81EC1F52F88506799 /* Pods-SwiftJSBridge_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftJSBridge_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example.release.xcconfig"; sourceTree = ""; }; 45 | 95835669623A212F294DB67B /* Pods_SwiftJSBridge_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftJSBridge_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | A835FFE8C97027884487E77B /* Pods-SwiftJSBridge_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftJSBridge_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example.debug.xcconfig"; sourceTree = ""; }; 47 | CF4A0CA1ED68149D08F52E10 /* Pods-SwiftJSBridge_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftJSBridge_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests.release.xcconfig"; sourceTree = ""; }; 48 | D64EDBE7D279DB2454DF3387 /* JSBridgeKit.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = JSBridgeKit.podspec; path = ../JSBridgeKit.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 49 | EB85D82280FCD3C69332E274 /* Pods-SwiftJSBridge_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftJSBridge_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftJSBridge_Tests/Pods-SwiftJSBridge_Tests.debug.xcconfig"; sourceTree = ""; }; 50 | F3779A4B20DE15BF005F8F17 /* test.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = test.html; path = ../../../../WebstormProjects/SwiftJSBridge/test.html; sourceTree = ""; }; 51 | FBB6654DFD177B046F656292 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | 445A26DA245B1B63C8BC7243 /* Pods_SwiftJSBridge_Example.framework in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | 4D6856D127FF2FB2069C86CB /* Pods_SwiftJSBridge_Tests.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 15E81C8218F31131FF4E3BA7 /* Frameworks */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 53E243C291D8D5C21D99A94D /* Pods_SwiftJSBridge_Example.framework */, 78 | 95835669623A212F294DB67B /* Pods_SwiftJSBridge_Tests.framework */, 79 | ); 80 | name = Frameworks; 81 | sourceTree = ""; 82 | }; 83 | 607FACC71AFB9204008FA782 = { 84 | isa = PBXGroup; 85 | children = ( 86 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 87 | 607FACD21AFB9204008FA782 /* Example for SwiftJSBridge */, 88 | 607FACE81AFB9204008FA782 /* Tests */, 89 | 607FACD11AFB9204008FA782 /* Products */, 90 | AA43AB97B976F0BB18CEA45F /* Pods */, 91 | 15E81C8218F31131FF4E3BA7 /* Frameworks */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | 607FACD11AFB9204008FA782 /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 607FACD01AFB9204008FA782 /* SwiftJSBridge_Example.app */, 99 | 607FACE51AFB9204008FA782 /* SwiftJSBridge_Tests.xctest */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | 607FACD21AFB9204008FA782 /* Example for SwiftJSBridge */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 108 | F3779A4B20DE15BF005F8F17 /* test.html */, 109 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 110 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 111 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 112 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 113 | 607FACD31AFB9204008FA782 /* Supporting Files */, 114 | ); 115 | name = "Example for SwiftJSBridge"; 116 | path = SwiftJSBridge; 117 | sourceTree = ""; 118 | }; 119 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 607FACD41AFB9204008FA782 /* Info.plist */, 123 | ); 124 | name = "Supporting Files"; 125 | sourceTree = ""; 126 | }; 127 | 607FACE81AFB9204008FA782 /* Tests */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 131 | 607FACE91AFB9204008FA782 /* Supporting Files */, 132 | ); 133 | path = Tests; 134 | sourceTree = ""; 135 | }; 136 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 607FACEA1AFB9204008FA782 /* Info.plist */, 140 | ); 141 | name = "Supporting Files"; 142 | sourceTree = ""; 143 | }; 144 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | D64EDBE7D279DB2454DF3387 /* JSBridgeKit.podspec */, 148 | 4CDC09B4D844D28BD1D9C3FE /* README.md */, 149 | FBB6654DFD177B046F656292 /* LICENSE */, 150 | ); 151 | name = "Podspec Metadata"; 152 | sourceTree = ""; 153 | }; 154 | AA43AB97B976F0BB18CEA45F /* Pods */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | A835FFE8C97027884487E77B /* Pods-SwiftJSBridge_Example.debug.xcconfig */, 158 | 8A5286C81EC1F52F88506799 /* Pods-SwiftJSBridge_Example.release.xcconfig */, 159 | EB85D82280FCD3C69332E274 /* Pods-SwiftJSBridge_Tests.debug.xcconfig */, 160 | CF4A0CA1ED68149D08F52E10 /* Pods-SwiftJSBridge_Tests.release.xcconfig */, 161 | ); 162 | name = Pods; 163 | sourceTree = ""; 164 | }; 165 | /* End PBXGroup section */ 166 | 167 | /* Begin PBXNativeTarget section */ 168 | 607FACCF1AFB9204008FA782 /* SwiftJSBridge_Example */ = { 169 | isa = PBXNativeTarget; 170 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SwiftJSBridge_Example" */; 171 | buildPhases = ( 172 | 754C43C03BC1631FC1E9159C /* [CP] Check Pods Manifest.lock */, 173 | 607FACCC1AFB9204008FA782 /* Sources */, 174 | 607FACCD1AFB9204008FA782 /* Frameworks */, 175 | 607FACCE1AFB9204008FA782 /* Resources */, 176 | BC8109E6B405B6ABB87468B5 /* [CP] Embed Pods Frameworks */, 177 | ); 178 | buildRules = ( 179 | ); 180 | dependencies = ( 181 | ); 182 | name = SwiftJSBridge_Example; 183 | productName = SwiftJSBridge; 184 | productReference = 607FACD01AFB9204008FA782 /* SwiftJSBridge_Example.app */; 185 | productType = "com.apple.product-type.application"; 186 | }; 187 | 607FACE41AFB9204008FA782 /* SwiftJSBridge_Tests */ = { 188 | isa = PBXNativeTarget; 189 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SwiftJSBridge_Tests" */; 190 | buildPhases = ( 191 | 26FDE5C71A58E84B6C23FB54 /* [CP] Check Pods Manifest.lock */, 192 | 607FACE11AFB9204008FA782 /* Sources */, 193 | 607FACE21AFB9204008FA782 /* Frameworks */, 194 | 607FACE31AFB9204008FA782 /* Resources */, 195 | ); 196 | buildRules = ( 197 | ); 198 | dependencies = ( 199 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 200 | ); 201 | name = SwiftJSBridge_Tests; 202 | productName = Tests; 203 | productReference = 607FACE51AFB9204008FA782 /* SwiftJSBridge_Tests.xctest */; 204 | productType = "com.apple.product-type.bundle.unit-test"; 205 | }; 206 | /* End PBXNativeTarget section */ 207 | 208 | /* Begin PBXProject section */ 209 | 607FACC81AFB9204008FA782 /* Project object */ = { 210 | isa = PBXProject; 211 | attributes = { 212 | LastSwiftUpdateCheck = 0830; 213 | LastUpgradeCheck = 0830; 214 | ORGANIZATIONNAME = CocoaPods; 215 | TargetAttributes = { 216 | 607FACCF1AFB9204008FA782 = { 217 | CreatedOnToolsVersion = 6.3.1; 218 | DevelopmentTeam = Y5ZP3NDNWZ; 219 | LastSwiftMigration = 0900; 220 | }; 221 | 607FACE41AFB9204008FA782 = { 222 | CreatedOnToolsVersion = 6.3.1; 223 | DevelopmentTeam = Y5ZP3NDNWZ; 224 | LastSwiftMigration = 0900; 225 | TestTargetID = 607FACCF1AFB9204008FA782; 226 | }; 227 | }; 228 | }; 229 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "SwiftJSBridge" */; 230 | compatibilityVersion = "Xcode 3.2"; 231 | developmentRegion = English; 232 | hasScannedForEncodings = 0; 233 | knownRegions = ( 234 | en, 235 | Base, 236 | ); 237 | mainGroup = 607FACC71AFB9204008FA782; 238 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 239 | projectDirPath = ""; 240 | projectRoot = ""; 241 | targets = ( 242 | 607FACCF1AFB9204008FA782 /* SwiftJSBridge_Example */, 243 | 607FACE41AFB9204008FA782 /* SwiftJSBridge_Tests */, 244 | ); 245 | }; 246 | /* End PBXProject section */ 247 | 248 | /* Begin PBXResourcesBuildPhase section */ 249 | 607FACCE1AFB9204008FA782 /* Resources */ = { 250 | isa = PBXResourcesBuildPhase; 251 | buildActionMask = 2147483647; 252 | files = ( 253 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 254 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 255 | F3779A4C20DE15BF005F8F17 /* test.html in Resources */, 256 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 257 | ); 258 | runOnlyForDeploymentPostprocessing = 0; 259 | }; 260 | 607FACE31AFB9204008FA782 /* Resources */ = { 261 | isa = PBXResourcesBuildPhase; 262 | buildActionMask = 2147483647; 263 | files = ( 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | /* End PBXResourcesBuildPhase section */ 268 | 269 | /* Begin PBXShellScriptBuildPhase section */ 270 | 26FDE5C71A58E84B6C23FB54 /* [CP] Check Pods Manifest.lock */ = { 271 | isa = PBXShellScriptBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | ); 275 | inputPaths = ( 276 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 277 | "${PODS_ROOT}/Manifest.lock", 278 | ); 279 | name = "[CP] Check Pods Manifest.lock"; 280 | outputPaths = ( 281 | "$(DERIVED_FILE_DIR)/Pods-SwiftJSBridge_Tests-checkManifestLockResult.txt", 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | shellPath = /bin/sh; 285 | 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"; 286 | showEnvVarsInLog = 0; 287 | }; 288 | 754C43C03BC1631FC1E9159C /* [CP] Check Pods Manifest.lock */ = { 289 | isa = PBXShellScriptBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | ); 293 | inputPaths = ( 294 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 295 | "${PODS_ROOT}/Manifest.lock", 296 | ); 297 | name = "[CP] Check Pods Manifest.lock"; 298 | outputPaths = ( 299 | "$(DERIVED_FILE_DIR)/Pods-SwiftJSBridge_Example-checkManifestLockResult.txt", 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | shellPath = /bin/sh; 303 | 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"; 304 | showEnvVarsInLog = 0; 305 | }; 306 | BC8109E6B405B6ABB87468B5 /* [CP] Embed Pods Frameworks */ = { 307 | isa = PBXShellScriptBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | ); 311 | inputPaths = ( 312 | "${SRCROOT}/Pods/Target Support Files/Pods-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example-frameworks.sh", 313 | "${BUILT_PRODUCTS_DIR}/JSBridgeKit/JSBridgeKit.framework", 314 | ); 315 | name = "[CP] Embed Pods Frameworks"; 316 | outputPaths = ( 317 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JSBridgeKit.framework", 318 | ); 319 | runOnlyForDeploymentPostprocessing = 0; 320 | shellPath = /bin/sh; 321 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftJSBridge_Example/Pods-SwiftJSBridge_Example-frameworks.sh\"\n"; 322 | showEnvVarsInLog = 0; 323 | }; 324 | /* End PBXShellScriptBuildPhase section */ 325 | 326 | /* Begin PBXSourcesBuildPhase section */ 327 | 607FACCC1AFB9204008FA782 /* Sources */ = { 328 | isa = PBXSourcesBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 332 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 333 | ); 334 | runOnlyForDeploymentPostprocessing = 0; 335 | }; 336 | 607FACE11AFB9204008FA782 /* Sources */ = { 337 | isa = PBXSourcesBuildPhase; 338 | buildActionMask = 2147483647; 339 | files = ( 340 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | }; 344 | /* End PBXSourcesBuildPhase section */ 345 | 346 | /* Begin PBXTargetDependency section */ 347 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 348 | isa = PBXTargetDependency; 349 | target = 607FACCF1AFB9204008FA782 /* SwiftJSBridge_Example */; 350 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 351 | }; 352 | /* End PBXTargetDependency section */ 353 | 354 | /* Begin PBXVariantGroup section */ 355 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 356 | isa = PBXVariantGroup; 357 | children = ( 358 | 607FACDA1AFB9204008FA782 /* Base */, 359 | ); 360 | name = Main.storyboard; 361 | sourceTree = ""; 362 | }; 363 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 364 | isa = PBXVariantGroup; 365 | children = ( 366 | 607FACDF1AFB9204008FA782 /* Base */, 367 | ); 368 | name = LaunchScreen.xib; 369 | sourceTree = ""; 370 | }; 371 | /* End PBXVariantGroup section */ 372 | 373 | /* Begin XCBuildConfiguration section */ 374 | 607FACED1AFB9204008FA782 /* Debug */ = { 375 | isa = XCBuildConfiguration; 376 | buildSettings = { 377 | ALWAYS_SEARCH_USER_PATHS = NO; 378 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 379 | CLANG_CXX_LIBRARY = "libc++"; 380 | CLANG_ENABLE_MODULES = YES; 381 | CLANG_ENABLE_OBJC_ARC = YES; 382 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 383 | CLANG_WARN_BOOL_CONVERSION = YES; 384 | CLANG_WARN_COMMA = YES; 385 | CLANG_WARN_CONSTANT_CONVERSION = YES; 386 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 387 | CLANG_WARN_EMPTY_BODY = YES; 388 | CLANG_WARN_ENUM_CONVERSION = YES; 389 | CLANG_WARN_INFINITE_RECURSION = YES; 390 | CLANG_WARN_INT_CONVERSION = YES; 391 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 392 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 393 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 394 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 395 | CLANG_WARN_STRICT_PROTOTYPES = YES; 396 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 397 | CLANG_WARN_UNREACHABLE_CODE = YES; 398 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 399 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 400 | COPY_PHASE_STRIP = NO; 401 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 402 | ENABLE_STRICT_OBJC_MSGSEND = YES; 403 | ENABLE_TESTABILITY = YES; 404 | GCC_C_LANGUAGE_STANDARD = gnu99; 405 | GCC_DYNAMIC_NO_PIC = NO; 406 | GCC_NO_COMMON_BLOCKS = YES; 407 | GCC_OPTIMIZATION_LEVEL = 0; 408 | GCC_PREPROCESSOR_DEFINITIONS = ( 409 | "DEBUG=1", 410 | "$(inherited)", 411 | ); 412 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 413 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 414 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 415 | GCC_WARN_UNDECLARED_SELECTOR = YES; 416 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 417 | GCC_WARN_UNUSED_FUNCTION = YES; 418 | GCC_WARN_UNUSED_VARIABLE = YES; 419 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 420 | MTL_ENABLE_DEBUG_INFO = YES; 421 | ONLY_ACTIVE_ARCH = YES; 422 | SDKROOT = iphoneos; 423 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 424 | }; 425 | name = Debug; 426 | }; 427 | 607FACEE1AFB9204008FA782 /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | buildSettings = { 430 | ALWAYS_SEARCH_USER_PATHS = NO; 431 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 432 | CLANG_CXX_LIBRARY = "libc++"; 433 | CLANG_ENABLE_MODULES = YES; 434 | CLANG_ENABLE_OBJC_ARC = YES; 435 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 436 | CLANG_WARN_BOOL_CONVERSION = YES; 437 | CLANG_WARN_COMMA = YES; 438 | CLANG_WARN_CONSTANT_CONVERSION = YES; 439 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 440 | CLANG_WARN_EMPTY_BODY = YES; 441 | CLANG_WARN_ENUM_CONVERSION = YES; 442 | CLANG_WARN_INFINITE_RECURSION = YES; 443 | CLANG_WARN_INT_CONVERSION = YES; 444 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 445 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 446 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 447 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 448 | CLANG_WARN_STRICT_PROTOTYPES = YES; 449 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 450 | CLANG_WARN_UNREACHABLE_CODE = YES; 451 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 452 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 453 | COPY_PHASE_STRIP = NO; 454 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 455 | ENABLE_NS_ASSERTIONS = NO; 456 | ENABLE_STRICT_OBJC_MSGSEND = YES; 457 | GCC_C_LANGUAGE_STANDARD = gnu99; 458 | GCC_NO_COMMON_BLOCKS = YES; 459 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 460 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 461 | GCC_WARN_UNDECLARED_SELECTOR = YES; 462 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 463 | GCC_WARN_UNUSED_FUNCTION = YES; 464 | GCC_WARN_UNUSED_VARIABLE = YES; 465 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 466 | MTL_ENABLE_DEBUG_INFO = NO; 467 | SDKROOT = iphoneos; 468 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 469 | VALIDATE_PRODUCT = YES; 470 | }; 471 | name = Release; 472 | }; 473 | 607FACF01AFB9204008FA782 /* Debug */ = { 474 | isa = XCBuildConfiguration; 475 | baseConfigurationReference = A835FFE8C97027884487E77B /* Pods-SwiftJSBridge_Example.debug.xcconfig */; 476 | buildSettings = { 477 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 478 | DEVELOPMENT_TEAM = Y5ZP3NDNWZ; 479 | INFOPLIST_FILE = SwiftJSBridge/Info.plist; 480 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 481 | MODULE_NAME = ExampleApp; 482 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 483 | PRODUCT_NAME = "$(TARGET_NAME)"; 484 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 485 | SWIFT_VERSION = 4.0; 486 | }; 487 | name = Debug; 488 | }; 489 | 607FACF11AFB9204008FA782 /* Release */ = { 490 | isa = XCBuildConfiguration; 491 | baseConfigurationReference = 8A5286C81EC1F52F88506799 /* Pods-SwiftJSBridge_Example.release.xcconfig */; 492 | buildSettings = { 493 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 494 | DEVELOPMENT_TEAM = Y5ZP3NDNWZ; 495 | INFOPLIST_FILE = SwiftJSBridge/Info.plist; 496 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 497 | MODULE_NAME = ExampleApp; 498 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 499 | PRODUCT_NAME = "$(TARGET_NAME)"; 500 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 501 | SWIFT_VERSION = 4.0; 502 | }; 503 | name = Release; 504 | }; 505 | 607FACF31AFB9204008FA782 /* Debug */ = { 506 | isa = XCBuildConfiguration; 507 | baseConfigurationReference = EB85D82280FCD3C69332E274 /* Pods-SwiftJSBridge_Tests.debug.xcconfig */; 508 | buildSettings = { 509 | DEVELOPMENT_TEAM = Y5ZP3NDNWZ; 510 | FRAMEWORK_SEARCH_PATHS = ( 511 | "$(SDKROOT)/Developer/Library/Frameworks", 512 | "$(inherited)", 513 | ); 514 | GCC_PREPROCESSOR_DEFINITIONS = ( 515 | "DEBUG=1", 516 | "$(inherited)", 517 | ); 518 | INFOPLIST_FILE = Tests/Info.plist; 519 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 520 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 521 | PRODUCT_NAME = "$(TARGET_NAME)"; 522 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 523 | SWIFT_VERSION = 4.0; 524 | }; 525 | name = Debug; 526 | }; 527 | 607FACF41AFB9204008FA782 /* Release */ = { 528 | isa = XCBuildConfiguration; 529 | baseConfigurationReference = CF4A0CA1ED68149D08F52E10 /* Pods-SwiftJSBridge_Tests.release.xcconfig */; 530 | buildSettings = { 531 | DEVELOPMENT_TEAM = Y5ZP3NDNWZ; 532 | FRAMEWORK_SEARCH_PATHS = ( 533 | "$(SDKROOT)/Developer/Library/Frameworks", 534 | "$(inherited)", 535 | ); 536 | INFOPLIST_FILE = Tests/Info.plist; 537 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 538 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 539 | PRODUCT_NAME = "$(TARGET_NAME)"; 540 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 541 | SWIFT_VERSION = 4.0; 542 | }; 543 | name = Release; 544 | }; 545 | /* End XCBuildConfiguration section */ 546 | 547 | /* Begin XCConfigurationList section */ 548 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "SwiftJSBridge" */ = { 549 | isa = XCConfigurationList; 550 | buildConfigurations = ( 551 | 607FACED1AFB9204008FA782 /* Debug */, 552 | 607FACEE1AFB9204008FA782 /* Release */, 553 | ); 554 | defaultConfigurationIsVisible = 0; 555 | defaultConfigurationName = Release; 556 | }; 557 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SwiftJSBridge_Example" */ = { 558 | isa = XCConfigurationList; 559 | buildConfigurations = ( 560 | 607FACF01AFB9204008FA782 /* Debug */, 561 | 607FACF11AFB9204008FA782 /* Release */, 562 | ); 563 | defaultConfigurationIsVisible = 0; 564 | defaultConfigurationName = Release; 565 | }; 566 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SwiftJSBridge_Tests" */ = { 567 | isa = XCConfigurationList; 568 | buildConfigurations = ( 569 | 607FACF31AFB9204008FA782 /* Debug */, 570 | 607FACF41AFB9204008FA782 /* Release */, 571 | ); 572 | defaultConfigurationIsVisible = 0; 573 | defaultConfigurationName = Release; 574 | }; 575 | /* End XCConfigurationList section */ 576 | }; 577 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 578 | } 579 | -------------------------------------------------------------------------------- /Example/SwiftJSBridge.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/SwiftJSBridge.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/SwiftJSBridge.xcodeproj/xcshareddata/xcschemes/SwiftJSBridge-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 80 | 82 | 88 | 89 | 90 | 91 | 92 | 93 | 99 | 101 | 107 | 108 | 109 | 110 | 112 | 113 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /Example/SwiftJSBridge.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/SwiftJSBridge.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/SwiftJSBridge/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SwiftJSBridge 4 | // 5 | // Created by hhfa008 on 06/23/2018. 6 | // Copyright (c) 2018 hhfa008. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and 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/SwiftJSBridge/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Example/SwiftJSBridge/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Example/SwiftJSBridge/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/SwiftJSBridge/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSAppTransportSecurity 6 | 7 | NSAllowsArbitraryLoads 8 | 9 | 10 | CFBundleDevelopmentRegion 11 | en 12 | CFBundleExecutable 13 | $(EXECUTABLE_NAME) 14 | CFBundleIdentifier 15 | $(PRODUCT_BUNDLE_IDENTIFIER) 16 | CFBundleInfoDictionaryVersion 17 | 6.0 18 | CFBundleName 19 | $(PRODUCT_NAME) 20 | CFBundlePackageType 21 | APPL 22 | CFBundleShortVersionString 23 | 1.0 24 | CFBundleSignature 25 | ???? 26 | CFBundleVersion 27 | 1 28 | LSRequiresIPhoneOS 29 | 30 | UILaunchStoryboardName 31 | LaunchScreen 32 | UIMainStoryboardFile 33 | Main 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | UIInterfaceOrientationLandscapeLeft 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Example/SwiftJSBridge/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SwiftJSBridge 4 | // 5 | // Created by hhfa008 on 06/23/2018. 6 | // Copyright (c) 2018 hhfa008. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import WebKit 11 | import SwiftJSBridge 12 | 13 | 14 | class ViewController: UIViewController { 15 | 16 | var webview:WebView? 17 | var timer:Timer? 18 | 19 | @objc func test() -> Void { 20 | _ = self.JSBridge?.callJS(name: "sendMessageToJS", data: ["message":"Hi, I am native"]) { (data) in 21 | print("data") 22 | if let data = data { 23 | print(data) 24 | } 25 | 26 | } 27 | } 28 | var JSBridge:SwiftJSBridge? 29 | override func viewDidLoad() { 30 | 31 | 32 | super.viewDidLoad() 33 | webview = getuiwebview() 34 | // webview = getwebview() 35 | timer = Timer.scheduledTimer(timeInterval: 10, target: self, selector: #selector(test), userInfo: nil, repeats: true) 36 | 37 | 38 | view.addSubview((webview?.contentView())!) 39 | let JSBridge = SwiftJSBridge(for: webview) 40 | self.JSBridge = JSBridge 41 | 42 | test() 43 | 44 | _ = JSBridge.addSwift(bridge: { (data, cb) in 45 | 46 | cb?(["appVersion":"1.0"]) 47 | }, name: "getAppVersion") 48 | 49 | let path = Bundle.main.path(forResource: "test", ofType: "html") 50 | let file = URL.init(fileURLWithPath: path!) 51 | 52 | _ = webview?.loadFileURL(url: file) 53 | } 54 | 55 | override func didReceiveMemoryWarning() { 56 | super.didReceiveMemoryWarning() 57 | // Dispose of any resources that can be recreated. 58 | } 59 | func getwebview()->WKWebView { 60 | let config = WKWebViewConfiguration() 61 | 62 | let web = WKWebView(frame: self.view.frame, configuration: config) 63 | return web; 64 | } 65 | 66 | func getuiwebview()->UIWebView { 67 | let web = UIWebView(frame: self.view.frame) 68 | return web; 69 | } 70 | 71 | 72 | } 73 | 74 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import SwiftJSBridge 3 | 4 | class Tests: XCTestCase { 5 | 6 | override func setUp() { 7 | super.setUp() 8 | // Put setup code here. This method is called before the invocation of each test method in the class. 9 | } 10 | 11 | override func tearDown() { 12 | // Put teardown code here. This method is called after the invocation of each test method in the class. 13 | super.tearDown() 14 | } 15 | 16 | func testExample() { 17 | // This is an example of a functional test case. 18 | XCTAssert(true, "Pass") 19 | } 20 | 21 | func testPerformanceExample() { 22 | // This is an example of a performance test case. 23 | self.measure() { 24 | // Put the code you want to measure the time of here. 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /JSBridgeKit.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint SwiftJSBridge.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'JSBridgeKit' 11 | s.version = '0.1.8' 12 | s.summary = 'BetterSwiftJSBridge is a handy JavaScript Bridge, written in Swift, support WKWebView and UIWebView.' 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 | BetterSwiftJSBridge is a handy JavaScript Bridge, written in Swift, support WKWebView and UIWebView. 22 | DESC 23 | 24 | s.homepage = 'https://github.com/hhfa008/SwiftJSBridge' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'hhfa008' => 'hhfa008@gmail.com' } 28 | s.source = { :git => 'https://github.com/hhfa008/SwiftJSBridge.git', :tag => s.version.to_s } 29 | # s.social_media_url = 'https://twitter.com/' 30 | 31 | s.ios.deployment_target = '8.0' 32 | s.swift_version = '4.1' 33 | 34 | s.source_files = 'JSBridgeKit/Classes/**/*' 35 | 36 | # s.resource_bundles = { 37 | # 'SwiftJSBridge' => ['SwiftJSBridge/Assets/*.png'] 38 | # } 39 | 40 | # s.public_header_files = 'Pod/Classes/**/*.h' 41 | # s.frameworks = 'UIKit', 'MapKit' 42 | # s.dependency 'AFNetworking', '~> 2.3' 43 | end 44 | -------------------------------------------------------------------------------- /JSBridgeKit/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hhfa008/SwiftJSBridge/50727736279ecca3e8bbfd00724d1718c7b89fbd/JSBridgeKit/Assets/.gitkeep -------------------------------------------------------------------------------- /JSBridgeKit/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hhfa008/SwiftJSBridge/50727736279ecca3e8bbfd00724d1718c7b89fbd/JSBridgeKit/Classes/.gitkeep -------------------------------------------------------------------------------- /JSBridgeKit/Classes/JSFile.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JSFile.swift 3 | // Pods-SwiftJSBridge_Example 4 | // 5 | // Created by hhfa on 2018/6/23. 6 | // 7 | 8 | import Foundation 9 | public let jsbrigeInject = """ 10 | ;(function() { 11 | if (window.SwiftJSBridge) { 12 | return; 13 | } 14 | 15 | window.SwiftJSBridge = { 16 | addJSBridge: addJSBridge, 17 | callNativeBridge: callNativeBridge, 18 | _setHash: function(value){ hashValue = value }, 19 | _fetchCommandQueue: _fetchCommandQueue, 20 | _callFromSwift: _callFromSwift, 21 | _callbackFromSwift: _callbackFromSwift 22 | }; 23 | 24 | var hashValue = ""; 25 | var JSCallSwiftQueue = []; 26 | var CallFromSwiftHandlers = {}; 27 | var JSResponseCallbacks = {}; 28 | 29 | setTimeout(function() { 30 | var callbacks = window.SwiftJSBridgeReadyCallbacks; 31 | delete window.SwiftJSBridgeReadyCallbacks; 32 | for (var i=0; i Bool { 35 | bridges[name] = bridge 36 | return true 37 | } 38 | 39 | func callFromJS(data: Data) -> Bool { 40 | let json = try? JSONDecoder().decode([CallbackJSON].self, from: data) 41 | guard let a = json else { 42 | return false 43 | } 44 | _ = callFromJS(array: a) 45 | 46 | return true 47 | } 48 | 49 | func callFromJS(array: [CallbackJSON]?) -> Bool { 50 | guard let array = array else { 51 | return false 52 | } 53 | for json in array { 54 | 55 | _ = json.responseID == nil ? callFromJS(json: json) :callbackFromJS(json: json) 56 | } 57 | return true 58 | } 59 | 60 | public func callFromJS(name: String, data: [String: String]?, callback: Callback?) -> Bool { 61 | let hander = bridges[name] 62 | if let hander = hander { 63 | hander(data, callback) 64 | } 65 | return true 66 | } 67 | 68 | public func callJS(name: String, data: [String: String]? = nil, callback: Callback? = nil) -> Bool { 69 | let json: CallbackJSON = CallbackJSON() 70 | 71 | json.name = name 72 | if let callback = callback { 73 | let callbackID = NSUUID().uuidString 74 | callbacks[callbackID] = callback 75 | json.callbackID = callbackID 76 | } 77 | 78 | if let data = data { 79 | json.data = data 80 | } 81 | let decoder = JSONEncoder() 82 | guard let rawdata = try? decoder.encode(json), let jsonString = String(data: rawdata, encoding: .utf8) else { 83 | return false 84 | } 85 | print(jsonString) 86 | return webview.evaluate(javascript: "window.SwiftJSBridge._callFromSwift(\'\(jsonString)\')") 87 | } 88 | 89 | func setHash() -> Bool { 90 | return webview.evaluate(javascript: "window.SwiftJSBridge._setHash(\"\(hash)\")") 91 | } 92 | 93 | func injectJS() -> Bool { 94 | return webview.evaluate(javascript: jsbrigeInject) 95 | } 96 | } 97 | 98 | extension SwiftJSBridge { 99 | 100 | func callbackFromJS(json: ResponseJSON) -> Bool { 101 | guard let responseID = json.responseID, let callback = callbacks[responseID] else { 102 | return false 103 | } 104 | callback(json.data) 105 | callbacks[responseID] = nil 106 | 107 | return true 108 | } 109 | 110 | func callFromJS(json: CallbackJSON) -> Bool { 111 | guard let name = json.name else { 112 | return false 113 | } 114 | var callback: Callback? 115 | if let callbackID = json.callbackID { 116 | 117 | callback = { [weak self] data in 118 | guard let `self` = self else { 119 | return 120 | } 121 | _ = self.callbackToJS(callbackID: callbackID,data: data) 122 | self.responseHandler[callbackID] = nil 123 | } 124 | responseHandler[callbackID] = callback 125 | } 126 | 127 | return callFromJS(name: name, data: json.data, callback: callback) 128 | } 129 | } 130 | 131 | extension SwiftJSBridge { 132 | public func callbackToJS(callbackID: String, data: [String: String]? = nil) -> Bool { 133 | let json: ResponseJSON = ResponseJSON() 134 | json.responseID = callbackID 135 | 136 | if let data = data { 137 | json.data = data 138 | } 139 | let decoder = JSONEncoder() 140 | guard let rawdata = try? decoder.encode(json), let jsonString = String(data: rawdata, encoding: .utf8) else { 141 | return false 142 | } 143 | 144 | return webview.evaluate(javascript: "window.SwiftJSBridge._callbackFromSwift(\'\(jsonString)\')") 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /JSBridgeKit/Classes/SwiftJSBridgeProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftJSBridgeProtocol.swift 3 | // Pods-SwiftJSBridge_Example 4 | // 5 | // Created by hhfa on 2018/6/23. 6 | // 7 | 8 | import Foundation 9 | 10 | public protocol WebView { 11 | func setup(setting: Dictionary) 12 | func evaluate(javascript: String) -> Bool 13 | func contentView() -> UIView 14 | func loadFileURL(url: URL) -> Bool 15 | } 16 | 17 | public typealias Callback = (_ responseData: [String:String]?) -> Void 18 | 19 | public typealias Bridge = (_ data: [String:String]?, _ callback: Callback?) -> Void 20 | 21 | public protocol SwiftJSBridgeProtocol { 22 | init(for webbiew: WebView) 23 | func addSwift(bridge: @escaping Bridge, name: String) -> Bool 24 | func callJS(name: String, data: [String: String]?, callback: Callback?) -> Bool 25 | } 26 | -------------------------------------------------------------------------------- /JSBridgeKit/Classes/UIWebViewJSBridge.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebViewJSBridge.swift 3 | // Pods-SwiftJSBridge_Example 4 | // 5 | // Created by hhfa on 2018/6/23. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Notification.Name { 11 | static let MessageFromWebview = Notification.Name("SwiftJSBridge".lowercased()) 12 | static let InjectMessageFromWebview = Notification.Name("SwiftJSBridgeInject".lowercased()) 13 | } 14 | 15 | extension Notification.Name { 16 | func post(object: Any? = nil, userInfo: [AnyHashable: Any]? = nil) { 17 | NotificationCenter.default.post(name: self, object: object, userInfo: userInfo) 18 | } 19 | 20 | func observer(object: Any? = nil, cb: @escaping (Notification) -> Void) { 21 | NotificationCenter.default.addObserver(forName: self, object: object, queue: .main) { notice in 22 | cb(notice) 23 | } 24 | } 25 | } 26 | 27 | @objc extension NSObject { 28 | static var jsBridgeKey = "AssociatedObjectWebView" 29 | @objc public var jsBridge: Any? { 30 | get { 31 | return objc_getAssociatedObject(self, &type(of: self).jsBridgeKey) 32 | } 33 | set(newValue) { 34 | objc_setAssociatedObject(self, &type(of: self).jsBridgeKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN) 35 | } 36 | } 37 | } 38 | 39 | protocol WebViewJSBridge { 40 | associatedtype WebView 41 | var baseBridge: SwiftJSBridge? { get } 42 | var webview: WebView? { get } 43 | init(for webview: WebView, with base: SwiftJSBridge) 44 | } 45 | 46 | class UIWebViewJSBridge: NSObject, WebViewJSBridge { 47 | weak var webview: UIWebView? 48 | var baseBridge: SwiftJSBridge? 49 | 50 | required init(for webview: UIWebView, with base: SwiftJSBridge) { 51 | self.webview = webview 52 | baseBridge = base 53 | super.init() 54 | URLProtocol.registerClass(JSBridgeURLProtocol.self) 55 | Notification.Name.MessageFromWebview.observer { [weak self] notification in 56 | guard let `self` = self else { 57 | return 58 | } 59 | let userInfo = notification.userInfo 60 | guard let url = userInfo?.values.first as? URL else { 61 | return 62 | } 63 | self.messageFromWebview(url: url) 64 | } 65 | 66 | Notification.Name.InjectMessageFromWebview.observer{ [weak self] notification in 67 | guard let `self` = self else { 68 | return 69 | } 70 | let userInfo = notification.userInfo 71 | guard let _ = userInfo?.values.first as? URL else { 72 | return 73 | } 74 | _ = self.baseBridge?.injectJS() 75 | } 76 | } 77 | 78 | func messageFromWebview(url: URL) { 79 | print(url) 80 | if let components = URLComponents(url: url, resolvingAgainstBaseURL: false) { 81 | if let dict = self.covert(url: components), let hash = dict["hash"] { 82 | if hash != baseBridge?.hash { 83 | return 84 | } 85 | } 86 | } 87 | let fetchQueue = webview?.stringByEvaluatingJavaScript(from: "SwiftJSBridge._fetchCommandQueue()") 88 | 89 | if let data = fetchQueue?.data(using: .utf8) { 90 | _ = baseBridge?.callFromJS(data: data) 91 | } 92 | } 93 | 94 | func covert(url: URLComponents) -> [String: String]? { 95 | guard let queryItems = url.queryItems else { 96 | return nil 97 | } 98 | 99 | var dict = [String: String]() 100 | 101 | for i in queryItems { 102 | // print(i.name + i.value!) 103 | dict[i.name] = i.value 104 | } 105 | return dict 106 | } 107 | } 108 | 109 | class JSBridgeURLProtocol: URLProtocol { 110 | open override class func canInit(with request: URLRequest) -> Bool { 111 | guard let url = request.url else { 112 | return false 113 | } 114 | guard let host = url.host, (host.lowercased().hasSuffix("SwiftJSBridge".lowercased())) else { 115 | return false 116 | } 117 | 118 | DispatchQueue.main.async { 119 | Notification.Name(host.lowercased()).post(userInfo: ["url": url]) 120 | } 121 | 122 | return true 123 | } 124 | 125 | open override func startLoading() { 126 | client?.urlProtocol(self, didReceive: URLResponse(), cacheStoragePolicy: URLCache.StoragePolicy.notAllowed) 127 | client?.urlProtocolDidFinishLoading(self) 128 | } 129 | 130 | open override class func canonicalRequest(for request: URLRequest) -> URLRequest { 131 | return URLRequest(url: request.url!, cachePolicy: URLRequest.CachePolicy.reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 1) 132 | } 133 | 134 | open override class func requestIsCacheEquivalent(_: URLRequest, to _: URLRequest) -> Bool { 135 | return false 136 | } 137 | 138 | open override func stopLoading() { 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /JSBridgeKit/Classes/WebKitJSBridge.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebKitJSBrige.swift 3 | // Pods-SwiftJSBridge_Example 4 | // 5 | // Created by hhfa on 2018/6/23. 6 | // 7 | 8 | import Foundation 9 | import WebKit 10 | 11 | class WebKitJSBridge: NSObject, WKScriptMessageHandler, WebViewJSBridge { 12 | var baseBridge: SwiftJSBridge? 13 | 14 | required init(for webview: WKWebView, with base: SwiftJSBridge) { 15 | self.webview = webview 16 | baseBridge = base 17 | super.init() 18 | } 19 | 20 | weak var webview: WKWebView? 21 | 22 | func userContentController(_: WKUserContentController, didReceive message: WKScriptMessage) { 23 | 24 | let name = message.name 25 | 26 | if name == "SwiftJSBridgeInject" { 27 | _ = baseBridge?.injectJS() 28 | return 29 | } 30 | 31 | let body = message.body 32 | print(name) 33 | print(body) 34 | if let data = try? JSONSerialization.data(withJSONObject: body, options: .prettyPrinted) { 35 | _ = baseBridge?.callFromJS(data: data) 36 | } 37 | } 38 | 39 | deinit { 40 | print("deinit WebKitJSBridge") 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /JSBridgeKit/Classes/WebView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebView.swift 3 | // Pods-SwiftJSBridge_Example 4 | // 5 | // Created by hhfa on 2018/6/23. 6 | // 7 | 8 | import Foundation 9 | import WebKit 10 | 11 | extension WKWebView: WebView { 12 | public func loadFileURL(url: URL) -> Bool { 13 | let readAccessUrl = url.deletingLastPathComponent() 14 | 15 | if #available(iOS 9.0, *) { 16 | self.loadFileURL(url, allowingReadAccessTo: readAccessUrl) 17 | } else { 18 | // Fallback on earlier versions 19 | } 20 | return true 21 | } 22 | 23 | public func contentView() -> UIView { 24 | return self 25 | } 26 | 27 | public func setup(setting: Dictionary) { 28 | guard let base = setting["base"] as? SwiftJSBridge else { 29 | return 30 | } 31 | let config = configuration 32 | let bridge = WebKitJSBridge(for: self, with: base) 33 | config.userContentController.add(bridge, name: "SwiftJSBridge") 34 | config.userContentController.add(bridge, name: "SwiftJSBridgeInject") 35 | jsBridge = bridge 36 | // self.configuration = config 37 | } 38 | 39 | public func evaluate(javascript: String) -> Bool { 40 | evaluateJavaScript(javascript) 41 | return true 42 | } 43 | } 44 | 45 | extension UIWebView: WebView { 46 | public func loadFileURL(url: URL) -> Bool { 47 | let req = URLRequest(url: url) 48 | loadRequest(req) 49 | // if #available(iOS 9.0, *) { 50 | // webview?.loadFileURL(file, allowingReadAccessTo: readAccessUrl) 51 | // } else { 52 | // // Fallback on earlier versions 53 | // } 54 | return true 55 | } 56 | 57 | public func contentView() -> UIView { 58 | return self 59 | } 60 | 61 | public func setup(setting: Dictionary) { 62 | guard let base = setting["base"] as? SwiftJSBridge else { 63 | return 64 | } 65 | 66 | jsBridge = UIWebViewJSBridge(for: self, with: base) 67 | } 68 | 69 | public func evaluate(javascript: String) -> Bool { 70 | print("javascript:" + javascript) 71 | stringByEvaluatingJavaScript(from: javascript) 72 | return true 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 hhfa008 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwiftJSBridge 2 | 3 | SwiftJSBridge is a handy JavaScript Bridge, written in Swift, support WKWebView and UIWebView 4 | 5 | 6 | 7 | ## Example 8 | 1. Swift 9 | ```swift 10 | let JSBridge = SwiftJSBridge(for: webview) 11 | JSBridge.addSwift(bridge: { (data, cb) in 12 | cb?(["appVersion":"1.0"]) 13 | }, name: "getAppVersion") 14 | 15 | JSBridge?.callJS(name: "sendMessageToJS", data: ["message":"Hi, I am native"]) { (data) in 16 | 17 | } 18 | 19 | ``` 20 | 2. JS 21 | 22 | ``` JS 23 | function setupSwiftJSBridge(callback) { 24 | if (window.SwiftJSBridge) { return callback(SwiftJSBridge); } 25 | if (window.SwiftJSBridgeReadyCallbacks) { return window.SwiftJSBridgeReadyCallbacks.push(callback); } 26 | window.SwiftJSBridgeReadyCallbacks = [callback]; 27 | SwiftJSBridgeInject() 28 | } 29 | 30 | function isWebKit() { 31 | return window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.SwiftJSBridgeInject; 32 | } 33 | 34 | function SwiftJSBridgeInject() { 35 | console.log("SwiftJSBridgeInject" ) 36 | if (isWebKit()) { 37 | window.webkit.messageHandlers.SwiftJSBridgeInject.postMessage("SwiftJSBridgeInject") 38 | } else { 39 | var src = "https://SwiftJSBridgeInject/" + Math.random() 40 | var req = new XMLHttpRequest 41 | req.open("GET", src) 42 | req.send() 43 | } 44 | } 45 | 46 | setupSwiftJSBridge(function(bridge) { 47 | function log(message, data) { 48 | console.log(message+data) 49 | } 50 | 51 | bridge.addJSBridge('sendMessageToJS', function(data, responseCallback) { 52 | log('Native called sendMessageToJS with', data) 53 | var responseData = { message:'Hi, I am JS' } 54 | log('JS responding with', responseData) 55 | responseCallback(responseData) 56 | }) 57 | }) 58 | function test() { 59 | 60 | SwiftJSBridge.callNativeBridge("getAppVersion",{"data":"v1"},function(data){ 61 | console.log("callback") 62 | console.log(data) 63 | }) 64 | 65 | 66 | } 67 | ``` 68 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 69 | 70 | ## Requirements 71 | 72 | ## Installation 73 | 74 | SwiftJSBridge is available through [CocoaPods](https://cocoapods.org). To install 75 | it, simply add the following line to your Podfile: 76 | 77 | ```ruby 78 | pod 'JSBridgeKit' 79 | ``` 80 | 81 | ## Author 82 | 83 | hhfa008, hhfa008@gmail.com 84 | 85 | ## License 86 | 87 | SwiftJSBridge is available under the MIT license. See the LICENSE file for more info. 88 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------