Tag: cocoapods

Google地图在iOS中闪烁

我使用Google地图SDK for iOS版本:1.10.17867.0在我的应用程序中通过pod。 但是当我在特定位置初始化地图时,所有的标题和地图开始闪烁。 示例代码(swift): import UIKit import GoogleMaps class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.whiteColor(); var camera = GMSCameraPosition.cameraWithLatitude(19.0176147, longitude: 72.8561644, zoom:18) // even try this: 28.6469655, longitude: 77.0932634, zoom:10 var mapView = GMSMapView.mapWithFrame(CGRectZero, camera:camera) var marker = GMSMarker() marker.position = camera.target marker.snippet = "Hello World" marker.appearAnimation = kGMSMarkerAnimationPop […]

AFNetworking(〜> 2.5)的依赖关系不用于任何具体的目标

我想安装AFNetworking,但我有一个问题,我如何修复和安装? 我使用AFNetworking入门 : 1.下载CocoaPods sudo gem install cocoapods pod setup 2.A. 创build一个Podfile touch Podfile open -a Xcode Podfile 2.B. 并复制粘贴: source 'https://github.com/CocoaPods/Specs.git' platform :ios, '7.0' pod 'AFNetworking', '~> 2.5'

iOS静态库+ CocoaPods和重复符号错误

我正在开发一个静态库/ iOS框架(Jeff Verkoeyen方式),我添加了CocoaPods来pipe理依赖关系(这与其他有关重复符号的问题有很大的区别)。 当使用CocoaPods的客户端使用我的静态库/框架和我正在使用的第三方库时,我一直在努力解决“重复符号”问题。 我一直在阅读有关不包含第三方库到自定义静态库的答案,但我想这样做,所以这不是一个选项。 我发现这篇文章 (谢谢你Ryan Arana)谈到这个问题和“最好”的解决scheme,我不得不适应它到我的CocoaPods驱动静态库: 1.在工作区的根目录下创build一个空的NamespacedDependencies.h ,并将其添加到主工程中。 2.将其添加到主项目的前缀标题(在任何包含pod之前): #import "NamespacedDependencies.h" 3.将此钩子添加到Podfile: post_install do | installer | environment_header = installer.config.project_pods_root + 'Pods-environment.h' text = "#import \"NamespacedDependencies.h\"\n\n" + environment_header.read environment_header.open('w') { |file| file.write(text) } dummy_class = installer.config.project_pods_root + 'Pods-dummy.m' text = "#import \"NamespacedDependencies.h\"\n\n" + dummy_class.read dummy_class.open('w') { |file| file.write(text) } end 4.将Ryan Arana的脚本复制到根目录并编辑variables。 5.使用以下命令将“运行脚本生成阶段”添加到目标目标: […]

错误“sudo pod安装”

我已经有一个项目与一个podfile工作。 我想在旧项目上添加一个Podfile,但是我在sudo pod install上遇到这个错误 错误: Resolving dependencies of `./Podfile' Updating spec repositories [!] git pull Updating 35bbbaf..8b42708 error: The following untracked working tree files would be overwritten by merge: AFXAuthClient/1.0.4/AFXAuthClient.podspec Please move or remove them before you can merge. Aborting 这很奇怪,因为我没有在我的项目上使用AFXAuthClient,我从来没有使用它。 这是我的Podfile: platform :ios, '5.0' pod 'TTTAttributedLabel', '~> 1.6.0' pod 'ECSlidingViewController', '~> 0.9.0' 我试图没有成功: gem […]

如何将cocoapods添加到现有的工作区而不是项目

我正在研究一个由另外三个项目组成的项目。 我想使用CocoaPods来pipe理我的依赖在工作区,但CocoaPods总是只有一个附加项目创build自己的工作区。 我想要做的是将CocoaPods项目添加到已经存在的工作区。 有没有简单的方法来实现?

如何使用cocoapods安装Facebook的SDK的iOS?

在Facebook的文档:这里: https : //developers.facebook.com/docs/ios/getting-started 这是写我们可以使用: pod \'Facebook-iOS-SDK\' 在我们的项目中安装pod。 但是我将它添加到第10行的pod文件中,并尝试运行pod install,它在terminal上显示以下错误: [!] Oh no, an error occurred. It appears to have originated from your Podfile at line 10. Search for existing github issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=%2FUsers%2Fprajeetshrestha%2FDesktop%2FHotRents%2FPodfile%3A10%3A+syntax+error%2C+unexpected+%24undefined%0A++++pod+%5C%27%2FUsers%2Fprajeetshrestha%2FDeskt…%0A+++++++++%5E%0A%2FUsers%2Fprajeetshrestha%2FDesktop%2FHotRents%2FPodfile%3A13%3A+syntax+error%2C+unexpected+tCONSTANT%2C+expecting+keyword_end%0Atarget+%27HotRentsTests%27+do%0A+++++++++++++++++++++%5E%0A%2FUsers%2Fprajeetshrestha%2FDesktop%2FHotRents%2FPodfile%3A13%3A+unterminated+string+meets+end+of+file%0A%2FUsers%2Fprajeetshrestha%2FDesktop%2FHotRents%2FPodfile%3A13%3A+syntax+error%2C+unexpected+end-of-input%2C+expecting+keyword_end&type=Issues If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new

从现有的Xcode项目制作一个CocoaPod

到目前为止,我一直在努力解决这个问题。 我有我的Xcode Swift项目与其源代码控制的github存储库。 我想用这个项目创build一个新的CocoaPod。 我经历了CocoaPods的文档,但没有任何工作到目前为止,我真的很困惑到现在,有人请写下步骤,以便我需要做的从现有的Xcode项目,已经有一个Github存储库链接到它。 提前致谢!

使用Google-Maps-iOS-SDK(1.8.1)时,架构armv7的未定义符号

我正在尝试使用cocoapods(0.33.1)添加Google-Maps-iOS-SDK(1.8.1) 。 部署目标版本: iOS 7.0 我已经添加了这个pod: pod 'Google-Maps-iOS-SDK' ,'〜> 1.8'正确下载和安装sdk。 我从这里开始添加头文件和样本地图视图加载代码。 我已经正确添加了API密钥。 在一个视图控制器的- (void)viewDidLoad , 我已经添加了以下代码: // Create a GMSCameraPosition that tells the map to display the // coordinate -33.86,151.20 at zoom level 6. GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86 longitude:151.20 zoom:6]; GMSMapView *mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; mapView_.myLocationEnabled = YES; self.view = mapView_; // Creates […]

Cocoapods 1.0:找不到头文件

我只是试图从cocoapods 0.39.x更新到Cocoapods 1.0。 运行 荚安装 从terminal不会导致警告。 一切似乎正常。 但是,当我尝试构build我的项目时,会输出: 找不到AFNetworking / AFNetworking.h文件 我的pod文件看起来像这样(还有一些依赖,但我只列出了它的一部分): platform :ios, '8.0' use_frameworks! source 'https://github.com/CocoaPods/Specs.git' target 'MyApp' do pod 'AFNetworking', '~> 2.6' pod 'BEMCheckBox' pod 'ActionSheetPicker-3.0', '~> 2.0.5' pod 'SCLAlertView' pod 'DZNEmptyDataSet' pod 'SSZipArchive' end target 'MyAppTests' do end 由于一些项目是用Objective-C编写的,我创build了一个桥接头: #import <AFNetworking/AFNetworking.h> #import <ActionSheetPicker_3_0/ActionSheetPicker.h> #import <SSZipArchive/SSZipArchive.h> #import <DZNEmptyDataSet/UIScrollView+EmptyDataSet.h> 我明确地将$(inherited)包含在Header Search Paths , […]

如何在Swift框架中使用Cocoapods?

我正在尝试在Swift中为iOS创build一个新的Cocoa Touch Framework,使用Cocoapods的一些库,但是我无法工作。 我知道有一些开放的问题,但他们似乎没有解决我的问题。 为了testing目的,我创build了一个空的Cocoa Touch框架,安装了Cocoapods并添加了“MBProgressHUD”窗格。 然后,如Apple所logging (“从相同框架目标中导入代码”部分),我在我的伞头中导入了MBProgressHUD标头,如下所示: #import "MBProgressHUD.h" 但是当我编译时,我有这个错误: include of non-modular header inside framework module 我确实设置了“允许框架模块中的非模块化包含”设置为“是”,但没有任何作用。 有什么办法在Swift框架中使用CocoaPods?