3

新しい iOS 7 Beta を使用し、AFNetworking の最新バージョンをダウンロードして、[ファイル] > [ファイルをプロジェクトに追加] に移動し、ディレクトリ AFNetworking.framework に渡しました。現在、リンカーエラーが多数発生しています。健全性チェックのために、コミット履歴を iOS 6 にロールバックすると、すべてが正常にコンパイルされました。ログは次のとおりです。

    Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_AFHTTPClient", referenced from:
      _OBJC_CLASS_$_CloudGlyphAPIClient in CloudGlyphAPIClient.o
  "_OBJC_CLASS_$_AFJSONRequestOperation", referenced from:
      objc-class-ref in CloudGlyphAPIClient.o
  "_OBJC_METACLASS_$_AFHTTPClient", referenced from:
      _OBJC_METACLASS_$_CloudGlyphAPIClient in CloudGlyphAPIClient.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

AFNetworking が iOS の次のバージョンで最新になるまで待つ必要がありますか?それともアーキテクチャの問題ですか?

ありがとう

4

1 に答える 1

5

AFNetworking compiles and loads fine for me on iOS 7. The easiest solution would be for you to set up CocoaPods, and include AFNetworking that way.

See this answer for instructions on making sure the file is included in your target. This answer will explain all the pieces of the error message to you.

iOS 7 is probably a red herring, but if AFNetworking was working before (you didn't say), you may want to file a bug report if your libraries got unlinked when you upgraded.

于 2013-06-12T21:09:02.683 に答える