I have some logic that works by creating a Unix Domain Socket and does not have problems when running in a regular application. However, when I run it to extend the application, I get -1 with errno = 48 ("Address is already in use") from bind ().
NSArray *applicationSupportDirectoryPaths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); int fd = socket(AF_UNIX, SOCK_STREAM, 0);
Return location for library directory:
/var/mobile/Containers/Data/PluginKitPlugin/A8110BA2-5AE7-42C1-84DA-2A9B303C7277/Library/
I think the reason is that this is a mistake, because it is some kind of special place compared to the library catalog for the application.
If anyone has an idea why this is happening or some workarounds, I appreciate that.
UPDATE: I tried with the cache directory (NSCachesDirectory), but now I get errno 3 (no such process).
source share