Skip to content

Commit

Permalink
Sync bookmarks between macOS and iOS #63: readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
filimo committed Dec 21, 2019
1 parent f817ba4 commit 5ee0686
Show file tree
Hide file tree
Showing 13 changed files with 246 additions and 18 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Explore features, limitations and bugs *SwiftUI, Combine and Catalyst*.
![](files/Release_1.9_1.gif)
![](files/Release_1.9_2.gif)
![](files/Release_1.9_3.gif)
![](files/Release_1.9_4.png)

## Releases
### Download .dmg from [here](https://github.com/filimo/ReaderTranslator/releases)
Expand Down
12 changes: 6 additions & 6 deletions ReaderTranslator.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
F0305FD42381271A002AC5F5 /* YTranslatorRepresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F062029423812264002EEAEE /* YTranslatorRepresenter.swift */; };
F033F41223A6D3A800605325 /* DirectoryObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = F033F41123A6D3A800605325 /* DirectoryObserver.swift */; };
F033F41523A75B5600605325 /* SentencesView_Row.swift in Sources */ = {isa = PBXBuildFile; fileRef = F033F41423A75B5600605325 /* SentencesView_Row.swift */; };
F0369E3223A2D92C00C33139 /* StatusBarView_Listener.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0369E3123A2D92C00C33139 /* StatusBarView_Listener.swift */; };
F0369E3323A2D92C00C33139 /* StatusBarView_Listener.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0369E3123A2D92C00C33139 /* StatusBarView_Listener.swift */; };
F0369E3223A2D92C00C33139 /* StatusBarView_Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0369E3123A2D92C00C33139 /* StatusBarView_Sync.swift */; };
F0369E3323A2D92C00C33139 /* StatusBarView_Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0369E3123A2D92C00C33139 /* StatusBarView_Sync.swift */; };
F040512B23ABDBDB00A5240C /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0C36A9C2359C78A001E396C /* Array.swift */; };
F040D5782336A77D004567B8 /* UserDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = F040D5772336A77D004567B8 /* UserDefault.swift */; };
F040D57C2336BD97004567B8 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = F040D57B2336BD97004567B8 /* README.md */; };
Expand Down Expand Up @@ -397,7 +397,7 @@
F0305FD0238125E6002AC5F5 /* YTranslatorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YTranslatorView.swift; sourceTree = "<group>"; };
F033F41123A6D3A800605325 /* DirectoryObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DirectoryObserver.swift; sourceTree = "<group>"; };
F033F41423A75B5600605325 /* SentencesView_Row.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentencesView_Row.swift; sourceTree = "<group>"; };
F0369E3123A2D92C00C33139 /* StatusBarView_Listener.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusBarView_Listener.swift; sourceTree = "<group>"; };
F0369E3123A2D92C00C33139 /* StatusBarView_Sync.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusBarView_Sync.swift; sourceTree = "<group>"; };
F03D7DFD234DF59500E53E3D /* files */ = {isa = PBXFileReference; lastKnownFileType = folder; path = files; sourceTree = "<group>"; };
F040D5772336A77D004567B8 /* UserDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefault.swift; sourceTree = "<group>"; };
F040D57B2336BD97004567B8 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
Expand Down Expand Up @@ -916,7 +916,7 @@
children = (
F06DB1142345ED3800C2DE90 /* StatusBarView_Voice */,
F0AA69D3232E9762007CC07B /* StatusBarView.swift */,
F0369E3123A2D92C00C33139 /* StatusBarView_Listener.swift */,
F0369E3123A2D92C00C33139 /* StatusBarView_Sync.swift */,
F04C830B23617653003A25B4 /* StatusBarView_ViewsEnabler.swift */,
F0EE0A18234897CC004A5EAD /* StatusBarView_Safari.swift */,
F0C36A952359AF01001E396C /* StatusBarView_Bookmarks.swift */,
Expand Down Expand Up @@ -1432,7 +1432,7 @@
F0562E0F2362026C0074ACF5 /* WikipediaRepresenter.swift in Sources */,
F023CEB3239A5674006DE5EA /* BookmarksView_List.swift in Sources */,
F0305FD223812711002AC5F5 /* YTranslatorView.swift in Sources */,
F0369E3323A2D92C00C33139 /* StatusBarView_Listener.swift in Sources */,
F0369E3323A2D92C00C33139 /* StatusBarView_Sync.swift in Sources */,
F0EDFB26239E49480048CFD1 /* AudioPlayer.swift in Sources */,
F02B04B023A2844700F93B84 /* NWParameters.swift in Sources */,
F02B04B823A2894700F93B84 /* PeerBrowser.swift in Sources */,
Expand Down Expand Up @@ -1611,7 +1611,7 @@
F0AB12B2233F597B005B9F2A /* StatusBarView_Voice_Select.swift in Sources */,
F0EE0A162347BF09004A5EAD /* WKPageView.swift in Sources */,
F0F256C2233E6C4C00C9D719 /* FavoriteVoiceName.swift in Sources */,
F0369E3223A2D92C00C33139 /* StatusBarView_Listener.swift in Sources */,
F0369E3223A2D92C00C33139 /* StatusBarView_Sync.swift in Sources */,
F0C36A9D2359C78A001E396C /* Array.swift in Sources */,
F0553728239BE3C700BA24BA /* LongmanStore.swift in Sources */,
F06DB10D23450B6000C2DE90 /* View.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1110"
version = "1.3">
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand Down Expand Up @@ -37,6 +37,10 @@
BlueprintName = "ReaderTranslatorMacTests"
ReferencedContainer = "container:ReaderTranslator.xcodeproj">
</BuildableReference>
<LocationScenarioReference
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
referenceType = "1">
</LocationScenarioReference>
</TestableReference>
</Testables>
</TestAction>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F0754436234479DA00E1D88E"
BuildableName = "ReaderTranslatorMac.app"
BlueprintName = "ReaderTranslatorMac"
ReferencedContainer = "container:ReaderTranslator.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F0A2179723A9355E00968133"
BuildableName = "ReaderTranslatorMacTests.xctest"
BlueprintName = "ReaderTranslatorMacTests"
ReferencedContainer = "container:ReaderTranslator.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F0120372239182DA008D0B47"
BuildableName = "ReaderTranslatorPlayer.app"
BlueprintName = "ReaderTranslatorPlayer"
ReferencedContainer = "container:ReaderTranslator.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F0A2179723A9355E00968133"
BuildableName = "ReaderTranslatorMacTests.xctest"
BlueprintName = "ReaderTranslatorMacTests"
ReferencedContainer = "container:ReaderTranslator.xcodeproj">
</BuildableReference>
</TestableReference>
</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 = "F0754436234479DA00E1D88E"
BuildableName = "ReaderTranslatorMac.app"
BlueprintName = "ReaderTranslatorMac"
ReferencedContainer = "container:ReaderTranslator.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F0754436234479DA00E1D88E"
BuildableName = "ReaderTranslatorMac.app"
BlueprintName = "ReaderTranslatorMac"
ReferencedContainer = "container:ReaderTranslator.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F0120372239182DA008D0B47"
BuildableName = "ReaderTranslatorPlayer.app"
BlueprintName = "ReaderTranslatorPlayer"
ReferencedContainer = "container:ReaderTranslator.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F0A2179723A9355E00968133"
BuildableName = "ReaderTranslatorMacTests.xctest"
BlueprintName = "ReaderTranslatorMacTests"
ReferencedContainer = "container:ReaderTranslator.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 = "F0120372239182DA008D0B47"
BuildableName = "ReaderTranslatorPlayer.app"
BlueprintName = "ReaderTranslatorPlayer"
ReferencedContainer = "container:ReaderTranslator.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F0120372239182DA008D0B47"
BuildableName = "ReaderTranslatorPlayer.app"
BlueprintName = "ReaderTranslatorPlayer"
ReferencedContainer = "container:ReaderTranslator.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,21 @@
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>ReaderTranslatorMac_Player_Test.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
</dict>
<key>ReaderTranslatorPlayer.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>ReaderTranslatorPlayer_Mac_Test.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
</dict>
<key>ReaderTranslatorSafari.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
Expand All @@ -47,6 +57,11 @@
<key>primary</key>
<true/>
</dict>
<key>F0A2179723A9355E00968133</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>F0AA699C232E9710007CC07B</key>
<dict>
<key>primary</key>
Expand Down
2 changes: 1 addition & 1 deletion ReaderTranslator/Views/StatusBarView/StatusBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct StatusBarView: View {
speechHandler
playbackRateView
SettingsView()
StatusBarView_Listener()
StatusBarView_Sync()
}.padding(.trailing, 20)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Network
import SwiftUI

struct StatusBarView_Listener: View {
struct StatusBarView_Sync: View {
@ObservedObject var store = Store.shared
@ObservedObject var bookmarksStore = BookmarksStore.shared

Expand Down Expand Up @@ -37,7 +37,7 @@ struct StatusBarView_Listener: View {
}
}

extension StatusBarView_Listener.Coordinator {
extension StatusBarView_Sync.Coordinator {
func stateUpdateHandler(newState: NWListener.State) {
switch newState {
case .ready:
Expand Down Expand Up @@ -65,7 +65,7 @@ extension StatusBarView_Listener.Coordinator {
}
}

extension StatusBarView_Listener.Coordinator: PeerConnectionDelegate {
extension StatusBarView_Sync.Coordinator: PeerConnectionDelegate {
// When a connection becomes ready, move into game mode.
func connectionReady() {
// navigationController?.performSegue(withIdentifier: "showGameSegue", sender: nil)
Expand All @@ -88,6 +88,6 @@ extension StatusBarView_Listener.Coordinator: PeerConnectionDelegate {

struct StatusBarView_Listener_Previews: PreviewProvider {
static var previews: some View {
StatusBarView_Listener()
StatusBarView_Sync()
}
}
2 changes: 1 addition & 1 deletion ReaderTranslatorMac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1638</string>
<string>1647</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.education</string>
<key>LSMinimumSystemVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion ReaderTranslatorMacTests/ReaderTranslatorMacTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ReaderTranslatorMacTests: XCTestCase {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

func testExample() {
func testSyncBookmarks() {

// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
Expand Down
6 changes: 3 additions & 3 deletions ReaderTranslatorPlayer/Store/Store.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import SwiftUI

class Store: ObservableObject {
final class Store: ObservableObject {
private init() {}
static var shared = Store()

@Published var hideNavBar = true

var lastWebPage = ""

@Published var hideNavBar = true
@Published(key: "bookmarks") var bookmarks: BookmarksStore.Bookmarks = []
}
Loading

0 comments on commit 5ee0686

Please sign in to comment.