oauthconsumerをARCにコンバートしたものを見つけたので、プロジェクトをARC対応で作り替えてみる。
以下手順:
1.https://github.com/jimkang/oauthconsumer からDL
2.TARGETS>Build Phases>LinkBinaryWithLibrariesからSecurityFrameworkとlibxml2.dylibを追加
3.TARGETS>Build Settings>SearchPaths>HeaderSearchPathのDebugとRelease両方に$SDKROOT/usr/include/libxml2を追加
4.TARGETS>Build Settings>Apple LLVM compiler 3.0 -warnings の Missing Function PrototypesをNoに
5.performSelectorのエラーが何個も出るので以下のように回避
#pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-performSelector-leaks" [delegate performSelector:didFinishSelector withObject:ticket withObject:responseData]; #pragma clang diagnostic pop6.OATokenクラスのinitWith系のメソッドにverifierの引数が無いので追加
7.tumblrがsecretをnullで返すのでその場合は値を上書かないようinitWithKeyを修正(if(aSecret) self.secret = aSecret;)
できた。
0 件のコメント:
コメントを投稿