This repository has been archived by the owner on Apr 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HexGL and SysApp demos are removed in this repo.
- Loading branch information
Showing
167 changed files
with
393 additions
and
3,192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
[submodule "src/hexgl/HexGL"] | ||
path = src/hexgl/HexGL | ||
url = [email protected]:hmin/HexGL.git | ||
[submodule "src/third-party/swifty-json"] | ||
path = src/third-party/swifty-json | ||
[submodule "third-party/swift-json"] | ||
path = third-party/swift-json | ||
url = [email protected]:dankogai/swift-json.git | ||
[submodule "src/cordova-plugin-demos/CordovaPluginFileDemo/CordovaPluginFileDemo/www/sample-file"] | ||
path = src/cordova-plugin-demos/CordovaPluginFileDemo/CordovaPluginFileDemo/www/sample-file | ||
url = [email protected]:Icenium/sample-file.git | ||
[submodule "src/third-party/cordova-ios"] | ||
path = src/third-party/cordova-ios | ||
[submodule "third-party/cordova-ios"] | ||
path = third-party/cordova-ios | ||
url = [email protected]:apache/cordova-ios.git | ||
[submodule "third-party/Icenium/sample-file"] | ||
path = third-party/Icenium/sample-file | ||
url = [email protected]:Icenium/sample-file.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ject.xcworkspace/contents.xcworkspacedata → ...ject.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) 2014 Intel Corporation. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import UIKit | ||
import WebKit | ||
import XWalkView | ||
|
||
class ViewController: UIViewController { | ||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
var start_url = "index.html" | ||
var xwalk_extensions = ["Extension.load"] | ||
if let plistPath = NSBundle.mainBundle().pathForResource("manifest", ofType: "plist") { | ||
if let manifest = NSDictionary(contentsOfFile: plistPath) { | ||
start_url = manifest["start_url"] as? String ?? start_url | ||
xwalk_extensions = manifest["xwalk_extensions"] as? [String] ?? xwalk_extensions | ||
} | ||
} | ||
|
||
let webview = WKWebView(frame: view.frame, configuration: WKWebViewConfiguration()) | ||
webview.scrollView.bounces = false | ||
view.addSubview(webview) | ||
|
||
for name in xwalk_extensions { | ||
if let ext: AnyObject = XWalkExtensionFactory.createExtension(name) { | ||
webview.loadExtension(ext, namespace: name) | ||
} | ||
} | ||
|
||
if let path = NSBundle.mainBundle().pathForResource( | ||
start_url.lastPathComponent.stringByDeletingPathExtension, | ||
ofType: start_url.pathExtension, | ||
inDirectory: "www/" + start_url.stringByDeletingLastPathComponent) { | ||
webview.loadRequest(NSURLRequest(URL: NSURL.fileURLWithPath(path)!)); | ||
} | ||
} | ||
|
||
override func prefersStatusBarHidden() -> Bool { | ||
return true | ||
} | ||
} |
Oops, something went wrong.