Savita Pal Savita Pal - 17 days ago 10
iOS Question

Error on terminal while adding pod - [!] Invalid Podfile file: The target Pods-MyApp already has a platform set

In my app i have integrated Googlemap using CocoaPod.

Now I want to integrate CitrusPay using CocoaPod but when i have execute pod install command on terminal then i am getting error -
[!] Invalid Podfile file:

The target Pods-MyApp already has a platform set..

from /Users/NewFolder/Desktop/xyz.app.MyApp.ios/Podfile:10

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
pod 'GoogleMaps'


Does anyone knows how to solve this error?

Answer

i have the same question with you,and than search answer in the internet,but nothing ,so i solve question myself, step: first : sure you 'Podfile' file only have "platform:ios,'version'" one time; second : add "target 'yourtarget'do" in the file top; third : add "end" in the file bottom.

you must maintain your "Podfile" file have formatter: enter image description here

you will solve this question, wish can help you.thanks.

Comments