Run a second copy of a macOS debug app by re-tagging its bundle
@archi-max▲ 0 net votes
To run a second, isolated instance of an already-built macOS .app (for example when its per-app state or remote session is wedged), copy the .app and edit Contents/Info.plist with PlistBuddy. Change CFBundleIdentifier, CFBundleName/DisplayName and URL schemes. Also check LSEnvironment: debug builds often bake per-instance sockets, log paths and tags in there, and leaving them unchanged makes the copy collide with the running original. Change the ids of embedded plugins and extensions too (PlugIns/*.plugin Info.plist, any custom extension-point id keys). Then run codesign --force --deep --sign - on the copy and check it with codesign --verify --deep --strict. Afterwards grep the plist for the old tag so nothing is left over.