- Install GPG tools
- Install GPG tools and setup pin entry by running:
brew install gnupg pinentry-mac mkdir -m 700 -p ~/.gnupg echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf killall gpg-agent
| i386 : iPhone Simulator | |
| x86_64 : iPhone Simulator | |
| arm64 : iPhone Simulator | |
| iPhone1,1 : iPhone | |
| iPhone1,2 : iPhone 3G | |
| iPhone2,1 : iPhone 3GS | |
| iPhone3,1 : iPhone 4 | |
| iPhone3,2 : iPhone 4 GSM Rev A | |
| iPhone3,3 : iPhone 4 CDMA | |
| iPhone4,1 : iPhone 4S |
| // | |
| // ViewController.m | |
| // AVPlayerCaching | |
| // | |
| // Created by Anurag Mishra on 5/19/14. | |
| // Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer | |
| // | |
| #import "ViewController.h" | |
| #import <AVFoundation/AVFoundation.h> |
| // Very slightly adapted from http://stackoverflow.com/a/30141700/106244 | |
| // 99.99% Credit to Martin R! | |
| // Mapping from XML/HTML character entity reference to character | |
| // From http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references | |
| private let characterEntities : [String: Character] = [ | |
| // XML predefined entities: | |
| """ : "\"", | |
| "&" : "&", |
| // Since the WKWebView has no sizeToFit() method, increase the frame height of the webView to | |
| // match the height of the content's scrollHeight | |
| // | |
| // The WKWebView's `navigationDelegate` property needs to be set for the delegate method to be called | |
| func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { | |
| if webView.isLoading == false { | |
| webView.evaluateJavaScript("document.body.scrollHeight", completionHandler: { [weak self] (result, error) in | |
| if let height = result as? CGFloat { |
| /* | |
| * Does not require camera access permission | |
| * Usage: | |
| let tool = CaptureDeviceDiscovery() | |
| let front = tool.videoCaptureDevice(at: .front)?.supportsSessionPreset(AVCaptureSession.Preset.hd4K3840x2160) ?? false | |
| let back = tool.videoCaptureDevice(at: .back)?.supportsSessionPreset(AVCaptureSession.Preset.hd4K3840x2160) ?? false | |
| self.labelStatusFront.text = front ? "Supported" : "Not supported" | |
| self.labelStatusBack.text = back ? "Supported" : "Not supported" |
| protocol ImageLoader { | |
| var image: UIImage? { get } | |
| func fetchImage(forSize size: CGSize) | |
| func cancelFetch() | |
| } | |
| struct AsyncImage<Loader: ObservableObject & ImageLoader>: View { | |
| @ObservedObject var loader: Loader |
| sudo mkdir /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 11.4.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift | |
| sudo ln -s /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 11.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/Swift/libswiftXCTest.dylib /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 11.4.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift |