I am trying to build an app where there is a premium version and a free version. When someone purchases the premium version, I want a new screen to show. How do I do this.
Code
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Link(destination: URL(string: "https://www.icloud.com/sharedalbum/#B0tG4Tcsmu6ATjR")!) {
VStack {
Image(systemName: "paperplane")
.font(.largeTitle)
Text("Click here to get wallpapers!")
.accentColor(Color.white)
.background(Color.black)
}
}
}
}
}
Premium Code
import Foundation
import SwiftUI
struct Premium: View {
var body: some View {
VStack {
Link(destination: URL(string: "https://www.icloud.com/sharedalbum/#B0tG6XBubu4jvR9")!) {
VStack {
Image(systemName: "plus")
.font(.largeTitle)
Text("Click here to get Premium wallpapers!")
.accentColor(Color.white)
.background(Color.black)
}
}
}
}
}