@@ -134,40 +134,18 @@ of the InjectionIII.app, set a user default to opt-in and restart the app.
134
134
```
135
135
$ defaults write com.johnholdsworth.InjectionIII deviceUnlock any
136
136
```
137
- Then, instead of loading the injection bundles run this script in a "Build Phase":
138
-
139
- ```
140
- RESOURCES=/Applications/InjectionIII.app/Contents/Resources
141
- if [ -f "$RESOURCES/copy_bundle.sh" ]; then
142
- "$RESOURCES/copy_bundle.sh"
143
- fi
144
- ```
145
- and, in your application execute the following code on startup:
146
-
147
- ```
148
- #if DEBUG
149
- if let path = Bundle.main.path(forResource:
150
- "iOSInjection", ofType: "bundle") ??
151
- Bundle.main.path(forResource:
152
- "macOSInjection", ofType: "bundle") {
153
- Bundle(path: path)!.load()
154
- }
155
- #endif
156
- ```
157
- Once you have switched to this configuaration it will also
158
- work when using the simulator. Consult the README of the
159
- [ HotReloading project] ( https://github.com/johnno1962/HotReloading )
160
- for details on how to debug having your program connect to the
137
+ Then, instead of loading the injection bundles add the following
138
+ Swift Package to your project (* only during development* ):
139
+ [ HotReloading project] ( https://github.com/johnno1962/HotReloading ) .
140
+ This contains details on how to debug having your program connect to the
161
141
InjectionIII.app over Wi-Fi. You will also need to select the project
162
142
directory for the file watcher manually from the pop-down menu.
163
143
164
144
### Injection on macOS
165
145
166
146
It works but you need to temporarily turn off the "app sandbox" and
167
147
"library validation" under the "hardened runtime" during development
168
- so it can dynamically load code. In order to avoid codesigning problems,
169
- use the new ` copy_bundle.sh ` script as detailed in the instructions for
170
- injection on an iOS device above.
148
+ so it can dynamically load code.
171
149
172
150
### How it works
173
151
@@ -231,9 +209,7 @@ file system to be a faithful simulation of a real device.
231
209
and because you cannot load a bundle off your Mac's filesystem on a real
232
210
phone you add the [ HotReloading Swift Package] ( https://github.com/johnno1962/HotReloading )
233
211
to your project (during development only!) which contains all the code that
234
- would normally be in the bundle to perform the dynamic loading. This
235
- requires that you use one of the un-sandboxed binary releases. It has
236
- also been replaced by the ` copy_bundle.sh ` script described above.
212
+ would normally be in the bundle to perform the dynamic loading.
237
213
238
214
"Standalone injection". This was the most recent evolution of the project
239
215
where you don't run the app itself anymore but simply load one of the
@@ -292,4 +268,4 @@ for the code to be evaluated using injection under an MIT license.
292
268
293
269
The fabulous app icon is thanks to Katya of [ pixel-mixer.com] ( http://pixel-mixer.com/ ) .
294
270
295
- $Date: 2024/01/28 $
271
+ $Date: 2024/03/06 $
0 commit comments