开发者

how to add json module in Three20

I tried to use command line to add Three20 with JSON :

python three20/src/scripts/ttmodule.py -p JsonTest/JsonTest.xcodeproj Three20 extThree20JSON:extThree20JSON+SBJSON

this command line successfully executed without any error message. I can find "extThree20JSON+SBJSON" in Direct dependencies and its link in linked libraries.

When I build my project with JSON 开发者_高级运维import: #import "extThree20JSON/SBJSON.h"

xcode reported: error: extThree20JSON/SBJSON.h: No such file or directory

help please:(


I had the same problem and just solved it.

  1. Add the extThree20JSON.xcodeproj to your project by draging it in.

  2. Add the extThree20JSON+SBJSON to the Target Dependencies in the Build Phases of your app's target.

  3. Add the libextThree20JSON+SBJSON.a library to the Link Binary With Libraries in the Build Phases of your app's target.

  4. Edit the User Header Search Paths in the Build Settings of your project, add the following paths:

    • ../three20/Build/Products/three20;
    • ../../frameworks/three20/Build/Products/three20;
    • ../frameworks/three20/Build/Products/three20;
    • $(BUILT_PRODUCTS_DIR)/../three20
    • $(BUILT_PRODUCTS_DIR)/../../three20
  5. Edit the Other Linker Flags in the Build Settings of your app's target, add the following flags:

    -ObjC -all_load

More information on manually adding Three20: http://chepri.com/2011/04/22/visual-guide-manually-adding-three20-xcode-4-project/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜