iOS Cocoapods -pod(MBProgressHUD) installed give error stuck at "Analyzing dependencies" and "Header file missing"

1.4k views Asked by At

I have installed 2 pods MBProgessHUD and PEPhotocropEditor it's working correctly till now but suddenly I got error for MBProgressHUD.h file not available. And I tried it with pod update and again pod install command but still not able to solve the problem. When I fier both the command terminal stucked at

Analysing dependencies.

Stuck at Analysing dependencies

and pods are looking in red color.

pods in red color

1

There are 1 answers

0
Badal Shah On BEST ANSWER

My problem is solved with following procedure.

1) Take Backup of your Project to other place.

2) open Terminal , and go to your project directory with cd command.

3) first type this command

setup you pod:

$ pod repo remove master
$ pod setup
$ pod install

Note
It takes time. so, don't panic wait for few minuts.

EDIT :- After completing this all if you find error like

MBProgressHUD.h file not found ( any of pod related header file)

you need to follow this procedure also.

you need to Check if the pod header files are correctly symlinked in Pods/Headers. (All imagae give with correct setting)

WIKI or Cocoapods Troubleshooting gives explaination in brief.

1) If something doesn’t seem to work, first of all ensure that you are not completely overriding any options set from the Pods.xcconfig file in your project’s build settings. To add values to options from your project’s build settings, prepend the value list with $(inherited).

$(inherited)

2) If Xcode can’t find the headers of the dependencies:

Check if the pod header files are correctly symlinked in Pods/Headers and you are not overriding the HEADER_SEARCH_PATHS (see #1). Make sure your project is using the Pods.xcconfig. To check this select your project file, then select it in the second pane again and open the Info section in the third pane. Under configurations you should select Pods.xcconfig for each configurations requiring your installed pods.

Make sure your project is using correct file

If Xcode still can’t find them, as a last resort you can prepend your imports, e.g. #import "Pods/SSZipArchive.h"

Don't need to include below step if only Headerfile missing Error.

Below line and image give for reference if some one can't find proper option.

3) If you're getting errors about unrecognized C compiler command line options, e.g. cc1obj: error: unrecognized command line option "-Wno-sign-conversion":

Make sure your project build settings are configured to use "Apple LLVM compiler" (clang)

Project Build setting are configured to use "Apple LLVM compiler" Are you setting the CC, CPP or CXX environment variable, e.g. in your ~/.profile? This may interfere with the Xcode build process. Remove the environment variable from your ~/.profile. ~/ .profile location

1)open Settings > General
2) Scroll to the bottom and open Profiles. If you do not see a "Profiles" section, you do not have a configuration profile installed.

In the "Profiles" section, select the profile you wish to remove.

4) If Xcode complains when linking, e.g. Library not found for -lPods, it doesn't detect the implicit dependencies:

Go to Product > Edit Scheme
Click on Build
   ![Edit scheme][6]
Add the Pods static library, and make sure it's at the top of the list
Clean and build again.
If that doesn't work, verify that the source for the spec you are trying to include has been pulled from github. Do this by looking in 

/Pods/. If it is empty (it should not be), verify that the ~/.cocoapods/master//.podspec has the correct git hub url in it. If still doesn't work, check your XCode build locations settings. Go to Preferences -> Locations -> Derived Data -> Advanced and set build location to "Relative to Workspace".

Xcode Build Location Setting:- If you tried to submit app to App Store, and found that "Product" > "Archive" produce nothing in "Organizer": In Xcode "Build Settings", find "Skip Install". Set the value for "Release" to "NO" on your application target. Build again and it should work.