0

I just updated my app to ios5 and the code below (that was working in 4x) is now not working I thought it was because of the UUID but i changed that and the error stayed the same. The error I am getting is below. Any help is greatly appreciated -- thx

I setup some breakpoints and isolated the error and i think the error is with localPutObjectRequest but after looking at what that line does the error message does not make sense to me.

- (void) updateLocation:(CLLocation*)loc
{
    [progressView setProgress:5];
    [[LocationManager sharedLocationManager] setDelegate:nil];

    uploadPath = [NSString stringWithFormat:@"%@/%@-%f.png", [[UIDevice currentDevice] uniqueIdentifier], [[UIDevice currentDevice] uniqueIdentifier], [[NSDate date] timeIntervalSince1970]];

    S3PutObjectRequest *localPutObjectRequest = [[[S3PutObjectRequest alloc] initWithKey:uploadPath inBucket:[NSString stringWithFormat:@"spotted-at"]] autorelease];


    localPutObjectRequest.data = UIImagePNGRepresentation([UIImage imageWithData:imageData]);
    [localPutObjectRequest setDelegate:self];

    [[Constants s3] putObject:localPutObjectRequest];

}



2011-10-23 00:45:39.654 spotted.at[4131:707] -[UIButtonContent length]: unrecognized   selector sent to instance 0x2c0130
2011-10-23 00:45:39.656 spotted.at[4131:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIButtonContent length]: unrecognized  selector sent to instance 0x2c0130'
*** First throw call stack:
(0x310868bf 0x3822b1e5 0x31089acb 0x31088945 0x30fe3680 0x330e42ef 0x330e4267 0x331d7e51    0x49041 0x4973d 0x352c05df 0x352bff81 0x352ba62f 0x3105ab31 0x3105a15f 0x31059381 0x30fdc4dd 0x30fdc3a5 0x33c0afed 0x3304e743 0x453b 0x3f74)
p01nd3xt3r
  • 821
  • 1
  • 9
  • 19

1 Answers1

-1

Judging from your post, the error lies in

[[UIDevice currentDevice] uniqueIdentifier]

The method UIDevice uniqueIdentifier is deprecated in iOS 5 and should not be called. From your code I cant really see what exactly you are trying to do but this post UIDevice uniqueIdentifier Deprecated - What To Do Now?

should be helpful in overcoming the deprecated method. You should change the deprecated calls and also use the ones listed in the post above. That should do the trick.

Community
  • 1
  • 1