diff --git a/Apple/.DS_Store b/Apple/.DS_Store deleted file mode 100644 index 6bf97d7..0000000 Binary files a/Apple/.DS_Store and /dev/null differ diff --git a/Apple/App/App-iOS.entitlements b/Apple/App/App-iOS.entitlements index 02ee960..d9849a8 100644 --- a/Apple/App/App-iOS.entitlements +++ b/Apple/App/App-iOS.entitlements @@ -2,10 +2,6 @@ - com.apple.developer.networking.networkextension - - packet-tunnel-provider - com.apple.security.application-groups $(APP_GROUP_IDENTIFIER) diff --git a/Apple/App/App-macOS.entitlements b/Apple/App/App-macOS.entitlements index 7395b5c..d9849a8 100644 --- a/Apple/App/App-macOS.entitlements +++ b/Apple/App/App-macOS.entitlements @@ -2,14 +2,9 @@ - com.apple.developer.networking.networkextension - - packet-tunnel-provider - com.apple.security.application-groups $(APP_GROUP_IDENTIFIER) - group.ThomasStubblefield.Unifriend.onesignal diff --git a/Apple/App/AppDelegate.swift b/Apple/App/AppDelegate.swift deleted file mode 100644 index 25c9baf..0000000 --- a/Apple/App/AppDelegate.swift +++ /dev/null @@ -1,14 +0,0 @@ -#if os(macOS) -import AppKit -import FluidMenuBarExtra - -class AppDelegate: NSObject, NSApplicationDelegate { - private var menuBarExtra: FluidMenuBarExtra? - - func applicationDidFinishLaunching(_ notification: Notification) { - self.menuBarExtra = FluidMenuBarExtra(title: "Burrow", systemImage: "network.badge.shield.half.filled") { - ContentView() - } - } -} -#endif diff --git a/Apple/App/Assets.xcassets/hackClubLogo.imageset/Contents.json b/Apple/App/Assets.xcassets/hackClubLogo.imageset/Contents.json deleted file mode 100644 index 76da2cb..0000000 --- a/Apple/App/Assets.xcassets/hackClubLogo.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "hackClubLogo.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Apple/App/Assets.xcassets/hackClubLogo.imageset/hackClubLogo.png b/Apple/App/Assets.xcassets/hackClubLogo.imageset/hackClubLogo.png deleted file mode 100644 index 6823ccf..0000000 Binary files a/Apple/App/Assets.xcassets/hackClubLogo.imageset/hackClubLogo.png and /dev/null differ diff --git a/Apple/App/BurrowApp.swift b/Apple/App/BurrowApp.swift index fc05084..b145dea 100644 --- a/Apple/App/BurrowApp.swift +++ b/Apple/App/BurrowApp.swift @@ -1,34 +1,10 @@ -// -// burrow_barApp.swift -// burrow-bar -// -// Created by Thomas Stubblefield on 4/19/23. -// - import SwiftUI -import NetworkExtension @main -struct burrowBarApp: App { - #if os(macOS) - @NSApplicationDelegateAdaptor private var appDelegate: AppDelegate - #endif - +struct BurrowApp: App { var body: some Scene { WindowGroup { - PermissionView() - } - } -} - -struct PermissionView: View { - @ObservedObject - var configuration = NetworkConfiguration() - - - var body: some View { - VStack { - Text(verbatim: "Status is \(configuration.status)") + ContentView() } } } diff --git a/Apple/App/ContentView.swift b/Apple/App/ContentView.swift index aa92046..f54deab 100644 --- a/Apple/App/ContentView.swift +++ b/Apple/App/ContentView.swift @@ -1,68 +1,14 @@ import SwiftUI struct ContentView: View { - - @ObservedObject var viewModel = NetworkConfiguration() - var body: some View { - VStack(alignment: .leading) { - - HStack { - Text(verbatim: "Networks \(viewModel.model.status)") - .font(.title3) - Spacer() - Image(systemName: "badge.plus.radiowaves.forward") - .symbolRenderingMode(.palette) - .foregroundStyle(.blue, .black) - .opacity(0.4) - .imageScale(.large) } - Divider() - VStack(alignment: .leading) { - Text("Burrows") - .padding(.top, 2) - .font(.subheadline.weight(.bold)) - HStack { - if (viewModel.status == .unknown) { - - - Image("hackClubLogo") - .resizable() - .frame(width: 32, height: 32) - .cornerRadius(100).onTapGesture { - viewModel.connectToBurrow() - print(viewModel.status) - } - - } else if (viewModel.status == .loading) { - ZStack { - Image("hackClubLogo") - .resizable() - .frame(width: 32, height: 32) - .cornerRadius(100) - .overlay(Color.white.opacity(0.6).cornerRadius(100)) - - ProgressView() - .progressViewStyle(CircularProgressViewStyle()) - .scaleEffect(0.6) - } - } - VStack(alignment: .leading) { - - Text("Hack Club Network") - .fontWeight(.medium) - - - Text("􁠲 Recently Validated Certificate") - .font(.caption2) - .foregroundColor(.blue) - }.onTapGesture { - print(true) - } - } - } - + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundColor(.accentColor) + Text("Hello, world!") } - .padding() + .padding() } } diff --git a/Apple/App/Model.swift b/Apple/App/Model.swift deleted file mode 100644 index 68d63fd..0000000 --- a/Apple/App/Model.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// MemoryGame.swift -// Memorize -// -// Created by Thomas Stubblefield on 3/12/23. -// - -import Foundation - -struct Model { - - var status: Status = .unknown - - mutating func connectToBurrow() { - print("let's get this working") - status = .valid - print(status) - } -} - -enum Status: CustomStringConvertible { - case unknown - case blank - case valid - case error - case loading - - var description: String { - switch self { - case .unknown: - return "Unknown" - case .blank: - return "Blank" - case .valid: - return "Valid" - case .loading: - return "Loading" - default: - return "Default" - } - } -} diff --git a/Apple/App/NetworkConfiguration.swift b/Apple/App/NetworkConfiguration.swift deleted file mode 100644 index 89bc601..0000000 --- a/Apple/App/NetworkConfiguration.swift +++ /dev/null @@ -1,87 +0,0 @@ -import SwiftUI -import NetworkExtension - -@MainActor -class NetworkConfiguration: ObservableObject { - func connectToBurrow() { - objectWillChange.send() - model.connectToBurrow() - } - - @Published var model = Model() - - @Published - var status: Status = .unknown - - init() { - update() - - - } - - func connectToNetwork() { - print(self.status) - self.status = .loading - print(self.status) - - DispatchQueue.main.asyncAfter(deadline: .now() + 3) { - let random = Int.random(in: 0...1) - if random == 0 { - self.status = .valid - print(self.status) - - } else { - self.status = .error - print(self.status) - - } - } - } - - func update() { - Task { - do { - let configurations = try await NETunnelProviderManager.loadAll() - - await MainActor.run { - self.status = configurations.isEmpty ? .blank : .valid - print(self.status) - self.objectWillChange.send() - } - } catch { - await MainActor.run { - self.status = .error - self.objectWillChange.send() - - } - } - } - } - - func request() { - let configuration = NETunnelProviderProtocol() - configuration.providerBundleIdentifier = "" - configuration.serverAddress = "Hack Club" - - let manager = NETunnelProviderManager() - manager.protocolConfiguration = configuration - manager.localizedDescription = "Hack Club Burrow" - manager.saveToPreferences { error in - print(error) - } - } -} - -extension NETunnelProviderManager { - static func loadAll() async throws -> [NETunnelProviderManager] { - try await withUnsafeThrowingContinuation { continuation in - NETunnelProviderManager.loadAllFromPreferences { managers, error in - if let error = error { - continuation.resume(throwing: error) - } else { - continuation.resume(returning: managers ?? []) - } - } - } - } -} diff --git a/Apple/Burrow.xcodeproj/project.pbxproj b/Apple/Burrow.xcodeproj/project.pbxproj index be8f359..fa4009a 100644 --- a/Apple/Burrow.xcodeproj/project.pbxproj +++ b/Apple/Burrow.xcodeproj/project.pbxproj @@ -7,10 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 43E50D6D29FA050600BD2280 /* FluidMenuBarExtra in Frameworks */ = {isa = PBXBuildFile; platformFilters = (macos, ); productRef = 43E50D6C29FA050600BD2280 /* FluidMenuBarExtra */; }; - 43EBDB2B29FD7557005D8CFF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EBDB2A29FD754A005D8CFF /* AppDelegate.swift */; }; - 43EBDB2D29FD759E005D8CFF /* NetworkConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EBDB2C29FD759E005D8CFF /* NetworkConfiguration.swift */; }; - 43EBDB2F29FDE85F005D8CFF /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EBDB2E29FDE85F005D8CFF /* Model.swift */; }; D020F65829E4A697002790F6 /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = D020F65729E4A697002790F6 /* PacketTunnelProvider.swift */; }; D020F65D29E4A697002790F6 /* BurrowNetworkExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = D020F65329E4A697002790F6 /* BurrowNetworkExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; D05B9F7629E39EEC008CB1F9 /* BurrowApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D05B9F7529E39EEC008CB1F9 /* BurrowApp.swift */; }; @@ -43,9 +39,6 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 43EBDB2A29FD754A005D8CFF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 43EBDB2C29FD759E005D8CFF /* NetworkConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkConfiguration.swift; sourceTree = ""; }; - 43EBDB2E29FDE85F005D8CFF /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = ""; }; D020F63D29E4A1FF002790F6 /* Identity.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Identity.xcconfig; sourceTree = ""; }; D020F64029E4A1FF002790F6 /* Compiler.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Compiler.xcconfig; sourceTree = ""; }; D020F64229E4A1FF002790F6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -78,7 +71,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 43E50D6D29FA050600BD2280 /* FluidMenuBarExtra in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -132,10 +124,7 @@ isa = PBXGroup; children = ( D05B9F7529E39EEC008CB1F9 /* BurrowApp.swift */, - 43EBDB2A29FD754A005D8CFF /* AppDelegate.swift */, D05B9F7729E39EEC008CB1F9 /* ContentView.swift */, - 43EBDB2C29FD759E005D8CFF /* NetworkConfiguration.swift */, - 43EBDB2E29FDE85F005D8CFF /* Model.swift */, D05B9F7929E39EED008CB1F9 /* Assets.xcassets */, D020F66829E4AA74002790F6 /* App-iOS.entitlements */, D020F66929E4AA74002790F6 /* App-macOS.entitlements */, @@ -179,9 +168,6 @@ D020F65C29E4A697002790F6 /* PBXTargetDependency */, ); name = Burrow; - packageProductDependencies = ( - 43E50D6C29FA050600BD2280 /* FluidMenuBarExtra */, - ); productName = Burrow; productReference = D05B9F7229E39EEC008CB1F9 /* Burrow.app */; productType = "com.apple.product-type.application"; @@ -213,9 +199,6 @@ Base, ); mainGroup = D05B9F6929E39EEC008CB1F9; - packageReferences = ( - 43E50D6B29FA050600BD2280 /* XCRemoteSwiftPackageReference "fluid-menu-bar-extra" */, - ); productRefGroup = D05B9F7329E39EEC008CB1F9 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -257,11 +240,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 43EBDB2F29FDE85F005D8CFF /* Model.swift in Sources */, - 43EBDB2B29FD7557005D8CFF /* AppDelegate.swift in Sources */, D05B9F7829E39EEC008CB1F9 /* ContentView.swift in Sources */, D05B9F7629E39EEC008CB1F9 /* BurrowApp.swift in Sources */, - 43EBDB2D29FD759E005D8CFF /* NetworkConfiguration.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -280,7 +260,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D020F66229E4A6E5002790F6 /* NetworkExtension.xcconfig */; buildSettings = { - DEVELOPMENT_TEAM = 2H4LMN3ZLG; }; name = Debug; }; @@ -288,7 +267,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D020F66229E4A6E5002790F6 /* NetworkExtension.xcconfig */; buildSettings = { - DEVELOPMENT_TEAM = 2H4LMN3ZLG; }; name = Release; }; @@ -310,8 +288,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D020F64929E4A34B002790F6 /* Burrow.xcconfig */; buildSettings = { - DEVELOPMENT_TEAM = 2H4LMN3ZLG; - MACOSX_DEPLOYMENT_TARGET = 13.0; }; name = Debug; }; @@ -319,8 +295,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D020F64929E4A34B002790F6 /* Burrow.xcconfig */; buildSettings = { - DEVELOPMENT_TEAM = 2H4LMN3ZLG; - MACOSX_DEPLOYMENT_TARGET = 13.0; }; name = Release; }; @@ -355,25 +329,6 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ - -/* Begin XCRemoteSwiftPackageReference section */ - 43E50D6B29FA050600BD2280 /* XCRemoteSwiftPackageReference "fluid-menu-bar-extra" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/lfroms/fluid-menu-bar-extra.git"; - requirement = { - branch = main; - kind = branch; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - 43E50D6C29FA050600BD2280 /* FluidMenuBarExtra */ = { - isa = XCSwiftPackageProductDependency; - package = 43E50D6B29FA050600BD2280 /* XCRemoteSwiftPackageReference "fluid-menu-bar-extra" */; - productName = FluidMenuBarExtra; - }; -/* End XCSwiftPackageProductDependency section */ }; rootObject = D05B9F6A29E39EEC008CB1F9 /* Project object */; } diff --git a/Apple/Burrow.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Apple/Burrow.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 569a50e..0000000 --- a/Apple/Burrow.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,14 +0,0 @@ -{ - "pins" : [ - { - "identity" : "fluid-menu-bar-extra", - "kind" : "remoteSourceControl", - "location" : "https://github.com/lfroms/fluid-menu-bar-extra.git", - "state" : { - "branch" : "main", - "revision" : "b8d41bc1c2609c3943c47d00fb539de38f90b817" - } - } - ], - "version" : 2 -} diff --git a/Apple/Configuration/Identity.xcconfig b/Apple/Configuration/Identity.xcconfig index 6ff2392..e4ef90e 100644 --- a/Apple/Configuration/Identity.xcconfig +++ b/Apple/Configuration/Identity.xcconfig @@ -1,2 +1,2 @@ -DEVELOPMENT_TEAM = 2H4LMN3ZLG -APP_BUNDLE_IDENTIFIER = com.ThomasStubblefield.burrow +DEVELOPMENT_TEAM = 87PW93R2ZR +APP_BUNDLE_IDENTIFIER = com.hackclub.burrow