Selected pull requests authored by quangDecember, focused on iOS, Swift, accessibility, compatibility, and user-facing product polish. Alt link: GitHub PR list
| Topic | Specific | How many | PRs |
|---|
Selected pull requests authored by quangDecember, focused on iOS, Swift, accessibility, compatibility, and user-facing product polish. Alt link: GitHub PR list
| Topic | Specific | How many | PRs |
|---|
Presented by Quang and Nikolas
The following Gist list the technical challenges and some decision making while attempting to updating a binary frameworks to a modular architecture with multiple binary frameworks.
So far this is the biggest challenge when working with Swift modularity.
WKWebView was first introduced on iOS 8. With Apple finally release a deadline for all apps to migrate away from UIWebView, this series and this post is here to help you explore the features of WKWebView. In this blog post you will create a simple web browser with some basic features such as displaying content, back and forward.
One of the most interesting things coming out with Xcode 11 is SwiftUI's PreviewProvider, which provides a way to preview the UI during development instantly on multiple devices, multiple settings at the same time.
To preview UIViewController and UIView, you need to download previewing code from NSHipster
Since we are making this browser with a navigation bar, our main UIViewController needs to be embedded inside a UINavigationController. Therefore the previewing code would be like this:
| @available(iOS 13.0, *) | |
| class DeviceOrientationObservable : ObservableObject { | |
| @Published var orientation = UIDevice.current.orientation | |
| init () { | |
| NotificationCenter.default.addObserver(self, selector: #selector(isRotated), name: UIDevice.orientationDidChangeNotification, object: nil) | |
| } | |
| @objc func isRotated() { | |
| self.orientation = UIDevice.current.orientation | |
| } | |
| } |
| import Foundation | |
| @propertyWrapper | |
| struct UserDefault<T> { | |
| let key: String | |
| let defaultValue: T | |
| init(_ key: String, defaultValue: T) { | |
| self.key = key |
| import Foundation | |
| import CommonCrypto | |
| struct AES256 : Codable { | |
| private var key: Data | |
| private var iv: Data | |
| public init(key: Data, iv: Data) throws { | |
| guard key.count == kCCKeySizeAES256 else { |
| env > env.txt | |
| instruments -s devices > devices.txt | |
| #! /bin/sh -e | |
| # This script demonstrates archive and create action on frameworks and libraries | |
| # Based on script by @author Boris Bielik | |
| # Release dir path | |
| OUTPUT_DIR_PATH="${PROJECT_DIR}/XCFramework" | |
| function archivePathSimulator { |
| protocol APIRequest { | |
| func mockURLProtocolClass() -> AnyClass? | |
| } | |
| extension APIRequest { | |
| func mockURLProtocolClass() -> AnyClass? { | |
| return nil | |
| } | |
| } |
| class EmployeeInfoRequest { | |
| #if MOCK_URL_PROTOCOL | |
| class iMockURLProtocol: MockURLProtocol { | |
| override func startLoading() { | |
| iMockURLProtocol.requestHandler = { request in | |
| let response = HTTPURLResponse.init(url: request.url!, statusCode: 200, httpVersion: "2.0", headerFields: nil)! | |
| return (response,mockEmployeeInfoData) | |
| } | |
| super.startLoading() |