In iOS 10, there are big changes in the notification. Remote and local notification methods are unified. You can add media such as image using notification extension. In this article, I will talk about how to set up notification types and register the remote notification. And I will show you how to handle remote notification and the actionable notification in the next section.
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
// confirm : WKUIDelegate protocol | |
webView.UIDelegate = self | |
….. | |
** javascript popup box test | |
// let alert_box_url = "http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert" | |
// let confirm_box_url = "http://www.w3schools.com/js/tryit.asp?filename=tryjs_confirm" |
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
// confirm : WKUIDelgate protocol | |
// To dealt with JS window open or target = _blank tag | |
// - result : open Safari app | |
func webView(webView: WKWebView, createWebViewWithConfiguration configuration: WKWebViewConfiguration, forNavigationAction navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? { | |
if UIApplication.sharedApplication().canOpenURL(navigationAction.request.URL!) { | |
UIApplication.sharedApplication().openURL(navigationAction.request.URL!) | |
} | |
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
/*: | |
* [How to make custom iterator](https://academy.realm.io/posts/try-swift-soroush-khanlou-sequence-collection/) | |
* [Implementation of a LinkedList using enum](https://github.com/apple/swift/blob/master/stdlib/public/core/Sequence.swift) | |
*/ | |
import Foundation | |
indirect enum LinkedListNode<T> { | |
case value(element: T, next: LinkedListNode<T>) | |
case end | |
} |
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
$ go env | grep GOPATH | |
GOPATH=`/Users/UserName/go` |
I hereby claim:
- I am dakeshi on github.
- I am dakeshi (https://keybase.io/dakeshi) on keybase.
- I have a public key ASCfKqtJR28WR4wENx8E5uWzS0COT_m0Gt2wwu5dPd-jswo
To claim this, I am signing this object:
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
/// In AppDelegate.swift | |
/// Execute remove webdata method when the app receives the memory warning. | |
/// | |
/// We can not avoid the infinitely get increased the app size issue | |
/// when users keep the web searching using the WKWebView. | |
/// So, you would get iOS full storage message. | |
/// | |
/// Set WKWebsiteDataStore.nonPersistentDataStore in the configuration | |
/// can make lightweight WKWebView. But it can not apply every web site. | |
/// Imagine the web sites used the localStorage, IndexedDB features. |