Circular dependency Issuse on cocoapods version (0.36.0) complete solution (non-derating)

Source: Internet
Author: User

Previous articles, which had been mentioned in the Cocoapods dependency management version if more than 0.34.4, such as 0.35, 0.36.0 and other versions. Perform a "pod install" or "Pod Update" and the xmppframework will have a cyclic dependency problem.

there is a circular dependency between Xmppframework/core and Xmppframework/authentication'

The temporary solution to the problem is to reduce the version cocoapods to 0.34.4.

However, as the Cocoapods version continues to escalate, this problem has not been fundamentally addressed. Share this solution here:

Please follow the steps below to

1. Upgrade the Cocoapods version to the latest version. When writing this article, the latest version is 0.36.0

Command line: sudo gem install cocoapods


2. The podfile remains unchanged.

Pod ' xmppframework '


3. Execute the command line to update all libraries in the native ~/.cocoapods directory

Pod Setup


4. Foreign friends have provided a modified xmppframework Podspec file. This file is not the same in Xmppframework's official GitHub. The latest version of Xmppframewokr 3.6.4 is currently available.

This modified version of the file is key, access the following link, and download the file.

Https://github.com/ChatSecure/XMPPFramework/blob/f1364d1dd9bc8d0843b79ee8abe261154473d8a0/XMPPFramework.podspec.json


5. Locate the file with the following path on the machine. Using the Finder's go to Folder

~/.cocoapods/repos/master/specs/xmppframework/3.6.4/xmppframework.podspec.json


6. Download the 4th step of the file, covering the path of 5 steps.


7. Then perform pod install or pod update


8. In this event, the loop-dependent error does not occur again. Pod also works smoothly. But it's not over yet. The following are more important steps


9. Build workspace will find that build failed. Error is XMPPFramework.h file

#ifdef Have_xmpp_subspec_systeminputactivitymonitor
#import "XMPPSystemInputActivityMonitor.h"
#endif

10. At this point you need to get from the official GitHub,

Https://github.com/robbiehanson/XMPPFramework/tree/master/Extensions/SystemInputActivityMonitor

Two files found:

XMPPSystemInputActivityMonitor.h

Xmppsysteminputactivitymonitor.m

and copied to the project folder in the following path, if there is no folder Systeminputactivitymonitor, you need to manually create Systeminputactivitymonitor

/pods/xmppframework/extensions/systeminputactivitymonitor/xmppsysteminputactivitymonitor.h

11. After completing the above work, re-build the workspace, you will find that everything is OK


The above plan is not perfect, but also considered the latest version of Cocoapods. As for steps 9th and 10th. You can also not do it, just in this case, you need to comment the corresponding import in the Xmppframework.h file. The weight of the light, can only be measured by themselves.


Circular dependency Issuse on cocoapods version (0.36.0) complete solution (non-derating)

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.