Commits

Jeff Laing committed 7af7b6f

device.udid was coming back nil - looks like something changed in 5.1 and you need to have a session established before you can get the UniqueDeviceID - strangely, DeviceName worked fine. I suspect this is one of those "Apple Enhanced Privacy" things.

Comments (0)

Files changed (2)

MobileDeviceAccess.m

 			return nil;
 		}
 
-		// we can access device values once we are connected
-		_deviceName = (NSString*)AMDeviceCopyValue(_device, 0, CFSTR("DeviceName"));
-		_udid = (NSString*)AMDeviceCopyValue(_device, 0, CFSTR("UniqueDeviceID"));
+		// we can access device values once we are connected - at 5.0.1, the behaviour
+        // seemed to change slightly, and we need a session established as well, so we
+        // use our regular method rather than directly calling AMDeviceCopyValue()
+		_deviceName = [[self deviceValueForKey:@"DeviceName"] retain];
+        _udid = [[self deviceValueForKey:@"UniqueDeviceID"] retain];
 
 		// NSLog(@"AMDeviceGetInterfaceType() returns %d",AMDeviceGetInterfaceType(device));
 		// NSLog(@"AMDeviceGetInterfaceSpeed() returns %.0fK",AMDeviceGetInterfaceSpeed(device)/1024.0);

MobileDeviceAccess.xcodeproj/project.pbxproj

 		0867D690FE84028FC02AAC07 /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 0420;
+				LastUpgradeCheck = 0430;
 			};
 			buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "MobileDeviceAccess" */;
 			compatibilityVersion = "Xcode 3.2";
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.