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
struct Regex { | |
static let urlRegex: NSRegularExpression? = { | |
do { | |
return try NSRegularExpression(pattern: "(http(s)?:\\/\\/)?(www\\.)?[-a-zA-Z0-9\\@:%_\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9\\@:%_\\+.~#?&//=]*)", options: .caseInsensitive) | |
} catch { | |
return nil | |
} | |
}() |
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
import CryptoSwift | |
/* | |
Where controls all actions related to save and retrieve value from User Default | |
All strings value will be encrypted/decrypted before saving/retrieving from UD | |
Other types will be save/retrieve directly | |
*/ | |
public protocol UD { | |