Swift Xcode看不到通过cocoa pods安装的框架
我正试图将Swift Xcode看不到通过cocoa pods安装的框架,swift,xcode,Swift,Xcode,我正试图将SharkORM框架添加到我的应用程序中,但不知何故,在安装了pod之后,它看起来像: target 'XXX' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for XXX pod 'Firebase/Core' pod 'SharkORM' target 'XXXTests'
SharkORM
框架添加到我的应用程序中,但不知何故,在安装了pod之后,它看起来像:
target 'XXX' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for XXX
pod 'Firebase/Core'
pod 'SharkORM'
target 'XXXTests' do
inherit! :search_paths
# Pods for testing
end
target 'XXXUITests' do
inherit! :search_paths
# Pods for testing
end
end
并使用命令pod install
;得到这个:
Analyzing dependencies
Downloading dependencies
Using Firebase (3.12.0)
Using FirebaseAnalytics (3.6.0)
Using FirebaseCore (3.4.7)
Using FirebaseInstanceID (1.0.8)
Using GoogleInterchangeUtilities (1.2.2)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleToolboxForMac (2.1.1)
Using SharkORM (2.1.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 8 total pods installed.
这听起来很棒,因为安装成功了
在AppDelegate.swift
获取错误中:
在此处使用未声明的类型'SRKDelegate'
:
class AppDelegate: UIResponder, UIApplicationDelegate, SRKDelegate {
我想说的是,我必须在我的文件顶部使用import SharkORM
,但它没有显示这个文件存在。它应该->在Pods
文件中我有这些组件,然后发生了什么?正如你所见,我正在使用的Firebase
正在工作
提前谢谢
pod install
//File -> New File -> Header File
//Save it as a YourApp-Bridging-Header
#include <SharkORM/SharkORM.h>
import SharkORM››
class AppDelegate: UIResponder, UIApplicationDelegate, SRKDelegate
您必须
导入SharkORM
才能使用pod。另外,请确保您正在处理与项目位于同一目录下的.xcworkspace文件(它是在您执行pod install
时自动创建的。您打开的是.xcworkspace文件而不是.xcprojects吗?这是什么意思?请检查并特别注意开始。Cocoapods创建一个新文件,您应该打开该文件(而不是默认的项目文件)。此新文件不包括所有库等。请使用XXX.xcworkspace
文件打开您的xcodeproject@milo526在Xcode项目中,我可以在哪里找到替换的位置?