IOS7 obtains UUID and converts MD5 to ios7uidmd5.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.