Skip to content

Commit 2dfb9c4

Browse files
author
pmaccamp
committed
2 parents cdc1779 + 903ec06 commit 2dfb9c4

11 files changed

Lines changed: 45 additions & 89 deletions

File tree

.travis.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

Example Apps/ExampleApp-iOS.xcodeproj/project.pbxproj

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
2CA0465C1711AC8E006DEE8B /* ExampleApp.html in Resources */ = {isa = PBXBuildFile; fileRef = 2CA0465B1711AC8D006DEE8B /* ExampleApp.html */; };
2121
2CAB869B1727684300BD9ED1 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CAB869A1727684300BD9ED1 /* Default-568h@2x.png */; };
2222
2CEB3EC01602563600548120 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CEB3EBF1602563600548120 /* UIKit.framework */; };
23-
6529BCFA17DEACD6F9C2E820 /* Pods_ExampleApp_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 495C20DD246029C0B2405EC9 /* Pods_ExampleApp_iOS.framework */; };
2423
/* End PBXBuildFile section */
2524

2625
/* Begin PBXFileReference section */
@@ -49,9 +48,6 @@
4948
2CEB3EBF1602563600548120 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
5049
2CEB3EC11602563600548120 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
5150
2CEB3EC31602563600548120 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
52-
495C20DD246029C0B2405EC9 /* Pods_ExampleApp_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExampleApp_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
53-
4BCA4425A9554AF93A944458 /* Pods-ExampleApp-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleApp-iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ExampleApp-iOS/Pods-ExampleApp-iOS.debug.xcconfig"; sourceTree = "<group>"; };
54-
E4F0C608003752F273BB146F /* Pods-ExampleApp-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleApp-iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-ExampleApp-iOS/Pods-ExampleApp-iOS.release.xcconfig"; sourceTree = "<group>"; };
5551
/* End PBXFileReference section */
5652

5753
/* Begin PBXFrameworksBuildPhase section */
@@ -61,7 +57,6 @@
6157
files = (
6258
0E4E9D4C1A101E0B00043087 /* WebKit.framework in Frameworks */,
6359
2CEB3EC01602563600548120 /* UIKit.framework in Frameworks */,
64-
6529BCFA17DEACD6F9C2E820 /* Pods_ExampleApp_iOS.framework in Frameworks */,
6560
);
6661
runOnlyForDeploymentPostprocessing = 0;
6762
};
@@ -137,16 +132,13 @@
137132
2CEB3EBF1602563600548120 /* UIKit.framework */,
138133
2CEB3EC11602563600548120 /* Foundation.framework */,
139134
2CEB3EC31602563600548120 /* CoreGraphics.framework */,
140-
495C20DD246029C0B2405EC9 /* Pods_ExampleApp_iOS.framework */,
141135
);
142136
name = Frameworks;
143137
sourceTree = "<group>";
144138
};
145139
81A733051B2F9C5795D856E4 /* Pods */ = {
146140
isa = PBXGroup;
147141
children = (
148-
4BCA4425A9554AF93A944458 /* Pods-ExampleApp-iOS.debug.xcconfig */,
149-
E4F0C608003752F273BB146F /* Pods-ExampleApp-iOS.release.xcconfig */,
150142
);
151143
name = Pods;
152144
sourceTree = "<group>";
@@ -158,12 +150,9 @@
158150
isa = PBXNativeTarget;
159151
buildConfigurationList = 2CEB3ED31602563600548120 /* Build configuration list for PBXNativeTarget "ExampleApp-iOS" */;
160152
buildPhases = (
161-
953B195B62A37FA474FD95D5 /* [CP] Check Pods Manifest.lock */,
162153
2CEB3EB71602563600548120 /* Sources */,
163154
2CEB3EB81602563600548120 /* Frameworks */,
164155
2CEB3EB91602563600548120 /* Resources */,
165-
A9D6EE0CEB388638298EBC18 /* [CP] Embed Pods Frameworks */,
166-
7E64B37A61F02883676CA89F /* [CP] Copy Pods Resources */,
167156
);
168157
buildRules = (
169158
);
@@ -218,54 +207,6 @@
218207
};
219208
/* End PBXResourcesBuildPhase section */
220209

221-
/* Begin PBXShellScriptBuildPhase section */
222-
7E64B37A61F02883676CA89F /* [CP] Copy Pods Resources */ = {
223-
isa = PBXShellScriptBuildPhase;
224-
buildActionMask = 2147483647;
225-
files = (
226-
);
227-
inputPaths = (
228-
);
229-
name = "[CP] Copy Pods Resources";
230-
outputPaths = (
231-
);
232-
runOnlyForDeploymentPostprocessing = 0;
233-
shellPath = /bin/sh;
234-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ExampleApp-iOS/Pods-ExampleApp-iOS-resources.sh\"\n";
235-
showEnvVarsInLog = 0;
236-
};
237-
953B195B62A37FA474FD95D5 /* [CP] Check Pods Manifest.lock */ = {
238-
isa = PBXShellScriptBuildPhase;
239-
buildActionMask = 2147483647;
240-
files = (
241-
);
242-
inputPaths = (
243-
);
244-
name = "[CP] Check Pods Manifest.lock";
245-
outputPaths = (
246-
);
247-
runOnlyForDeploymentPostprocessing = 0;
248-
shellPath = /bin/sh;
249-
shellScript = "diff \"${PODS_ROOT}/../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";
250-
showEnvVarsInLog = 0;
251-
};
252-
A9D6EE0CEB388638298EBC18 /* [CP] Embed Pods Frameworks */ = {
253-
isa = PBXShellScriptBuildPhase;
254-
buildActionMask = 2147483647;
255-
files = (
256-
);
257-
inputPaths = (
258-
);
259-
name = "[CP] Embed Pods Frameworks";
260-
outputPaths = (
261-
);
262-
runOnlyForDeploymentPostprocessing = 0;
263-
shellPath = /bin/sh;
264-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ExampleApp-iOS/Pods-ExampleApp-iOS-frameworks.sh\"\n";
265-
showEnvVarsInLog = 0;
266-
};
267-
/* End PBXShellScriptBuildPhase section */
268-
269210
/* Begin PBXSourcesBuildPhase section */
270211
2CEB3EB71602563600548120 /* Sources */ = {
271212
isa = PBXSourcesBuildPhase;
@@ -373,7 +314,6 @@
373314
};
374315
2CEB3ED41602563600548120 /* Debug */ = {
375316
isa = XCBuildConfiguration;
376-
baseConfigurationReference = 4BCA4425A9554AF93A944458 /* Pods-ExampleApp-iOS.debug.xcconfig */;
377317
buildSettings = {
378318
CLANG_ENABLE_MODULES = YES;
379319
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -391,7 +331,6 @@
391331
};
392332
2CEB3ED51602563600548120 /* Release */ = {
393333
isa = XCBuildConfiguration;
394-
baseConfigurationReference = E4F0C608003752F273BB146F /* Pods-ExampleApp-iOS.release.xcconfig */;
395334
buildSettings = {
396335
CLANG_ENABLE_MODULES = YES;
397336
GCC_PRECOMPILE_PREFIX_HEADER = YES;

Example Apps/ExampleSwiftApp-iOS/ExampleSwiftApp-iOS.xcodeproj/project.pbxproj

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,12 @@
188188
TargetAttributes = {
189189
2CF20A941E12BB3F00D3009D = {
190190
CreatedOnToolsVersion = 8.2.1;
191+
LastSwiftMigration = 0910;
191192
ProvisioningStyle = Automatic;
192193
};
193194
2CF20AA81E12BB3F00D3009D = {
194195
CreatedOnToolsVersion = 8.2.1;
196+
LastSwiftMigration = 0910;
195197
ProvisioningStyle = Automatic;
196198
TestTargetID = 2CF20A941E12BB3F00D3009D;
197199
};
@@ -481,7 +483,8 @@
481483
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
482484
PRODUCT_BUNDLE_IDENTIFIER = "in.marcuswest.ExampleSwiftApp-iOS";
483485
PRODUCT_NAME = "$(TARGET_NAME)";
484-
SWIFT_VERSION = 3.0;
486+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
487+
SWIFT_VERSION = 4.0;
485488
};
486489
name = Debug;
487490
};
@@ -494,7 +497,8 @@
494497
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
495498
PRODUCT_BUNDLE_IDENTIFIER = "in.marcuswest.ExampleSwiftApp-iOS";
496499
PRODUCT_NAME = "$(TARGET_NAME)";
497-
SWIFT_VERSION = 3.0;
500+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
501+
SWIFT_VERSION = 4.0;
498502
};
499503
name = Release;
500504
};
@@ -507,7 +511,8 @@
507511
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
508512
PRODUCT_BUNDLE_IDENTIFIER = "in.marcuswest.ExampleSwiftApp-iOSTests";
509513
PRODUCT_NAME = "$(TARGET_NAME)";
510-
SWIFT_VERSION = 3.0;
514+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
515+
SWIFT_VERSION = 4.0;
511516
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ExampleSwiftApp-iOS.app/ExampleSwiftApp-iOS";
512517
};
513518
name = Debug;
@@ -521,7 +526,8 @@
521526
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
522527
PRODUCT_BUNDLE_IDENTIFIER = "in.marcuswest.ExampleSwiftApp-iOSTests";
523528
PRODUCT_NAME = "$(TARGET_NAME)";
524-
SWIFT_VERSION = 3.0;
529+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
530+
SWIFT_VERSION = 4.0;
525531
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ExampleSwiftApp-iOS.app/ExampleSwiftApp-iOS";
526532
};
527533
name = Release;

Example Apps/ExampleSwiftApp-iOS/ExampleSwiftApp-iOSTests/ExampleSwiftApp_iOSTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ExampleSwiftApp_iOSTests: XCTestCase {
6666
}
6767
func _testSetup(webView: Any) {
6868
let setup = self.expectation(description: "Setup completed")
69-
let bridge = self.bridgeForWebView(webView: webView)
69+
let bridge = self.bridgeForWebView(webView)
7070
bridge.registerHandler("Greet") { (data, responseCallback) in
7171
XCTAssertEqual(data as! String, "Hello world")
7272
setup.fulfill()

Makefile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
test:
22
xcodebuild test -project Tests/WebViewJavascriptBridge.xcodeproj -scheme WebViewJavascriptBridge \
3-
-destination 'platform=iOS Simulator,name=iPhone 7'
3+
-destination 'platform=iOS Simulator,name=iPhone 8'
44
xcodebuild test -workspace Example\ Apps/ExampleSwiftApp-iOS/ExampleSwiftApp-iOS.xcworkspace -scheme ExampleSwiftApp-iOS \
5-
-destination 'platform=iOS Simulator,name=iPhone 7'
5+
-destination 'platform=iOS Simulator,name=iPhone 8'
66

7-
test-travis-ci:
7+
test-many:
88
xcodebuild test -project Tests/WebViewJavascriptBridge.xcodeproj -scheme WebViewJavascriptBridge \
9-
-destination 'platform=iOS Simulator,name=iPhone 5s,OS=8.4' \
10-
-destination 'platform=iOS Simulator,name=iPhone 6s,OS=9.3' \
11-
-destination 'platform=iOS Simulator,name=iPhone 7,OS=10.1'
9+
-destination 'platform=iOS Simulator,name=iPhone 6' \
10+
-destination 'platform=iOS Simulator,name=iPhone 7' \
11+
-destination 'platform=iOS Simulator,name=iPhone 8'
1212

1313
test-circle-ci:
1414
xcodebuild test -project Tests/WebViewJavascriptBridge.xcodeproj -scheme WebViewJavascriptBridge \
15-
-destination 'platform=iOS Simulator,name=iPhone 5s,OS=8.4' \
16-
-destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' \
17-
-destination 'platform=iOS Simulator,name=iPhone 6s,OS=10.1'
18-
15+
-destination 'platform=iOS Simulator,name=iPhone 7,OS=10.3.1' \
16+
-destination 'platform=iOS Simulator,name=iPhone X,OS=11.0.1'
17+
1918

2019
publish-pod:
2120
# pod trunk register narcvs@gmail.com 'Marcus Westin' --description='MBA/MBP-xyz'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Installation (iOS & OSX)
3737
Add this to your [podfile](https://guides.cocoapods.org/using/getting-started.html) and run `pod install` to install:
3838

3939
```ruby
40-
`pod 'WebViewJavascriptBridge', '~> 5.0'`
40+
pod 'WebViewJavascriptBridge', '~> 6.0'
4141
```
4242

4343
### Manual installation

Tests/WebViewJavascriptBridge.xcodeproj/project.pbxproj

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,12 @@
205205
3D0FE4621AE2886400BB4104 /* Project object */ = {
206206
isa = PBXProject;
207207
attributes = {
208-
LastUpgradeCheck = 0820;
208+
LastUpgradeCheck = 0900;
209209
ORGANIZATIONNAME = marcuswestin;
210210
TargetAttributes = {
211211
3D0FE4741AE2886500BB4104 = {
212212
CreatedOnToolsVersion = 6.3;
213-
LastSwiftMigration = 0820;
213+
LastSwiftMigration = 0900;
214214
TestTargetID = 3DCCF7D51AE28C2900CE7C51;
215215
};
216216
3DCCF7D51AE28C2900CE7C51 = {
@@ -298,14 +298,20 @@
298298
CLANG_CXX_LIBRARY = "libc++";
299299
CLANG_ENABLE_MODULES = YES;
300300
CLANG_ENABLE_OBJC_ARC = YES;
301+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
301302
CLANG_WARN_BOOL_CONVERSION = YES;
303+
CLANG_WARN_COMMA = YES;
302304
CLANG_WARN_CONSTANT_CONVERSION = YES;
303305
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
304306
CLANG_WARN_EMPTY_BODY = YES;
305307
CLANG_WARN_ENUM_CONVERSION = YES;
306308
CLANG_WARN_INFINITE_RECURSION = YES;
307309
CLANG_WARN_INT_CONVERSION = YES;
310+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
311+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
308312
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
313+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
314+
CLANG_WARN_STRICT_PROTOTYPES = YES;
309315
CLANG_WARN_SUSPICIOUS_MOVE = YES;
310316
CLANG_WARN_UNREACHABLE_CODE = YES;
311317
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -343,14 +349,20 @@
343349
CLANG_CXX_LIBRARY = "libc++";
344350
CLANG_ENABLE_MODULES = YES;
345351
CLANG_ENABLE_OBJC_ARC = YES;
352+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
346353
CLANG_WARN_BOOL_CONVERSION = YES;
354+
CLANG_WARN_COMMA = YES;
347355
CLANG_WARN_CONSTANT_CONVERSION = YES;
348356
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
349357
CLANG_WARN_EMPTY_BODY = YES;
350358
CLANG_WARN_ENUM_CONVERSION = YES;
351359
CLANG_WARN_INFINITE_RECURSION = YES;
352360
CLANG_WARN_INT_CONVERSION = YES;
361+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
362+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
353363
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
364+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
365+
CLANG_WARN_STRICT_PROTOTYPES = YES;
354366
CLANG_WARN_SUSPICIOUS_MOVE = YES;
355367
CLANG_WARN_UNREACHABLE_CODE = YES;
356368
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -390,7 +402,8 @@
390402
PRODUCT_NAME = "$(TARGET_NAME)";
391403
SWIFT_OBJC_BRIDGING_HEADER = "WebViewJavascriptBridgeTests/WebViewJavascriptBridgeTests-Bridging-Header.h";
392404
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
393-
SWIFT_VERSION = 3.0;
405+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
406+
SWIFT_VERSION = 4.0;
394407
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WebViewJavascriptBridgeTestHost.app/WebViewJavascriptBridgeTestHost";
395408
};
396409
name = Debug;
@@ -406,7 +419,8 @@
406419
PRODUCT_BUNDLE_IDENTIFIER = "in.marcuswestin.WebViewJavascriptBridge.$(PRODUCT_NAME:rfc1034identifier)";
407420
PRODUCT_NAME = "$(TARGET_NAME)";
408421
SWIFT_OBJC_BRIDGING_HEADER = "WebViewJavascriptBridgeTests/WebViewJavascriptBridgeTests-Bridging-Header.h";
409-
SWIFT_VERSION = 3.0;
422+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
423+
SWIFT_VERSION = 4.0;
410424
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WebViewJavascriptBridgeTestHost.app/WebViewJavascriptBridgeTestHost";
411425
};
412426
name = Release;

Tests/WebViewJavascriptBridge.xcodeproj/xcshareddata/xcschemes/WebViewJavascriptBridge.xcscheme

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0820"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -40,6 +40,7 @@
4040
buildConfiguration = "Debug"
4141
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4242
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43+
language = ""
4344
shouldUseLaunchSchemeArgsEnv = "YES">
4445
<Testables>
4546
<TestableReference
@@ -69,6 +70,7 @@
6970
buildConfiguration = "Debug"
7071
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
7172
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
73+
language = ""
7274
launchStyle = "0"
7375
useCustomWorkingDirectory = "NO"
7476
ignoresPersistentStateOnLaunch = "NO"

WebViewJavascriptBridge.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'WebViewJavascriptBridge'
3-
s.version = '6.0.2'
3+
s.version = '6.0.3'
44
s.summary = 'An iOS & OSX bridge for sending messages between Obj-C/Swift and JavaScript in WKWebViews, UIWebViews & WebViews.'
55
s.homepage = 'https://github.com/marcuswestin/WebViewJavascriptBridge'
66
s.license = { :type => 'MIT', :file => 'LICENSE' }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#import <Foundation/Foundation.h>
22

3-
NSString * WebViewJavascriptBridge_js();
3+
NSString * WebViewJavascriptBridge_js(void);

0 commit comments

Comments
 (0)