Compare commits
5 Commits
d8e93e481d
...
058166e028
Author | SHA1 | Date |
---|---|---|
Shadowfacts | 058166e028 | |
Shadowfacts | b2aea09b54 | |
Shadowfacts | f5bb2ed2c3 | |
Shadowfacts | cea2076244 | |
Shadowfacts | b174a26d1c |
|
@ -12,11 +12,13 @@ import GeminiProtocol
|
|||
|
||||
public struct BrowserView: View {
|
||||
let navigator: NavigationManager
|
||||
let scrollingEnabled: Bool
|
||||
@State var task: GeminiDataTask?
|
||||
@State var state: ViewState = .loading
|
||||
|
||||
public init(navigator: NavigationManager) {
|
||||
public init(navigator: NavigationManager, scrollingEnabled: Bool = true) {
|
||||
self.navigator = navigator
|
||||
self.scrollingEnabled = scrollingEnabled
|
||||
}
|
||||
|
||||
public var body: some View {
|
||||
|
@ -26,18 +28,21 @@ public struct BrowserView: View {
|
|||
|
||||
@ViewBuilder
|
||||
private var mainView: some View {
|
||||
switch state {
|
||||
case .loading:
|
||||
loadingView
|
||||
.onAppear(perform: self.loadDocument)
|
||||
case let .error(message):
|
||||
VStack {
|
||||
VStack {
|
||||
switch state {
|
||||
case .loading:
|
||||
Spacer()
|
||||
loadingView
|
||||
.onAppear(perform: self.loadDocument)
|
||||
Spacer()
|
||||
case let .error(message):
|
||||
Text("An error occurred")
|
||||
.font(.headline)
|
||||
Text(message)
|
||||
case let .document(doc):
|
||||
DocumentView(document: doc, scrollingEnabled: scrollingEnabled, changeURL: navigator.changeURL)
|
||||
Spacer()
|
||||
}
|
||||
case let .document(doc):
|
||||
DocumentView(document: doc, changeURL: navigator.changeURL)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,7 +82,12 @@ public struct BrowserView: View {
|
|||
}
|
||||
|
||||
private func urlChanged(_ newValue: URL) {
|
||||
state = .loading
|
||||
if case .loading = state {
|
||||
task?.cancel()
|
||||
loadDocument()
|
||||
} else {
|
||||
state = .loading
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,13 +24,29 @@ public class NavigationManager: NSObject, ObservableObject {
|
|||
}
|
||||
|
||||
public func changeURL(_ url: URL) {
|
||||
guard url.scheme == "gemini" else {
|
||||
delegate?.loadNonGeminiURL(url)
|
||||
return
|
||||
var components = URLComponents(url: url, resolvingAgainstBaseURL: false)!
|
||||
if let scheme = url.scheme {
|
||||
if scheme != "gemini" {
|
||||
delegate?.loadNonGeminiURL(url)
|
||||
return
|
||||
}
|
||||
if components.port == 1965 {
|
||||
components.port = nil
|
||||
}
|
||||
} else {
|
||||
components.scheme = "gemini"
|
||||
}
|
||||
|
||||
// Foundation parses bare hosts (e.g. `example.com`) as having no host and a path of `example.com`
|
||||
if components.host == nil {
|
||||
components.host = components.path
|
||||
components.path = "/"
|
||||
}
|
||||
|
||||
let url = components.url!
|
||||
|
||||
backStack.append(currentURL)
|
||||
currentURL = cannonicalizeURL(url)
|
||||
currentURL = url
|
||||
forwardStack = []
|
||||
}
|
||||
|
||||
|
@ -39,14 +55,6 @@ public class NavigationManager: NSObject, ObservableObject {
|
|||
currentURL = url
|
||||
}
|
||||
|
||||
private func cannonicalizeURL(_ url: URL) -> URL {
|
||||
var components = URLComponents(url: url, resolvingAgainstBaseURL: false)!
|
||||
if components.scheme == "gemini" && components.port == 1965 {
|
||||
components.port = nil
|
||||
}
|
||||
return components.url!
|
||||
}
|
||||
|
||||
@objc public func back() {
|
||||
guard !backStack.isEmpty else { return }
|
||||
forwardStack.insert(currentURL, at: 0)
|
||||
|
|
After Width: | Height: | Size: 332 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 16 KiB |
|
@ -1,41 +1,49 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "20@2x-1.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"filename" : "20@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"filename" : "29@2x-1.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"filename" : "29@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"filename" : "40@2x-1.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "40@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "60@2x.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"filename" : "60@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "60x60"
|
||||
|
@ -46,6 +54,7 @@
|
|||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"filename" : "20@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
|
@ -56,6 +65,7 @@
|
|||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"filename" : "29@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
|
@ -66,6 +76,7 @@
|
|||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "40@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
|
@ -76,16 +87,19 @@
|
|||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"filename" : "76@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"filename" : "83.5@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "83.5x83.5"
|
||||
},
|
||||
{
|
||||
"filename" : "1024.png",
|
||||
"idiom" : "ios-marketing",
|
||||
"scale" : "1x",
|
||||
"size" : "1024x1024"
|
||||
|
|
|
@ -0,0 +1,167 @@
|
|||
//
|
||||
// BrowserViewController.swift
|
||||
// Gemini-iOS
|
||||
//
|
||||
// Created by Shadowfacts on 9/28/20.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
import BrowserCore
|
||||
import Combine
|
||||
|
||||
class BrowserViewController: UIViewController, UIScrollViewDelegate {
|
||||
|
||||
let navigator: NavigationManager
|
||||
|
||||
private var scrollView: UIScrollView!
|
||||
|
||||
private var browserHost: UIHostingController<BrowserView>!
|
||||
private var navBarHost: UIHostingController<NavigationBar>!
|
||||
private var toolBarHost: UIHostingController<ToolBar>!
|
||||
|
||||
private var prevScrollViewContentOffset: CGPoint?
|
||||
|
||||
private var barAnimator: UIViewPropertyAnimator?
|
||||
|
||||
private var cancellables = [AnyCancellable]()
|
||||
|
||||
init(navigator: NavigationManager) {
|
||||
self.navigator = navigator
|
||||
|
||||
super.init(nibName: nil, bundle: nil)
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
view.backgroundColor = .systemBackground
|
||||
|
||||
scrollView = UIScrollView()
|
||||
scrollView.translatesAutoresizingMaskIntoConstraints = false
|
||||
scrollView.keyboardDismissMode = .interactive
|
||||
view.addSubview(scrollView)
|
||||
scrollView.delegate = self
|
||||
NSLayoutConstraint.activate([
|
||||
scrollView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
scrollView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||||
scrollView.topAnchor.constraint(equalTo: view.topAnchor),
|
||||
scrollView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
||||
])
|
||||
|
||||
browserHost = UIHostingController(rootView: BrowserView(navigator: navigator, scrollingEnabled: false))
|
||||
browserHost.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
scrollView.addSubview(browserHost.view)
|
||||
addChild(browserHost)
|
||||
browserHost.didMove(toParent: self)
|
||||
NSLayoutConstraint.activate([
|
||||
scrollView.contentLayoutGuide.leadingAnchor.constraint(equalTo: browserHost.view.leadingAnchor),
|
||||
scrollView.contentLayoutGuide.trailingAnchor.constraint(equalTo: browserHost.view.trailingAnchor),
|
||||
scrollView.contentLayoutGuide.topAnchor.constraint(equalTo: browserHost.view.topAnchor),
|
||||
scrollView.contentLayoutGuide.bottomAnchor.constraint(equalTo: browserHost.view.bottomAnchor),
|
||||
browserHost.view.widthAnchor.constraint(equalTo: view.widthAnchor),
|
||||
|
||||
// make sure the browser host view is at least the screen height so the loading indicator appears centered
|
||||
browserHost.view.heightAnchor.constraint(greaterThanOrEqualTo: view.heightAnchor),
|
||||
])
|
||||
|
||||
navBarHost = UIHostingController(rootView: NavigationBar(navigator: navigator))
|
||||
navBarHost.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
view.addSubview(navBarHost.view)
|
||||
addChild(navBarHost)
|
||||
navBarHost.didMove(toParent: self)
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
navBarHost.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
navBarHost.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||||
navBarHost.view.topAnchor.constraint(equalTo: view.topAnchor),
|
||||
])
|
||||
|
||||
toolBarHost = UIHostingController(rootView: ToolBar(navigator: navigator, shareCurrentURL: {
|
||||
let vc = UIActivityViewController(activityItems: [self.navigator.currentURL], applicationActivities: nil)
|
||||
self.present(vc, animated: true)
|
||||
}))
|
||||
toolBarHost.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
view.addSubview(toolBarHost.view)
|
||||
addChild(toolBarHost)
|
||||
toolBarHost.didMove(toParent: self)
|
||||
NSLayoutConstraint.activate([
|
||||
toolBarHost.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
toolBarHost.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||||
toolBarHost.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
||||
])
|
||||
|
||||
navigator.$currentURL
|
||||
.sink { (_) in
|
||||
self.scrollView.contentOffset = .zero
|
||||
self.navBarHost.view.transform = .identity
|
||||
self.toolBarHost.view.transform = .identity
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
override func viewDidLayoutSubviews() {
|
||||
super.viewDidLayoutSubviews()
|
||||
|
||||
let insets = UIEdgeInsets(
|
||||
top: navBarHost.view.bounds.height - view.safeAreaInsets.top,
|
||||
left: 0,
|
||||
bottom: toolBarHost.view.bounds.height - view.safeAreaInsets.bottom,
|
||||
right: 0
|
||||
)
|
||||
scrollView.contentInset = insets
|
||||
scrollView.scrollIndicatorInsets = insets
|
||||
}
|
||||
|
||||
// MARK: - UIScrollViewDelegate
|
||||
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
var scrollViewDelta: CGFloat = 0
|
||||
if let prev = prevScrollViewContentOffset {
|
||||
scrollViewDelta = scrollView.contentOffset.y - prev.y
|
||||
}
|
||||
prevScrollViewContentOffset = scrollView.contentOffset
|
||||
|
||||
// When certain state changes happen, the scroll view seems to "scroll" by top the safe area inset.
|
||||
// It's not actually user scrolling, and this screws up our animation, so we ignore it.
|
||||
guard abs(scrollViewDelta) != view.safeAreaInsets.top,
|
||||
scrollViewDelta != 0,
|
||||
scrollView.contentOffset.y > 0 else { return }
|
||||
|
||||
let barAnimator: UIViewPropertyAnimator
|
||||
if let animator = self.barAnimator {
|
||||
barAnimator = animator
|
||||
} else {
|
||||
navBarHost.view.transform = .identity
|
||||
toolBarHost.view.transform = .identity
|
||||
barAnimator = UIViewPropertyAnimator(duration: 0.2, curve: .linear) {
|
||||
self.navBarHost.view.transform = CGAffineTransform(translationX: 0, y: -self.navBarHost.view.frame.height)
|
||||
self.toolBarHost.view.transform = CGAffineTransform(translationX: 0, y: self.toolBarHost.view.frame.height)
|
||||
}
|
||||
if scrollViewDelta < 0 {
|
||||
barAnimator.fractionComplete = 1
|
||||
}
|
||||
barAnimator.addCompletion { (_) in
|
||||
self.barAnimator = nil
|
||||
}
|
||||
self.barAnimator = barAnimator
|
||||
}
|
||||
|
||||
let progressDelta = scrollViewDelta / navBarHost.view.bounds.height
|
||||
barAnimator.fractionComplete = max(0, min(1, barAnimator.fractionComplete + progressDelta))
|
||||
}
|
||||
|
||||
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
|
||||
if let barAnimator = barAnimator {
|
||||
if barAnimator.fractionComplete < 0.5 {
|
||||
barAnimator.isReversed = true
|
||||
}
|
||||
barAnimator.startAnimation()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -8,14 +8,23 @@
|
|||
import SwiftUI
|
||||
import BrowserCore
|
||||
|
||||
// This is not currently used as SwiftUI's ScrollView has no mechanism for detecting when it stops deceleraing,
|
||||
// which is necessary to preven tthe bars from being left in a partially visible state.
|
||||
struct ContentView: View {
|
||||
@ObservedObject private var navigator: NavigationManager
|
||||
@State private var urlFieldContents: String
|
||||
@State private var showPreferencesSheet = false
|
||||
private let shareCurrentURL: () -> Void
|
||||
|
||||
@Environment(\.colorScheme) var colorScheme: ColorScheme
|
||||
|
||||
@State private var prevScrollOffset: CGFloat = 0
|
||||
@State private var scrollOffset: CGFloat = 0 {
|
||||
didSet {
|
||||
prevScrollOffset = oldValue
|
||||
}
|
||||
}
|
||||
@State private var barOffset: CGFloat = 0
|
||||
@State private var navBarHeight: CGFloat = 0
|
||||
@State private var toolBarHeight: CGFloat = 0
|
||||
|
||||
init(navigator: NavigationManager, shareCurrentURL: @escaping () -> Void) {
|
||||
self.navigator = navigator
|
||||
self._urlFieldContents = State(initialValue: navigator.currentURL.absoluteString)
|
||||
|
@ -23,18 +32,57 @@ struct ContentView: View {
|
|||
}
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
urlBar
|
||||
ZStack {
|
||||
GeometryReader { (outer: GeometryProxy) in
|
||||
ScrollView(.vertical) {
|
||||
Color.clear.frame(height: navBarHeight)
|
||||
|
||||
BrowserView(navigator: navigator, scrollingEnabled: false)
|
||||
.background(GeometryReader { (inner: GeometryProxy) in
|
||||
Color.clear.preference(key: ScrollOffsetPrefKey.self, value: -inner.frame(in: .global).minY + outer.frame(in: .global).minY)
|
||||
})
|
||||
|
||||
Color.clear.frame(height: toolBarHeight)
|
||||
}
|
||||
.onPreferenceChange(ScrollOffsetPrefKey.self) {
|
||||
scrollOffset = $0
|
||||
let delta = scrollOffset - prevScrollOffset
|
||||
|
||||
// When certain state changes happen, the scroll view seems to "scroll" by the top safe area inset.
|
||||
// It's not actually user scrolling, and this screws up our animation, so we ignore it.
|
||||
guard abs(delta) != outer.safeAreaInsets.top else { return }
|
||||
|
||||
if delta != 0 {
|
||||
barOffset += delta
|
||||
}
|
||||
|
||||
barOffset = max(0, min(navBarHeight + outer.safeAreaInsets.top, barOffset))
|
||||
}
|
||||
}
|
||||
|
||||
barBorder
|
||||
|
||||
Spacer(minLength: 0)
|
||||
BrowserView(navigator: navigator)
|
||||
Spacer(minLength: 0)
|
||||
|
||||
barBorder
|
||||
|
||||
bottomBar
|
||||
VStack(spacing: 0) {
|
||||
NavigationBar(navigator: navigator)
|
||||
.background(GeometryReader { (geom: GeometryProxy) in
|
||||
Color.clear.preference(key: NavBarHeightPrefKey.self, value: geom.frame(in: .global).height)
|
||||
})
|
||||
.offset(y: -barOffset)
|
||||
|
||||
Spacer()
|
||||
|
||||
ToolBar(navigator: navigator, shareCurrentURL: shareCurrentURL)
|
||||
.background(GeometryReader { (geom: GeometryProxy) in
|
||||
Color.clear.preference(key: ToolBarHeightPrefKey.self, value: geom.frame(in: .global).height)
|
||||
})
|
||||
.offset(y: barOffset)
|
||||
}
|
||||
.onPreferenceChange(NavBarHeightPrefKey.self) {
|
||||
navBarHeight = $0
|
||||
print("nav bar height: \($0)")
|
||||
}
|
||||
.onPreferenceChange(ToolBarHeightPrefKey.self) {
|
||||
toolBarHeight = $0
|
||||
print("tool bar height: \($0)")
|
||||
}
|
||||
}
|
||||
.onAppear(perform: tweakAppearance)
|
||||
.onReceive(navigator.$currentURL, perform: { (new) in
|
||||
|
@ -45,70 +93,6 @@ struct ContentView: View {
|
|||
})
|
||||
}
|
||||
|
||||
private var barBorder: some View {
|
||||
Rectangle()
|
||||
.frame(height: 1)
|
||||
.foregroundColor(Color(white: colorScheme == .dark ? 0.25 : 0.75))
|
||||
}
|
||||
|
||||
private var urlBar: some View {
|
||||
TextField("URL", text: $urlFieldContents, onCommit: commitURL)
|
||||
.keyboardType(.URL)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.textFieldStyle(RoundedBorderTextFieldStyle())
|
||||
.padding([.leading, .trailing, .bottom])
|
||||
}
|
||||
|
||||
private var bottomBar: some View {
|
||||
HStack {
|
||||
// use a group because this exceeds the 10 view limit :/
|
||||
Group {
|
||||
Spacer()
|
||||
|
||||
Button(action: navigator.back) {
|
||||
Image(systemName: "arrow.left")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
.disabled(navigator.backStack.isEmpty)
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: navigator.forward) {
|
||||
Image(systemName: "arrow.right")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
.disabled(navigator.forwardStack.isEmpty)
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: navigator.reload) {
|
||||
Image(systemName: "arrow.clockwise")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: shareCurrentURL) {
|
||||
Image(systemName: "square.and.arrow.up")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: {
|
||||
showPreferencesSheet = true
|
||||
}, label: {
|
||||
Image(systemName: "gear")
|
||||
.font(.system(size: 24))
|
||||
})
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.top, 4)
|
||||
}
|
||||
|
||||
private func tweakAppearance() {
|
||||
UIScrollView.appearance().keyboardDismissMode = .interactive
|
||||
}
|
||||
|
@ -119,6 +103,34 @@ struct ContentView: View {
|
|||
}
|
||||
}
|
||||
|
||||
fileprivate struct ScrollOffsetPrefKey: PreferenceKey {
|
||||
typealias Value = CGFloat
|
||||
static var defaultValue: CGFloat = 0
|
||||
static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
|
||||
value += nextValue()
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate struct NavBarHeightPrefKey: PreferenceKey {
|
||||
typealias Value = CGFloat
|
||||
static var defaultValue: CGFloat = 0
|
||||
static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
|
||||
value += nextValue()
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate struct ToolBarHeightPrefKey: PreferenceKey {
|
||||
typealias Value = CGFloat
|
||||
static var defaultValue: CGFloat = 0
|
||||
static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
|
||||
value += nextValue()
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate enum ScrollDirection {
|
||||
case up, down, none
|
||||
}
|
||||
|
||||
struct ContentView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ContentView(navigator: NavigationManager(url: URL(string: "gemini://localhost/overview.gmi")!), shareCurrentURL: {})
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Rocketeer</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
@ -15,7 +17,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
//
|
||||
// NavigationBar.swift
|
||||
// Gemini-iOS
|
||||
//
|
||||
// Created by Shadowfacts on 9/28/20.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import BrowserCore
|
||||
|
||||
struct NavigationBar: View {
|
||||
@ObservedObject var navigator: NavigationManager
|
||||
@State private var urlFieldContents: String
|
||||
|
||||
@Environment(\.colorScheme) var colorScheme: ColorScheme
|
||||
|
||||
init(navigator: NavigationManager) {
|
||||
self.navigator = navigator
|
||||
self._urlFieldContents = State(initialValue: navigator.currentURL.absoluteString)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
TextField("URL", text: $urlFieldContents, onCommit: commitURL)
|
||||
.keyboardType(.URL)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.textFieldStyle(RoundedBorderTextFieldStyle())
|
||||
.padding([.leading, .trailing, .bottom])
|
||||
|
||||
Rectangle()
|
||||
.frame(height: 1)
|
||||
.foregroundColor(Color(white: colorScheme == .dark ? 0.25 : 0.75))
|
||||
}
|
||||
.background(Color(UIColor.systemBackground).edgesIgnoringSafeArea(.top))
|
||||
.onReceive(navigator.$currentURL) { (newURL) in
|
||||
urlFieldContents = newURL.absoluteString
|
||||
}
|
||||
}
|
||||
|
||||
private func commitURL() {
|
||||
guard let url = URL(string: urlFieldContents) else { return }
|
||||
navigator.changeURL(url)
|
||||
}
|
||||
}
|
||||
|
||||
struct NavigationBar_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
NavigationBar(navigator: NavigationManager(url: URL(string: "gemini://localhost/overview.gmi")!))
|
||||
}
|
||||
}
|
|
@ -26,19 +26,24 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|||
if let context = connectionOptions.urlContexts.first {
|
||||
initialURL = context.url
|
||||
} else {
|
||||
initialURL = URL(string: "gemini://gemini.circumlunar.space/")!
|
||||
if ProcessInfo.processInfo.environment.keys.contains("DEFAULT_URL") {
|
||||
initialURL = URL(string: ProcessInfo.processInfo.environment["DEFAULT_URL"]!)!
|
||||
} else {
|
||||
initialURL = URL(string: "gemini://gemini.circumlunar.space/")!
|
||||
}
|
||||
}
|
||||
|
||||
navigationManager = NavigationManager(url: initialURL)
|
||||
navigationManager.delegate = self
|
||||
|
||||
// Create the SwiftUI view that provides the window contents.
|
||||
let contentView = ContentView(navigator: navigationManager, shareCurrentURL: self.shareCurrentURL)
|
||||
// let contentView = ContentView(navigator: navigationManager, shareCurrentURL: self.shareCurrentURL)
|
||||
|
||||
// Use a UIHostingController as window root view controller.
|
||||
if let windowScene = scene as? UIWindowScene {
|
||||
let window = UIWindow(windowScene: windowScene)
|
||||
window.rootViewController = UIHostingController(rootView: contentView)
|
||||
// window.rootViewController = UIHostingController(rootView: contentView)
|
||||
window.rootViewController = BrowserViewController(navigator: navigationManager)
|
||||
self.window = window
|
||||
window.makeKeyAndVisible()
|
||||
}
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
//
|
||||
// ToolBar.swift
|
||||
// Gemini-iOS
|
||||
//
|
||||
// Created by Shadowfacts on 9/28/20.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import BrowserCore
|
||||
|
||||
struct ToolBar: View {
|
||||
@ObservedObject var navigator: NavigationManager
|
||||
let shareCurrentURL: () -> Void
|
||||
@State private var showPreferencesSheet = false
|
||||
|
||||
@Environment(\.colorScheme) var colorScheme: ColorScheme
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 4) {
|
||||
Rectangle()
|
||||
.frame(height: 1)
|
||||
.foregroundColor(Color(white: colorScheme == .dark ? 0.25 : 0.75))
|
||||
|
||||
HStack {
|
||||
// use a group because this exceeds the 10 view limit :/
|
||||
Group {
|
||||
Spacer()
|
||||
|
||||
Button(action: navigator.back) {
|
||||
Image(systemName: "arrow.left")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
.disabled(navigator.backStack.isEmpty)
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: navigator.forward) {
|
||||
Image(systemName: "arrow.right")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
.disabled(navigator.forwardStack.isEmpty)
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: navigator.reload) {
|
||||
Image(systemName: "arrow.clockwise")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: shareCurrentURL) {
|
||||
Image(systemName: "square.and.arrow.up")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: {
|
||||
showPreferencesSheet = true
|
||||
}, label: {
|
||||
Image(systemName: "gear")
|
||||
.font(.system(size: 24))
|
||||
})
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
|
||||
Spacer(minLength: 4)
|
||||
}
|
||||
.background(Color(UIColor.systemBackground).edgesIgnoringSafeArea(.bottom))
|
||||
.sheet(isPresented: $showPreferencesSheet, content: {
|
||||
PreferencesView(presented: $showPreferencesSheet)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
struct ToolBar_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ToolBar(navigator: NavigationManager(url: URL(string: "gemini://localhost/overview.gmi")!), shareCurrentURL: {})
|
||||
}
|
||||
}
|
|
@ -42,6 +42,9 @@
|
|||
D664673A24BD0B8E00B0B741 /* Fonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = D664673924BD0B8E00B0B741 /* Fonts.swift */; };
|
||||
D691A64E25217C6F00348C4B /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = D691A64D25217C6F00348C4B /* Preferences.swift */; };
|
||||
D691A66725217FD800348C4B /* PreferencesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D691A66625217FD800348C4B /* PreferencesView.swift */; };
|
||||
D691A6772522382E00348C4B /* BrowserViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D691A6762522382E00348C4B /* BrowserViewController.swift */; };
|
||||
D691A68725223A4700348C4B /* NavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = D691A68625223A4600348C4B /* NavigationBar.swift */; };
|
||||
D691A6A0252242FC00348C4B /* ToolBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = D691A69F252242FC00348C4B /* ToolBar.swift */; };
|
||||
D69F00AC24BE9DD300E37622 /* GeminiDataTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69F00AB24BE9DD300E37622 /* GeminiDataTask.swift */; };
|
||||
D69F00AE24BEA29100E37622 /* GeminiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69F00AD24BEA29100E37622 /* GeminiResponse.swift */; };
|
||||
D6E1529824BFAAA400FDF9D3 /* BrowserWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6E1529624BFAAA400FDF9D3 /* BrowserWindowController.swift */; };
|
||||
|
@ -142,21 +145,49 @@
|
|||
remoteGlobalIDString = D62664A724BBF26A00DF9B88;
|
||||
remoteInfo = GeminiFormat;
|
||||
};
|
||||
D6E152B824BFFE2400FDF9D3 /* PBXContainerItemProxy */ = {
|
||||
D68543F72522DEF0004C4AE0 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D626645324BBF1C200DF9B88 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D6E152CF24C0007200FDF9D3;
|
||||
remoteInfo = BrowserCore;
|
||||
};
|
||||
D68543F92522DEF3004C4AE0 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D626645324BBF1C200DF9B88 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D62664A724BBF26A00DF9B88;
|
||||
remoteInfo = GeminiFormat;
|
||||
};
|
||||
D6E152C524C0004C00FDF9D3 /* PBXContainerItemProxy */ = {
|
||||
D68543FB2522DEF5004C4AE0 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D626645324BBF1C200DF9B88 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D626647624BBF22E00DF9B88;
|
||||
remoteInfo = GeminiProtocol;
|
||||
};
|
||||
D6E152C924C0004C00FDF9D3 /* PBXContainerItemProxy */ = {
|
||||
D68543FD2522DEF7004C4AE0 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D626645324BBF1C200DF9B88 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D62664CD24BC081B00DF9B88;
|
||||
remoteInfo = GeminiRenderer;
|
||||
};
|
||||
D68544062522DF36004C4AE0 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D626645324BBF1C200DF9B88 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D62664A724BBF26A00DF9B88;
|
||||
remoteInfo = GeminiFormat;
|
||||
};
|
||||
D68544082522DF39004C4AE0 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D626645324BBF1C200DF9B88 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D626647624BBF22E00DF9B88;
|
||||
remoteInfo = GeminiProtocol;
|
||||
};
|
||||
D685440A2522DF3C004C4AE0 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D626645324BBF1C200DF9B88 /* Project object */;
|
||||
proxyType = 1;
|
||||
|
@ -184,13 +215,6 @@
|
|||
remoteGlobalIDString = D6E152CF24C0007200FDF9D3;
|
||||
remoteInfo = BrowserCore;
|
||||
};
|
||||
D6E152EF24C0009300FDF9D3 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D626645324BBF1C200DF9B88 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D6E152CF24C0007200FDF9D3;
|
||||
remoteInfo = BrowserCore;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
|
@ -276,6 +300,9 @@
|
|||
D664673924BD0B8E00B0B741 /* Fonts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fonts.swift; sourceTree = "<group>"; };
|
||||
D691A64D25217C6F00348C4B /* Preferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Preferences.swift; sourceTree = "<group>"; };
|
||||
D691A66625217FD800348C4B /* PreferencesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesView.swift; sourceTree = "<group>"; };
|
||||
D691A6762522382E00348C4B /* BrowserViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowserViewController.swift; sourceTree = "<group>"; };
|
||||
D691A68625223A4600348C4B /* NavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationBar.swift; sourceTree = "<group>"; };
|
||||
D691A69F252242FC00348C4B /* ToolBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToolBar.swift; sourceTree = "<group>"; };
|
||||
D69F00AB24BE9DD300E37622 /* GeminiDataTask.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeminiDataTask.swift; sourceTree = "<group>"; };
|
||||
D69F00AD24BEA29100E37622 /* GeminiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeminiResponse.swift; sourceTree = "<group>"; };
|
||||
D69F00AF24BEA84D00E37622 /* NavigationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationManager.swift; sourceTree = "<group>"; };
|
||||
|
@ -526,7 +553,10 @@
|
|||
children = (
|
||||
D6E152A424BFFDF500FDF9D3 /* AppDelegate.swift */,
|
||||
D6E152A624BFFDF500FDF9D3 /* SceneDelegate.swift */,
|
||||
D691A6762522382E00348C4B /* BrowserViewController.swift */,
|
||||
D6E152A824BFFDF500FDF9D3 /* ContentView.swift */,
|
||||
D691A68625223A4600348C4B /* NavigationBar.swift */,
|
||||
D691A69F252242FC00348C4B /* ToolBar.swift */,
|
||||
D691A64D25217C6F00348C4B /* Preferences.swift */,
|
||||
D691A66625217FD800348C4B /* PreferencesView.swift */,
|
||||
D6E152AA24BFFDF600FDF9D3 /* Assets.xcassets */,
|
||||
|
@ -750,10 +780,10 @@
|
|||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
D6E152B924BFFE2400FDF9D3 /* PBXTargetDependency */,
|
||||
D6E152C624C0004C00FDF9D3 /* PBXTargetDependency */,
|
||||
D6E152CA24C0004C00FDF9D3 /* PBXTargetDependency */,
|
||||
D6E152F024C0009300FDF9D3 /* PBXTargetDependency */,
|
||||
D68543FE2522DEF7004C4AE0 /* PBXTargetDependency */,
|
||||
D68543FC2522DEF5004C4AE0 /* PBXTargetDependency */,
|
||||
D68543FA2522DEF3004C4AE0 /* PBXTargetDependency */,
|
||||
D68543F82522DEF0004C4AE0 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Gemini-iOS";
|
||||
productName = "Gemini-iOS";
|
||||
|
@ -772,6 +802,9 @@
|
|||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
D685440B2522DF3C004C4AE0 /* PBXTargetDependency */,
|
||||
D68544092522DF39004C4AE0 /* PBXTargetDependency */,
|
||||
D68544072522DF36004C4AE0 /* PBXTargetDependency */,
|
||||
);
|
||||
name = BrowserCore;
|
||||
productName = BrowserCore;
|
||||
|
@ -804,7 +837,7 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1200;
|
||||
LastUpgradeCheck = 1200;
|
||||
LastUpgradeCheck = 1220;
|
||||
TargetAttributes = {
|
||||
D626645A24BBF1C200DF9B88 = {
|
||||
CreatedOnToolsVersion = 12.0;
|
||||
|
@ -1028,8 +1061,11 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D691A66725217FD800348C4B /* PreferencesView.swift in Sources */,
|
||||
D691A6772522382E00348C4B /* BrowserViewController.swift in Sources */,
|
||||
D6E152A524BFFDF500FDF9D3 /* AppDelegate.swift in Sources */,
|
||||
D691A6A0252242FC00348C4B /* ToolBar.swift in Sources */,
|
||||
D6E152A724BFFDF500FDF9D3 /* SceneDelegate.swift in Sources */,
|
||||
D691A68725223A4700348C4B /* NavigationBar.swift in Sources */,
|
||||
D691A64E25217C6F00348C4B /* Preferences.swift in Sources */,
|
||||
D6E152A924BFFDF500FDF9D3 /* ContentView.swift in Sources */,
|
||||
);
|
||||
|
@ -1105,20 +1141,40 @@
|
|||
target = D62664A724BBF26A00DF9B88 /* GeminiFormat */;
|
||||
targetProxy = D62664F224BC0D7700DF9B88 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D6E152B924BFFE2400FDF9D3 /* PBXTargetDependency */ = {
|
||||
D68543F82522DEF0004C4AE0 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D6E152CF24C0007200FDF9D3 /* BrowserCore */;
|
||||
targetProxy = D68543F72522DEF0004C4AE0 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D68543FA2522DEF3004C4AE0 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D62664A724BBF26A00DF9B88 /* GeminiFormat */;
|
||||
targetProxy = D6E152B824BFFE2400FDF9D3 /* PBXContainerItemProxy */;
|
||||
targetProxy = D68543F92522DEF3004C4AE0 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D6E152C624C0004C00FDF9D3 /* PBXTargetDependency */ = {
|
||||
D68543FC2522DEF5004C4AE0 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D626647624BBF22E00DF9B88 /* GeminiProtocol */;
|
||||
targetProxy = D6E152C524C0004C00FDF9D3 /* PBXContainerItemProxy */;
|
||||
targetProxy = D68543FB2522DEF5004C4AE0 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D6E152CA24C0004C00FDF9D3 /* PBXTargetDependency */ = {
|
||||
D68543FE2522DEF7004C4AE0 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D62664CD24BC081B00DF9B88 /* GeminiRenderer */;
|
||||
targetProxy = D6E152C924C0004C00FDF9D3 /* PBXContainerItemProxy */;
|
||||
targetProxy = D68543FD2522DEF7004C4AE0 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D68544072522DF36004C4AE0 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D62664A724BBF26A00DF9B88 /* GeminiFormat */;
|
||||
targetProxy = D68544062522DF36004C4AE0 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D68544092522DF39004C4AE0 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D626647624BBF22E00DF9B88 /* GeminiProtocol */;
|
||||
targetProxy = D68544082522DF39004C4AE0 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D685440B2522DF3C004C4AE0 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D62664CD24BC081B00DF9B88 /* GeminiRenderer */;
|
||||
targetProxy = D685440A2522DF3C004C4AE0 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D6E152DB24C0007200FDF9D3 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
|
@ -1135,11 +1191,6 @@
|
|||
target = D6E152CF24C0007200FDF9D3 /* BrowserCore */;
|
||||
targetProxy = D6E152E324C0007200FDF9D3 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D6E152F024C0009300FDF9D3 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D6E152CF24C0007200FDF9D3 /* BrowserCore */;
|
||||
targetProxy = D6E152EF24C0009300FDF9D3 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
|
@ -1276,10 +1327,11 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = Gemini/Gemini.entitlements;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Gemini/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = Gemini/Info.plist;
|
||||
|
@ -1288,7 +1340,7 @@
|
|||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.Gemini;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
|
@ -1301,10 +1353,11 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = Gemini/Gemini.entitlements;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Gemini/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = Gemini/Info.plist;
|
||||
|
@ -1313,7 +1366,7 @@
|
|||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.Gemini;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
|
@ -1327,7 +1380,7 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
|
@ -1340,13 +1393,13 @@
|
|||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.GeminiProtocol;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini.GeminiProtocol;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALID_ARCHS = "x86_64 arm64 armv7s armv7 arm64e";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
|
@ -1360,7 +1413,7 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
|
@ -1373,12 +1426,12 @@
|
|||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.GeminiProtocol;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini.GeminiProtocol;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALID_ARCHS = "x86_64 arm64 armv7s armv7 arm64e";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
|
@ -1390,7 +1443,7 @@
|
|||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
INFOPLIST_FILE = GeminiProtocolTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
@ -1410,7 +1463,7 @@
|
|||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
INFOPLIST_FILE = GeminiProtocolTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
@ -1432,7 +1485,7 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
|
@ -1445,13 +1498,13 @@
|
|||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.GeminiFormat;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini.GeminiFormat;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALID_ARCHS = "x86_64 arm64 armv7s armv7 arm64e";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
|
@ -1465,7 +1518,7 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
|
@ -1478,12 +1531,12 @@
|
|||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.GeminiFormat;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini.GeminiFormat;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALID_ARCHS = "x86_64 arm64 armv7s armv7 arm64e";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
|
@ -1495,7 +1548,7 @@
|
|||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
INFOPLIST_FILE = GeminiFormatTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
@ -1515,7 +1568,7 @@
|
|||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
INFOPLIST_FILE = GeminiFormatTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
@ -1537,7 +1590,7 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
|
@ -1550,13 +1603,13 @@
|
|||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.GeminiRenderer;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini.GeminiRenderer;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALID_ARCHS = "x86_64 arm64 armv7s armv7 arm64e";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
|
@ -1570,7 +1623,7 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
|
@ -1583,12 +1636,12 @@
|
|||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.GeminiRenderer;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini.GeminiRenderer;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALID_ARCHS = "x86_64 arm64 armv7s armv7 arm64e";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
|
@ -1600,7 +1653,7 @@
|
|||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
INFOPLIST_FILE = GeminiRendererTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
@ -1620,7 +1673,7 @@
|
|||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
INFOPLIST_FILE = GeminiRendererTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
@ -1642,7 +1695,7 @@
|
|||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Gemini-iOS/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = "Gemini-iOS/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.5;
|
||||
|
@ -1650,7 +1703,8 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.shadowfacts.Gemini-iOS";
|
||||
MARKETING_VERSION = 2020.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
@ -1666,7 +1720,7 @@
|
|||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Gemini-iOS/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = "Gemini-iOS/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.5;
|
||||
|
@ -1674,7 +1728,8 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.shadowfacts.Gemini-iOS";
|
||||
MARKETING_VERSION = 2020.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
@ -1690,7 +1745,7 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
|
@ -1703,12 +1758,12 @@
|
|||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.BrowserCore;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini.BrowserCore;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALID_ARCHS = "x86_64 arm64 armv7s armv7 arm64e";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
|
@ -1721,7 +1776,7 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
|
@ -1734,12 +1789,12 @@
|
|||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.BrowserCore;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = space.vaccor.Gemini.BrowserCore;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALID_ARCHS = "x86_64 arm64 armv7s armv7 arm64e";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
|
@ -1751,7 +1806,7 @@
|
|||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
INFOPLIST_FILE = BrowserCoreTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
@ -1771,7 +1826,7 @@
|
|||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = HGYVAQA9FW;
|
||||
DEVELOPMENT_TEAM = V4WK9KR9U2;
|
||||
INFOPLIST_FILE = BrowserCoreTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1220"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D6E152A124BFFDF500FDF9D3"
|
||||
BuildableName = "Gemini-iOS.app"
|
||||
BlueprintName = "Gemini-iOS"
|
||||
ReferencedContainer = "container:Gemini.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D6E152A124BFFDF500FDF9D3"
|
||||
BuildableName = "Gemini-iOS.app"
|
||||
BlueprintName = "Gemini-iOS"
|
||||
ReferencedContainer = "container:Gemini.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "DEFAULT_URL"
|
||||
value = "gemini://gemini.circumlunar.space/docs/specification.gmi"
|
||||
isEnabled = "NO">
|
||||
</EnvironmentVariable>
|
||||
<EnvironmentVariable
|
||||
key = "DEFAULT_URL"
|
||||
value = "gemini://drewdevault.com"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D6E152A124BFFDF500FDF9D3"
|
||||
BuildableName = "Gemini-iOS.app"
|
||||
BlueprintName = "Gemini-iOS"
|
||||
ReferencedContainer = "container:Gemini.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1200"
|
||||
LastUpgradeVersion = "1220"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1200"
|
||||
LastUpgradeVersion = "1220"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
<key>BrowserCore.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>4</integer>
|
||||
<integer>5</integer>
|
||||
</dict>
|
||||
<key>Gemini-iOS.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>3</integer>
|
||||
<integer>2</integer>
|
||||
</dict>
|
||||
<key>Gemini.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
|
@ -27,12 +27,12 @@
|
|||
<key>GeminiProtocol.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>2</integer>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
<key>GeminiRenderer.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>5</integer>
|
||||
<integer>4</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
|
@ -62,6 +62,11 @@
|
|||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>D6E152A124BFFDF500FDF9D3</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "container:Gemini.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -2,8 +2,6 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
@ -24,6 +22,8 @@
|
|||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
|
|
|
@ -12,22 +12,33 @@ public struct DocumentView: View {
|
|||
private let document: Document
|
||||
private let blocks: [RenderingBlock]
|
||||
private let changeURL: ((URL) -> Void)?
|
||||
private let scrollingEnabled: Bool
|
||||
|
||||
public init(document: Document, changeURL: ((URL) -> Void)? = nil) {
|
||||
public init(document: Document, scrollingEnabled: Bool = true, changeURL: ((URL) -> Void)? = nil) {
|
||||
self.document = document
|
||||
self.blocks = document.renderingBlocks
|
||||
self.changeURL = changeURL
|
||||
self.scrollingEnabled = scrollingEnabled
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
public var body: some View {
|
||||
ScrollView(.vertical) {
|
||||
MaybeLazyVStack(alignment: .leading) {
|
||||
ForEach(blocks.indices) { (index) in
|
||||
RenderingBlockView(block: blocks[index], changeURL: changeURL)
|
||||
}
|
||||
}.padding([.leading, .trailing, .bottom])
|
||||
if scrollingEnabled {
|
||||
ScrollView(.vertical) {
|
||||
scrollBody
|
||||
}
|
||||
} else {
|
||||
scrollBody
|
||||
}
|
||||
}
|
||||
|
||||
private var scrollBody: some View {
|
||||
MaybeLazyVStack(alignment: .leading) {
|
||||
ForEach(blocks.indices) { (index) in
|
||||
RenderingBlockView(block: blocks[index], changeURL: changeURL)
|
||||
}
|
||||
}.padding([.leading, .trailing, .bottom])
|
||||
}
|
||||
}
|
||||
|
||||
struct DocumentView_Previews: PreviewProvider {
|
||||
|
|