SwiftKit/Sources/SwiftKit/Extensions/Url+Global.swift

27 lines
618 B
Swift

//
// Url+Global.swift
// SwiftKit
//
// Created by Daniel Saidi on 2020-08-31.
// Copyright © 2020 Daniel Saidi. All rights reserved.
//
import Foundation
public extension URL {
/**
This url leads to the Apple subscription screen for the
currently logged in account.
*/
static let userSubscriptions = URL(string: "https://apps.apple.com/account/subscriptions")
/**
This url leads to the App Store page for a certain app.
*/
static func appStoreUrl(forAppId appId: Int) -> URL? {
URL(string: "https://itunes.apple.com/app/id\(appId)")
}
}