Target USD = $17.99 (base price) x PLR (Price Level Ratio)
New Price = floor(Target USD) to nearest $X.99
With two hard boundaries:
| // The SwiftUI Lab | |
| // Website: https://swiftui-lab.com | |
| // Article: https://swiftui-lab.com/alignment-guides | |
| import SwiftUI | |
| class Model: ObservableObject { | |
| @Published var minimumContainer = true | |
| @Published var extendedTouchBar = false | |
| @Published var twoPhases = true |
| /* | |
| Copyright (c) 2018 Kazume Koze | |
| Released under the MIT license | |
| https://opensource.org/licenses/mit-license.php | |
| */ | |
| // | |
| // CaseIterable+Index.swift | |
| // | |
| // |
| extension String { | |
| /// Checks if the `String` is a valid email address. | |
| /// ```` | |
| /// // Example | |
| /// "name@email.com".isValidEmailAddress() // true | |
| /// "name(at)email(dot)com".isValidEmailAddress() // false | |
| /// "name@email".isValidEmailAddress() // false | |
| /// "name@.com".isValidEmailAddress() // false | |
| /// "name.com".isValidEmailAddress() // false |
| import Foundation | |
| extension Data { | |
| var prettyPrintedJSONString: NSString? { /// NSString gives us a nice sanitized debugDescription | |
| guard let object = try? JSONSerialization.jsonObject(with: self, options: []), | |
| let data = try? JSONSerialization.data(withJSONObject: object, options: [.prettyPrinted]), | |
| let prettyPrintedString = NSString(data: data, encoding: String.Encoding.utf8.rawValue) else { return nil } | |
| return prettyPrintedString | |
| } |
| class FairPlayer: AVPlayer { | |
| private let queue = DispatchQueue(label: "com.icapps.fairplay.queue") | |
| func play(asset: AVURLAsset) { | |
| // Set the resource loader delegate to this class. The `resourceLoader`'s delegate will be | |
| // triggered when FairPlay handling is required. | |
| asset.resourceLoader.setDelegate(self, queue: queue) | |
| // Load the asset in the player. |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>method</key> | |
| <string>app-store</string> | |
| <key>teamID</key> | |
| <string>XXXXXXXXXX</string> | |
| <key>uploadBitcode</key> | |
| <true/> |
| import Foundation | |
| import UIKit | |
| public class Checkmark: UIView { | |
| // MARK: Public variables | |
| public var initialLayerColor: UIColor = UIColor.blue { | |
| didSet { | |
| initialLayer.strokeColor = initialLayerColor.cgColor | |
| } |
| // | |
| // Obfuscator.swift | |
| // | |
| // Created by Dejan Atanasov on 2017-05-31. | |
| // | |
| import Foundation | |
| class Obfuscator: AnyObject { | |
Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.