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

Commit 24b7981

Browse files
authored
Codesigning improvements (johnno1962#476)
* Code signing improvements for release 4.8.1
1 parent 6e5b128 commit 24b7981

8 files changed

+23
-46
lines changed

InjectionIII.xcodeproj/project.pbxproj

+7-3
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@
321321
BBEB704A1FD28C6F00127711 /* XcodeHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeHash.h; sourceTree = "<group>"; };
322322
BBEB704B1FD28C6F00127711 /* XcodeHash.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XcodeHash.m; sourceTree = "<group>"; };
323323
BBF3D62A2851E6DC0070356F /* ReducerInjection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ReducerInjection.swift; path = HotReloading/Sources/HotReloading/ReducerInjection.swift; sourceTree = SOURCE_ROOT; };
324-
BBFE27E92B148E7400E47E61 /* copy_bundle.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = copy_bundle.sh; sourceTree = "<group>"; };
324+
BBFE27E92B148E7400E47E61 /* copy_bundle.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = copy_bundle.sh; path = ../HotReloading/copy_bundle.sh; sourceTree = "<group>"; };
325325
BD35949D21A6C5DE0020EB94 /* Vaccine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Vaccine.swift; path = ../HotReloading/Sources/HotReloading/Vaccine.swift; sourceTree = "<group>"; };
326326
BDB6A7CE21824C800001CF95 /* UserDefaults.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UserDefaults.h; path = ../HotReloading/Sources/HotReloadingGuts/include/UserDefaults.h; sourceTree = "<group>"; };
327327
CEC17029253ED117002E823F /* Experimental.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Experimental.swift; path = ../HotReloading/Sources/injectiond/Experimental.swift; sourceTree = "<group>"; };
@@ -1477,7 +1477,7 @@
14771477
INFOPLIST_FILE = InjectionIII/Info.plist;
14781478
LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks";
14791479
MACOSX_DEPLOYMENT_TARGET = 10.12;
1480-
MARKETING_VERSION = 4.8.0;
1480+
MARKETING_VERSION = 4.8.1;
14811481
PRODUCT_BUNDLE_IDENTIFIER = com.johnholdsworth.InjectionIII;
14821482
PRODUCT_NAME = "$(TARGET_NAME)";
14831483
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1501,7 +1501,7 @@
15011501
INFOPLIST_FILE = InjectionIII/Info.plist;
15021502
LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks";
15031503
MACOSX_DEPLOYMENT_TARGET = 10.12;
1504-
MARKETING_VERSION = 4.8.0;
1504+
MARKETING_VERSION = 4.8.1;
15051505
PRODUCT_BUNDLE_IDENTIFIER = com.johnholdsworth.InjectionIII;
15061506
PRODUCT_NAME = "$(TARGET_NAME)";
15071507
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1521,6 +1521,7 @@
15211521
ENABLE_HARDENED_RUNTIME = YES;
15221522
INFOPLIST_FILE = InjectionBundle/Info.plist;
15231523
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
1524+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
15241525
LD_RUNPATH_SEARCH_PATHS = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/$(PLATFORM_NAME) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks @loader_path/../Frameworks";
15251526
MACH_O_TYPE = mh_dylib;
15261527
MACOSX_DEPLOYMENT_TARGET = 10.12;
@@ -1531,6 +1532,7 @@
15311532
SDKROOT = macosx;
15321533
SKIP_INSTALL = YES;
15331534
SWIFT_OBJC_BRIDGING_HEADER = "InjectionBundle/XprobeSwift-Bridging-Header.h";
1535+
TVOS_DEPLOYMENT_TARGET = 13.0;
15341536
WRAPPER_EXTENSION = bundle;
15351537
};
15361538
name = Debug;
@@ -1545,6 +1547,7 @@
15451547
ENABLE_HARDENED_RUNTIME = YES;
15461548
INFOPLIST_FILE = InjectionBundle/Info.plist;
15471549
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
1550+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
15481551
LD_RUNPATH_SEARCH_PATHS = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/$(PLATFORM_NAME) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks @loader_path/../Frameworks";
15491552
MACH_O_TYPE = mh_dylib;
15501553
MACOSX_DEPLOYMENT_TARGET = 10.12;
@@ -1555,6 +1558,7 @@
15551558
SDKROOT = macosx;
15561559
SKIP_INSTALL = YES;
15571560
SWIFT_OBJC_BRIDGING_HEADER = "InjectionBundle/XprobeSwift-Bridging-Header.h";
1561+
TVOS_DEPLOYMENT_TARGET = 13.0;
15581562
WRAPPER_EXTENSION = bundle;
15591563
};
15601564
name = Release;

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>7932</string>
22+
<string>7959</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.developer-tools</string>
2525
<key>LSMinimumSystemVersion</key>

InjectionIII/InjectionIII-Bridging-Header.h

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#import <Carbon/Carbon.h>
66
#import <AppKit/NSEvent.h>
77

8-
#import "Xcode.h"
98
#import "XcodeHash.h"
109
#import "UserDefaults.h"
1110
#import "SimpleSocket.h"

InjectionIII/build_bundles.sh

+2-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#79 $
9+
# $Id: //depot/ResidentEval/InjectionIII/build_bundles.sh#82 $
1010
#
1111

1212
# Injection has to assume a fixed path for Xcode.app as it uses
@@ -46,7 +46,7 @@ build_bundle iOS iPhoneSimulator iphonesimulator &&
4646
build_bundle tvOS AppleTVSimulator appletvsimulator &&
4747

4848
# iphoneos on M1 mac (requires Sandbox switched off)
49-
#build_bundle maciOS iPhoneOS iphoneos &&
49+
build_bundle maciOS iPhoneOS iphoneos &&
5050

5151
# CWE-22 / CVE-2023-26111 with node-static (npm) <= 0.7.11 (not used)
5252
rm "$CODESIGNING_FOLDER_PATH/Contents/Resources/CodeMirror/package.json" &&

InjectionIII/copy_bundle.sh

-33
This file was deleted.

README.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ one of the [github
1818
releases](https://github.com/johnno1962/InjectionIII/releases) of the app
1919
or from the [Mac App Store](https://itunes.apple.com/app/injectioniii/id1380446739?mt=12)
2020
and adding the code below somewhere in your app to be executed on
21-
startup (it is no longer necessary to actually run the app itself). It's also
22-
important to add "-Xlinker -interposable" (without the double quotes and on separate
23-
lines) to the "Other Linker Flags" of all targets in your project (for the `Debug`
24-
configuration only) to enable "interposing" (see the explanation below).
21+
startup (it is no longer necessary to actually run the app itself).
2522

2623
```Swift
2724
#if DEBUG
@@ -32,6 +29,12 @@ Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/tvOSInjection.bu
3229
Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/macOSInjection.bundle")?.load()
3330
#endif
3431
```
32+
It's also important to add the options `-Xlinker` and `-interposable` (without double
33+
quotes and on separate lines) to the "Other Linker Flags" of targets in your project
34+
(for the `Debug` configuration only) to enable "interposing" (see the explanation below).
35+
36+
![Icon](interposable.png)
37+
3538
After that, when you run your app in the simulator you should see a
3639
message saying a file watcher has started for your home directory
3740
and, whenever you save a source file in the current project it should
@@ -71,6 +74,10 @@ or removing methods as the `vtable` used for dispatch is
7174
itself a data structure which must not change over injection.
7275
Injection also can't work out what pieces of code need to
7376
be re-executed to update the display as discussed above.
77+
Finally, Injection doesn't cope well with source files being
78+
added/renamed/deleted during injection. You will need to
79+
build and relaunch your app or even close and reopen
80+
your project to clear out old Xcode build logs.
7481

7582
### Injection of SwiftUI
7683

@@ -282,4 +289,4 @@ for the code to be evaluated using injection under an MIT license.
282289

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

285-
$Date: 2023/12/14 $
292+
$Date: 2024/01/11 $

interposable.png

66 KB
Loading

0 commit comments

Comments
 (0)