Skip to content
This repository was archived by the owner on Mar 11, 2024. It is now read-only.

Commit 119af19

Browse files
committed
Re-instate codesigning for injection on an iOS a device.
1 parent c5012cb commit 119af19

File tree

4 files changed

+10
-35
lines changed

4 files changed

+10
-35
lines changed

InjectionIII/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>$(MARKETING_VERSION)</string>
2121
<key>CFBundleVersion</key>
22-
<string>7988</string>
22+
<string>7995</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.developer-tools</string>
2525
<key>LSMinimumSystemVersion</key>

InjectionIII/build_bundles.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Created by John Holdsworth on 04/10/2019.
77
# Copyright © 2019 John Holdsworth. All rights reserved.
88
#
9-
# $Id: //depot/ResidentEval/InjectionIII/build_bundles.sh#87 $
9+
# $Id: //depot/ResidentEval/InjectionIII/build_bundles.sh#88 $
1010
#
1111

1212
# Injection has to assume a fixed path for Xcode.app as it uses
@@ -44,7 +44,6 @@ function build_bundle () {
4444
#build_bundle macOS MacOSX macosx &&
4545
if [ "$(hostname)" != "Johns-MacBook-Air.local" ]; then
4646
build_bundle xrOS XRSimulator xrsimulator
47-
build_bundle xrdevOS XROS xros
4847
fi
4948
build_bundle iOS iPhoneSimulator iphonesimulator &&
5049
build_bundle tvOS AppleTVSimulator appletvsimulator &&

README.md

+7-31
Original file line numberDiff line numberDiff line change
@@ -134,40 +134,18 @@ of the InjectionIII.app, set a user default to opt-in and restart the app.
134134
```
135135
$ defaults write com.johnholdsworth.InjectionIII deviceUnlock any
136136
```
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
161141
InjectionIII.app over Wi-Fi. You will also need to select the project
162142
directory for the file watcher manually from the pop-down menu.
163143

164144
### Injection on macOS
165145

166146
It works but you need to temporarily turn off the "app sandbox" and
167147
"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.
171149

172150
### How it works
173151

@@ -231,9 +209,7 @@ file system to be a faithful simulation of a real device.
231209
and because you cannot load a bundle off your Mac's filesystem on a real
232210
phone you add the [HotReloading Swift Package](https://github.com/johnno1962/HotReloading)
233211
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.
237213

238214
"Standalone injection". This was the most recent evolution of the project
239215
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.
292268

293269
The fabulous app icon is thanks to Katya of [pixel-mixer.com](http://pixel-mixer.com/).
294270

295-
$Date: 2024/01/28 $
271+
$Date: 2024/03/06 $

0 commit comments

Comments
 (0)