Cycle in dependencies between targets 'StoreApp' and 'NotificationContentExtension'; building could produce unreliable results

6.7k views Asked by At

After updating Xcode 10.0 the following error occurs while building the project.

Cycle in dependencies between targets 'StoreApp' and 'NotificationContentExtension'; building could produce unreliable results. Cycle path: StoreApp → NotificationContentExtension → StoreApp Cycle details: → Target 'StoreApp': LinkStoryboards ○ Target 'StoreApp' has compile command with input

○ Target 'StoreApp' has target dependency on Target 'NotificationContentExtension' ○ That command depends on command in Target 'NotificationContentExtension': script phase “[CP] Check Pods Manifest.lock” → Target 'NotificationContentExtension' has target dependency on Target 'StoreApp' ○ That command depends on command in Target 'StoreApp': script phase “[CP] Check Pods Manifest.lock”

I have tried many different ways suggested in all other questions but none of them are working. Please help me to resolve this issue?

3

There are 3 answers

0
Chowdhury Md Rajib Sarwar On

I have solved the issue in the following ways:

First remove the Cocoapod from your project completely in the following way:

  1. Delete the standalone files (Podfile Podfile.lock and your Pods directory)
  2. Delete the generated xcworkspace
  3. Open your xcodeproj file, delete the references to Pods.xcconfig and libPods.a (in the Frameworks group)
  4. Under your Build Phases delete the Copy Pods Resources, Embed Pods Frameworks and Check Pods Manifest.lock phases.

After that uninstall Cocoapod from your computer completely: To completely remove, issue the following commands:

gem uninstall cocoapods
gem uninstall cocoapods-core
gem uninstall cocoapods-downloader

If you have multiple versions installed then uninstall them individually as follows:

gem uninstall cocoapods -v 0.20.2

Run gem list --local | grep cocoapods to check whether cocoapods remained in your machine or not.

then restart your machine and reinstall Cocoapods into the machine into the following way:

sudo gem install -n /usr/local/bin cocoapods

and finally integrate cocoapods with your project.

0
Chitra On

Just in case if someone still searching for solution...

It worked for me in following steps:

  1. Re-Install cocoapods: sudo gem install cocoapods
  2. Update pods: pod update
  3. Remove target dependencies from all targets under 'Build Phases > Dependencies', like so:

enter image description here

0
Charlie Fish On

I just ran into a very similar issue. Turns out I had an import StoreApp command in one of the NotificationContentExtension files. Ensuring that you don't have circular import dependencies is important, instead you can just add files to be part of the other target that you want to use it in.