DEBUG: explore link changing
This commit is contained in:
1 parent
9687a8f19d
commit
5a94ea73d9
4 files changed
+37
-3
No files matched your search
@@ -10,6 +10,7 @@ import UIKit
|
||||
|
||||
class DownloadManager: ObservableObject {
|
||||
static let shared = DownloadManager()
|
||||
static let exploreLink = "https://cowabun.ga/wallpapers?pocketposter=true"
|
||||
|
||||
@Published var downloadURL: String? = nil
|
||||
|
||||
|
||||
@@ -11,8 +11,17 @@ struct ExploreView: View {
|
||||
@State private var isLoading = true
|
||||
@State private var error: Error? = nil
|
||||
|
||||
#if DEBUG
|
||||
@AppStorage("exploreLink") var exploreLink: String = DownloadManager.exploreLink
|
||||
#endif
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
#if DEBUG
|
||||
let websiteURL = URL(string: exploreLink)
|
||||
#else
|
||||
let websiteURL = URL(string: DownloadManager.exploreLink)
|
||||
#endif
|
||||
if let error = error {
|
||||
VStack {
|
||||
Text(error.localizedDescription)
|
||||
@@ -24,7 +33,7 @@ struct ExploreView: View {
|
||||
Text("Retry")
|
||||
}
|
||||
}
|
||||
} else if let url = URL(string: "https://cowabun.ga/wallpapers?pocketposter=true") {
|
||||
} else if let url = websiteURL {
|
||||
WallpaperWebView(url, isLoading: $isLoading, error: $error)
|
||||
if isLoading {
|
||||
ProgressView()
|
||||
|
||||
@@ -13,6 +13,11 @@ struct SettingsView: View {
|
||||
@AppStorage("cpHash") var cpHash: String = "" // CarPlay hash
|
||||
@AppStorage("ignoreDurationLimit") var ignoreDurationLimit: Bool = false
|
||||
|
||||
// DEBUG
|
||||
#if DEBUG
|
||||
@AppStorage("exploreLink") var exploreLink: String = DownloadManager.exploreLink
|
||||
#endif
|
||||
|
||||
@State var checkingForHash: Bool = false
|
||||
@State var hashCheckTask: Task<Void, any Error>? = nil
|
||||
|
||||
@@ -53,6 +58,19 @@ struct SettingsView: View {
|
||||
Label("App Hash", systemImage: "lock.app.dashed")
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
Section {
|
||||
VStack {
|
||||
Text(String("Explore Page URL"))
|
||||
TextField(String("Enter Explore Page URL"), text: $exploreLink)
|
||||
.textFieldStyle(RoundedBorderTextFieldStyle())
|
||||
.font(.system(.body, design: .monospaced))
|
||||
}
|
||||
} header: {
|
||||
Label(String("Debug"), systemImage: "ant")
|
||||
}
|
||||
#endif
|
||||
|
||||
Section {
|
||||
Toggle(isOn: $ignoreDurationLimit, label: {
|
||||
Label("Disable Video Duration Limit", systemImage: "ruler")
|
||||
|
||||
+8
-2
@@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
CONFIG="Release"
|
||||
|
||||
if [ "$1" == "-d" ]; then
|
||||
CONFIG="Debug"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
@@ -15,13 +21,13 @@ cd build
|
||||
|
||||
xcodebuild -project "$WORKING_LOCATION/$APPLICATION_NAME.xcodeproj" \
|
||||
-scheme "$APPLICATION_NAME" \
|
||||
-configuration Release \
|
||||
-configuration "$CONFIG" \
|
||||
-derivedDataPath "$WORKING_LOCATION/build/DerivedDataApp" \
|
||||
-destination 'generic/platform=iOS' \
|
||||
clean build \
|
||||
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"
|
||||
|
||||
DD_APP_PATH="$WORKING_LOCATION/build/DerivedDataApp/Build/Products/Release-iphoneos/$APPLICATION_NAME.app"
|
||||
DD_APP_PATH="$WORKING_LOCATION/build/DerivedDataApp/Build/Products/$CONFIG-iphoneos/$APPLICATION_NAME.app"
|
||||
TARGET_APP="$WORKING_LOCATION/build/$APPLICATION_NAME.app"
|
||||
cp -r "$DD_APP_PATH" "$TARGET_APP"
|
||||
|
||||
|
||||
Reference in new issue
Block a user