ipeddle 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ipeddle-0.1.0/.gitignore +11 -0
- ipeddle-0.1.0/LICENSE +201 -0
- ipeddle-0.1.0/NOTICE +27 -0
- ipeddle-0.1.0/PKG-INFO +272 -0
- ipeddle-0.1.0/README.md +245 -0
- ipeddle-0.1.0/README.pt-BR.md +102 -0
- ipeddle-0.1.0/examples/hello/Icon.png +0 -0
- ipeddle-0.1.0/examples/hello/Package.swift +21 -0
- ipeddle-0.1.0/examples/hello/README.md +11 -0
- ipeddle-0.1.0/examples/hello/Sources/Hello/HelloApp.swift +54 -0
- ipeddle-0.1.0/examples/hello/Sources/Hello/Resources/message.txt +1 -0
- ipeddle-0.1.0/examples/hello/Sources/HelloSupport/HelloSupport.c +12 -0
- ipeddle-0.1.0/examples/hello/Sources/HelloSupport/include/HelloSupport.h +10 -0
- ipeddle-0.1.0/examples/hello/ipeddle.toml +8 -0
- ipeddle-0.1.0/pyproject.toml +57 -0
- ipeddle-0.1.0/src/ipeddle/__init__.py +3 -0
- ipeddle-0.1.0/src/ipeddle/__main__.py +3 -0
- ipeddle-0.1.0/src/ipeddle/build.py +309 -0
- ipeddle-0.1.0/src/ipeddle/cli.py +219 -0
- ipeddle-0.1.0/src/ipeddle/config.py +95 -0
- ipeddle-0.1.0/src/ipeddle/doctor.py +173 -0
- ipeddle-0.1.0/src/ipeddle/errors.py +11 -0
- ipeddle-0.1.0/src/ipeddle/fsutil.py +131 -0
- ipeddle-0.1.0/src/ipeddle/inspect.py +329 -0
- ipeddle-0.1.0/src/ipeddle/macho.py +281 -0
- ipeddle-0.1.0/src/ipeddle/mangling.py +136 -0
- ipeddle-0.1.0/src/ipeddle/package.py +309 -0
- ipeddle-0.1.0/src/ipeddle/patcher.py +247 -0
- ipeddle-0.1.0/src/ipeddle/paths.py +76 -0
- ipeddle-0.1.0/src/ipeddle/proc.py +58 -0
- ipeddle-0.1.0/src/ipeddle/runtime.py +73 -0
- ipeddle-0.1.0/src/ipeddle/scaffold.py +83 -0
- ipeddle-0.1.0/src/ipeddle/sdk.py +130 -0
- ipeddle-0.1.0/src/ipeddle/setup.py +309 -0
- ipeddle-0.1.0/src/ipeddle/swiftsdk.py +143 -0
- ipeddle-0.1.0/src/ipeddle/tbd.py +308 -0
- ipeddle-0.1.0/src/ipeddle/toolchain.py +194 -0
- ipeddle-0.1.0/src/ipeddle/ui.py +56 -0
- ipeddle-0.1.0/src/ipeddle/xip.py +213 -0
- ipeddle-0.1.0/tests/conftest.py +4 -0
- ipeddle-0.1.0/tests/helpers.py +183 -0
- ipeddle-0.1.0/tests/test_cli_misc.py +97 -0
- ipeddle-0.1.0/tests/test_downloads.py +60 -0
- ipeddle-0.1.0/tests/test_macho.py +46 -0
- ipeddle-0.1.0/tests/test_mangling.py +52 -0
- ipeddle-0.1.0/tests/test_package_inspect.py +132 -0
- ipeddle-0.1.0/tests/test_patcher.py +90 -0
- ipeddle-0.1.0/tests/test_setup_sdk.py +57 -0
- ipeddle-0.1.0/tests/test_tbd.py +113 -0
- ipeddle-0.1.0/tests/test_xip.py +39 -0
ipeddle-0.1.0/.gitignore
ADDED
ipeddle-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
ipeddle-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
ipeddle
|
|
2
|
+
Copyright 2026 Neguiolidas and the ipeddle contributors
|
|
3
|
+
|
|
4
|
+
This product is licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
5
|
+
|
|
6
|
+
Third-party software
|
|
7
|
+
--------------------
|
|
8
|
+
|
|
9
|
+
ipeddle does not bundle third-party code. At setup time it downloads, onto
|
|
10
|
+
the user's machine:
|
|
11
|
+
|
|
12
|
+
* The Swift toolchain for Linux from swift.org
|
|
13
|
+
(Apache License 2.0 with Runtime Library Exception).
|
|
14
|
+
* The ld64-compatible linker built by the xtool project, as a prebuilt release
|
|
15
|
+
archive pinned by version and SHA-256
|
|
16
|
+
(https://github.com/xtool-org/darwin-tools-linux-llvm, MIT License;
|
|
17
|
+
LLVM itself is Apache License 2.0 with LLVM Exceptions).
|
|
18
|
+
Copyright (c) xtool contributors. ipeddle's approach to cross-compiling
|
|
19
|
+
for iOS on Linux owes a lot to xtool (https://github.com/xtool-org/xtool).
|
|
20
|
+
|
|
21
|
+
Apple SDKs
|
|
22
|
+
----------
|
|
23
|
+
|
|
24
|
+
ipeddle never ships Apple software. The iOS SDK is fetched by the user, on
|
|
25
|
+
the user's machine, from a source the user chooses; its use is governed by
|
|
26
|
+
Apple's license terms. ipeddle is not affiliated with or endorsed by Apple
|
|
27
|
+
Inc. iOS, iPhone, Xcode and Swift are trademarks of Apple Inc.
|
ipeddle-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: ipeddle
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Build iOS apps (.ipa) on Linux, no Mac or Xcode required — the Gradle of iOS.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Neguiolidas/ipeddle
|
|
6
|
+
Project-URL: Issues, https://github.com/Neguiolidas/ipeddle/issues
|
|
7
|
+
Author: Neguiolidas
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: NOTICE
|
|
11
|
+
Keywords: build,cross-compile,ios,ipa,linux,swift,swiftpm
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Requires-Dist: tomli>=1.1; python_version < '3.11'
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest>=7; extra == 'dev'
|
|
23
|
+
Requires-Dist: ruff>=0.5; extra == 'dev'
|
|
24
|
+
Provides-Extra: icons
|
|
25
|
+
Requires-Dist: pillow>=9; extra == 'icons'
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# ipeddle
|
|
29
|
+
|
|
30
|
+
**Build iOS apps on Linux. No Mac, no Xcode.** · [Português](https://github.com/Neguiolidas/ipeddle/blob/main/README.pt-BR.md)
|
|
31
|
+
|
|
32
|
+
ipeddle is to iOS what Gradle is to Android: one command line tool that takes
|
|
33
|
+
your app's source and gives you an installable package. You write a SwiftPM
|
|
34
|
+
app, run `ipeddle build`, and get an unsigned `.ipa` that you can sign and
|
|
35
|
+
install on your iPhone with Sideloadly or AltStore and a free Apple ID.
|
|
36
|
+
|
|
37
|
+
```console
|
|
38
|
+
$ pipx install ipeddle
|
|
39
|
+
$ ipeddle setup # once: Swift for Linux, an iOS linker, the iOS SDK
|
|
40
|
+
$ ipeddle build examples/hello
|
|
41
|
+
==> building Hello (release, iOS 16.0+, dev.ipeddle.example.hello)
|
|
42
|
+
[5/7] Compiling Hello HelloApp.swift
|
|
43
|
+
[6/7] Linking Hello
|
|
44
|
+
==> packaging
|
|
45
|
+
ok examples/hello/.build/Hello.ipa (37.6 KB, unsigned) in 2.3s
|
|
46
|
+
$ ipeddle inspect examples/hello/.build/Hello.ipa
|
|
47
|
+
App: Hello.app (dev.ipeddle.example.hello)
|
|
48
|
+
Executable: Hello [arm64]
|
|
49
|
+
Platform: iOS min 16.0 (built with SDK 18.6)
|
|
50
|
+
Links: 29 libraries, 146 imported symbols
|
|
51
|
+
Result: OK
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
> Status: **alpha (0.1.0)**. Pure-SwiftPM apps (SwiftUI or UIKit, Swift and
|
|
55
|
+
> C/Objective-C targets, resources, binary xcframeworks) build. Read
|
|
56
|
+
> [Limitations](#limitations) before relying on it.
|
|
57
|
+
|
|
58
|
+
## Requirements
|
|
59
|
+
|
|
60
|
+
* Linux x86_64 or aarch64 (Ubuntu 22.04/24.04, Debian 12/13, Fedora, RHEL-likes).
|
|
61
|
+
On Windows use WSL2. On a Mac, just use Xcode.
|
|
62
|
+
* Python 3.10+ and `git`.
|
|
63
|
+
* About 4 GB of free disk for setup (Swift ~2.5 GB, SDK ~0.6 GB, caches).
|
|
64
|
+
* The system libraries the Swift toolchain needs, see
|
|
65
|
+
<https://www.swift.org/install/linux/> (on Ubuntu:
|
|
66
|
+
`sudo apt install binutils git libc6-dev libcurl4-openssl-dev libedit2 libgcc-13-dev libstdc++-13-dev libxml2-dev libncurses-dev libz3-dev pkg-config tzdata unzip zlib1g-dev`).
|
|
67
|
+
|
|
68
|
+
`ipeddle doctor` checks all of this and tells you what is missing.
|
|
69
|
+
|
|
70
|
+
## Quick start
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pipx install ipeddle # or: pip install --user ipeddle ('ipeddle[icons]' to resize app icons)
|
|
74
|
+
# latest from git: pipx install git+https://github.com/Neguiolidas/ipeddle
|
|
75
|
+
ipeddle doctor # what is there, what is missing, how to fix it
|
|
76
|
+
ipeddle setup # ~5-10 min the first time, mostly downloads
|
|
77
|
+
git clone https://github.com/Neguiolidas/ipeddle && cd ipeddle
|
|
78
|
+
ipeddle build examples/hello --inspect
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The `.ipa` is in `examples/hello/.build/Hello.ipa`. To put it on a phone:
|
|
82
|
+
|
|
83
|
+
1. Install [Sideloadly](https://sideloadly.io) (Windows/macOS) or
|
|
84
|
+
[AltStore](https://altstore.io).
|
|
85
|
+
2. Plug in the iPhone, drop the `.ipa` in, sign in with your Apple ID (a free
|
|
86
|
+
one works; apps then expire after 7 days and you re-install).
|
|
87
|
+
3. On the phone: Settings → General → VPN & Device Management → trust your
|
|
88
|
+
Apple ID. On iOS 16+ also enable Settings → Privacy & Security → Developer Mode.
|
|
89
|
+
|
|
90
|
+
## Commands
|
|
91
|
+
|
|
92
|
+
| Command | What it does |
|
|
93
|
+
|---|---|
|
|
94
|
+
| `ipeddle init DIR` | Creates a minimal SwiftUI app (`Package.swift`, `ipeddle.toml`, `.gitignore`) to start from. |
|
|
95
|
+
| `ipeddle doctor [--deep]` | Checks Python, OS, disk, the toolchain, the linker, the SDK; `--deep` also compiles and links a test program. |
|
|
96
|
+
| `ipeddle setup` | Downloads Swift for Linux and the linker, fetches the iOS SDK, prepares it. Idempotent: re-running only does what is missing. |
|
|
97
|
+
| `ipeddle build [DIR]` | Builds the SwiftPM app in `DIR` into `DIR/.build/<App>.ipa` (`-o` to choose). `-c debug`, `--product`, `--clean`, `--inspect`. |
|
|
98
|
+
| `ipeddle inspect FILE` | Checks an `.ipa` or `.app`: architectures, minimum iOS, Info.plist, embedded frameworks, and that every imported symbol exists in the library it is bound to. `--json` for scripts. |
|
|
99
|
+
| `ipeddle clean [DIR]` | Deletes temporary files, an app's `.build`, or with `--all` everything ipeddle installed. |
|
|
100
|
+
|
|
101
|
+
Setup options: `--swift DIR` (use a toolchain you have), `--linker FILE`,
|
|
102
|
+
`--sdk DIR` (an `iPhoneOS*.sdk` you have), `--xip FILE` (extract the SDK from
|
|
103
|
+
an `Xcode_*.xip` you downloaded from Apple; only the SDK is written to disk),
|
|
104
|
+
`--sdk-version` (default 18.6), `--force`, `--no-download`. `ipeddle clean
|
|
105
|
+
--cache` empties the shared module cache. Everything lives
|
|
106
|
+
in `$IPEDDLE_HOME` (default `~/.local/share/ipeddle`).
|
|
107
|
+
|
|
108
|
+
## Making an app ipeddle can build
|
|
109
|
+
|
|
110
|
+
An ipeddle app is a regular Swift package with an executable product and an
|
|
111
|
+
iOS platform. See [`examples/hello`](https://github.com/Neguiolidas/ipeddle/tree/main/examples/hello):
|
|
112
|
+
|
|
113
|
+
```swift
|
|
114
|
+
// swift-tools-version: 5.9
|
|
115
|
+
import PackageDescription
|
|
116
|
+
|
|
117
|
+
let package = Package(
|
|
118
|
+
name: "Hello",
|
|
119
|
+
platforms: [.iOS(.v16)],
|
|
120
|
+
products: [.executable(name: "Hello", targets: ["Hello"])],
|
|
121
|
+
targets: [
|
|
122
|
+
.executableTarget(name: "Hello", resources: [.process("Resources")]),
|
|
123
|
+
]
|
|
124
|
+
)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The `@main` SwiftUI `App` (or a UIKit `UIApplicationMain`) lives in the
|
|
128
|
+
executable target. App settings go in an optional `ipeddle.toml`:
|
|
129
|
+
|
|
130
|
+
```toml
|
|
131
|
+
[app]
|
|
132
|
+
product = "Hello" # which executable product to package
|
|
133
|
+
bundle-id = "com.example.hello" # default: dev.ipeddle.<product>
|
|
134
|
+
display-name = "Hello"
|
|
135
|
+
version = "1.0.0" # CFBundleShortVersionString
|
|
136
|
+
build = "1" # CFBundleVersion
|
|
137
|
+
icon = "Icon.png" # square PNG, 1024x1024 recommended
|
|
138
|
+
info-plist = "Info.plist" # extra keys (permissions, URL types...); $(VARS) are expanded
|
|
139
|
+
resources = ["Extra"] # files/folders copied into the .app as-is
|
|
140
|
+
device-family = ["iphone", "ipad"]
|
|
141
|
+
swiftc-flags = []
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## How it works
|
|
145
|
+
|
|
146
|
+
Apple's toolchain is open source; what makes "iOS on Linux" hard is
|
|
147
|
+
everything around it. ipeddle puts these pieces together on your machine:
|
|
148
|
+
|
|
149
|
+
1. **Compiler.** The official Swift toolchain for Linux already contains
|
|
150
|
+
`swiftc`, `clang` and `llvm-ar` with the ARM64/Darwin backends.
|
|
151
|
+
2. **Linker.** The Linux toolchain's `ld64.lld` refuses iOS, so setup downloads
|
|
152
|
+
the ld64-compatible `lld` that the [xtool](https://github.com/xtool-org/xtool)
|
|
153
|
+
project publishes.
|
|
154
|
+
3. **SDK.** Headers, `.swiftinterface` files and `.tbd` stubs for iOS. By
|
|
155
|
+
default setup makes a sparse, shallow `git` checkout of a public mirror
|
|
156
|
+
(only the one SDK folder, a few hundred MB). You can point it at an SDK you
|
|
157
|
+
already have, or at an `Xcode.xip` (streamed: only the SDK is extracted).
|
|
158
|
+
4. **SDK patches, generated on your machine.** Public SDK mirrors carry
|
|
159
|
+
*reconstructed* `.tbd` stubs that describe the newest iOS layout, so a
|
|
160
|
+
naively linked app crashes on older iOS. ipeddle copies the SDK (hard links,
|
|
161
|
+
so it costs almost no disk) and rewrites the stubs with rules derived from
|
|
162
|
+
the SDK itself, never from a hand-made list:
|
|
163
|
+
* **Swift overlays.** Until iOS 17 the Swift half of a framework
|
|
164
|
+
(`Foundation`'s `Data`, `URLRequest`...) lived in
|
|
165
|
+
`/usr/lib/swift/libswiftFoundation.dylib`; since iOS 18 it lives in the
|
|
166
|
+
framework. Every Swift symbol whose mangled name says it belongs to module
|
|
167
|
+
*X* is moved from the framework's stub to `libswiftX`'s stub. Binding
|
|
168
|
+
through the overlay works on both old and new systems.
|
|
169
|
+
* **Split frameworks.** Declarations moved to a new framework keep their
|
|
170
|
+
original mangling (`@_originallyDefinedIn`), e.g. `SwiftUICore` split
|
|
171
|
+
out of `SwiftUI` in iOS 18. Such symbols are moved back into the parent
|
|
172
|
+
that re-exports the child, so the app never links the child and still
|
|
173
|
+
launches on iOS 15-17.
|
|
174
|
+
* **Missing symbols.** If the link fails on Swift symbols the stubs do not
|
|
175
|
+
list at all, ipeddle works out the owning module from the mangled name,
|
|
176
|
+
declares them in that module's overlay, and relinks. What it learns is
|
|
177
|
+
kept in the patched SDK for every later build.
|
|
178
|
+
5. **Runtime bits.** Xcode ships `libclang_rt.ios.a`; ipeddle compiles the
|
|
179
|
+
one routine apps need from it (`__isPlatformVersionAtLeast`, used by
|
|
180
|
+
`#available` / `@available`) from its own source at setup.
|
|
181
|
+
6. **Build and package.** `swift build` cross-compiles with a generated Swift
|
|
182
|
+
SDK bundle; ipeddle then assembles `Payload/<App>.app` (binary, resource
|
|
183
|
+
bundles, frameworks, Info.plist, icons) and zips a reproducible `.ipa`.
|
|
184
|
+
|
|
185
|
+
### Caching
|
|
186
|
+
|
|
187
|
+
* The SDK's Swift and Clang modules (Swift, Foundation, UIKit, SwiftUI...) are
|
|
188
|
+
compiled into **one module cache shared by all your apps**. Setup ends with a
|
|
189
|
+
test compile that also fills it, so even the first build of a new app is fast.
|
|
190
|
+
* SwiftPM's incremental build does the rest; the `.ipa` step takes milliseconds.
|
|
191
|
+
* When the SDK stubs change (re-setup, learned symbols), the next build relinks.
|
|
192
|
+
|
|
193
|
+
Measured on a 16-core Linux box with `examples/hello`:
|
|
194
|
+
|
|
195
|
+
| Build | Time |
|
|
196
|
+
|---|---|
|
|
197
|
+
| very first compile, empty module cache | 68 s |
|
|
198
|
+
| first build of an app after `ipeddle setup` (cache filled by setup) | 2.0 s |
|
|
199
|
+
| `--clean` rebuild | 2.1 s |
|
|
200
|
+
| rebuild with no changes | 0.7 s |
|
|
201
|
+
|
|
202
|
+
## Limitations
|
|
203
|
+
|
|
204
|
+
Honest list. Some are fundamental, some are just not done yet.
|
|
205
|
+
|
|
206
|
+
* **No code signing.** The `.ipa` is unsigned. Sideloadly/AltStore sign it
|
|
207
|
+
with your Apple ID; App Store / TestFlight distribution still needs Apple's
|
|
208
|
+
tools and a paid developer account.
|
|
209
|
+
* **No asset catalogs (`actool`).** `.xcassets` cannot be compiled. ipeddle
|
|
210
|
+
falls back: the app icon is taken from `icon` (or the largest PNG of an
|
|
211
|
+
`AppIcon` set), and image sets are bundled as loose `name@2x.png` files,
|
|
212
|
+
which `UIImage(named:)` and `Image("name")` find. Color sets, data sets and
|
|
213
|
+
symbol sets are not supported; define them in code.
|
|
214
|
+
* **No Interface Builder (`ibtool`).** Storyboards and XIBs are not compiled;
|
|
215
|
+
build UI in code (SwiftUI or UIKit). The launch screen comes from
|
|
216
|
+
`UILaunchScreen` in Info.plist.
|
|
217
|
+
* **SwiftPM projects only.** `.xcodeproj` / `.xcworkspace` projects are not
|
|
218
|
+
read. CocoaPods are not supported; SwiftPM dependencies and binary
|
|
219
|
+
`.xcframework` targets are.
|
|
220
|
+
* **Device builds only** (arm64). There is no iOS Simulator on Linux.
|
|
221
|
+
* **iOS 15 or newer.** Older deployment targets need back-deployment
|
|
222
|
+
libraries that only ship with Xcode.
|
|
223
|
+
* **Public SDK caveats.** The symbol rules are derived from the SDK and
|
|
224
|
+
`examples/hello` (SwiftUI, Foundation, a C target with `#available`) and a
|
|
225
|
+
UIKit + PhotosUI app built from the 18.6 SDK were launched on iOS 16.7, but
|
|
226
|
+
the rules are heuristics over reconstructed stubs: a symbol that lived in a different library on some
|
|
227
|
+
older iOS version than the stubs suggest will fail at launch on that
|
|
228
|
+
version. `ipeddle inspect` catches symbols the SDK does not export at all,
|
|
229
|
+
not this case. Test on the oldest iOS you support.
|
|
230
|
+
* **Macros.** Macros that ship with the Swift toolchain (`@Observable`,
|
|
231
|
+
`#Predicate`...) work; SwiftUI's `#Preview` and other Apple-only macro
|
|
232
|
+
plugins do not (remove `#Preview` blocks or wrap them in `#if DEBUG` checks you
|
|
233
|
+
do not build).
|
|
234
|
+
* **Embedded dynamic frameworks** (from binary `.xcframework` targets) are
|
|
235
|
+
packaged the way Xcode does it (`Frameworks/`, stripped of headers and
|
|
236
|
+
modules, `@executable_path/Frameworks` rpath) and pass `ipeddle inspect`,
|
|
237
|
+
but have not yet been launched on a real device.
|
|
238
|
+
* **Less-tested inputs.** Development used the public mirror's 18.6 SDK.
|
|
239
|
+
SDKs extracted from an Xcode `.xip` use the same code path but have had
|
|
240
|
+
less testing; downloads are checked for completeness, not signatures.
|
|
241
|
+
* **No dSYMs** (`-debug-info-format none`), so crash logs are not symbolicated.
|
|
242
|
+
* SwiftPM prints a deprecation warning for the `native` build system that
|
|
243
|
+
ipeddle uses; a future Swift release may require changes.
|
|
244
|
+
|
|
245
|
+
## Legal
|
|
246
|
+
|
|
247
|
+
ipeddle is licensed under the Apache License 2.0 and contains no Apple
|
|
248
|
+
software. The iOS SDK is downloaded by **you**, onto **your** machine, from a
|
|
249
|
+
source **you** choose, and Apple's license terms apply to it (Apple's Xcode
|
|
250
|
+
and SDK agreement allows use on Apple-branded computers; whether and how you
|
|
251
|
+
may use the SDK elsewhere is between you and Apple). ipeddle does not
|
|
252
|
+
redistribute SDK files and the patched copy never leaves your machine.
|
|
253
|
+
|
|
254
|
+
ipeddle is not affiliated with, endorsed by, or sponsored by Apple Inc.
|
|
255
|
+
iOS, iPhone, iPad, Xcode and Swift are trademarks of Apple Inc.
|
|
256
|
+
|
|
257
|
+
## Acknowledgements
|
|
258
|
+
|
|
259
|
+
* [xtool](https://github.com/xtool-org/xtool) (MIT) pioneered Xcode-free iOS
|
|
260
|
+
builds on Linux; ipeddle downloads its ld64-compatible linker.
|
|
261
|
+
* The [Swift project](https://swift.org) for the Linux toolchain.
|
|
262
|
+
|
|
263
|
+
## Contributing
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
pip install -e '.[dev]'
|
|
267
|
+
ruff check src tests
|
|
268
|
+
pytest
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Unit tests use synthetic `.tbd`, Mach-O and `.xip` fixtures generated in the
|
|
272
|
+
tests themselves; no Apple files are needed or allowed in the repository.
|