在 Podfile 我
pod 'AFNetworking', '~> 2.6.0'
Run Code Online (Sandbox Code Playgroud)
pod 更新,我使用 xcworkspace 打开项目。
一切都如我所愿,但是:
当我导入 AFNetworking 时,Xcode 提示 'No such module AFNetworking'
我搜索了这个问题的解决方案,并这样做:在“内置设置->用户标题搜索路径”中添加${SRCROOT}并选择递归。
但它没有用。Xcode 抛出相同的消息:'No such module AFNetworking'
这是我的Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'RMQClient', '~> 0.8'
Run Code Online (Sandbox Code Playgroud)
当我尝试从 cocoapods 安装 repo 时pod install,它会为我安装一个新版本pod 'RMQClient'(例如 0.9)。
在另一个xcode project相同的Podfile,我做了一个pod update和它更新 pod repo 的 cocoapods:
安装 RMQClient 0.9.0(原为 0.8)
cocoapods当我进行更新时,如何防止更新 pod 存储库?如何强制安装我在Podfile.
我正在使用 Apache Cordova 6.5,添加 iOS 平台并尝试在由cordova iOS 项目创建的工作区中使用 cocoapods。
当我运行命令时
吊舱安装
Xcode 项目无法编译,并且出现以下错误
diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Run Code Online (Sandbox Code Playgroud)
以下是我为解决此问题所做的步骤:
科尔多瓦创建应用程序1
光盘应用1/
科尔多瓦平台添加ios
cd 平台/ios
豆荚初始化
吊舱安装
我尝试使用基本 podfile 和添加工作区名称的 podfile
# Uncomment the next line to define a global platform for your project
# …Run Code Online (Sandbox Code Playgroud) 我已经在我的 Xcode 项目中通过 pod 文件安装了一些框架。我正在使用 Xcode 9.2。它已成功安装,但是,在尝试将该第三方框架导入到我的主类时,显示未找到此类模块。
甚至尝试了这么多次完全清理和重建。但是,仍然显示错误No such module found OR无法为 XLPagerTabStrip 加载底层模块。
在框架搜索路径中,它显示在 PFA 下方。
我已经使用颤振有一段时间了。有一次当我去编译时,我刚收到这个错误。我的代码似乎没有任何问题。我试图重新安装我的 cocoapods,但这并没有改变任何东西。谁有想法?
Launching lib/main.dart on iPhone X in debug mode...
Skipping compilation. Fingerprint match.
Running pod install...
CocoaPods' output:
?
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (`arm64`)
Finding Podfile changes
A helloworld
- Flutter
- camera
Fetching external sources
-> Fetching podspec for `Flutter` from `Pods/.symlinks/flutter/ios`
-> Fetching podspec for `camera` from `Pods/.symlinks/plugins/camera-0.1.2/ios`
-> Fetching podspec for `helloworld ` from `Pods/.symlinks/plugins/helloworld/ios`
[!] No podspec found for `helloworld ` in `Pods/.symlinks/plugins/helloworld/ios` …Run Code Online (Sandbox Code Playgroud) 我一直在尝试更新 cocoapod。在此期间,我更新了 Ruby 和 RVM。现在,当我pod init在我的新 ios 项目中尝试时,显示以下内容
Traceback (most recent call last):
2: from /usr/local/bin/pod:23:in `<main>'
1: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)
Run Code Online (Sandbox Code Playgroud)
我检查了以下内容,
ruby --version
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin16]
Run Code Online (Sandbox Code Playgroud)rvm list rubies
=* ruby-2.5.1 [ x86_64 ]
# => - current
# =* - current && default
# * - default
Run Code Online (Sandbox Code Playgroud)我创建了自己的 pod,其中包含 s.version = "0.4.7" 的 podspec 文件,我希望以编程方式将其写入代码,因此每当应用程序运行时,它都会将 pod 版本发送到服务器。
获取 pod 版本的另一个地方是从下面的 plist 文件,即“捆绑版本字符串”0.4.7
我试过使用,let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String但它从 Apps Info.plist 文件中获取版本。
我正在尝试将Moltin和Firebase pod添加到我的应用程序中.我知道如果我想打开文件(只安装了一个pod),我需要从.xcworkspace文件中打开它,而不是使用.xcodeproj文件.
如果我安装了多个pod(以及两个.xcworkspace文件),我必须打开哪个文件?
我使用的是 Swift 5、Xcode 10 和 iOS 12。
我将“FilesProvider”(单击)作为 CocoaPod 添加到我的项目中并且它正在工作,但现在我想测试一些东西,为此我向print库的一个 .swift 文件中添加了几个s。
我是如何做到的:
Pods - Pods - FilesProvider在项目导航器中导航到prints不过,添加的prints 并未打印在控制台中。我很确定我将它们添加到我的应用程序正在使用的库中的函数中。
我是否必须使用任何特殊设置来显示printCocoaPod的s?
我想在 Swift 5 中使用 Firebase,但出现错误消息。
无法构建 Objective-C 模块“Firebase”
我尝试了以下页面上的所有解决方案,但无法解决:
错误:无法构建 Objective-C 模块“Firebase”
https://github.com/firebase/quickstart-ios/issues/672
import UIKit
import Firebase
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
return true
}
}
Run Code Online (Sandbox Code Playgroud)
我期望构建成功,但实际上构建失败。
构建错误消息是:
找不到“FirebaseCore/FirebaseCore.h”文件无法构建Objective-C模块“Firebase”
并且,xcode 在以下位置显示错误消息
import Firebase
Run Code Online (Sandbox Code Playgroud)
在 AppDelegate.swift 中