Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from BenjaminHornbeck6/main
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
haxi0 authored Nov 13, 2022
2 parents 2df1123 + 234e6a3 commit a7fb477
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ App Store, but for TrollStore
As the description says, "App Store, but for TrollStore". The App fetches an API from my website and loads a list of popular TrollStore apps to download. Then when you press the "GET" button the app opens the url scheme (apple-magnifier://install?url=) to TrollStore which downloads and installs the you have chosen app. All of this means also if whenever an app update of a TrollStore app which is in the list is out, I just have to update a variable in the API and won't need to have to update TrollApps and you would need to install the new version of it. You need to have a WiFi or either a cellular connection for this to work! **This works for iOS 15.0 and up, make sure to be on the latest version of TrollStore**

# Want to submit an app?
If you want to submit an app, PM me on Twitter with the request. My Twitter is @haxi0sm
If you want to submit an app, DM me on Twitter with the request. My Twitter is @haxi0sm


8 changes: 5 additions & 3 deletions TrollApps/TrollApps/AppsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import SwiftUI

struct AppsView: View {
@Environment(\.openURL) var openURL

var body: some View {
NavigationView {
List(FetchApps()) { json in
Expand All @@ -19,7 +18,8 @@ struct AppsView: View {
Spacer()
Button("GET") {
openURL(URL(string: json.link)!)
}.buttonStyle(appstorestyle())
}
.buttonStyle(appstorestyle())
}
} icon: {
AsyncImage(url: URL(string: json.urlimg)) { image in
Expand All @@ -30,8 +30,10 @@ struct AppsView: View {
.frame(width: 30, height: 30)
.clipShape(RoundedRectangle(cornerRadius: 7))
}
}.navigationTitle("Apps")
}
.navigationTitle("Apps")
}
.navigationViewStyle(.stack)
}
}

Expand Down
7 changes: 3 additions & 4 deletions TrollApps/TrollApps/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ import SwiftUI

struct ContentView: View {
@AppStorage("FirstStart") var alertShouldBeShown = true

var body: some View {
TabView {
AppsView()
.tabItem {
Image(systemName: "iphone.and.arrow.forward")
Image(systemName: "apps.iphone")
Text("Apps")
}
.alert(isPresented: $alertShouldBeShown, content: {
Expand All @@ -29,8 +28,8 @@ struct ContentView: View {
})
OtherView()
.tabItem {
Image(systemName: "ellipsis")
Text("Other")
Image(systemName: "person")
Text("Credits")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion TrollApps/TrollApps/JSONStuff.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func FetchApps() -> [stuff] {
do {
return try JSONDecoder().decode([stuff].self, from: try! Data(contentsOf: URL(string: "https://haxi0-dev.com/api/trollapps-0.1.json")!))
} catch {
print("oopsie")
print(error)
return []
}
}
13 changes: 7 additions & 6 deletions TrollApps/TrollApps/OtherView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import SwiftUI

struct OtherView: View {
@Environment(\.openURL) var openURL

var body: some View {
NavigationView {
List {
Expand All @@ -31,12 +30,12 @@ struct OtherView: View {
}
Label {
HStack {
Button("iOScreator - JSON Fetching") {
openURL(URL(string: "https://www.ioscreator.com/tutorials/swiftui-json-list-tutorial")!)
Button("AppInstaller iOS - JSON Fetching") {
openURL(URL(string: "https://twitter.com/AppInstalleriOS")!)
}
}
} icon: {
AsyncImage(url: URL(string: "https://cdn.discordapp.com/attachments/969879614379921418/1040887934640979988/iOScreator.png")) { image in
AsyncImage(url: URL(string: "https://appinstallerios.com/Img/AppInstalleriOSIcon.png")) { image in
image.resizable()
} placeholder: {
Color.black
Expand Down Expand Up @@ -74,10 +73,12 @@ struct OtherView: View {
.frame(width: 30, height: 30)
.clipShape(RoundedRectangle(cornerRadius: 7))
}

}
}.navigationTitle("Other")
}
.navigationTitle("Credits")
}
.navigationViewStyle(.stack)
}
}

Expand Down

0 comments on commit a7fb477

Please sign in to comment.