Skip to content
Merged

v2.0 #17

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
61b8eb9
ADDED: upgrade
PerseusRealDeal Dec 4, 2024
a5c68a2
ADDED: current location and other changes
PerseusRealDeal Jan 13, 2025
56c3604
ADDED: location package update
PerseusRealDeal Jan 17, 2025
4aac442
ADDED: GoTo Settings Alert from PerseusGeoLocationKit
PerseusRealDeal Jan 30, 2025
f099ee6
ADDED: minor update
PerseusRealDeal Feb 2, 2025
357e0df
ADDED: location updates handler
PerseusRealDeal Feb 4, 2025
9578e8b
ADDED: minor changes
PerseusRealDeal Feb 4, 2025
8a28f53
UPDATED: dependency branch
PerseusRealDeal Feb 5, 2025
72811da
ADDED: minor changes
PerseusRealDeal Feb 9, 2025
d3d9063
CHANGED: dependencies branches
PerseusRealDeal Feb 26, 2025
9a6a5cd
CHANGED: product name
PerseusRealDeal Mar 12, 2025
e7ca699
REDIRECTED: logs to Console.app
PerseusRealDeal Mar 13, 2025
b134048
ADDED: AppIcon
PerseusRealDeal Mar 16, 2025
fec1d8d
RENAMED: project
PerseusRealDeal Mar 16, 2025
86e945d
FINISHED: current location
PerseusRealDeal Mar 17, 2025
33e0554
ADDED: location screen RESTRUCTURED: content
PerseusRealDeal Mar 17, 2025
c0227b1
ADDED: minor changes
PerseusRealDeal Mar 28, 2025
4edf047
ADDED: controls
PerseusRealDeal Mar 29, 2025
1de3fda
PREPARING: PerseusDarkMode update for iOS
PerseusRealDeal Apr 13, 2025
ce959d7
ADOPTED: PerseusDarkMode 2.0.0 for both iOS and macOS
PerseusRealDeal Apr 14, 2025
ec9a838
ADDED: minor changes
PerseusRealDeal Apr 15, 2025
1b03a03
UPDATED: dependencies
PerseusRealDeal Apr 27, 2025
0e7363b
UPDATED: PGK dependency usage
PerseusRealDeal May 2, 2025
df6e145
ADDED: Geo Coordinator
PerseusRealDeal May 9, 2025
86190aa
ADDED: Location Dealer
PerseusRealDeal May 9, 2025
ea22902
CHANGED: PGKSupportingStar
PerseusRealDeal May 9, 2025
63ac9c7
ADDED: updating location
PerseusRealDeal May 11, 2025
2f005cb
ADDED: movement
PerseusRealDeal May 12, 2025
1900900
PREPARED: geo approbation
PerseusRealDeal May 15, 2025
ade6499
IMPROVED: geo reporting
PerseusRealDeal May 16, 2025
6014e69
CHANGED: support defaults for "the redirect dialog"
PerseusRealDeal May 16, 2025
469add7
LIMITED: geo report
PerseusRealDeal May 17, 2025
5f93cd1
ADDED: auto map to current point control
PerseusRealDeal May 19, 2025
e89a7e3
ADDED: minor changes
PerseusRealDeal May 19, 2025
dbe174f
UPDATED: dependencies
PerseusRealDeal May 28, 2025
3f94490
FINISHED: updating location
PerseusRealDeal May 31, 2025
f2641a0
ADDED: updates
PerseusRealDeal Jun 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 19 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
name: Build & Tests

on:
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# schedule:
# - cron: '30 5 * * 5'
# schedule:
# - cron: '30 5 * * 5'

jobs:

build:
runs-on: macos-latest
build:
runs-on: macos-14
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Show xcodebuild version
run: xcodebuild -version
- name: Show xcode embedded SDKs
run: xcodebuild -showsdks
uses: actions/checkout@v4
- name: Select Xcode 15.4
run: sudo xcode-select -s "/Applications/Xcode_15.4.app"
- name: Show buildable schemes
run: xcodebuild -list -project ./DiscoveryProject/DarkModeDiscovery.xcodeproj
- uses: mxcl/xcodebuild@v1.9.2
run: xcodebuild -list -project ./DiscoveryProject/TheOneRing.xcodeproj
- uses: mxcl/xcodebuild@v3
with:
platform: iOS
scheme: 'DarkModeDiscovery'
Expand All @@ -30,24 +28,21 @@ jobs:
verbosity: xcpretty
upload-logs: always
configuration: Release
tests:
runs-on: macos-latest

unit-tests:
runs-on: macos-14
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Show xcodebuild version
run: xcodebuild -version
- name: Show xcode embedded SDKs
run: xcodebuild -showsdks
uses: actions/checkout@v4
- name: Select Xcode 15.4
run: sudo xcode-select -s "/Applications/Xcode_15.4.app"
- name: Show buildable schemes
run: xcodebuild -list -project ./DiscoveryProject/DarkModeDiscovery.xcodeproj
- uses: mxcl/xcodebuild@v1.9.2
run: xcodebuild -list -project ./DiscoveryProject/TheOneRing.xcodeproj
- uses: mxcl/xcodebuild@v3
with:
platform: iOS
scheme: 'DarkModeDiscovery'
action: test
code-coverage: true
working-directory: ./DiscoveryProject
verbosity: xcpretty
upload-logs: always
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# .github/workflows/swiftlint.yml
name: Style

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
SwiftLint:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: cirruslabs/swiftlint-action@v1
with:
version: latest
49 changes: 49 additions & 0 deletions APPROBATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Approbation Matrix / Descovery project for iOS

> Build System: macOS Monterey 12.7.6 / Xcode 14.2

> Approbated capability: Logging —— CPL

| Device | Simulator | OS Version | Result | Details |
| --------------- | :-------: | ---------- | :-----: | ------- |
| iPad Air | no | 12.5.7 | ok | - |
| iPhone SE (3rd) | yes | 16.2 | ok | - |

> Approbated capability: Dark Mode —— Perseus Dark Mode

| Device | Simulator | OS Version | Result | Details |
| --------------- | :-------: | ---------- | :-----: | ------- |
| iPad Air | no | 12.5.7 | ok | - |
| iPhone SE (3rd) | yes | 16.2 | ok | - |

> Approbated capability: Location —— Perseus Geo Kit

| Device | Simulator | OS Version | Result | Details |
| --------------- | :-------: | ---------- | :-----: | ------- |
| iPad Air | no | 12.5.7 | ok | - |
| iPhone SE (3rd) | yes | 16.2 | ok | - |

## A3 environment

### List of available Apple machines

> Excluded: virtualization (e.g. VirtualBox) and hackintosh

| Machine | Memory | Storage | OS
| -------------- | ------ | ---------------------- | --------------- |
| Mac mini | 16GB | SATA 480GB, NVMe 256GB | Monterey 12.7.6 |
| MacBook Pro | 8GB | 256GB | Ventura 13.7.4 |
| iPad Air A1475 | -- | 16GB | iOS 12.5.7 |

### System configuration for A3 environment

| macOS | Version | Machine | Xcode | OpenCore | Git Client |
| ----------- | ------- | ----------- | ------ | -------- | -------------- |
| High Sierra | 10.13.6 | Mac mini | 10.1 | - | GitHub Desktop |
| Mojave | 10.14.6 | Mac mini | 11.3.1 | - | GitHub Desktop |
| Catalina | 10.15.7 | Mac mini | 11.7 | - | GitHub Desktop |
| Big Sur | 11.7.10 | Mac mini | 13.2.1 | - | GitHub Desktop |
| Monterey | 12.7.6 | Mac mini | 14.2 | - | SmartGit |
| Ventura | 13.7.4 | MacBook Pro | 15.2 | - | GitHub Desktop |
| Sonoma | 14.7.4 | MacBook Pro | 16.2 | yes | GitHub Desktop |
| Sequoia | 15.3.1 | MacBook Pro | 16.2 | yes | GitHub Desktop |
3 changes: 3 additions & 0 deletions .swiftlint.yml → DiscoveryProject/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji)

excluded:
- DerivedData

opt_in_rules:
- empty_count
# - missing_docs
Expand Down
50 changes: 50 additions & 0 deletions DiscoveryProject/DarkModeDiscovery/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//
// AppDelegate.swift
// DarkModeDiscovery
//
// Created by Mikhail A. Zhigulin of Novosibirsk.
//
// Unlicensed Free Software.
//

import UIKit

import ConsolePerseusLogger
import PerseusDarkMode
import PerseusGeoKit

class AppDelegate: UIResponder { var window: UIWindow? }

extension AppDelegate: UIApplicationDelegate {

func application(_ application: UIApplication, didFinishLaunchingWithOptions
launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

log.message("Launching with business matter purpose", .info)
log.message("[\(type(of: self))].\(#function)", .info)

// Register Settings Bundle
registerSettingsBundle()

// Init the app's window
window = UIWindow(frame: UIScreen.main.bounds)

// Give it a root view for the first screen
window!.rootViewController = MainViewController.storyboardInstance()
window!.makeKeyAndVisible()

DarkModeAgent.force(DarkModeUserChoice)
GeoCoordinator.reloadGeoComponents()

return true
}

func applicationDidBecomeActive(_ application: UIApplication) {
log.message("[\(type(of: self))].\(#function)")

// Actualize Dark Mode style to Settings Bundle
if let choice = DarkModeAgent.isDarkModeSettingsKeyChanged() {
DarkModeAgent.force(choice)
}
}
}
73 changes: 73 additions & 0 deletions DiscoveryProject/DarkModeDiscovery/AppGlobals.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
//
// AppGlobals.swift
// DarkModeDiscovery
//
// Created by Mikhail A. Zhigulin of Novosibirsk.
//
// Unlicensed Free Software.
//

import Foundation

import ConsolePerseusLogger
import PerseusGeoKit

// MARK: - Geo Constants

var DEFAULT_GEO_POINT: String { "\(DEFAULT_MAP_POINT.point)" }
var CURRENT_GEO_POINT: String {

guard let point = AppGlobals.currentLocation else {
return "Latitude, Longitude"
}

return "\(point)"
}

var CURRENT_LOCATION: String {
return AppGlobals.currentLocation == nil ? DEFAULT_GEO_POINT : CURRENT_GEO_POINT
}

// MARK: - App Globals

struct AppGlobals {

// MARK: - Business Data

static var currentLocation: GeoPoint? {
didSet {
let location = currentLocation?.description ?? "current location is erased"
log.message("[\(type(of: self))] \(location)")
}
}

// MARK: - System Services

static let userDefaults = UserDefaults.standard
static let notificationCenter = NotificationCenter.default

// MARK: - Initializer

init() {
log.message("[\(type(of: self))].\(#function)", .info)

GeoAgent.currentAccuracy = .best

GeoCoordinator.shared.onStatusAllowed = {
// LocationDealer.requestCurrent()
LocationDealer.requestUpdatingLocation()
}
GeoCoordinator.shared.notifier = AppGlobals.notificationCenter

GeoCoordinator.shared.locationRecieved = { point in
AppGlobals.currentLocation = point
}

GeoCoordinator.shared.locationUpdatesRecieved = { updates in
if let lastone = updates.last {
log.message("Location Updates: \(updates.count)")
AppGlobals.currentLocation = lastone
}
}
}
}
56 changes: 0 additions & 56 deletions DiscoveryProject/DarkModeDiscovery/Configuration/AppDelegate.swift

This file was deleted.

Loading