how to add json module in Three20

♀尐吖头ヾ 提交于 2019-12-09 22:50:40

问题


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:(


回答1:


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/



来源:https://stackoverflow.com/questions/5439845/how-to-add-json-module-in-three20

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!