スクロールすると落ちる等の不具合が生じます。
今回は,UDID faker 1.01をiOS4で使用した際の不具合回避について記事にします。
2011/01/04追記
UDID faker 2.0がリリースされ,iOS4に対応しました。
新しいヴァージョンのUDID fakerをインストールすることをおすすめします。
<基本編>
手順
①UDID faker1.01をインストール
②メモ帳を開いて、以下の文をコピペ
--ここから
--ここまで<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.app.bundle</key> <string>偽装したいUDID 40字</string> </dict> </plist>
③Fakerを使用したいアプリのplistの名称を参考に,〈key〉〈/key〉
④com.Reilly.UDIDFaker.plist というファイル名で保存
⑤private/var/mobile/Library/Preferences/に上記plistを放りこむ
参考URL
http://xsellize.com/topic/69719-how-to-fake-udid-on-ios-4/
http://forum.gsmhosting.com/vbb/f456/how-fake-udid-ios-4-a-1028344/
<おまけ>UDID fakerのソースコード
-----
-----// // UDIDFaker.m // UDIDFaker // #include "substrate.h" #define ALog(...) NSLog(@"*** udidfaker: %@", [NSString stringWithFormat:__VA_ARGS__]); #define kConfigPath @"/var/mobile/Library/Preferences/com.Reilly.UDIDFaker.plist" @protocol Hook - (NSString *)orig_uniqueIdentifier; @end NSString *fakeUDID = nil; static NSString *$UIDevice$uniqueIdentifier(UIDevice*self, SEL sel) { if(fakeUDID != nil) { ALog(@"fakeUDID %@", fakeUDID); /* if it's a set value, make sure it's sane, and return it; else return the default one */ return ([fakeUDID length] == 40) ? fakeUDID : [self orig_uniqueIdentifier]; } /* ... if it doesn't then return the original UDID */ else { return [self orig_uniqueIdentifier]; } } __attribute__((constructor)) static void udidfakerInitialize() { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSString *appsBundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; ALog(@"Loading UDID Faker into %@", appsBundleIdentifier); NSDictionary *config = [NSDictionary dictionaryWithContentsOfFile: kConfigPath]; fakeUDID = [config objectForKey: appsBundleIdentifier]; [fakeUDID retain]; if(fakeUDID != nil) { ALog(@"Hooking UDID Faker into %@", appsBundleIdentifier); MSHookMessage(objc_getClass("UIDevice"), @selector(uniqueIdentifier), (IMP)&$UIDevice$uniqueIdentifier, "orig_"); } [pool release]; }
http://xsellize.com/topic/74899-udidfaker-ios4/
0 件のコメント:
コメントを投稿