ios 请在您的 Podfile 中为此目标指定平台?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/52040910/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Please specify a platform for this target in your Podfile?
提问by Gowthaman M
I want to config Firebase Firestore. I followed all the step, but at last step I got error link below I mention.
我想配置 Firebase Firestore。我遵循了所有步骤,但在最后一步,我在下面提到了错误链接。
After Executing this pod installCommends below error I got
执行此pod install 后出现以下错误提示
[!] Automatically assigning platform
ios
with version11.4
on targettesting_gowtham
because no platform was specified. Please specify a platform for this target in your Podfile. Seehttps://guides.cocoapods.org/syntax/podfile.html#platform
.
[!]由于未指定平台
ios
,因此自动分配具有11.4
目标版本的testing_gowtham
平台。请在您的 Podfile 中为此目标指定平台。见https://guides.cocoapods.org/syntax/podfile.html#platform
。
My PodFile:
我的 PodFile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'testing_gowtham' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for testing_gowtham
target 'testing_gowthamTests' do
inherit! :search_paths
# Pods for testing
end
target 'testing_gowthamUITests' do
inherit! :search_paths
# Pods for testing
end
pod 'Firebase/Core'
pod 'Firebase/Firestore'
end
I saw this https://guides.cocoapods.org/syntax/podfile.html#platformbut I did not find which line I need to change .
我看到了这个https://guides.cocoapods.org/syntax/podfile.html#platform但我没有找到我需要更改哪一行。
How to solve this issue?
如何解决这个问题?
回答by aBilal17
Replace your whole pod file text with below text and then check.
用下面的文本替换整个 pod 文件文本,然后检查。
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'testing_gowtham' do
use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/Firestore'
end
(or) solution 2
(或)解决方案2
platform :ios, '9.0'
is working...I simply removed #this
platform :ios, '9.0'
正在工作......我只是删除了#这个
回答by kurupareshan
If the above error occurs when you install pod 'PusherSwift'
and pod 'AlamofireImage'
you have to remove #
symbol from
如果安装时出现上述错误pod 'PusherSwift'
, pod 'AlamofireImage'
需要将#
符号从
# platform :ios, '9.0'.
Then write the command pod installin your terminal.
然后在终端中写入命令pod install。
When you run the project again the error will appear according to 'pusher swift'
.you have to click unblock option. Then the problem is successfully solved.
当您再次运行该项目时,错误将根据'pusher swift'
.you have to click unblock option 出现。那么问题就顺利解决了。
回答by Onyekachi Samuel
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'testing_gowtham' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for testing_gowtham
pod 'Firebase/Core'
pod 'Firebase/Firestore'
end
回答by Hourglasser
Delete Podfile.lock
file and run pod install
.
删除Podfile.lock
文件并运行pod install
。
I got this issue by changing the target iOS version and developing application on more devices.
我通过更改目标 iOS 版本并在更多设备上开发应用程序来解决此问题。
Worked for me, but be careful - it will replace all, let's say, locked (cached) versions of libraries, that you are using. Check yourself that you fully understand what Podfile.lock
file does here --> https://guides.cocoapods.org/using/using-cocoapods.html
为我工作,但要小心 - 它会替换您正在使用的所有锁定(缓存)版本的库。检查自己是否完全理解Podfile.lock
这里文件的作用 --> https://guides.cocoapods.org/using/using-cocoapods.html