Tag: 椰子树

如何在Objective-C项目中导入和使用Swift Pod框架

我一直在试图检查CocoaPods新的框架设置来得到一些豆荚,我在我的Objective-C项目中使用Swift的时候遇到了麻烦。 首先,这是CocoaPods预发行0.35,你可以阅读如何使用和安装在这里 。 这是我目前的Podfile: source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' pod 'MBProgressHUD' pod 'SLPagingViewSwift' MBProgressHUD是一个常见的旋转指标,SLPagingViewSwift是一个随机项目,我通过在cocoapodssearch中inputSwift来find。 这里是ViewController.m在我的项目中: #import "ViewController.h" @import SLPagingViewSwift; @import MBProgressHUD; @interface ViewController () @end @implementation ViewController – (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; // Works just fine MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:self.view]; [self.view addSubview:hud]; [hud show:YES]; // Causes Error — Won't build SLPagingViewSwift *sl = […]

cocoaPods pod install权限被拒绝

这是简短的版本: 当我跑步 pod install 在我得到的Xcode项目 [!] Pod :: Executable pull error:无法打开.git / FETCH_HEAD:权限被拒绝 如果我跑 sudo pod install 我没有得到任何错误,但我安装的文件是由根拥有,无法编译,我必须将这些文件chown给普通用户使用Xcode编译器。 我正在运行狮子OSX。 我使用安装cocoaPods sudo gem install cocoaPods 我不得不使用sudo因为没有它我得到了 错误:执行gem时(Gem :: FilePermissionError) 您没有写入/Library/Ruby/Gems/1.8目录的权限。 所以现在我有一个根安装的版本的cocoaPods,下载根拥有的Xcode库。 是sudo安装cocoaPods错误的方式还是正常的方式? 如果正常,有没有办法解决吊舱安装问题?

如何在Swift项目中使用Objective-C Cocoapods?

有没有一种方法,我可以使用Swift项目中使用Swift Objective C中编写的CocoaPod? 我只是做一个桥头? 如果是这样,我可以访问Swift中CocoaPod库中定义的对象,类和字段吗? Objective C中有很多很棒的CocoaPods。我只知道Swift,而且我想知道是否还有一种方法可以让我继续使用这些CocoaPods。

找不到-lPods的Xcode – ld:library

我尝试构buildiOS应用程序时遇到这些错误。 ld: library not found for -lPods clang: error: linker command failed with exit code 1 (use -v to see invocation) Ld /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator/Totalbox.app/Totalbox normal x86_64 cd /Users/Markus/Development/xcode/totalbox-ios export IPHONEOS_DEPLOYMENT_TARGET=7.1 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator -F/Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator -filelist /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Intermediates/Totalbox.build/Debug-iphonesimulator/Totalbox.build/Objects-normal/x86_64/Totalbox.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -framework CoreGraphics -framework Foundation -framework MobileCoreServices -framework QuartzCore -framework Security […]