Skip to content

Commit 56e4be0

Browse files
committed
Make it simpler to setup the bridge - just copy in a single directory as oppposed to three files
1 parent cc2bb08 commit 56e4be0

File tree

13 files changed

+343
-332
lines changed

13 files changed

+343
-332
lines changed
Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
2CEB3EC01602563600548120 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CEB3EBF1602563600548120 /* UIKit.framework */; };
11+
2CEB3EC21602563600548120 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CEB3EC11602563600548120 /* Foundation.framework */; };
12+
2CEB3EC41602563600548120 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CEB3EC31602563600548120 /* CoreGraphics.framework */; };
13+
2CEB3ECA1602563600548120 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2CEB3EC81602563600548120 /* InfoPlist.strings */; };
14+
2CEB3ECC1602563600548120 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CEB3ECB1602563600548120 /* main.m */; };
15+
2CEB3ED01602563600548120 /* ExampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CEB3ECF1602563600548120 /* ExampleAppDelegate.m */; };
16+
2CEB3F5216025A4E00548120 /* WebViewJavascriptBridge.js.txt in Resources */ = {isa = PBXBuildFile; fileRef = 2CEB3F5016025A4E00548120 /* WebViewJavascriptBridge.js.txt */; };
17+
2CEB3F5316025A4E00548120 /* WebViewJavascriptBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CEB3F5116025A4E00548120 /* WebViewJavascriptBridge.m */; };
18+
2CEB3F5516025A9000548120 /* ExampleApp.html in Resources */ = {isa = PBXBuildFile; fileRef = 2CEB3F5416025A9000548120 /* ExampleApp.html */; };
19+
/* End PBXBuildFile section */
20+
21+
/* Begin PBXFileReference section */
22+
2CEB3EBB1602563600548120 /* ExampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ExampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
23+
2CEB3EBF1602563600548120 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
24+
2CEB3EC11602563600548120 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
25+
2CEB3EC31602563600548120 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
26+
2CEB3EC71602563600548120 /* ExampleApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ExampleApp-Info.plist"; sourceTree = "<group>"; };
27+
2CEB3EC91602563600548120 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
28+
2CEB3ECB1602563600548120 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29+
2CEB3ECD1602563600548120 /* ExampleApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ExampleApp-Prefix.pch"; sourceTree = "<group>"; };
30+
2CEB3ECE1602563600548120 /* ExampleAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExampleAppDelegate.h; sourceTree = "<group>"; };
31+
2CEB3ECF1602563600548120 /* ExampleAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleAppDelegate.m; sourceTree = "<group>"; };
32+
2CEB3F4F16025A4E00548120 /* WebViewJavascriptBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewJavascriptBridge.h; sourceTree = "<group>"; };
33+
2CEB3F5016025A4E00548120 /* WebViewJavascriptBridge.js.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebViewJavascriptBridge.js.txt; sourceTree = "<group>"; };
34+
2CEB3F5116025A4E00548120 /* WebViewJavascriptBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewJavascriptBridge.m; sourceTree = "<group>"; };
35+
2CEB3F5416025A9000548120 /* ExampleApp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ExampleApp.html; sourceTree = "<group>"; };
36+
/* End PBXFileReference section */
37+
38+
/* Begin PBXFrameworksBuildPhase section */
39+
2CEB3EB81602563600548120 /* Frameworks */ = {
40+
isa = PBXFrameworksBuildPhase;
41+
buildActionMask = 2147483647;
42+
files = (
43+
2CEB3EC01602563600548120 /* UIKit.framework in Frameworks */,
44+
2CEB3EC21602563600548120 /* Foundation.framework in Frameworks */,
45+
2CEB3EC41602563600548120 /* CoreGraphics.framework in Frameworks */,
46+
);
47+
runOnlyForDeploymentPostprocessing = 0;
48+
};
49+
/* End PBXFrameworksBuildPhase section */
50+
51+
/* Begin PBXGroup section */
52+
2CEB3EB01602563600548120 = {
53+
isa = PBXGroup;
54+
children = (
55+
2CEB3EC51602563600548120 /* ExampleApp */,
56+
2CEB3EBE1602563600548120 /* Frameworks */,
57+
2CEB3EBC1602563600548120 /* Products */,
58+
);
59+
sourceTree = "<group>";
60+
};
61+
2CEB3EBC1602563600548120 /* Products */ = {
62+
isa = PBXGroup;
63+
children = (
64+
2CEB3EBB1602563600548120 /* ExampleApp.app */,
65+
);
66+
name = Products;
67+
sourceTree = "<group>";
68+
};
69+
2CEB3EBE1602563600548120 /* Frameworks */ = {
70+
isa = PBXGroup;
71+
children = (
72+
2CEB3EBF1602563600548120 /* UIKit.framework */,
73+
2CEB3EC11602563600548120 /* Foundation.framework */,
74+
2CEB3EC31602563600548120 /* CoreGraphics.framework */,
75+
);
76+
name = Frameworks;
77+
sourceTree = "<group>";
78+
};
79+
2CEB3EC51602563600548120 /* ExampleApp */ = {
80+
isa = PBXGroup;
81+
children = (
82+
2CEB3ECE1602563600548120 /* ExampleAppDelegate.h */,
83+
2CEB3ECF1602563600548120 /* ExampleAppDelegate.m */,
84+
2CEB3F5416025A9000548120 /* ExampleApp.html */,
85+
2CEB3F4E16025A4E00548120 /* WebViewJavascriptBridge */,
86+
2CEB3EC61602563600548120 /* Supporting Files */,
87+
);
88+
path = ExampleApp;
89+
sourceTree = "<group>";
90+
};
91+
2CEB3EC61602563600548120 /* Supporting Files */ = {
92+
isa = PBXGroup;
93+
children = (
94+
2CEB3EC71602563600548120 /* ExampleApp-Info.plist */,
95+
2CEB3EC81602563600548120 /* InfoPlist.strings */,
96+
2CEB3ECB1602563600548120 /* main.m */,
97+
2CEB3ECD1602563600548120 /* ExampleApp-Prefix.pch */,
98+
);
99+
name = "Supporting Files";
100+
sourceTree = "<group>";
101+
};
102+
2CEB3F4E16025A4E00548120 /* WebViewJavascriptBridge */ = {
103+
isa = PBXGroup;
104+
children = (
105+
2CEB3F4F16025A4E00548120 /* WebViewJavascriptBridge.h */,
106+
2CEB3F5016025A4E00548120 /* WebViewJavascriptBridge.js.txt */,
107+
2CEB3F5116025A4E00548120 /* WebViewJavascriptBridge.m */,
108+
);
109+
path = WebViewJavascriptBridge;
110+
sourceTree = SOURCE_ROOT;
111+
};
112+
/* End PBXGroup section */
113+
114+
/* Begin PBXNativeTarget section */
115+
2CEB3EBA1602563600548120 /* ExampleApp */ = {
116+
isa = PBXNativeTarget;
117+
buildConfigurationList = 2CEB3ED31602563600548120 /* Build configuration list for PBXNativeTarget "ExampleApp" */;
118+
buildPhases = (
119+
2CEB3EB71602563600548120 /* Sources */,
120+
2CEB3EB81602563600548120 /* Frameworks */,
121+
2CEB3EB91602563600548120 /* Resources */,
122+
);
123+
buildRules = (
124+
);
125+
dependencies = (
126+
);
127+
name = ExampleApp;
128+
productName = ExampleApp;
129+
productReference = 2CEB3EBB1602563600548120 /* ExampleApp.app */;
130+
productType = "com.apple.product-type.application";
131+
};
132+
/* End PBXNativeTarget section */
133+
134+
/* Begin PBXProject section */
135+
2CEB3EB21602563600548120 /* Project object */ = {
136+
isa = PBXProject;
137+
attributes = {
138+
LastUpgradeCheck = 0450;
139+
ORGANIZATIONNAME = "Marcus Westin";
140+
};
141+
buildConfigurationList = 2CEB3EB51602563600548120 /* Build configuration list for PBXProject "ExampleApp" */;
142+
compatibilityVersion = "Xcode 3.2";
143+
developmentRegion = English;
144+
hasScannedForEncodings = 0;
145+
knownRegions = (
146+
en,
147+
);
148+
mainGroup = 2CEB3EB01602563600548120;
149+
productRefGroup = 2CEB3EBC1602563600548120 /* Products */;
150+
projectDirPath = "";
151+
projectRoot = "";
152+
targets = (
153+
2CEB3EBA1602563600548120 /* ExampleApp */,
154+
);
155+
};
156+
/* End PBXProject section */
157+
158+
/* Begin PBXResourcesBuildPhase section */
159+
2CEB3EB91602563600548120 /* Resources */ = {
160+
isa = PBXResourcesBuildPhase;
161+
buildActionMask = 2147483647;
162+
files = (
163+
2CEB3ECA1602563600548120 /* InfoPlist.strings in Resources */,
164+
2CEB3F5216025A4E00548120 /* WebViewJavascriptBridge.js.txt in Resources */,
165+
2CEB3F5516025A9000548120 /* ExampleApp.html in Resources */,
166+
);
167+
runOnlyForDeploymentPostprocessing = 0;
168+
};
169+
/* End PBXResourcesBuildPhase section */
170+
171+
/* Begin PBXSourcesBuildPhase section */
172+
2CEB3EB71602563600548120 /* Sources */ = {
173+
isa = PBXSourcesBuildPhase;
174+
buildActionMask = 2147483647;
175+
files = (
176+
2CEB3ECC1602563600548120 /* main.m in Sources */,
177+
2CEB3ED01602563600548120 /* ExampleAppDelegate.m in Sources */,
178+
2CEB3F5316025A4E00548120 /* WebViewJavascriptBridge.m in Sources */,
179+
);
180+
runOnlyForDeploymentPostprocessing = 0;
181+
};
182+
/* End PBXSourcesBuildPhase section */
183+
184+
/* Begin PBXVariantGroup section */
185+
2CEB3EC81602563600548120 /* InfoPlist.strings */ = {
186+
isa = PBXVariantGroup;
187+
children = (
188+
2CEB3EC91602563600548120 /* en */,
189+
);
190+
name = InfoPlist.strings;
191+
sourceTree = "<group>";
192+
};
193+
/* End PBXVariantGroup section */
194+
195+
/* Begin XCBuildConfiguration section */
196+
2CEB3ED11602563600548120 /* Debug */ = {
197+
isa = XCBuildConfiguration;
198+
buildSettings = {
199+
ALWAYS_SEARCH_USER_PATHS = NO;
200+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
201+
CLANG_CXX_LIBRARY = "libc++";
202+
CLANG_ENABLE_OBJC_ARC = YES;
203+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
204+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
205+
COPY_PHASE_STRIP = NO;
206+
GCC_C_LANGUAGE_STANDARD = gnu99;
207+
GCC_DYNAMIC_NO_PIC = NO;
208+
GCC_OPTIMIZATION_LEVEL = 0;
209+
GCC_PREPROCESSOR_DEFINITIONS = (
210+
"DEBUG=1",
211+
"$(inherited)",
212+
);
213+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
214+
GCC_WARN_ABOUT_RETURN_TYPE = YES;
215+
GCC_WARN_UNINITIALIZED_AUTOS = YES;
216+
GCC_WARN_UNUSED_VARIABLE = YES;
217+
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
218+
SDKROOT = iphoneos;
219+
};
220+
name = Debug;
221+
};
222+
2CEB3ED21602563600548120 /* Release */ = {
223+
isa = XCBuildConfiguration;
224+
buildSettings = {
225+
ALWAYS_SEARCH_USER_PATHS = NO;
226+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
227+
CLANG_CXX_LIBRARY = "libc++";
228+
CLANG_ENABLE_OBJC_ARC = YES;
229+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
230+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
231+
COPY_PHASE_STRIP = YES;
232+
GCC_C_LANGUAGE_STANDARD = gnu99;
233+
GCC_WARN_ABOUT_RETURN_TYPE = YES;
234+
GCC_WARN_UNINITIALIZED_AUTOS = YES;
235+
GCC_WARN_UNUSED_VARIABLE = YES;
236+
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
237+
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
238+
SDKROOT = iphoneos;
239+
VALIDATE_PRODUCT = YES;
240+
};
241+
name = Release;
242+
};
243+
2CEB3ED41602563600548120 /* Debug */ = {
244+
isa = XCBuildConfiguration;
245+
buildSettings = {
246+
GCC_PRECOMPILE_PREFIX_HEADER = YES;
247+
GCC_PREFIX_HEADER = "ExampleApp/ExampleApp-Prefix.pch";
248+
INFOPLIST_FILE = "ExampleApp/ExampleApp-Info.plist";
249+
PRODUCT_NAME = "$(TARGET_NAME)";
250+
WRAPPER_EXTENSION = app;
251+
};
252+
name = Debug;
253+
};
254+
2CEB3ED51602563600548120 /* Release */ = {
255+
isa = XCBuildConfiguration;
256+
buildSettings = {
257+
GCC_PRECOMPILE_PREFIX_HEADER = YES;
258+
GCC_PREFIX_HEADER = "ExampleApp/ExampleApp-Prefix.pch";
259+
INFOPLIST_FILE = "ExampleApp/ExampleApp-Info.plist";
260+
PRODUCT_NAME = "$(TARGET_NAME)";
261+
WRAPPER_EXTENSION = app;
262+
};
263+
name = Release;
264+
};
265+
/* End XCBuildConfiguration section */
266+
267+
/* Begin XCConfigurationList section */
268+
2CEB3EB51602563600548120 /* Build configuration list for PBXProject "ExampleApp" */ = {
269+
isa = XCConfigurationList;
270+
buildConfigurations = (
271+
2CEB3ED11602563600548120 /* Debug */,
272+
2CEB3ED21602563600548120 /* Release */,
273+
);
274+
defaultConfigurationIsVisible = 0;
275+
defaultConfigurationName = Release;
276+
};
277+
2CEB3ED31602563600548120 /* Build configuration list for PBXNativeTarget "ExampleApp" */ = {
278+
isa = XCConfigurationList;
279+
buildConfigurations = (
280+
2CEB3ED41602563600548120 /* Debug */,
281+
2CEB3ED51602563600548120 /* Release */,
282+
);
283+
defaultConfigurationIsVisible = 0;
284+
defaultConfigurationName = Release;
285+
};
286+
/* End XCConfigurationList section */
287+
};
288+
rootObject = 2CEB3EB21602563600548120 /* Project object */;
289+
}

WebViewJavascriptBridge/WebViewJavascriptBridge-Info.plist renamed to ExampleApp/ExampleApp-Info.plist

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
<string>${PRODUCT_NAME}</string>
99
<key>CFBundleExecutable</key>
1010
<string>${EXECUTABLE_NAME}</string>
11-
<key>CFBundleIconFiles</key>
12-
<array/>
1311
<key>CFBundleIdentifier</key>
14-
<string>com.marcuswestin.${PRODUCT_NAME:rfc1034identifier}</string>
12+
<string>com.example.${PRODUCT_NAME:rfc1034identifier}</string>
1513
<key>CFBundleInfoDictionaryVersion</key>
1614
<string>6.0</string>
1715
<key>CFBundleName</key>
@@ -26,16 +24,13 @@
2624
<string>1.0</string>
2725
<key>LSRequiresIPhoneOS</key>
2826
<true/>
29-
<key>UISupportedInterfaceOrientations</key>
27+
<key>UIRequiredDeviceCapabilities</key>
3028
<array>
31-
<string>UIInterfaceOrientationPortrait</string>
32-
<string>UIInterfaceOrientationLandscapeLeft</string>
33-
<string>UIInterfaceOrientationLandscapeRight</string>
29+
<string>armv7</string>
3430
</array>
35-
<key>UISupportedInterfaceOrientations~ipad</key>
31+
<key>UISupportedInterfaceOrientations</key>
3632
<array>
3733
<string>UIInterfaceOrientationPortrait</string>
38-
<string>UIInterfaceOrientationPortraitUpsideDown</string>
3934
<string>UIInterfaceOrientationLandscapeLeft</string>
4035
<string>UIInterfaceOrientationLandscapeRight</string>
4136
</array>

WebViewJavascriptBridge/WebViewJavascriptBridge-Prefix.pch renamed to ExampleApp/ExampleApp-Prefix.pch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Prefix header for all source files of the 'WebViewJavascriptBridge' target in the 'WebViewJavascriptBridge' project
2+
// Prefix header for all source files of the 'ExampleApp' target in the 'ExampleApp' project
33
//
44

55
#import <Availability.h>
File renamed without changes.

WebViewJavascriptBridge/ExampleAppDelegate.h renamed to ExampleApp/ExampleAppDelegate.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
@interface ExampleAppDelegate : UIResponder <UIApplicationDelegate>
55

66
@property (strong, nonatomic) UIWindow *window;
7-
@property (strong, nonatomic) UIWebView *webView;
87
@property (strong, nonatomic) WebViewJavascriptBridge *javascriptBridge;
98

10-
- (void)renderButtons;
11-
- (void)loadExamplePage;
9+
- (void)renderButtons:(UIWebView*)webView;
10+
- (void)loadExamplePage:(UIWebView*)webView;
1211

1312
@end

0 commit comments

Comments
 (0)