mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Compare commits
No commits in common. "8ddd2b15773a205f40f2604ce9db42bb2fe7e735" and "90c0df5c5d2d9db64b6f183038f1288f17301143" have entirely different histories.
8ddd2b1577
...
90c0df5c5d
@ -1,60 +0,0 @@
|
|||||||
{
|
|
||||||
"entries": {
|
|
||||||
"brew": {
|
|
||||||
"meson": {
|
|
||||||
"version": "0.53.2",
|
|
||||||
"bottle": {
|
|
||||||
"cellar": ":any_skip_relocation",
|
|
||||||
"prefix": "/usr/local",
|
|
||||||
"files": {
|
|
||||||
"catalina": {
|
|
||||||
"url": "https://homebrew.bintray.com/bottles/meson-0.53.2.catalina.bottle.tar.gz",
|
|
||||||
"sha256": "b2855c6300305417e6b709f9f4a197b6b9905255d947dd8263b14443c18a64a6"
|
|
||||||
},
|
|
||||||
"mojave": {
|
|
||||||
"url": "https://homebrew.bintray.com/bottles/meson-0.53.2.mojave.bottle.tar.gz",
|
|
||||||
"sha256": "b2855c6300305417e6b709f9f4a197b6b9905255d947dd8263b14443c18a64a6"
|
|
||||||
},
|
|
||||||
"high_sierra": {
|
|
||||||
"url": "https://homebrew.bintray.com/bottles/meson-0.53.2.high_sierra.bottle.tar.gz",
|
|
||||||
"sha256": "b2855c6300305417e6b709f9f4a197b6b9905255d947dd8263b14443c18a64a6"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ninja": {
|
|
||||||
"version": "1.10.0",
|
|
||||||
"bottle": {
|
|
||||||
"cellar": ":any_skip_relocation",
|
|
||||||
"prefix": "/usr/local",
|
|
||||||
"files": {
|
|
||||||
"catalina": {
|
|
||||||
"url": "https://homebrew.bintray.com/bottles/ninja-1.10.0.catalina.bottle.tar.gz",
|
|
||||||
"sha256": "b536415ef20ab14e808ef3fe558bbcd4c86de048d7e47cc86906fed4e1507fdc"
|
|
||||||
},
|
|
||||||
"mojave": {
|
|
||||||
"url": "https://homebrew.bintray.com/bottles/ninja-1.10.0.mojave.bottle.tar.gz",
|
|
||||||
"sha256": "07c7d5eab06643969950a168b7a4ce34a39d236869e909942294eb136dfe3063"
|
|
||||||
},
|
|
||||||
"high_sierra": {
|
|
||||||
"url": "https://homebrew.bintray.com/bottles/ninja-1.10.0.high_sierra.bottle.tar.gz",
|
|
||||||
"sha256": "e413c88eed509424d118a0b61b7b3c63535fc7c8c92cd336322db7a8af9cf6e0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"system": {
|
|
||||||
"macos": {
|
|
||||||
"catalina": {
|
|
||||||
"HOMEBREW_VERSION": "2.2.11",
|
|
||||||
"HOMEBREW_PREFIX": "/usr/local",
|
|
||||||
"Homebrew/homebrew-core": "a1f4cb841742ad23afc288c9ac11173c4a56aad2",
|
|
||||||
"CLT": "11.0.33.8",
|
|
||||||
"Xcode": "11.4",
|
|
||||||
"macOS": "10.15.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -6,13 +6,14 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
struct App {
|
struct App {
|
||||||
static let store = Store<AppState>(reducer: appReducer, state: nil)
|
static let store = Store<AppState>(reducer: appReducer, state: nil)
|
||||||
static let trackTimer = TrackTimer()
|
static let trackTimer = TrackTimer()
|
||||||
static let userNotificationsController = UserNotificationsController()
|
static let userNotificationsController = UserNotificationsController()
|
||||||
|
static let mpdServerController = MPDServerController()
|
||||||
static let mpdServerDelegate = MPDServerDelegate()
|
static let mpdServerDelegate = MPDServerDelegate()
|
||||||
static let mpdServerController = MPDServerController(delegate: mpdServerDelegate)
|
|
||||||
static var mpdClient: MPDClient!
|
static var mpdClient: MPDClient!
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,8 +10,8 @@ import Foundation
|
|||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
class MPDServerController {
|
class MPDServerController {
|
||||||
init(delegate: MPDClientDelegate? = nil) {
|
init() {
|
||||||
App.mpdClient = MPDClient(withDelegate: delegate)
|
App.mpdClient = MPDClient(withDelegate: App.mpdServerDelegate)
|
||||||
|
|
||||||
App.store.subscribe(self) {
|
App.store.subscribe(self) {
|
||||||
$0.select { $0.preferencesState.mpdServer }
|
$0.select { $0.preferencesState.mpdServer }
|
||||||
@ -6,8 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Dispatch
|
import AppKit
|
||||||
import NotificationCenter
|
|
||||||
|
|
||||||
class MPDServerDelegate: MPDClientDelegate {
|
class MPDServerDelegate: MPDClientDelegate {
|
||||||
func didConnect(mpdClient: MPDClient) {
|
func didConnect(mpdClient: MPDClient) {
|
||||||
@ -68,5 +67,8 @@ class MPDServerDelegate: MPDClientDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func didLoadArtists(mpdClient: MPDClient, artists: [String]) {
|
func didLoadArtists(mpdClient: MPDClient, artists: [String]) {
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
App.store.dispatch(UpdateArtistListAction(artists: artists))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6,6 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
struct UpdateAlbumListAction: Action {
|
struct UpdateAlbumListAction: Action {
|
||||||
14
Mac/State/Actions/ArtistListActions.swift
Normal file
14
Mac/State/Actions/ArtistListActions.swift
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
//
|
||||||
|
// ArtistListActions.swift
|
||||||
|
// Persephone
|
||||||
|
//
|
||||||
|
// Created by Daniel Barber on 2019/9/29.
|
||||||
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import AppKit
|
||||||
|
import ReSwift
|
||||||
|
|
||||||
|
struct UpdateArtistListAction: Action {
|
||||||
|
var artists: [String]
|
||||||
|
}
|
||||||
@ -13,6 +13,7 @@ struct AppState: StateType {
|
|||||||
var playerState = PlayerState()
|
var playerState = PlayerState()
|
||||||
var queueState = QueueState()
|
var queueState = QueueState()
|
||||||
var albumListState = AlbumListState()
|
var albumListState = AlbumListState()
|
||||||
|
var artistListState = ArtistListState()
|
||||||
var preferencesState = PreferencesState()
|
var preferencesState = PreferencesState()
|
||||||
var uiState = UIState()
|
var uiState = UIState()
|
||||||
}
|
}
|
||||||
13
Mac/State/ArtistListState.swift
Normal file
13
Mac/State/ArtistListState.swift
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// ArtistListState.swift
|
||||||
|
// Persephone
|
||||||
|
//
|
||||||
|
// Created by Daniel Barber on 2019/9/20.
|
||||||
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import ReSwift
|
||||||
|
|
||||||
|
struct ArtistListState: StateType, Equatable {
|
||||||
|
var artists: [Artist] = []
|
||||||
|
}
|
||||||
@ -14,6 +14,7 @@ func appReducer(action: Action, state: AppState?) -> AppState {
|
|||||||
playerState: playerReducer(action: action, state: state?.playerState),
|
playerState: playerReducer(action: action, state: state?.playerState),
|
||||||
queueState: queueReducer(action: action, state: state?.queueState),
|
queueState: queueReducer(action: action, state: state?.queueState),
|
||||||
albumListState: albumListReducer(action: action, state: state?.albumListState),
|
albumListState: albumListReducer(action: action, state: state?.albumListState),
|
||||||
|
artistListState: artistListReducer(action: action, state: state?.artistListState),
|
||||||
preferencesState: preferencesReducer(action: action, state: state?.preferencesState),
|
preferencesState: preferencesReducer(action: action, state: state?.preferencesState),
|
||||||
uiState: uiReducer(action: action, state: state?.uiState)
|
uiState: uiReducer(action: action, state: state?.uiState)
|
||||||
)
|
)
|
||||||
25
Mac/State/Reducers/ArtistReducer.swift
Normal file
25
Mac/State/Reducers/ArtistReducer.swift
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
//
|
||||||
|
// ArtistReducer.swift
|
||||||
|
// Persephone
|
||||||
|
//
|
||||||
|
// Created by Daniel Barber on 2019/9/29.
|
||||||
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import ReSwift
|
||||||
|
|
||||||
|
func artistListReducer(action: Action, state: ArtistListState?) -> ArtistListState {
|
||||||
|
var state = state ?? ArtistListState()
|
||||||
|
|
||||||
|
switch action {
|
||||||
|
case let action as UpdateArtistListAction:
|
||||||
|
state.artists = action.artists.map { Artist(name: $0) }
|
||||||
|
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return state
|
||||||
|
}
|
||||||
|
|
||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Dispatch
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
func playerReducer(action: Action, state: PlayerState?) -> PlayerState {
|
func playerReducer(action: Action, state: PlayerState?) -> PlayerState {
|
||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Dispatch
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
func queueReducer(action: Action, state: QueueState?) -> QueueState {
|
func queueReducer(action: Action, state: QueueState?) -> QueueState {
|
||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Dispatch
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
func uiReducer(action: Action, state: UIState?) -> UIState {
|
func uiReducer(action: Action, state: UIState?) -> UIState {
|
||||||
File diff suppressed because it is too large
Load Diff
@ -4,11 +4,6 @@
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SchemeUserState</key>
|
<key>SchemeUserState</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>Persephone-iOS.xcscheme_^#shared#^_</key>
|
|
||||||
<dict>
|
|
||||||
<key>orderHint</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
</dict>
|
|
||||||
<key>Persephone.xcscheme</key>
|
<key>Persephone.xcscheme</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
@ -19,11 +14,6 @@
|
|||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>libmpdclient.xcscheme_^#shared#^_</key>
|
|
||||||
<dict>
|
|
||||||
<key>orderHint</key>
|
|
||||||
<integer>2</integer>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
</dict>
|
||||||
<key>SuppressBuildableAutocreation</key>
|
<key>SuppressBuildableAutocreation</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
//
|
|
||||||
// MachTime.swift
|
|
||||||
// Persephone
|
|
||||||
//
|
|
||||||
// Created by Daniel Barber on 2020-3-19.
|
|
||||||
// Copyright © 2020 Dan Barber. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
func machTime() -> UInt64 {
|
|
||||||
var info = mach_timebase_info()
|
|
||||||
mach_timebase_info(&info)
|
|
||||||
|
|
||||||
return mach_absolute_time() * UInt64(info.numer) / UInt64(info.denom)
|
|
||||||
}
|
|
||||||
|
|
||||||
func machTimeS() -> Double {
|
|
||||||
return Double(machTime()) / 1_000_000_000
|
|
||||||
}
|
|
||||||
@ -6,6 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import AppKit
|
||||||
import CryptoSwift
|
import CryptoSwift
|
||||||
|
|
||||||
struct Album {
|
struct Album {
|
||||||
|
|||||||
24
Shared/Models/Artist.swift
Normal file
24
Shared/Models/Artist.swift
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
//
|
||||||
|
// Artist.swift
|
||||||
|
// Persephone
|
||||||
|
//
|
||||||
|
// Created by Daniel Barber on 2019/10/04.
|
||||||
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import AppKit
|
||||||
|
|
||||||
|
struct Artist {
|
||||||
|
var name: String
|
||||||
|
var image: Loading<NSImage?> = .notLoaded
|
||||||
|
|
||||||
|
init(name: String) {
|
||||||
|
self.name = name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Artist: Equatable {
|
||||||
|
static func == (lhs: Artist, rhs: Artist) -> Bool {
|
||||||
|
return lhs.name == rhs.name
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,6 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import AppKit
|
||||||
import CryptoSwift
|
import CryptoSwift
|
||||||
|
|
||||||
struct DraggedAlbum: Codable {
|
struct DraggedAlbum: Codable {
|
||||||
|
|||||||
@ -6,6 +6,8 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
enum Loading<T> {
|
enum Loading<T> {
|
||||||
case notLoaded
|
case notLoaded
|
||||||
case loading
|
case loading
|
||||||
|
|||||||
@ -6,6 +6,8 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct MPDServer {
|
struct MPDServer {
|
||||||
let hostDefault = "127.0.0.1"
|
let hostDefault = "127.0.0.1"
|
||||||
let portDefault = 6600
|
let portDefault = 6600
|
||||||
|
|||||||
@ -6,6 +6,8 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import AppKit
|
||||||
|
|
||||||
struct QueueItem: Hashable {
|
struct QueueItem: Hashable {
|
||||||
var song: Song
|
var song: Song
|
||||||
var queuePos: Int
|
var queuePos: Int
|
||||||
|
|||||||
@ -6,6 +6,8 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct Song {
|
struct Song {
|
||||||
var mpdSong: MPDClient.MPDSong
|
var mpdSong: MPDClient.MPDSong
|
||||||
|
|
||||||
|
|||||||
@ -6,17 +6,17 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import AppKit
|
||||||
|
|
||||||
class TrackTimer {
|
class TrackTimer: NSObject {
|
||||||
var timer: Timer?
|
var timer: Timer?
|
||||||
var startTime: CFTimeInterval = CFTimeInterval(machTimeS())
|
var startTime: CFTimeInterval = CACurrentMediaTime()
|
||||||
var startElapsed: Double = 0
|
var startElapsed: Double = 0
|
||||||
|
|
||||||
func start(elapsedTimeMs: UInt?) {
|
func start(elapsedTimeMs: UInt?) {
|
||||||
guard let elapsedTimeMs = elapsedTimeMs else { return }
|
guard let elapsedTimeMs = elapsedTimeMs else { return }
|
||||||
|
|
||||||
startTime = CFTimeInterval(machTimeS())
|
startTime = CACurrentMediaTime()
|
||||||
startElapsed = Double(elapsedTimeMs) / 1000
|
startElapsed = Double(elapsedTimeMs) / 1000
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
@ -26,7 +26,7 @@ class TrackTimer {
|
|||||||
withTimeInterval: 0.25,
|
withTimeInterval: 0.25,
|
||||||
repeats: true
|
repeats: true
|
||||||
) { _ in
|
) { _ in
|
||||||
let currentTime = CFTimeInterval(machTimeS())
|
let currentTime = CACurrentMediaTime()
|
||||||
|
|
||||||
let timeDiff = currentTime - self.startTime
|
let timeDiff = currentTime - self.startTime
|
||||||
let newElapsedTimeMs = UInt((self.startElapsed + timeDiff) * 1000)
|
let newElapsedTimeMs = UInt((self.startElapsed + timeDiff) * 1000)
|
||||||
|
|||||||
13
bin/setup
13
bin/setup
@ -1,13 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
brew bundle
|
brew install meson
|
||||||
|
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
git apply --directory=libmpdclient/ libmpdclient.patch
|
|
||||||
|
|
||||||
pushd libmpdclient
|
cd libmpdclient && \
|
||||||
|
meson . output && \
|
||||||
meson . output
|
ninja -C output
|
||||||
ninja -C output
|
cd ..
|
||||||
|
|
||||||
popd
|
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
//
|
|
||||||
// App.swift
|
|
||||||
// Persephone
|
|
||||||
//
|
|
||||||
// Created by Daniel Barber on 2019/4/30.
|
|
||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import ReSwift
|
|
||||||
|
|
||||||
struct App {
|
|
||||||
static let store = Store<AppState>(reducer: appReducer, state: nil)
|
|
||||||
static let trackTimer = TrackTimer()
|
|
||||||
//static let userNotificationsController = UserNotificationsController()
|
|
||||||
static let mpdServerDelegate = MPDServerDelegate()
|
|
||||||
static let mpdServerController = MPDServerController(delegate: mpdServerDelegate)
|
|
||||||
static var mpdClient: MPDClient!
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
//
|
|
||||||
// AppDelegate.swift
|
|
||||||
// Persephone-iOS
|
|
||||||
//
|
|
||||||
// Created by Daniel Barber on 2020-3-13.
|
|
||||||
// Copyright © 2020 Dan Barber. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
@UIApplicationMain
|
|
||||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
||||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: UISceneSession Lifecycle
|
|
||||||
|
|
||||||
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
|
|
||||||
// Called when a new scene session is being created.
|
|
||||||
// Use this method to select a configuration to create the new scene with.
|
|
||||||
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
|
|
||||||
}
|
|
||||||
|
|
||||||
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
|
|
||||||
// Called when the user discards a scene session.
|
|
||||||
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
|
|
||||||
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,62 +0,0 @@
|
|||||||
<?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>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>$(PRODUCT_NAME)</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>$(MARKETING_VERSION)</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1</string>
|
|
||||||
<key>LSRequiresIPhoneOS</key>
|
|
||||||
<true/>
|
|
||||||
<key>UIApplicationSceneManifest</key>
|
|
||||||
<dict>
|
|
||||||
<key>UIApplicationSupportsMultipleScenes</key>
|
|
||||||
<false/>
|
|
||||||
<key>UISceneConfigurations</key>
|
|
||||||
<dict>
|
|
||||||
<key>UIWindowSceneSessionRoleApplication</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>UISceneConfigurationName</key>
|
|
||||||
<string>Default Configuration</string>
|
|
||||||
<key>UISceneDelegateClassName</key>
|
|
||||||
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
|
||||||
<key>UISceneStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>UILaunchStoryboardName</key>
|
|
||||||
<string>LaunchScreen</string>
|
|
||||||
<key>UIMainStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
<key>UIRequiredDeviceCapabilities</key>
|
|
||||||
<array>
|
|
||||||
<string>armv7</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
<?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>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>$(PRODUCT_NAME)</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
//
|
|
||||||
// Persephone_iOSTests.swift
|
|
||||||
// Persephone-iOSTests
|
|
||||||
//
|
|
||||||
// Created by Daniel Barber on 2020-3-13.
|
|
||||||
// Copyright © 2020 Dan Barber. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import XCTest
|
|
||||||
@testable import Persephone_iOS
|
|
||||||
|
|
||||||
class Persephone_iOSTests: XCTestCase {
|
|
||||||
|
|
||||||
override func setUp() {
|
|
||||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
|
||||||
}
|
|
||||||
|
|
||||||
override func tearDown() {
|
|
||||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
|
||||||
}
|
|
||||||
|
|
||||||
func testExample() {
|
|
||||||
// This is an example of a functional test case.
|
|
||||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
|
||||||
}
|
|
||||||
|
|
||||||
func testPerformanceExample() {
|
|
||||||
// This is an example of a performance test case.
|
|
||||||
self.measure {
|
|
||||||
// Put the code you want to measure the time of here.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
<?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>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>$(PRODUCT_NAME)</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
//
|
|
||||||
// Persephone_iOSUITests.swift
|
|
||||||
// Persephone-iOSUITests
|
|
||||||
//
|
|
||||||
// Created by Daniel Barber on 2020-3-13.
|
|
||||||
// Copyright © 2020 Dan Barber. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import XCTest
|
|
||||||
|
|
||||||
class Persephone_iOSUITests: XCTestCase {
|
|
||||||
|
|
||||||
override func setUp() {
|
|
||||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
|
||||||
|
|
||||||
// In UI tests it is usually best to stop immediately when a failure occurs.
|
|
||||||
continueAfterFailure = false
|
|
||||||
|
|
||||||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
|
|
||||||
}
|
|
||||||
|
|
||||||
override func tearDown() {
|
|
||||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
|
||||||
}
|
|
||||||
|
|
||||||
func testExample() {
|
|
||||||
// UI tests must launch the application that they test.
|
|
||||||
let app = XCUIApplication()
|
|
||||||
app.launch()
|
|
||||||
|
|
||||||
// Use recording to get started writing UI tests.
|
|
||||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
|
||||||
}
|
|
||||||
|
|
||||||
func testLaunchPerformance() {
|
|
||||||
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) {
|
|
||||||
// This measures how long it takes to launch your application.
|
|
||||||
measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) {
|
|
||||||
XCUIApplication().launch()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
diff --git a/src/socket.c b/src/socket.c
|
|
||||||
index 8f684b2..65498f2 100644
|
|
||||||
--- a/src/socket.c
|
|
||||||
+++ b/src/socket.c
|
|
||||||
@@ -35,6 +35,7 @@
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
+#include <sys/time.h>
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
# include <winsock2.h>
|
|
||||||
diff --git a/src/sync.c b/src/sync.c
|
|
||||||
index 3fefffe..ab96fb7 100644
|
|
||||||
--- a/src/sync.c
|
|
||||||
+++ b/src/sync.c
|
|
||||||
@@ -34,6 +34,7 @@
|
|
||||||
#include <assert.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
+#include <sys/time.h>
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
#include <sys/select.h>
|
|
||||||
Loading…
Reference in New Issue
Block a user