From bf6db015624ec5c05e74c6176a1494e53c9b3d55 Mon Sep 17 00:00:00 2001 From: redstrate <54911369+redstrate@users.noreply.github.com> Date: Wed, 18 Nov 2020 08:18:26 -0500 Subject: [PATCH] Add macOS version --- .../{MobileFort => Common}/Common.swift | 0 .../{MobileFort => Common}/PostView.swift | 0 .../{MobileFort => Common}/ProfileView.swift | 47 ++ .../AppDelegate.swift | 4 +- .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 58 ++ .../Assets.xcassets/Contents.json | 0 .../AttributedText.swift | 0 .../Base.lproj/LaunchScreen.storyboard | 0 .../Base.lproj/Main.storyboard | 683 ++++++++++++++++++ MobileFort/MobileFort (iOS)/Info.plist | 30 + .../MainView.swift | 2 +- .../MobileFort (iOS)/MobileFort.entitlements | 10 + .../Preview Assets.xcassets/Contents.json | 6 + .../SceneDelegate.swift | 0 .../MobileFort (macOS)/AppDelegate.swift | 32 + .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 58 ++ .../Assets.xcassets/Contents.json | 6 + .../MobileFort (macOS)/AttributedText.swift | 101 +++ .../Base.lproj/LaunchScreen.storyboard | 25 + .../Base.lproj/Main.storyboard | 683 ++++++++++++++++++ MobileFort/MobileFort (macOS)/Info.plist | 30 + MobileFort/MobileFort (macOS)/MainView.swift | 17 + .../MobileFort.entitlements | 12 + .../Preview Assets.xcassets/Contents.json | 6 + .../MobileFort (macOS)/SceneDelegate.swift | 34 + .../MobileFort.xcodeproj/project.pbxproj | 237 +++++- .../xcshareddata/swiftpm/Package.resolved | 13 +- .../xcschemes/MobileFort (macOS).xcscheme | 78 ++ .../xcschemes/MobileFort.xcscheme | 78 ++ .../AppIcon.appiconset/Contents.json | 98 --- MobileFort/MobileFort/Info.plist | 60 -- 33 files changed, 2238 insertions(+), 192 deletions(-) rename MobileFort/{MobileFort => Common}/Common.swift (100%) rename MobileFort/{MobileFort => Common}/PostView.swift (100%) rename MobileFort/{MobileFort => Common}/ProfileView.swift (68%) rename MobileFort/{MobileFort => MobileFort (iOS)}/AppDelegate.swift (98%) create mode 100644 MobileFort/MobileFort (iOS)/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 MobileFort/MobileFort (iOS)/Assets.xcassets/AppIcon.appiconset/Contents.json rename MobileFort/{MobileFort => MobileFort (iOS)}/Assets.xcassets/Contents.json (100%) rename MobileFort/{MobileFort => MobileFort (iOS)}/AttributedText.swift (100%) rename MobileFort/{MobileFort => MobileFort (iOS)}/Base.lproj/LaunchScreen.storyboard (100%) create mode 100644 MobileFort/MobileFort (iOS)/Base.lproj/Main.storyboard create mode 100644 MobileFort/MobileFort (iOS)/Info.plist rename MobileFort/{MobileFort => MobileFort (iOS)}/MainView.swift (91%) create mode 100644 MobileFort/MobileFort (iOS)/MobileFort.entitlements create mode 100644 MobileFort/MobileFort (iOS)/Preview Content/Preview Assets.xcassets/Contents.json rename MobileFort/{MobileFort => MobileFort (iOS)}/SceneDelegate.swift (100%) create mode 100644 MobileFort/MobileFort (macOS)/AppDelegate.swift create mode 100644 MobileFort/MobileFort (macOS)/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 MobileFort/MobileFort (macOS)/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 MobileFort/MobileFort (macOS)/Assets.xcassets/Contents.json create mode 100644 MobileFort/MobileFort (macOS)/AttributedText.swift create mode 100644 MobileFort/MobileFort (macOS)/Base.lproj/LaunchScreen.storyboard create mode 100644 MobileFort/MobileFort (macOS)/Base.lproj/Main.storyboard create mode 100644 MobileFort/MobileFort (macOS)/Info.plist create mode 100644 MobileFort/MobileFort (macOS)/MainView.swift create mode 100644 MobileFort/MobileFort (macOS)/MobileFort.entitlements create mode 100644 MobileFort/MobileFort (macOS)/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 MobileFort/MobileFort (macOS)/SceneDelegate.swift create mode 100644 MobileFort/MobileFort.xcodeproj/xcshareddata/xcschemes/MobileFort (macOS).xcscheme create mode 100644 MobileFort/MobileFort.xcodeproj/xcshareddata/xcschemes/MobileFort.xcscheme delete mode 100644 MobileFort/MobileFort/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 MobileFort/MobileFort/Info.plist diff --git a/MobileFort/MobileFort/Common.swift b/MobileFort/Common/Common.swift similarity index 100% rename from MobileFort/MobileFort/Common.swift rename to MobileFort/Common/Common.swift diff --git a/MobileFort/MobileFort/PostView.swift b/MobileFort/Common/PostView.swift similarity index 100% rename from MobileFort/MobileFort/PostView.swift rename to MobileFort/Common/PostView.swift diff --git a/MobileFort/MobileFort/ProfileView.swift b/MobileFort/Common/ProfileView.swift similarity index 68% rename from MobileFort/MobileFort/ProfileView.swift rename to MobileFort/Common/ProfileView.swift index a286419..547f116 100644 --- a/MobileFort/MobileFort/ProfileView.swift +++ b/MobileFort/Common/ProfileView.swift @@ -1,6 +1,9 @@ import SwiftUI import WebKit + +#if !os(macOS) import WebView +#endif struct DescriptionView: View { let username: String @@ -46,10 +49,15 @@ struct DescriptionView: View { return view } + @ViewBuilder var body: some View { + #if !os(macOS) VStack { WebView(webView: webView) }.navigationBarTitle("Sidebar", displayMode: .inline) + #else + Text("Not supported on macOS.") + #endif } } @@ -58,6 +66,7 @@ struct ProfileView: View { @State var posts: [ParsedPostContainer] = [] + #if os(iOS) var body: some View { List(posts, id: \.post.id) { post in PostView(post: post) @@ -98,6 +107,44 @@ struct ProfileView: View { }.resume() } } + #else + var body: some View { + List(posts, id: \.post.id) { post in + PostView(post: post) + } + .onAppear { + let url = URL(string: "https://www.pillowfort.social/" + self.username + "/json")! + + URLSession.shared.dataTask(with: url) { (data, response, error) in + do { + if let jsonData = data { + struct Posts : Decodable { + let posts: [Post] + } + + let decoder = JSONDecoder() + decoder.keyDecodingStrategy = .convertFromSnakeCase + + let decodedPosts = try decoder.decode(Posts.self, from: jsonData) + + var postArray = [ParsedPostContainer]() + + for post in decodedPosts.posts { + let container = ParsedPostContainer(post: post, contentAttributed: (try? NSMutableAttributedString(data: post.getContent().data(using: .utf8)!, options: [.documentType: NSAttributedString.DocumentType.html], documentAttributes: nil))!) + postArray.append(container) + } + + DispatchQueue.main.sync { + self.posts = postArray + } + } + } catch { + print("\(error)") + } + }.resume() + } + } + #endif } struct ProfileView_Previews: PreviewProvider { diff --git a/MobileFort/MobileFort/AppDelegate.swift b/MobileFort/MobileFort (iOS)/AppDelegate.swift similarity index 98% rename from MobileFort/MobileFort/AppDelegate.swift rename to MobileFort/MobileFort (iOS)/AppDelegate.swift index c9a4cb4..cbd1c1d 100644 --- a/MobileFort/MobileFort/AppDelegate.swift +++ b/MobileFort/MobileFort (iOS)/AppDelegate.swift @@ -5,11 +5,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { return true } - + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } - + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { } } diff --git a/MobileFort/MobileFort (iOS)/Assets.xcassets/AccentColor.colorset/Contents.json b/MobileFort/MobileFort (iOS)/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/MobileFort/MobileFort (iOS)/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MobileFort/MobileFort (iOS)/Assets.xcassets/AppIcon.appiconset/Contents.json b/MobileFort/MobileFort (iOS)/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..3f00db4 --- /dev/null +++ b/MobileFort/MobileFort (iOS)/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MobileFort/MobileFort/Assets.xcassets/Contents.json b/MobileFort/MobileFort (iOS)/Assets.xcassets/Contents.json similarity index 100% rename from MobileFort/MobileFort/Assets.xcassets/Contents.json rename to MobileFort/MobileFort (iOS)/Assets.xcassets/Contents.json diff --git a/MobileFort/MobileFort/AttributedText.swift b/MobileFort/MobileFort (iOS)/AttributedText.swift similarity index 100% rename from MobileFort/MobileFort/AttributedText.swift rename to MobileFort/MobileFort (iOS)/AttributedText.swift diff --git a/MobileFort/MobileFort/Base.lproj/LaunchScreen.storyboard b/MobileFort/MobileFort (iOS)/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from MobileFort/MobileFort/Base.lproj/LaunchScreen.storyboard rename to MobileFort/MobileFort (iOS)/Base.lproj/LaunchScreen.storyboard diff --git a/MobileFort/MobileFort (iOS)/Base.lproj/Main.storyboard b/MobileFort/MobileFort (iOS)/Base.lproj/Main.storyboard new file mode 100644 index 0000000..1c77c0c --- /dev/null +++ b/MobileFort/MobileFort (iOS)/Base.lproj/Main.storyboard @@ -0,0 +1,683 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MobileFort/MobileFort (iOS)/Info.plist b/MobileFort/MobileFort (iOS)/Info.plist new file mode 100644 index 0000000..cfbbdb7 --- /dev/null +++ b/MobileFort/MobileFort (iOS)/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + + diff --git a/MobileFort/MobileFort/MainView.swift b/MobileFort/MobileFort (iOS)/MainView.swift similarity index 91% rename from MobileFort/MobileFort/MainView.swift rename to MobileFort/MobileFort (iOS)/MainView.swift index a233882..707dfc1 100644 --- a/MobileFort/MobileFort/MainView.swift +++ b/MobileFort/MobileFort (iOS)/MainView.swift @@ -8,7 +8,7 @@ struct MainView: View { VStack { TextField("Username", text: $username) .disableAutocorrection(true) - .autocapitalization(.none) + //.autocapitalization(.none) NavigationLink(destination: ProfileView(username: username)) { Text("Show Feed") } diff --git a/MobileFort/MobileFort (iOS)/MobileFort.entitlements b/MobileFort/MobileFort (iOS)/MobileFort.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/MobileFort/MobileFort (iOS)/MobileFort.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/MobileFort/MobileFort (iOS)/Preview Content/Preview Assets.xcassets/Contents.json b/MobileFort/MobileFort (iOS)/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MobileFort/MobileFort (iOS)/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MobileFort/MobileFort/SceneDelegate.swift b/MobileFort/MobileFort (iOS)/SceneDelegate.swift similarity index 100% rename from MobileFort/MobileFort/SceneDelegate.swift rename to MobileFort/MobileFort (iOS)/SceneDelegate.swift diff --git a/MobileFort/MobileFort (macOS)/AppDelegate.swift b/MobileFort/MobileFort (macOS)/AppDelegate.swift new file mode 100644 index 0000000..276132e --- /dev/null +++ b/MobileFort/MobileFort (macOS)/AppDelegate.swift @@ -0,0 +1,32 @@ +import Cocoa +import SwiftUI + +@NSApplicationMain +class AppDelegate: NSObject, NSApplicationDelegate { + + var window: NSWindow! + + + func applicationDidFinishLaunching(_ aNotification: Notification) { + // Create the SwiftUI view that provides the window contents. + let contentView = MainView() + + // Create the window and set the content view. + window = NSWindow( + contentRect: NSRect(x: 0, y: 0, width: 480, height: 300), + styleMask: [.titled, .closable, .miniaturizable, .resizable, .fullSizeContentView], + backing: .buffered, defer: false) + window.isReleasedWhenClosed = false + window.center() + window.setFrameAutosaveName("Main Window") + window.contentView = NSHostingView(rootView: contentView) + window.makeKeyAndOrderFront(nil) + } + + func applicationWillTerminate(_ aNotification: Notification) { + // Insert code here to tear down your application + } + + +} + diff --git a/MobileFort/MobileFort (macOS)/Assets.xcassets/AccentColor.colorset/Contents.json b/MobileFort/MobileFort (macOS)/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/MobileFort/MobileFort (macOS)/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MobileFort/MobileFort (macOS)/Assets.xcassets/AppIcon.appiconset/Contents.json b/MobileFort/MobileFort (macOS)/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..3f00db4 --- /dev/null +++ b/MobileFort/MobileFort (macOS)/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MobileFort/MobileFort (macOS)/Assets.xcassets/Contents.json b/MobileFort/MobileFort (macOS)/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MobileFort/MobileFort (macOS)/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MobileFort/MobileFort (macOS)/AttributedText.swift b/MobileFort/MobileFort (macOS)/AttributedText.swift new file mode 100644 index 0000000..9c0adea --- /dev/null +++ b/MobileFort/MobileFort (macOS)/AttributedText.swift @@ -0,0 +1,101 @@ +import SwiftUI + +extension NSMutableAttributedString { + func with(font: NSFont) -> NSMutableAttributedString { + enumerateAttribute(NSAttributedString.Key.font, in: NSMakeRange(0, length), options: .longestEffectiveRangeNotRequired, using: { (value, range, stop) in + if let originalFont = value as? NSFont, let newFont = applyTraitsFromFont(originalFont, to: font) { + addAttribute(NSAttributedString.Key.font, value: newFont, range: range) + } + }) + + return self + } + + func applyTraitsFromFont(_ originalFont: NSFont, to newFont: NSFont) -> NSFont? { + let originalTrait = originalFont.fontDescriptor.symbolicTraits + + if(originalTrait.contains(NSFontDescriptor.SymbolicTraits.bold)) { + var traits = newFont.fontDescriptor.symbolicTraits + traits.insert(.bold) + + let fontDescriptor = newFont.fontDescriptor.withSymbolicTraits(traits) + return NSFont.init(descriptor: fontDescriptor, size: 0) + } + + return newFont + } +} + +final class AttributedTextComponent: NSViewRepresentable { + let string: NSMutableAttributedString + + init(_ string: NSMutableAttributedString) { + self.string = string + } + + public func makeNSView(context: NSViewRepresentableContext) -> NSTextField { + NSTextField() + } + + func updateNSView(_ uiView: NSTextField, context: Context) { + uiView.backgroundColor = .clear + //uiView.numberOfLines = 0 + uiView.lineBreakMode = .byWordWrapping + uiView.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) + uiView.attributedStringValue = string + } +} + +struct SizeKey: PreferenceKey { + static var defaultValue: CGSize = .zero + + static func reduce(value: inout CGSize, nextValue: () -> CGSize) { + value = nextValue() + } +} + +struct AttributedText: View { + let html: NSMutableAttributedString + let component: AttributedTextComponent + + @State var height: CGFloat = 0.0 + @State var lastSize: CGSize = .zero + + init(_ html: NSMutableAttributedString) { + self.html = html.with(font: NSFont.systemFont(ofSize: 15)) + self.component = AttributedTextComponent(html) + } + + func calculateHeight(size: CGSize) { + let label = NSTextField(frame: NSRect(x: 0, y: 0, width: size.width, height: .greatestFiniteMagnitude)) + + //label.numberOfLines = 0 + label.lineBreakMode = .byWordWrapping + + //label.attributedText = self.html + label.attributedStringValue = self.html + + label.sizeToFit() + + self.height = label.frame.height + self.lastSize = size + } + + var body: some View { + ZStack { + GeometryReader { geometry in + Rectangle().fill(Color.clear).preference(key: SizeKey.self, value: geometry.size) + }.onPreferenceChange(SizeKey.self, perform: { size in + self.calculateHeight(size: size) + }) + + component + } + .frame(minWidth: 0.0, maxWidth: .infinity, minHeight: self.height, maxHeight: self.height) + .onAppear { + if self.lastSize != .zero { + self.calculateHeight(size: self.lastSize) + } + } + } +} diff --git a/MobileFort/MobileFort (macOS)/Base.lproj/LaunchScreen.storyboard b/MobileFort/MobileFort (macOS)/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/MobileFort/MobileFort (macOS)/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MobileFort/MobileFort (macOS)/Base.lproj/Main.storyboard b/MobileFort/MobileFort (macOS)/Base.lproj/Main.storyboard new file mode 100644 index 0000000..1c77c0c --- /dev/null +++ b/MobileFort/MobileFort (macOS)/Base.lproj/Main.storyboard @@ -0,0 +1,683 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MobileFort/MobileFort (macOS)/Info.plist b/MobileFort/MobileFort (macOS)/Info.plist new file mode 100644 index 0000000..cfbbdb7 --- /dev/null +++ b/MobileFort/MobileFort (macOS)/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + + diff --git a/MobileFort/MobileFort (macOS)/MainView.swift b/MobileFort/MobileFort (macOS)/MainView.swift new file mode 100644 index 0000000..dc9c1b8 --- /dev/null +++ b/MobileFort/MobileFort (macOS)/MainView.swift @@ -0,0 +1,17 @@ +import SwiftUI + +struct MainView: View { + @State private var username: String = "" + + var body: some View { + VStack { + ProfileView(username: "redstrate") + } + } +} + +struct MainView_Previews: PreviewProvider { + static var previews: some View { + MainView() + } +} diff --git a/MobileFort/MobileFort (macOS)/MobileFort.entitlements b/MobileFort/MobileFort (macOS)/MobileFort.entitlements new file mode 100644 index 0000000..625af03 --- /dev/null +++ b/MobileFort/MobileFort (macOS)/MobileFort.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + com.apple.security.network.client + + + diff --git a/MobileFort/MobileFort (macOS)/Preview Content/Preview Assets.xcassets/Contents.json b/MobileFort/MobileFort (macOS)/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MobileFort/MobileFort (macOS)/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MobileFort/MobileFort (macOS)/SceneDelegate.swift b/MobileFort/MobileFort (macOS)/SceneDelegate.swift new file mode 100644 index 0000000..95f64c6 --- /dev/null +++ b/MobileFort/MobileFort (macOS)/SceneDelegate.swift @@ -0,0 +1,34 @@ +import UIKit +import SwiftUI + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + var window: UIWindow? + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + + let contentView = MainView() + + if let windowScene = scene as? UIWindowScene { + let window = UIWindow(windowScene: windowScene) + window.rootViewController = UIHostingController(rootView: contentView) + self.window = window + window.makeKeyAndVisible() + } + } + + func sceneDidDisconnect(_ scene: UIScene) { + } + + func sceneDidBecomeActive(_ scene: UIScene) { + } + + func sceneWillResignActive(_ scene: UIScene) { + } + + func sceneWillEnterForeground(_ scene: UIScene) { + } + + func sceneDidEnterBackground(_ scene: UIScene) { + } +} + diff --git a/MobileFort/MobileFort.xcodeproj/project.pbxproj b/MobileFort/MobileFort.xcodeproj/project.pbxproj index 7726c0e..c708876 100644 --- a/MobileFort/MobileFort.xcodeproj/project.pbxproj +++ b/MobileFort/MobileFort.xcodeproj/project.pbxproj @@ -13,6 +13,16 @@ 03427F5F2488856D00A0073D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03427F5E2488856D00A0073D /* Assets.xcassets */; }; 03427F652488856D00A0073D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 03427F632488856D00A0073D /* LaunchScreen.storyboard */; }; 03427F6D248887D200A0073D /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03427F6C248887D200A0073D /* Common.swift */; }; + 03B2BA5C25654E9700483FE3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B2BA5B25654E9700483FE3 /* AppDelegate.swift */; }; + 03B2BA6025654E9800483FE3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03B2BA5F25654E9800483FE3 /* Assets.xcassets */; }; + 03B2BA6325654E9800483FE3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03B2BA6225654E9800483FE3 /* Preview Assets.xcassets */; }; + 03B2BA6625654E9800483FE3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 03B2BA6425654E9800483FE3 /* Main.storyboard */; }; + 03B2BA7025654F0500483FE3 /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03427F6C248887D200A0073D /* Common.swift */; }; + 03B2BA7125654F0500483FE3 /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03BCD7422488947200DA1F27 /* ProfileView.swift */; }; + 03B2BA7225654F0500483FE3 /* PostView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03BCD7442488948200DA1F27 /* PostView.swift */; }; + 03B2BA7925654F4E00483FE3 /* RemoteImage in Frameworks */ = {isa = PBXBuildFile; productRef = 03B2BA7825654F4E00483FE3 /* RemoteImage */; }; + 03B2BA85256550FA00483FE3 /* AttributedText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B2BA84256550FA00483FE3 /* AttributedText.swift */; }; + 03B2BA9F2565555500483FE3 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B2BA9E2565555500483FE3 /* MainView.swift */; }; 03BCD7432488947200DA1F27 /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03BCD7422488947200DA1F27 /* ProfileView.swift */; }; 03BCD7452488948200DA1F27 /* PostView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03BCD7442488948200DA1F27 /* PostView.swift */; }; 03BCD7482488985A00DA1F27 /* RemoteImage in Frameworks */ = {isa = PBXBuildFile; productRef = 03BCD7472488985A00DA1F27 /* RemoteImage */; }; @@ -21,7 +31,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 03427F552488856C00A0073D /* MobileFort.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MobileFort.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 03427F552488856C00A0073D /* MobileFort (iOS).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "MobileFort (iOS).app"; sourceTree = BUILT_PRODUCTS_DIR; }; 03427F582488856C00A0073D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 03427F5A2488856C00A0073D /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 03427F5C2488856C00A0073D /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; }; @@ -29,6 +39,15 @@ 03427F642488856D00A0073D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 03427F662488856D00A0073D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 03427F6C248887D200A0073D /* Common.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = ""; }; + 03B2BA5925654E9700483FE3 /* MobileFort (macOS).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "MobileFort (macOS).app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 03B2BA5B25654E9700483FE3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 03B2BA5F25654E9800483FE3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 03B2BA6225654E9800483FE3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 03B2BA6525654E9800483FE3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 03B2BA6725654E9800483FE3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 03B2BA6825654E9800483FE3 /* MobileFort.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MobileFort.entitlements; sourceTree = ""; }; + 03B2BA84256550FA00483FE3 /* AttributedText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttributedText.swift; sourceTree = ""; }; + 03B2BA9E2565555500483FE3 /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; }; 03BCD7422488947200DA1F27 /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = ""; }; 03BCD7442488948200DA1F27 /* PostView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostView.swift; sourceTree = ""; }; 03BCD7492489322500DA1F27 /* AttributedText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttributedText.swift; sourceTree = ""; }; @@ -44,48 +63,97 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 03B2BA5625654E9700483FE3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 03B2BA7925654F4E00483FE3 /* RemoteImage in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 03427F4C2488856C00A0073D = { isa = PBXGroup; children = ( - 03427F572488856C00A0073D /* MobileFort */, + 03B2BA6E25654ED300483FE3 /* Common */, + 03427F572488856C00A0073D /* MobileFort (iOS) */, + 03B2BA5A25654E9700483FE3 /* MobileFort (macOS) */, 03427F562488856C00A0073D /* Products */, + 03B2BA7725654F4E00483FE3 /* Frameworks */, ); sourceTree = ""; }; 03427F562488856C00A0073D /* Products */ = { isa = PBXGroup; children = ( - 03427F552488856C00A0073D /* MobileFort.app */, + 03427F552488856C00A0073D /* MobileFort (iOS).app */, + 03B2BA5925654E9700483FE3 /* MobileFort (macOS).app */, ); name = Products; sourceTree = ""; }; - 03427F572488856C00A0073D /* MobileFort */ = { + 03427F572488856C00A0073D /* MobileFort (iOS) */ = { isa = PBXGroup; children = ( + 03427F5C2488856C00A0073D /* MainView.swift */, 03427F582488856C00A0073D /* AppDelegate.swift */, 03427F5A2488856C00A0073D /* SceneDelegate.swift */, - 03427F5C2488856C00A0073D /* MainView.swift */, 03427F5E2488856D00A0073D /* Assets.xcassets */, 03427F632488856D00A0073D /* LaunchScreen.storyboard */, 03427F662488856D00A0073D /* Info.plist */, + 03BCD7492489322500DA1F27 /* AttributedText.swift */, + ); + path = "MobileFort (iOS)"; + sourceTree = ""; + }; + 03B2BA5A25654E9700483FE3 /* MobileFort (macOS) */ = { + isa = PBXGroup; + children = ( + 03B2BA5B25654E9700483FE3 /* AppDelegate.swift */, + 03B2BA5F25654E9800483FE3 /* Assets.xcassets */, + 03B2BA6425654E9800483FE3 /* Main.storyboard */, + 03B2BA6725654E9800483FE3 /* Info.plist */, + 03B2BA6825654E9800483FE3 /* MobileFort.entitlements */, + 03B2BA6125654E9800483FE3 /* Preview Content */, + 03B2BA84256550FA00483FE3 /* AttributedText.swift */, + 03B2BA9E2565555500483FE3 /* MainView.swift */, + ); + path = "MobileFort (macOS)"; + sourceTree = ""; + }; + 03B2BA6125654E9800483FE3 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 03B2BA6225654E9800483FE3 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 03B2BA6E25654ED300483FE3 /* Common */ = { + isa = PBXGroup; + children = ( 03427F6C248887D200A0073D /* Common.swift */, 03BCD7422488947200DA1F27 /* ProfileView.swift */, 03BCD7442488948200DA1F27 /* PostView.swift */, - 03BCD7492489322500DA1F27 /* AttributedText.swift */, ); - path = MobileFort; + path = Common; + sourceTree = ""; + }; + 03B2BA7725654F4E00483FE3 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 03427F542488856C00A0073D /* MobileFort */ = { + 03427F542488856C00A0073D /* MobileFort (iOS) */ = { isa = PBXNativeTarget; - buildConfigurationList = 03427F692488856D00A0073D /* Build configuration list for PBXNativeTarget "MobileFort" */; + buildConfigurationList = 03427F692488856D00A0073D /* Build configuration list for PBXNativeTarget "MobileFort (iOS)" */; buildPhases = ( 03427F512488856C00A0073D /* Sources */, 03427F522488856C00A0073D /* Frameworks */, @@ -95,13 +163,33 @@ ); dependencies = ( ); - name = MobileFort; + name = "MobileFort (iOS)"; packageProductDependencies = ( 03BCD7472488985A00DA1F27 /* RemoteImage */, 03BCD74C2489365600DA1F27 /* WebView */, ); productName = MobileFort; - productReference = 03427F552488856C00A0073D /* MobileFort.app */; + productReference = 03427F552488856C00A0073D /* MobileFort (iOS).app */; + productType = "com.apple.product-type.application"; + }; + 03B2BA5825654E9700483FE3 /* MobileFort (macOS) */ = { + isa = PBXNativeTarget; + buildConfigurationList = 03B2BA6925654E9800483FE3 /* Build configuration list for PBXNativeTarget "MobileFort (macOS)" */; + buildPhases = ( + 03B2BA5525654E9700483FE3 /* Sources */, + 03B2BA5625654E9700483FE3 /* Frameworks */, + 03B2BA5725654E9700483FE3 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "MobileFort (macOS)"; + packageProductDependencies = ( + 03B2BA7825654F4E00483FE3 /* RemoteImage */, + ); + productName = MobileFort; + productReference = 03B2BA5925654E9700483FE3 /* MobileFort (macOS).app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -110,12 +198,15 @@ 03427F4D2488856C00A0073D /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 1150; - LastUpgradeCheck = 1150; + LastSwiftUpdateCheck = 1200; + LastUpgradeCheck = 1200; TargetAttributes = { 03427F542488856C00A0073D = { CreatedOnToolsVersion = 11.5; }; + 03B2BA5825654E9700483FE3 = { + CreatedOnToolsVersion = 12.0; + }; }; }; buildConfigurationList = 03427F502488856C00A0073D /* Build configuration list for PBXProject "MobileFort" */; @@ -135,7 +226,8 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 03427F542488856C00A0073D /* MobileFort */, + 03427F542488856C00A0073D /* MobileFort (iOS) */, + 03B2BA5825654E9700483FE3 /* MobileFort (macOS) */, ); }; /* End PBXProject section */ @@ -150,6 +242,16 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 03B2BA5725654E9700483FE3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 03B2BA6625654E9800483FE3 /* Main.storyboard in Resources */, + 03B2BA6325654E9800483FE3 /* Preview Assets.xcassets in Resources */, + 03B2BA6025654E9800483FE3 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -167,6 +269,19 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 03B2BA5525654E9700483FE3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 03B2BA85256550FA00483FE3 /* AttributedText.swift in Sources */, + 03B2BA9F2565555500483FE3 /* MainView.swift in Sources */, + 03B2BA7025654F0500483FE3 /* Common.swift in Sources */, + 03B2BA7125654F0500483FE3 /* ProfileView.swift in Sources */, + 03B2BA7225654F0500483FE3 /* PostView.swift in Sources */, + 03B2BA5C25654E9700483FE3 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ @@ -178,6 +293,14 @@ name = LaunchScreen.storyboard; sourceTree = ""; }; + 03B2BA6425654E9800483FE3 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 03B2BA6525654E9800483FE3 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -207,6 +330,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -231,13 +355,15 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.5; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -267,6 +393,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -285,12 +412,14 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.5; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -303,7 +432,7 @@ DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = JM5LKVKH48; ENABLE_PREVIEWS = YES; - INFOPLIST_FILE = MobileFort/Info.plist; + INFOPLIST_FILE = "MobileFort (iOS)/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -323,7 +452,7 @@ DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = JM5LKVKH48; ENABLE_PREVIEWS = YES; - INFOPLIST_FILE = MobileFort/Info.plist; + INFOPLIST_FILE = "MobileFort (iOS)/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -335,6 +464,60 @@ }; name = Release; }; + 03B2BA6A25654E9800483FE3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_ENTITLEMENTS = "MobileFort (macOS)/MobileFort.entitlements"; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_ASSET_PATHS = ""; + DEVELOPMENT_TEAM = JM5LKVKH48; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = "MobileFort (macOS)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = josh.MobileFort; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 03B2BA6B25654E9800483FE3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_ENTITLEMENTS = "MobileFort (macOS)/MobileFort.entitlements"; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_ASSET_PATHS = ""; + DEVELOPMENT_TEAM = JM5LKVKH48; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = "MobileFort (macOS)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = josh.MobileFort; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -347,7 +530,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 03427F692488856D00A0073D /* Build configuration list for PBXNativeTarget "MobileFort" */ = { + 03427F692488856D00A0073D /* Build configuration list for PBXNativeTarget "MobileFort (iOS)" */ = { isa = XCConfigurationList; buildConfigurations = ( 03427F6A2488856D00A0073D /* Debug */, @@ -356,6 +539,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 03B2BA6925654E9800483FE3 /* Build configuration list for PBXNativeTarget "MobileFort (macOS)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 03B2BA6A25654E9800483FE3 /* Debug */, + 03B2BA6B25654E9800483FE3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ @@ -364,7 +556,7 @@ repositoryURL = "https://github.com/crelies/RemoteImage"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 2.0.2; + minimumVersion = 3.0.0; }; }; 03BCD74B2489365600DA1F27 /* XCRemoteSwiftPackageReference "SwiftUI-WebView" */ = { @@ -378,6 +570,11 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 03B2BA7825654F4E00483FE3 /* RemoteImage */ = { + isa = XCSwiftPackageProductDependency; + package = 03BCD7462488985A00DA1F27 /* XCRemoteSwiftPackageReference "RemoteImage" */; + productName = RemoteImage; + }; 03BCD7472488985A00DA1F27 /* RemoteImage */ = { isa = XCSwiftPackageProductDependency; package = 03BCD7462488985A00DA1F27 /* XCRemoteSwiftPackageReference "RemoteImage" */; diff --git a/MobileFort/MobileFort.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/MobileFort/MobileFort.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 29f5aba..5a28100 100644 --- a/MobileFort/MobileFort.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/MobileFort/MobileFort.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/crelies/RemoteImage", "state": { "branch": null, - "revision": "dd92986fbb43c7a204aafabb0b3f550e94d55e70", - "version": "2.0.2" + "revision": "0a774642c744d653601d76b625c2cf290e363e52", + "version": "3.0.0" } }, { @@ -18,15 +18,6 @@ "revision": "ec4352095428a06423868b3b2a92fdaa3c6281f7", "version": "0.2.0" } - }, - { - "package": "ViewInspector", - "repositoryURL": "https://github.com/nalexn/ViewInspector.git", - "state": { - "branch": null, - "revision": "7d55eb940242512aad2bf28db354d09d5de43893", - "version": "0.3.11" - } } ] }, diff --git a/MobileFort/MobileFort.xcodeproj/xcshareddata/xcschemes/MobileFort (macOS).xcscheme b/MobileFort/MobileFort.xcodeproj/xcshareddata/xcschemes/MobileFort (macOS).xcscheme new file mode 100644 index 0000000..6279423 --- /dev/null +++ b/MobileFort/MobileFort.xcodeproj/xcshareddata/xcschemes/MobileFort (macOS).xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MobileFort/MobileFort.xcodeproj/xcshareddata/xcschemes/MobileFort.xcscheme b/MobileFort/MobileFort.xcodeproj/xcshareddata/xcschemes/MobileFort.xcscheme new file mode 100644 index 0000000..6fbc4aa --- /dev/null +++ b/MobileFort/MobileFort.xcodeproj/xcshareddata/xcschemes/MobileFort.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MobileFort/MobileFort/Assets.xcassets/AppIcon.appiconset/Contents.json b/MobileFort/MobileFort/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 9221b9b..0000000 --- a/MobileFort/MobileFort/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/MobileFort/MobileFort/Info.plist b/MobileFort/MobileFort/Info.plist deleted file mode 100644 index 9742bf0..0000000 --- a/MobileFort/MobileFort/Info.plist +++ /dev/null @@ -1,60 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - $(PRODUCT_MODULE_NAME).SceneDelegate - - - - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - -