IOS7 obtains UUID and converts MD5 to ios7uidmd5.
Recently developed in the project, it is used to obtain UUID to MD5, but iOS7 cannot use the obtained UDID interface (involving privacy). The interface for obtaining MAC addresses is also discarded under iOS7. at present, it is possible to obtain the UUID. However, in iOS7, the UUID is called once every time, and the generated UUID is different. This will change once the APP is uninstalled and reinstalled.
Next, we will introduce a more convenient method to solve this problem:
1. Import Security. framework
2. Compile on github
- (NSString *)getIOSUUID{ NSString *retrieveuuid = [SSKeychain passwordForService:@"com.mohe.userinfo"account:@"uuid"]; if ( retrieveuuid == nil || [retrieveuuid isEqualToString:@""]){ CFUUIDRef uuid = CFUUIDCreate(NULL); assert(uuid != NULL); CFStringRef uuidStr = CFUUIDCreateString(NULL, uuid); retrieveuuid = [NSString stringWithFormat:@"%@", uuidStr]; [SSKeychain setPassword:retrieveuuid forService:@"com.mohe.userinfo"account:@"uuid"]; } return retrieveuuid;}
@ To convert the MD5 format, you can write a category:
#import "NSString+MD5.h"#import <CommonCrypto/CommonDigest.h>@implementation NSString (MD5)- (NSString *)md5HexDigest{ const char *original_str = [self UTF8String]; unsigned char result[CC_MD5_DIGEST_LENGTH]; CC_MD5(original_str, (int)strlen(original_str), result); NSMutableString *hash = [NSMutableString string]; for (int i = 0; i < 16; i++) [hash appendFormat:@"%02X", result[i]]; return [hash lowercaseString];}@end
To upgrade ios7 bata, do developers need to add uuid?
Wait, it will take tomorrow to refresh. If it is good, it's a big deal. Buy an account tomorrow.
Can I cheat itunes to verify the firmware after I change the MD5 value of the iOS 7 firmware of iPhone 4 to the baseband? Has anyone tried it?
No, because itunes not only verifies md5, but also the firmware integrity. You can use red snow to flash the base band. Now it supports iOS 7.