https://github.com/nor0x/untranslocator-xmac
Untranslocator allows to get the original bundle path from a translocated Xamarin.Mac app
https://github.com/nor0x/untranslocator-xmac
app-translocation macos xamarin-mac
Last synced: 2 months ago
JSON representation
Untranslocator allows to get the original bundle path from a translocated Xamarin.Mac app
- Host: GitHub
- URL: https://github.com/nor0x/untranslocator-xmac
- Owner: nor0x
- License: mit
- Created: 2020-10-05T14:04:47.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-11-03T10:59:00.000Z (over 3 years ago)
- Last Synced: 2025-03-17T23:17:44.071Z (over 1 year ago)
- Topics: app-translocation, macos, xamarin-mac
- Language: Objective-C
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License.md
Awesome Lists containing this project
README

# Untranslocator
[](https://nor0x.visualstudio.com/Untranslocator/_build/latest?definitionId=9&branchName=main) [](https://nuget.org/packages/nor0x.Untranslocator)
[](https://nuget.org/packages/nor0x.Untranslocator)
Untranslocator allows to get the original bundle path from a translocated Xamarin.Mac app.
## Usage
if a macOS app is translocated `NSBundle.MainBundle.BundlePath` returns a randomized read-only location - something like:
```
/private/var/folders/xx/xxxxxxxxxxx/x/AppTranslocation/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/x/MyApp.app
```
we can use this translocated path and use an object of `Untranslocator` to retrieve the original bundle path (i.e. `/Users/nor0x/Downloads`)
```cs
var untrans = new Untranslocator();
var path = untrans.ResolveTranslocatedPath(NSBundle.MainBundle.BundlePath);
```
more info on App Translocation:
https://www.synack.com/blog/untranslocating-apps