Index: tests/OFUNIXDatagramSocketTests.m ================================================================== --- tests/OFUNIXDatagramSocketTests.m +++ tests/OFUNIXDatagramSocketTests.m @@ -28,17 +28,20 @@ OFString *path; OFUNIXDatagramSocket *sock; OFSocketAddress address1, address2; char buffer[5]; -#ifdef OF_HAVE_FILES +#if defined(OF_HAVE_FILES) && !defined(OF_IOS) path = [[OFSystemInfo temporaryDirectoryPath] stringByAppendingPathComponent: [[OFUUID UUID] UUIDString]]; #else /* * We can have sockets, including UNIX sockets, while file support is * disabled. + * + * We also use this code path for iOS, as the temporaryDirectoryPath is + * too long on the iOS simulator. */ path = [OFString stringWithFormat: @"/tmp/%@", [[OFUUID UUID] UUIDString]]; #endif Index: tests/OFUNIXStreamSocketTests.m ================================================================== --- tests/OFUNIXStreamSocketTests.m +++ tests/OFUNIXStreamSocketTests.m @@ -27,17 +27,20 @@ void *pool = objc_autoreleasePoolPush(); OFString *path; OFUNIXStreamSocket *sockClient, *sockServer, *sockAccepted; char buffer[5]; -#ifdef OF_HAVE_FILES +#if defined(OF_HAVE_FILES) && !defined(OF_IOS) path = [[OFSystemInfo temporaryDirectoryPath] stringByAppendingPathComponent: [[OFUUID UUID] UUIDString]]; #else /* * We can have sockets, including UNIX sockets, while file support is * disabled. + * + * We also use this code path for iOS, as the temporaryDirectoryPath is + * too long on the iOS simulator. */ path = [OFString stringWithFormat: @"/tmp/%@", [[OFUUID UUID] UUIDString]]; #endif