Skip to content

Commit 6931328

Browse files
Initial project setup
0 parents  commit 6931328

9 files changed

Lines changed: 1360 additions & 0 deletions

File tree

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.DS_Store
2+
3+
# Swift Package Manager
4+
.build/
5+
.swiftpm/
6+
Package.resolved
7+
8+
# Xcode
9+
DerivedData/
10+
*.xcworkspace
11+
*.xcodeproj/project.xcworkspace/
12+
*.xcuserdatad/
13+
*.xcuserstate
14+
xcuserdata/
15+
16+
# Editors
17+
.idea/
18+
.vscode/

LICENSE

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Khons Personal Use License
2+
3+
Copyright (c) 2026 stack-node
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to use,
7+
copy, modify, and distribute the Software for personal, non-commercial
8+
purposes only, subject to the following conditions:
9+
10+
1. Commercial use is prohibited without prior written permission from the
11+
copyright holder.
12+
13+
2. If you distribute the Software or modified versions of it, you must retain
14+
this license and attribution to the original creator.
15+
16+
3. Contributions, modifications, and suggested changes are welcome. However,
17+
all rights, title, and ownership in the original Software remain with the
18+
original creator.
19+
20+
4. Unless explicitly agreed otherwise in writing, any contributions submitted
21+
for inclusion in the Software may be used, modified, and redistributed by the
22+
copyright holder as part of the Software.
23+
24+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26+
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
28+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM,
29+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30+
SOFTWARE.

Package.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "Khons",
6+
platforms: [
7+
.macOS(.v14),
8+
],
9+
targets: [
10+
.executableTarget(
11+
name: "Khons",
12+
path: "Sources/Khons"
13+
),
14+
]
15+
)

README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Khons
2+
3+
Khons is a macOS SwiftUI utility for simulating an iPhone's location from a desktop map. It lets you pick a target point visually, detects connected iOS devices, and applies location spoofing through the toolchain that matches the device generation:
4+
5+
- `libimobiledevice` for older iOS versions
6+
- `pymobiledevice3` developer tooling for iOS 17+
7+
8+
The app is built as a Swift Package and provides a map-first workflow for selecting coordinates, refreshing attached devices, starting simulation, and resetting back to the device's real location.
9+
10+
## Screenshot
11+
12+
![Khons screenshot](Resources/Preview.png)
13+
14+
## Features
15+
16+
- Native macOS SwiftUI interface with MapKit
17+
- Click-to-select target coordinates
18+
- USB device detection via `idevice_id`
19+
- Device name lookup via `ideviceinfo`
20+
- Location simulation for both legacy and modern iOS tooling
21+
- One-click dependency bootstrap from inside the app
22+
23+
## Requirements
24+
25+
- macOS 14 or newer
26+
- Xcode Command Line Tools
27+
- Homebrew
28+
- A physical iPhone connected over USB
29+
- The iPhone must be unlocked and trusted by the Mac
30+
- For development services on newer iOS versions, opening the device once in Xcode may be required
31+
32+
## Build
33+
34+
Build the app from the project root:
35+
36+
```bash
37+
swift build
38+
```
39+
40+
Run it directly with SwiftPM:
41+
42+
```bash
43+
swift run
44+
```
45+
46+
## Dependency Setup
47+
48+
Khons can install most runtime dependencies from the app UI, but you can also prepare them manually.
49+
50+
Install the native tooling:
51+
52+
```bash
53+
brew install python swig openssl@3 libimobiledevice
54+
```
55+
56+
Create the Python environment used for iOS 17+ support:
57+
58+
```bash
59+
python3 -m venv "$HOME/.venvs/khons-pmd3"
60+
source "$HOME/.venvs/khons-pmd3/bin/activate"
61+
python -m pip install -U pip setuptools wheel
62+
python -m pip install -U pymobiledevice3
63+
```
64+
65+
When launching Khons for iOS 17+ simulation, use the same shell session after activating that virtual environment:
66+
67+
```bash
68+
source "$HOME/.venvs/khons-pmd3/bin/activate"
69+
swift run
70+
```
71+
72+
## Usage
73+
74+
1. Connect an iPhone over USB and unlock it.
75+
2. Trust the Mac on the device if prompted.
76+
3. Start Khons.
77+
4. Refresh devices if needed.
78+
5. Pick the correct tool group for the target iOS version.
79+
6. Click on the map to choose a target location.
80+
7. Press the green action button to start simulation.
81+
8. Press the red action button to clear the simulated location.
82+
83+
## Notes
84+
85+
- If `idevice_id` or `idevicesetlocation` are missing, install `libimobiledevice`.
86+
- If no devices appear, reconnect the phone, unlock it, trust the Mac, and retry.
87+
- Modern iOS simulation relies on Apple developer services exposed through `pymobiledevice3`, so local environment setup matters.
88+
89+
## License Clarification
90+
91+
Khons is source-available, but it is not Open Source in the OSI sense.
92+
93+
- Personal, non-commercial use is allowed.
94+
- Commercial use is not allowed without prior written permission from the creator.
95+
- You can study the code, modify it, and share improvements under the same license terms.
96+
- Ownership of the original project and brand remains with the creator.
97+
98+
## License
99+
100+
This project is distributed under the terms in [LICENSE](LICENSE).
101+
102+
## Contributing
103+
104+
Contributions are welcome, especially bug fixes, compatibility updates, and UX improvements.
105+
106+
- Open an issue or submit a pull request with a clear description of the change.
107+
- Keep changes focused and easy to review.
108+
- By submitting a contribution, you agree that it may be incorporated into the project and redistributed under this repository's license.
109+
- Submitting a contribution does not transfer ownership of the overall project away from the creator.

Resources/Preview.png

4.71 MB
Loading

0 commit comments

Comments
 (0)