Revision | f50eabbc0ef47a37de07bdd0e2fbec5c9868533e (tree) |
---|---|
Time | 2018-04-18 00:37:26 |
Author | masakih <masakih@user...> |
Commiter | masakih |
WKWebViewを導入
@@ -164,14 +164,16 @@ | ||
164 | 164 | F4EF18A71B4D36E60021BF8D /* Project object */ = { |
165 | 165 | isa = PBXProject; |
166 | 166 | attributes = { |
167 | - LastUpgradeCheck = 0640; | |
167 | + LastUpgradeCheck = 0810; | |
168 | 168 | ORGANIZATIONNAME = "Hori,Masaki"; |
169 | 169 | TargetAttributes = { |
170 | 170 | F4EF18AE1B4D36E60021BF8D = { |
171 | 171 | CreatedOnToolsVersion = 6.4; |
172 | + LastSwiftMigration = 0810; | |
172 | 173 | }; |
173 | 174 | F4EF18BE1B4D36E60021BF8D = { |
174 | 175 | CreatedOnToolsVersion = 6.4; |
176 | + LastSwiftMigration = 0810; | |
175 | 177 | TestTargetID = F4EF18AE1B4D36E60021BF8D; |
176 | 178 | }; |
177 | 179 | }; |
@@ -278,6 +280,7 @@ | ||
278 | 280 | isa = XCBuildConfiguration; |
279 | 281 | buildSettings = { |
280 | 282 | ALWAYS_SEARCH_USER_PATHS = NO; |
283 | + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; | |
281 | 284 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
282 | 285 | CLANG_CXX_LIBRARY = "libc++"; |
283 | 286 | CLANG_ENABLE_MODULES = YES; |
@@ -287,14 +290,17 @@ | ||
287 | 290 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
288 | 291 | CLANG_WARN_EMPTY_BODY = YES; |
289 | 292 | CLANG_WARN_ENUM_CONVERSION = YES; |
293 | + CLANG_WARN_INFINITE_RECURSION = YES; | |
290 | 294 | CLANG_WARN_INT_CONVERSION = YES; |
291 | 295 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
296 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | |
292 | 297 | CLANG_WARN_UNREACHABLE_CODE = YES; |
293 | 298 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
294 | 299 | CODE_SIGN_IDENTITY = "-"; |
295 | 300 | COPY_PHASE_STRIP = NO; |
296 | 301 | DEBUG_INFORMATION_FORMAT = dwarf; |
297 | 302 | ENABLE_STRICT_OBJC_MSGSEND = YES; |
303 | + ENABLE_TESTABILITY = YES; | |
298 | 304 | GCC_C_LANGUAGE_STANDARD = gnu99; |
299 | 305 | GCC_DYNAMIC_NO_PIC = NO; |
300 | 306 | GCC_NO_COMMON_BLOCKS = YES; |
@@ -310,7 +316,7 @@ | ||
310 | 316 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
311 | 317 | GCC_WARN_UNUSED_FUNCTION = YES; |
312 | 318 | GCC_WARN_UNUSED_VARIABLE = YES; |
313 | - MACOSX_DEPLOYMENT_TARGET = 10.10; | |
319 | + MACOSX_DEPLOYMENT_TARGET = 10.12; | |
314 | 320 | MTL_ENABLE_DEBUG_INFO = YES; |
315 | 321 | ONLY_ACTIVE_ARCH = YES; |
316 | 322 | SDKROOT = macosx; |
@@ -322,6 +328,7 @@ | ||
322 | 328 | isa = XCBuildConfiguration; |
323 | 329 | buildSettings = { |
324 | 330 | ALWAYS_SEARCH_USER_PATHS = NO; |
331 | + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; | |
325 | 332 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
326 | 333 | CLANG_CXX_LIBRARY = "libc++"; |
327 | 334 | CLANG_ENABLE_MODULES = YES; |
@@ -331,8 +338,10 @@ | ||
331 | 338 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
332 | 339 | CLANG_WARN_EMPTY_BODY = YES; |
333 | 340 | CLANG_WARN_ENUM_CONVERSION = YES; |
341 | + CLANG_WARN_INFINITE_RECURSION = YES; | |
334 | 342 | CLANG_WARN_INT_CONVERSION = YES; |
335 | 343 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
344 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | |
336 | 345 | CLANG_WARN_UNREACHABLE_CODE = YES; |
337 | 346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
338 | 347 | CODE_SIGN_IDENTITY = "-"; |
@@ -348,9 +357,10 @@ | ||
348 | 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
349 | 358 | GCC_WARN_UNUSED_FUNCTION = YES; |
350 | 359 | GCC_WARN_UNUSED_VARIABLE = YES; |
351 | - MACOSX_DEPLOYMENT_TARGET = 10.10; | |
360 | + MACOSX_DEPLOYMENT_TARGET = 10.12; | |
352 | 361 | MTL_ENABLE_DEBUG_INFO = NO; |
353 | 362 | SDKROOT = macosx; |
363 | + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; | |
354 | 364 | }; |
355 | 365 | name = Release; |
356 | 366 | }; |
@@ -361,7 +371,9 @@ | ||
361 | 371 | COMBINE_HIDPI_IMAGES = YES; |
362 | 372 | INFOPLIST_FILE = KanColleBrowserForOSX/Info.plist; |
363 | 373 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; |
374 | + PRODUCT_BUNDLE_IDENTIFIER = "com.masakih.$(PRODUCT_NAME:rfc1034identifier)"; | |
364 | 375 | PRODUCT_NAME = "$(TARGET_NAME)"; |
376 | + SWIFT_VERSION = 3.0; | |
365 | 377 | }; |
366 | 378 | name = Debug; |
367 | 379 | }; |
@@ -372,7 +384,9 @@ | ||
372 | 384 | COMBINE_HIDPI_IMAGES = YES; |
373 | 385 | INFOPLIST_FILE = KanColleBrowserForOSX/Info.plist; |
374 | 386 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; |
387 | + PRODUCT_BUNDLE_IDENTIFIER = "com.masakih.$(PRODUCT_NAME:rfc1034identifier)"; | |
375 | 388 | PRODUCT_NAME = "$(TARGET_NAME)"; |
389 | + SWIFT_VERSION = 3.0; | |
376 | 390 | }; |
377 | 391 | name = Release; |
378 | 392 | }; |
@@ -391,7 +405,9 @@ | ||
391 | 405 | ); |
392 | 406 | INFOPLIST_FILE = KanColleBrowserForOSXTests/Info.plist; |
393 | 407 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; |
408 | + PRODUCT_BUNDLE_IDENTIFIER = "com.masakih.$(PRODUCT_NAME:rfc1034identifier)"; | |
394 | 409 | PRODUCT_NAME = "$(TARGET_NAME)"; |
410 | + SWIFT_VERSION = 3.0; | |
395 | 411 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KanColleBrowserForOSX.app/Contents/MacOS/KanColleBrowserForOSX"; |
396 | 412 | }; |
397 | 413 | name = Debug; |
@@ -407,7 +423,9 @@ | ||
407 | 423 | ); |
408 | 424 | INFOPLIST_FILE = KanColleBrowserForOSXTests/Info.plist; |
409 | 425 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; |
426 | + PRODUCT_BUNDLE_IDENTIFIER = "com.masakih.$(PRODUCT_NAME:rfc1034identifier)"; | |
410 | 427 | PRODUCT_NAME = "$(TARGET_NAME)"; |
428 | + SWIFT_VERSION = 3.0; | |
411 | 429 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KanColleBrowserForOSX.app/Contents/MacOS/KanColleBrowserForOSX"; |
412 | 430 | }; |
413 | 431 | name = Release; |
@@ -431,6 +449,7 @@ | ||
431 | 449 | F4EF18CB1B4D36E60021BF8D /* Release */, |
432 | 450 | ); |
433 | 451 | defaultConfigurationIsVisible = 0; |
452 | + defaultConfigurationName = Release; | |
434 | 453 | }; |
435 | 454 | F4EF18CC1B4D36E60021BF8D /* Build configuration list for PBXNativeTarget "KanColleBrowserForOSXTests" */ = { |
436 | 455 | isa = XCConfigurationList; |
@@ -439,6 +458,7 @@ | ||
439 | 458 | F4EF18CE1B4D36E60021BF8D /* Release */, |
440 | 459 | ); |
441 | 460 | defaultConfigurationIsVisible = 0; |
461 | + defaultConfigurationName = Release; | |
442 | 462 | }; |
443 | 463 | /* End XCConfigurationList section */ |
444 | 464 | }; |
@@ -13,8 +13,8 @@ class AppDelegate: NSObject, NSApplicationDelegate { | ||
13 | 13 | |
14 | 14 | var mainWindowController: KCBFOMainWindowController! |
15 | 15 | |
16 | - func applicationDidFinishLaunching(aNotification: NSNotification) { | |
17 | - mainWindowController = KCBFOMainWindowController.new() | |
16 | + func applicationDidFinishLaunching(_ aNotification: Notification) { | |
17 | + mainWindowController = KCBFOMainWindowController.makeInstance() | |
18 | 18 | mainWindowController.showWindow(nil) |
19 | 19 | } |
20 | 20 | } |
@@ -9,7 +9,7 @@ | ||
9 | 9 | <key>CFBundleIconFile</key> |
10 | 10 | <string></string> |
11 | 11 | <key>CFBundleIdentifier</key> |
12 | - <string>com.masakih.$(PRODUCT_NAME:rfc1034identifier)</string> | |
12 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | |
13 | 13 | <key>CFBundleInfoDictionaryVersion</key> |
14 | 14 | <string>6.0</string> |
15 | 15 | <key>CFBundleName</key> |
@@ -22,6 +22,8 @@ | ||
22 | 22 | <string>????</string> |
23 | 23 | <key>CFBundleVersion</key> |
24 | 24 | <string>%%%%REVISION%%%%</string> |
25 | + <key>LSHasLocalizedDisplayName</key> | |
26 | + <true/> | |
25 | 27 | <key>LSMinimumSystemVersion</key> |
26 | 28 | <string>$(MACOSX_DEPLOYMENT_TARGET)</string> |
27 | 29 | <key>NSHumanReadableCopyright</key> |
@@ -30,7 +32,10 @@ | ||
30 | 32 | <string>MainMenu</string> |
31 | 33 | <key>NSPrincipalClass</key> |
32 | 34 | <string>NSApplication</string> |
33 | - <key>LSHasLocalizedDisplayName</key> | |
34 | - <true/> | |
35 | + <key>NSAppTransportSecurity</key> | |
36 | + <dict> | |
37 | + <key>NSAllowsArbitraryLoadsInWebContent</key> | |
38 | + <true/> | |
39 | + </dict> | |
35 | 40 | </dict> |
36 | 41 | </plist> |
@@ -12,101 +12,80 @@ import WebKit | ||
12 | 12 | class KCBFOMainWindowController: NSWindowController { |
13 | 13 | |
14 | 14 | @IBOutlet var clipView: NSClipView! |
15 | - @IBOutlet var webView: WebView! | |
15 | + var webView: WKWebView! | |
16 | 16 | |
17 | - var flashTopLeft: NSPoint = NSMakePoint(2600, 145); | |
17 | + var flashTopLeft: NSPoint = NSPoint(x: 600, y: 77) | |
18 | 18 | |
19 | 19 | let gamePageURL = "http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/" |
20 | - | |
21 | - override class func new() -> KCBFOMainWindowController { | |
22 | - return KCBFOMainWindowController(windowNibName: "KCBFOMainWindowController") | |
23 | - } | |
24 | - | |
20 | + | |
21 | + class func makeInstance() -> KCBFOMainWindowController { | |
22 | + return KCBFOMainWindowController(windowNibName: "KCBFOMainWindowController") | |
23 | + } | |
24 | + | |
25 | + | |
25 | 26 | override func windowDidLoad() { |
26 | 27 | super.windowDidLoad() |
28 | + | |
29 | + let pref = WKPreferences() | |
30 | + pref.plugInsEnabled = true | |
31 | + let config = WKWebViewConfiguration() | |
32 | + config.preferences = pref | |
33 | + config.applicationNameForUserAgent = "Version/11.1 Safari/605.1.15" | |
34 | + | |
35 | + let js = """ | |
36 | + var style = document.createElement('style'); | |
37 | + style.innerHTML = 'html { overflow: hidden; }'; | |
38 | + document.head.appendChild(style); | |
39 | +""" | |
40 | + let script = WKUserScript(source: js, injectionTime: .atDocumentEnd, forMainFrameOnly: false) | |
41 | + config.userContentController.addUserScript(script) | |
42 | + | |
43 | + let frame = CGRect(x: 0, y: 0, width: 2000, height: 2_000) | |
44 | + webView = WKWebView(frame: frame, configuration: config) | |
45 | + webView.navigationDelegate = self | |
27 | 46 | |
28 | 47 | clipView.documentView = webView |
29 | 48 | |
30 | 49 | adjustFlash() |
31 | 50 | |
32 | - webView.mainFrame.frameView.allowsScrolling = false | |
33 | - webView.applicationNameForUserAgent = "Version/8.0.6 Safari/600.6.3" | |
34 | - webView.mainFrameURL = gamePageURL | |
51 | + webView.allowsBackForwardNavigationGestures = false | |
52 | + webView.allowsMagnification = false | |
53 | + webView.allowsLinkPreview = false | |
54 | + | |
55 | + loadURLString(urlString: gamePageURL) | |
56 | + } | |
57 | + | |
58 | + func loadURLString(urlString: String) { | |
59 | + guard let url = URL(string: urlString) else { return } | |
60 | + let req = URLRequest(url: url) | |
61 | + webView.load(req) | |
35 | 62 | } |
63 | + | |
36 | 64 | |
37 | - @IBAction func reloadContent(sender: AnyObject?) { | |
38 | - if webView.mainFrameURL != gamePageURL { | |
39 | - adjustFlash() | |
40 | - webView.mainFrameURL = gamePageURL | |
41 | - return | |
42 | - } | |
43 | - adjustFlash() | |
44 | - webView.reload(nil) | |
45 | - } | |
46 | - @IBAction func reloadAndRecache(sender: AnyObject?) { | |
47 | - NSURLCache.sharedURLCache().removeAllCachedResponses() | |
65 | + @IBAction func reloadContent(_ sender: AnyObject?) { | |
66 | + guard let _ = webView.url | |
67 | + else { | |
68 | + loadURLString(urlString: gamePageURL) | |
69 | + return | |
70 | + } | |
71 | + // ゲームページでない場合はゲームページを表示する | |
72 | + if let url = webView?.url, url.absoluteString != gamePageURL { | |
73 | + loadURLString(urlString: gamePageURL) | |
74 | + return | |
75 | + } | |
76 | + | |
77 | + adjustFlash() | |
78 | + | |
79 | + webView.reload(sender) | |
80 | + | |
81 | + } | |
82 | + @IBAction func reloadAndRecache(_ sender: AnyObject?) { | |
83 | + URLCache.shared.removeAllCachedResponses() | |
48 | 84 | reloadContent(sender) |
49 | 85 | } |
50 | 86 | |
51 | 87 | func adjustFlash() { |
52 | - clipView.scrollToPoint(flashTopLeft) | |
53 | - } | |
54 | - | |
55 | - // MARK: - WebFrameLoadDelegate | |
56 | - func handler(c: JSContext! , e: JSValue!) { | |
57 | - println("caught exception in evaluateScript: -> \(e)") | |
58 | - } | |
59 | - func adjustIFrame(frame: WebFrame) { | |
60 | - let context = frame.javaScriptContext! | |
61 | - context.exceptionHandler = handler | |
62 | - context.evaluateScript( | |
63 | - [ "var emb = document.getElementById('flashWrap');", | |
64 | - "var rect = emb.getBoundingClientRect();", | |
65 | - "var atop = rect.top;", | |
66 | - "var aleft = rect.left;" | |
67 | - ].reduce(""){ $0 + $1 } | |
68 | - ) | |
69 | - let top = context.objectForKeyedSubscript("atop") | |
70 | - let left = context.objectForKeyedSubscript("aleft") | |
71 | - let x = CGFloat(left.toDouble()) | |
72 | - let y = webView.frame.size.height - CGFloat(top.toDouble()) - 480 | |
73 | - flashTopLeft = NSMakePoint(x, y) | |
74 | - } | |
75 | - func adjustGameFrame(frame: WebFrame) { | |
76 | - let context = frame.javaScriptContext! | |
77 | - context.exceptionHandler = handler | |
78 | - context.evaluateScript( | |
79 | - [ "var iframe = document.getElementById('game_frame');", | |
80 | - "var validIframe = 0;", | |
81 | - "if(iframe) {", | |
82 | - " validIframe = 1;", | |
83 | - " var rect = iframe.getBoundingClientRect();", | |
84 | - " var atop = rect.top;", | |
85 | - " var aleft = rect.left;", | |
86 | - "}" | |
87 | - ].reduce(""){ $0 + $1 } | |
88 | - ) | |
89 | - if let validIframe = context.objectForKeyedSubscript("validIframe")?.toInt32() { | |
90 | - if validIframe == 0 { return } | |
91 | - | |
92 | - let top = context.objectForKeyedSubscript("atop") | |
93 | - let left = context.objectForKeyedSubscript("aleft") | |
94 | - let x = flashTopLeft.x + CGFloat(left.toDouble()) | |
95 | - let y = flashTopLeft.y - CGFloat(top.toDouble()) | |
96 | - flashTopLeft = NSMakePoint(x, y) | |
97 | - adjustFlash() | |
98 | - } | |
99 | - } | |
100 | - override func webView(sender: WebView!, didFinishLoadForFrame frame: WebFrame!) { | |
101 | - if let path = frame.dataSource?.initialRequest.URL?.path { | |
102 | - if path.hasSuffix("gadgets/ifr") { | |
103 | - adjustIFrame(frame) | |
104 | - } | |
105 | - | |
106 | - if path.hasSuffix("app_id=854854") { | |
107 | - adjustGameFrame(frame) | |
108 | - } | |
109 | - } | |
88 | + clipView.scroll(to: flashTopLeft) | |
110 | 89 | } |
111 | 90 | |
112 | 91 | // MARK: - WebUIDelegate |
@@ -119,12 +98,64 @@ class KCBFOMainWindowController: NSWindowController { | ||
119 | 98 | WebMenuItemTagStop, |
120 | 99 | WebMenuItemTagReload] |
121 | 100 | |
122 | - override func webView(sender: WebView!, contextMenuItemsForElement element: [NSObject : AnyObject]!, defaultMenuItems: [AnyObject]!) -> [AnyObject]! { | |
101 | + func webView(_ sender: WebView!, contextMenuItemsForElement element: [AnyHashable: Any]!, defaultMenuItems: [AnyObject]!) -> [Any]! { | |
123 | 102 | return defaultMenuItems.flatMap() { |
124 | - if contains(ignoreTags, $0.tag()) { | |
103 | + if ignoreTags.contains($0.tag) { | |
125 | 104 | return [] |
126 | 105 | } |
127 | 106 | return [$0] |
128 | 107 | } |
129 | 108 | } |
130 | 109 | } |
110 | + | |
111 | +extension KCBFOMainWindowController: WKNavigationDelegate { | |
112 | + func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { | |
113 | + | |
114 | + webView.evaluateJavaScript( | |
115 | + ["var iframe = document.getElementById('game_frame');", | |
116 | + "var validIframe = 0;", | |
117 | + "var atop = 0;", | |
118 | + "var aleft = 0;", | |
119 | + "var aWidth = 0;", | |
120 | + "if(iframe) {", | |
121 | + " validIframe = 1;", | |
122 | + " var rect = iframe.getBoundingClientRect();", | |
123 | + " atop = rect.top;", | |
124 | + " aleft = rect.left;", | |
125 | + " aWidth = rect.width;", | |
126 | + "}", | |
127 | + "var dict = {valid:validIframe, top:atop, left:aleft, width:aWidth};", | |
128 | + "dict;"] | |
129 | + .reduce("", +) | |
130 | + ) { (dict, error) in | |
131 | + error.map { print($0) } | |
132 | + | |
133 | + guard let param = dict as? [String: Any] else { | |
134 | + | |
135 | + print("can not get dict") | |
136 | + return | |
137 | + } | |
138 | + guard let valid = param["valid"] as? Int else { | |
139 | + | |
140 | + print("can not get invalid") | |
141 | + return | |
142 | + } | |
143 | + guard valid == 1 else { | |
144 | + | |
145 | + return | |
146 | + } | |
147 | + guard let top = param["top"] as? Int, | |
148 | + let left = param["left"] as? Int, | |
149 | + let width = param["width"] as? Int | |
150 | + else { return } | |
151 | + | |
152 | + DispatchQueue.main.async { [weak self] in | |
153 | + guard let `self` = self else { return } | |
154 | + | |
155 | + self.flashTopLeft = NSPoint(x: CGFloat(left + (width - 800) / 2), | |
156 | + y: CGFloat(top + 16)) | |
157 | + self.adjustFlash() | |
158 | + } | |
159 | + } | |
160 | + } | |
161 | +} |
@@ -1,14 +1,14 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
2 | -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> | |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> | |
3 | 3 | <dependencies> |
4 | - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7706"/> | |
5 | - <plugIn identifier="com.apple.WebKitIBPlugin" version="7706"/> | |
4 | + <deployment identifier="macosx"/> | |
5 | + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12121"/> | |
6 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | |
6 | 7 | </dependencies> |
7 | 8 | <objects> |
8 | 9 | <customObject id="-2" userLabel="File's Owner" customClass="KCBFOMainWindowController" customModule="KanColleBrowserForOSX" customModuleProvider="target"> |
9 | 10 | <connections> |
10 | 11 | <outlet property="clipView" destination="CE2-tS-wOP" id="e59-4N-ABH"/> |
11 | - <outlet property="webView" destination="9oP-vl-4d9" id="S8P-5p-uZ0"/> | |
12 | 12 | <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/> |
13 | 13 | </connections> |
14 | 14 | </customObject> |
@@ -20,7 +20,7 @@ | ||
20 | 20 | <rect key="contentRect" x="196" y="240" width="800" height="480"/> |
21 | 21 | <rect key="screenRect" x="0.0" y="0.0" width="1440" height="900"/> |
22 | 22 | <view key="contentView" id="se5-gp-TjO"> |
23 | - <rect key="frame" x="0.0" y="6" width="800" height="480"/> | |
23 | + <rect key="frame" x="0.0" y="0.0" width="800" height="480"/> | |
24 | 24 | <autoresizingMask key="autoresizingMask"/> |
25 | 25 | <subviews> |
26 | 26 | <customView id="CE2-tS-wOP" customClass="NSClipView"> |
@@ -34,15 +34,5 @@ | ||
34 | 34 | </connections> |
35 | 35 | <point key="canvasLocation" x="422" y="234"/> |
36 | 36 | </window> |
37 | - <webView id="9oP-vl-4d9"> | |
38 | - <rect key="frame" x="0.0" y="0.0" width="6000" height="700"/> | |
39 | - <autoresizingMask key="autoresizingMask"/> | |
40 | - <webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12"/> | |
41 | - <connections> | |
42 | - <outlet property="UIDelegate" destination="-2" id="vms-hm-oFJ"/> | |
43 | - <outlet property="frameLoadDelegate" destination="-2" id="Qaq-jw-LUu"/> | |
44 | - </connections> | |
45 | - <point key="canvasLocation" x="199" y="1063"/> | |
46 | - </webView> | |
47 | 37 | </objects> |
48 | 38 | </document> |
@@ -7,7 +7,7 @@ | ||
7 | 7 | <key>CFBundleExecutable</key> |
8 | 8 | <string>$(EXECUTABLE_NAME)</string> |
9 | 9 | <key>CFBundleIdentifier</key> |
10 | - <string>com.masakih.$(PRODUCT_NAME:rfc1034identifier)</string> | |
10 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | |
11 | 11 | <key>CFBundleInfoDictionaryVersion</key> |
12 | 12 | <string>6.0</string> |
13 | 13 | <key>CFBundleName</key> |
@@ -28,7 +28,7 @@ class KanColleBrowserForOSXTests: XCTestCase { | ||
28 | 28 | |
29 | 29 | func testPerformanceExample() { |
30 | 30 | // This is an example of a performance test case. |
31 | - self.measureBlock() { | |
31 | + self.measure() { | |
32 | 32 | // Put the code you want to measure the time of here. |
33 | 33 | } |
34 | 34 | } |