No prompt for solution when using cocoapods Import

Source: Internet
Author: User

It is very convenient to use cocoapods when using third-party class libraries. For details, refer:Cocoapods installation and usage tutorial. The problem discussed today is that I encountered some problems when using it: After using cocoapod sinstall to complete the required third-party class libraries, I found no prompt when importing (# import) where I want to use it, you can also use it after handwriting, but there is a risk of wrong writing without prompting. Besides, writing is not convenient.

I think it is because the third-party class libraries cannot be detected during import in the project, so that the import will not be automatically completed. I searched a lot on the Internet and finally foundStackoverflowSolution found: you only need to add the pods directory to the path of the user header file retrieval. The specific implementation is as follows:

1. select target (your project target on the left) -- buildsettings -- User header search paths (:)

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/CA/wKioL1PrNVDhvk32AAkqAnhriIs191.jpg "Title =" QQ20140813-4.png "alt =" wkiol1prnvdhvk32aakqanhriis191.jpg "/>

2. Double-click the blank area following it :(:)

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/45/C9/wKioL1PrLxCS9dZ6AAGtxSdcE40785.jpg "Title =" QQ20140813-2.png "alt =" wkiol1prlxcs9dz6aagtxsdce40785.jpg "/> 3. the following figure is displayed, and click "+" to add one, and enter "$ (pods_root)" (no quotation marks). Select: recursive (files will be searched recursively in the corresponding directory ):

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/CA/wKioL1PrMFaDmUEoAALorFj7Qz0814.jpg "Title =" QQ20140813-3.png "alt =" wkiol1prmfadmueoaalorfj7qz0814.jpg "/>

After completing the settings, you will be prompted to import the third-party class library installed in cocoapods in the project.

This article is from the "one hair" blog, please be sure to keep this source http://winann.blog.51cto.com/4424329/1539590

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.