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
var content = UNMutableNotificationContent() | |
content.title = "Title" | |
content.subtitle = "Subtitle" | |
content.body = "Text" | |
content.sound = nil | |
content.categoryIdentifier = "categoryName" | |
var personNameComponents = PersonNameComponents() | |
personNameComponents.nickname = "Sender Name" |
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
// Created by Soulchild on 21/07/2020. | |
// Copyright © 2020 fluffy. All rights reserved. | |
// | |
import Foundation | |
import StoreKit | |
// Need to install the TPInAppReceipt library first | |
import TPInAppReceipt | |
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 Darwin | |
import Foundation | |
// known good: Swift 5 | |
// runs on macOS, probably works on iOS (but haven't tried) | |
/// Wraps `host_statistics64`, and provides info on virtual memory | |
/// | |
/// - Returns: a `vm_statistics64`, or nil if the kernel reported an error | |
/// |