question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[!] Invalid `Podfile` file: The target `Pods-projectName` already has a platform set..

See original GitHub issue

When I install the nativescript-mapbox plugin then run (tns run ios) my project I get this error:

[!] Invalid Podfile file: The target Pods-projectName already has a platform set…

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
sputn1kcommented, Oct 25, 2018

update the Podfile in platforms/ios folder. then pod install from that dir.

# Begin Podfile - /Volumes/Drive/Work/project/projectName/dateapp/node_modules/nativescript-mapbox/platforms/ios/Podfile 
 pod 'Mapbox-iOS-SDK', '~> 4.4.1'
 
 # End Podfile 

or go into the node_modules folder and remove the platform :ios, '9.0' line in Podfile of the mapbox plugin.

1reaction
miahdouble07commented, May 21, 2019

You probably have the same code twice…

For example:

platform :ios, ‘9.0’ target :‘ScreenColorChange’ do use_frameworks! pod ‘AWSCore’, ‘~> 2.9.0’

end

platform :ios, ‘9.0’ target :‘YOUR-APP-NAME’ do use_frameworks! pod ‘AWSAppSync’, ‘~> 2.10.0’

end

Solution: Remove the duplicate code: platform :ios, ‘9.0’ target :‘YOUR-APP-NAME’ do use_frameworks!

and just add the last line to the previous code pod ‘AWSAppSync’, ‘~> 2.10.0’

So it should look like this: platform :ios, ‘9.0’ target :‘YOUR-APP-NAME’ do use_frameworks!

pod ‘AWSCore’, ‘~> 2.9.0’ pod ‘AWSAppSync’, ‘~> 2.10.0’

end end

Read more comments on GitHub >

github_iconTop Results From Across the Web

[!] Invalid `Podfile` file: The target `Pods-projectName` already ...
When I install the nativescript-mapbox plugin then run (tns run ios) my project I get this error: [!] Invalid Podfile file: The target...
Read more >
[!] Invalid Podfile file: The target Pods-MyApp already has a ...
Now I want to integrate CitrusPay using CocoaPod but when i have execute pod install command on terminal then i am getting error...
Read more >
Xcode, Pods ProjectName.debug.xcco… - Apple Developer
When I build project, I see build error: ProjectName.debug.xcconfig unable to open file . I couldn't understand my problem for a long time,...
Read more >
The Podfile - CocoaPods Guides
The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects. The file should simply be...
Read more >
How To Manage Dependencies With CocoaPods - Cocoacasts
Notice how CocoaPods has already created a target block for the Notes target of the Xcode project. By using a target block, we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found