当我升级到Xcode8时,它当然将.storyboard文件转换为最新版本.当我清理重建应用程序时,我注意到背景颜色与以前不一样.有趣的事实:xcode8自动替换
colorSpace="calibratedRGB"
Run Code Online (Sandbox Code Playgroud)
至
colorSpace="custom" customColorSpace="sRGB"
Run Code Online (Sandbox Code Playgroud)
我的问题:calibratedRGB是一个弃用的东西,我不应该再使用了?或者只是苹果严重转换了故事板?
我正在尝试将我的项目转换为Swift 3,但我收到一条错误消息,表达式太复杂,无法在合理的时间内解决.我不知道为什么会这样,因为这个表达式在Swift 2.2中运行良好,但是现在突然间它需要这么长时间?
有谁知道我怎么解决这个问题?这是表达式.它基本上是一个字典,稍后将用于SecItemCopyMatching从使用密钥标记保存的钥匙串中提取项目.它执行a touchID来执行此操作,因为它是使用该锁定参数保存的:
let query : [String: AnyObject] = [String(kSecClass) : kSecClassGenericPassword,
String(kSecAttrService) : keyTag as AnyObject,
String(kSecAttrAccount) : keyTag,
String(kSecReturnData) : kCFBooleanTrue,
String(kSecMatchLimit) : kSecMatchLimitOne,
String(kSecUseOperationPrompt) : message]
Run Code Online (Sandbox Code Playgroud) 我正在尝试从我的项目中获取代码覆盖率报告.但是,当我尝试构建和运行测试时,在派生数据文件夹中没有创建CodeCoverage文件夹.
我正在运行xcodebuild,如下所示:
xcodebuild \
-workspace <some_workspace> \
-scheme <some_scheme> \
-destination <some_destination> \
-derivedDataPath <some_path> \
-enableCodeCoverage YES \
build test
对于我的工作区/项目,它最后会在一行中失败:
xcodebuild: error: Failed to build workspace <some_workspace> with scheme <some_scheme>.
Reason: Could not determine bundle identifier for <some_test_target>'s TEST_HOST: "<some_path>/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/<some_product>.app"
起初它似乎与TEST_HOST问题直接相关,但事实并非如此.
根本没有CodeCoverage文件夹:
<some_path>/Build/Intermediates/CodeCoverage
我尝试了一个干净的新项目,同样运行相同的xcodebuild命令,成功.该范围内Build/Intermediates/的文件夹所在的CodeCoverage文件夹.
但是,在我自己的项目中,它更复杂,该Build/Intermediates/文件夹包含一堆*.build文件夹(例如,与应用程序和各种框架相关HockeySDK.build),PrecompiledHeaders但没有CodeCoverage文件夹.
在查看输出时,xcodebuild我从未看到CodeCoverage对项目文件夹的引用.但是,对于测试项目,首先提到的是:
Write auxiliary files
/bin/mkdir -p /<some_path>/Build/Intermediates/CodeCoverage/Intermediates/<some_project>.build/Debug-iphonesimulator/<some_project>.build/Objects-normal/x86_64
对于我的项目,我看到:
Write …
我已经阅读了两种可能性:
我试过第一个,它不适合我.Couldn't Generate Swift Representation当我试图进入框架代码时,我得到了一个.如果这个选项应该仍然工作Xcode 8和Xcode 8.1,我应该检查哪些设置?
如果现在最好/唯一的选择是第二个选项,我应该如何正确设置呢?
我有这个UIButton和一个适合的图像.我不希望图像占据按钮内的所有空间,但只是它的一小部分位于中心,但如果我调整按钮的大小,它也会调整图像的大小.我怎么能这样做,有没有选择设置我想要的任何尺寸独立于UIButton的大小?谢谢!
我最近升级到Xcode 8和现有项目到Swift 3.在与Cocoapods有各种各样的问题后,我决定从头开始.运行后pod deintegrate和删除Podfile,Podfile.lock以及[Project].xcworkspace,我有一个空白的石板尽可能的CocoaPods担心.
然后我采取了以下行动:
在项目位置打开终端并运行pod init,然后pod install(使用pod init创建的存根Podfile ).
这似乎是成功的,但附带以下两个警告:
[!] The `Xena [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Xena/Pods-Xena.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Xena [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Xena/Pods-Xena.release.xcconfig'. This can …
我正在观看本教程,在Xcode 8中使用Core Data,视频使用的是Swift.在视频中,他进入Task了核心数据模型中命名的实体,然后在他能够调用的代码中Task:
let task = Task(context: context)
Run Code Online (Sandbox Code Playgroud)
我有一个叫做的实体Tag.如何使用Objective-C在代码中访问Tag?Codegen在Core Data模型中设置,但我在项目中看不到任何其他文件.如果我尝试:
Tag test = [[Tag alloc] init];
Run Code Online (Sandbox Code Playgroud)
我收到一个Tag不存在的错误.
在尝试调试我的视图层次结构时,出现以下错误:
Error: Unable to capture view hierarchy.
Details: No plist data for fetching view hierarchy: error evaluating expression “(id)[(Class)objc_getClass("DBGViewDebuggerSupport_iOS") fetchViewHierarchyWithOptions:(id)[(Class)objc_getClass("NSDictionary") dictionaryWithObjects:(id)[(id)[(id)[(Class)objc_getClass("NSArray") arrayWithObject:(id)[(Class)objc_getClass("NSNumber") numberWithBool:1]] arrayByAddingObject:(id)[(id)[(Class)objc_getClass("NSArray") arrayWithObject:@"_UIVisualEffectBackdropView"] arrayByAddingObject:@"_UIBackdropEffectView"]] arrayByAddingObject:(id)[(Class)objc_getClass("NSNumber") numberWithBool:0]] forKeys:(id)[(id)[(id)[(Class)objc_getClass("NSArray") arrayWithObject:@"DBGViewDebuggerUseLayersAsSnapshots"] arrayByAddingObject:@"DBGViewDebuggerEffectViewsToSnapshotAsImage"] arrayByAddingObject:@"DBGViewDebuggerAlwaysEncodeLayers"]]]”: error: Expression can't be run, because there is no JIT compiled function
Method: -[DBGAbstractViewDescriber handleFetchedViewInfo:fetchError:resultHandler:]
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
Run Code Online (Sandbox Code Playgroud)
在iPhone 6 10.2和iPhone 5C 9.3.5上发布.XCode是8.2.1.Mac机是Sierra 10.12.2(16C67).
始终可重复 - 永远不会让它发挥作用.
有人知道吗?
我在将分发证书附加到企业应用程序时遇到问题.Xcode抛出错误
供应配置文件不包括在钥匙串中安装匹配私钥的任何证书(Xcode 8).
我搜索了很多,但没有找到令人满意的答案Xcode 8(最新答案).
我对我在互联网上找到的解决方案有以下疑问:
使用自动管理签名:是否不会为使用相同分发证书的其他应用程序创建任何问题?
从旧机器导出私钥:很久以前发布的/sf/answers/900757441/,仍然可以使用吗?或者我们还有其他新选择吗?
在提交给Apple之前尝试存档应用.超出警告限制 - 仅显示前200个警告.示例警告:
ld: warning: Linker asked to preserve internal global: 'sharedInstance.sharedInstance'
ld: warning: Linker asked to preserve internal global: '__block_descriptor_tmp'
ld: warning: Linker asked to preserve internal global: '__block_descriptor_tmp'
ld: warning: Linker asked to preserve internal global: '__block_descriptor_tmp'
ld: warning: Linker asked to preserve internal global: '__block_descriptor_tmp'
ld: warning: Linker asked to preserve internal global: '__block_literal_global'
ld: warning: Linker asked to preserve internal global: '__block_descriptor_tmp'
ld: warning: Linker asked to preserve internal global: '__block_descriptor_tmp'
ld: warning: Linker asked to …Run Code Online (Sandbox Code Playgroud) ios ×10
xcode8 ×10
xcode ×5
swift ×3
swift3 ×3
objective-c ×2
cocoapods ×1
code-signing ×1
core-data ×1
debugging ×1
firebase ×1
frameworks ×1
iphone ×1
sourcekit ×1
storyboard ×1
xcodebuild ×1