lewis4u
lewis4u

Reputation: 15047

Error on "pod install --verbose"

I just installed pod with this command

sudo gem install cocoapods

git cloned a project from git repository and run pod install --verbose and I get this error:

enter image description here

Resolving dependencies of `Podfile`
[!] Unable to integrate the following embedded targets with their respective host targets (a host target is a "parent" target which embeds a "child" target like a framework or extension):

- MyApp (true) and OneSignalNotificationServiceExtension (false) do not both set use_frameworks!.

I can't get this app tower inside Xcode because of this. I get this error message:

enter image description here

update

this is my (the only one) Podfile

enter image description here

update 2

after putting up the use_frameworks! line I get this:

enter image description here

Upvotes: 2

Views: 10138

Answers (3)

Mayur Waghmare
Mayur Waghmare

Reputation: 81

Just declare the use_frameworks! line globally. It worked for me!!!

Sample Code below :

use_frameworks!

target 'my_project' do pod 'OneSignal', '>= 2.6.2', '< 3.0' end

target 'OneSignalNotificationServiceExtension' do pod 'OneSignal', '>= 2.6.2', '< 3.0' end

Upvotes: 0

Mauro Marsiglia
Mauro Marsiglia

Reputation: 101

add use_frameworks! to solve this problem on OneSignalNotificationServiceExtension.

target 'OneSignalNotificationServiceExtension' do use_frameworks! pod 'OneSignal', '>= 2.5.2', '< 3.0' end

Upvotes: 10

Michael Dautermann
Michael Dautermann

Reputation: 89509

Okay!

Looks like the solution in your case was to move use_frameworks! up and out of a specific target and make it global for the Podfile.

The issues you're now seeing (in your Update 2) is that you need to go into your Project Settings and fix the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES setting. I'd recommend simply removing the build setting.

Upvotes: 6

Related Questions