cocoapods

Xcode 10 archiving fails - only on command line (xcodebuild)

两盒软妹~` 提交于 2020-03-18 03:40:44
问题 I'm having issues with archiving on my CI machine (Jenkins), when running the process manually on the SAME machine but with the Xcode UI, everything works just fine. The error I get is: <unknown>:0: error: cannot have input files with file list ** ARCHIVE FAILED ** The following build commands failed: CompileSwift normal armv7 CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler CompileSwift normal arm64 (4

Xcode10 - dyld: Library not loaded for pod installed in framework

跟風遠走 提交于 2020-03-18 03:19:28
问题 I have a project with target frameworks. MainAppTarget FrameworkA FrameworkA is the only one to use a certain pod, hence in my pod file I have something like target 'MainAppTarget' do ... end target 'FrameworkA' do pod 'PodA' end the build succeeds with no problem, but when I run the app on a simulator the app crashes immediately with the following error message: dyld: Library not loaded: @rpath/PodA.framework/PodA Referenced from: .../Build/Products/Development-iphonesimulator/FrameworkA

Cocoapods : Issue with pod which contains resource folder Assets.xcassets

拜拜、爱过 提交于 2020-03-14 13:29:34
问题 I am creating my own cocoapods. I am getting an error as shown in screenshot. I think , there is some issue with Assets.xcassets folder linking. In case, there is no image in assets.xcassets folder, then there is no issue with it. When I am adding any image in assets, then contents.json will be generated automatically with respect to those images, and then this below issue started coming. 回答1: I have modified these two lines and now it's working. s.source_files = 'ECGame/**/*.{swift, plist}'

Cocoapods : Issue with pod which contains resource folder Assets.xcassets

浪尽此生 提交于 2020-03-14 13:22:08
问题 I am creating my own cocoapods. I am getting an error as shown in screenshot. I think , there is some issue with Assets.xcassets folder linking. In case, there is no image in assets.xcassets folder, then there is no issue with it. When I am adding any image in assets, then contents.json will be generated automatically with respect to those images, and then this below issue started coming. 回答1: I have modified these two lines and now it's working. s.source_files = 'ECGame/**/*.{swift, plist}'

CocoaPods安装与使用

巧了我就是萌 提交于 2020-03-14 00:55:11
CocoaPods是一个负责管理iOS项目中第三方开源代码的工具。使用CocoaPods可以为我们节省设置和更新第三方开源库的时间。 下面将分为两部分来讲述如何安装和使用CocoaPods。 一、安装CocoaPods 先使用下面命令升级Ruby版本: ? 1 gem update --system 等待更新完成后,然后通过gem命令来下载安装CocoaPods: ? 1 gem install cocoapods 安装完毕后调用下面命令,进行CocoaPods设置: ? 1 pod setup 执行完成上述命令后,表示安装成功!下面将讲述如何使用CocoaPods。 二、使用CocoaPods 打开终端,使用cd命令定位到需要使用CocoaPods的项目根路径。如: ? 1 cd /Users/username/Documents/Projects/Demo 先考虑项目中需要引用哪些库,然后在通过search命令来查找库的信息,如需要加入JSONKit,那可以如下写法: ? 1 pod search JSONKit 命令执行后会得到如下结果: ? 1 2 3 4 5 6 -> JSONKit (1.5pre) A Very High Performance Objective-C JSON Library. pod 'JSONKit' , '~> 1.5pre' -

iOS开发总结-Xcode常见错误

♀尐吖头ヾ 提交于 2020-03-12 04:46:41
iOS开发总结-Xcode常见错误 "file/file.h"filenotfound 如果遇到这种类型的问题报错,可以分为三部来解决,由简到复杂一步一步来,直到解决问题位置。 1. 点击Xcode -> Project -> Clean清除缓存或者使用⌘ + ⇧ + k快捷键来清除。 2. 点击Xcode -> Window -> Projects 清除Derived Data的缓存,在清除缓存之前先彻底退出Xcode,然后直接删除缓存文件夹。 3. 再Build Settings -> Header Search Paths 添加路径,$(SRCROOT)/项目名称/文件路径。 如果上面这三种方法都没有解决问题,就要考虑一下文件是否存在或者导入方式是否有错误了。例如:# include<>和# include""、# import<>和# import""的导入方式是否有错误。 ld: -pie can only be used when targeting iOS4.2or laterclang: error: linker command failed withexitcode1(use -v to see invocation) 首先注意:-pie can only be used when targeting iOS 4.2 or later -pie只能在ios4

Cocoapods 1.9.0 更新日志

谁说我不能喝 提交于 2020-03-09 18:57:07
CocoaPods 1.9 现在支持 “XCFrameworks”, “podspec支持基于配置的依赖”, “指定 schemes 的代码覆盖率”, “use_frameworks link自定义” XCFramework Support 推荐指数:*** 随着Xcode11,苹果引入的新的Bundle格.XCFramework. 这种支持多个不同的架构和平台类型的.framework捆绑到一个结构里面。 二进制依赖项也需要XCFrameworks来支持macOS Catalina中引入的新的Catalyst平台。 用法 Pod::Spec.new do |s| s.name = 'ToastLib' s.version = '1.0.0' # ...rest of attributes here s.vendored_frameworks = 'ButterLib.xcframework' end 如何创建xcframework参考视频 Configuration-based dependencies for Podspecs 推荐指数:** Podspecs也指出基于配置的依赖了 用法 Podfile修改 target 'BananaApp' do pod 'Toast', :configurations => ['Debug'] end Podspec修改 Pod:

iOS开发~CocoaPods使用详细说明

你离开我真会死。 提交于 2020-03-08 09:36:27
一、概要 iOS 开发时,项目中会引用许多第三方库,CocoaPods( https://github.com/CocoaPods/CocoaPods )可以用来方便的统一管理这些第三方库(从一个坑出来,又进了另一个坑而已……)。 二、安装 由于网上的教程基本都大同小异,但细节之处还不是很完善,所以借机会在这里补充下: 注:要使用 CocoaPods,那就要下载安装它,而下载安装CocoaPods需要Ruby环境 1、Ruby环境搭建 当前安装环境为Mac mini 10.8.5。Mac OS本身自带Ruby,但还是更新一下保险,因为我第一次安装在没有更新Ruby的情况下就失败了。 a 查看下当前ruby版本:打开终端输入 ruby -v(确实安装了,不过用这个版本接下来工作失败了,所以更新下ruby) [objc] view plain copy print ? ritekiMac-mini:PodTest lucky$ ruby -v ruby 1 .8 .7 ( 2 0 1 2- 0 2- 0 8 patchlevel 3 5 8) [universal-darwin 1 2 .0] ritekiMac-mini:PodTest lucky$ b 更新ruby 终端输入如下命令( 把Ruby镜像指向taobao,避免被墙,你懂得) gem sources --remove

关于CocoaPods的安装和使用

喜夏-厌秋 提交于 2020-03-07 19:24:30
CocoaPods应该是iOS最常用最有名的类库管理工具,上面两个问题,通过CocoaPods,只需要一行命令就可以完全解决,前提是你正确设置它。现在绝大部分知名类库都支持CocoaPods,所以掌握CocoaPods的使用是必不可少的基本技能。 一.下载安装CocoaPods 在安装CocoaPods之前,首先要在本地安装好Ruby环境。至于如何在Mac上安装好Ruby环境,请Google。 假如你在本地已经装好Ruby环境,那么下载和安装CocoaPods将十分简单,只需要一行命令,在Terminator(终端)中输入以下命令 sudo gem install cocoapods 但是,且慢,如果你是天朝子明,在终端中敲入这个命令之后,会发现并没有什么反应,因为有堵神秘的墙阻挡了 sudo cocoapods.org。but,但是呢,我们可以用淘宝的Ruby镜像来访问 cocoapods 。按照顺序在终端中输入下列命令 $ gem sources --remove https://rubygems.org/ --add https://ruby.taobao.org/ 为了验证你的Ruby镜像就是是淘宝,可以利用下面的命令行来查看 $ gem sources -l 只有在终端中出现下面文字才表明你是成功的: 2 3 4 * * * CURRENT SOURCES * * *

After updating iOS, all applications using the framework stopped running on the device, but they run on the simulator

我们两清 提交于 2020-03-07 07:23:32
问题 error: { dyld: Library not loaded: @rpath/Realm.framework/Realm Referenced from: /private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Favorite Places Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Frameworks/Realm.framework/Realm: code signature invalid for '/private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places