我遇到了一些我在项目中使用的外部框架的兼容性问题.有没有办法在Xcode 8上更改Base SDK?目前在项目设置中只显示最新的SDK.
我已经尝试将旧版SDK从另一个版本的Xcode复制到此处,但它不起作用:
/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
仅供参考:我是Swift的新手,所以这可能是一个非常简单的问题,但我无法理解.
我一直在使用Xcode 8 beta和Swift 3 开始开发iOS应用程序(Swift)教程.
我将Tap Gesture Recognizer附加到Image View,然后在ViewController.swift中添加了这个动作:
@IBAction func selectImageFromPhotoLibrary(_ sender: UITapGestureRecognizer) {
// Hide the keyboard.
nameTextField.resignFirstResponder()
// UIImagePickerController is a view controller that lets a user pick media from their photo library.
let imagePickerController = UIImagePickerController()
// Only allow photos to be picked, not taken.
imagePickerController.sourceType = .photoLibrary
// Make sure ViewController is notified when the user picks an image.
imagePickerController.delegate = self
present(imagePickerController, animated: true, completion: nil)
}
Run Code Online (Sandbox Code Playgroud)
当通过点击图像视图调用selectImageFromPhotLibrary Action时,应用程序崩溃而不显示ImagePicker.
我想问题是新的礼物而不是在Swift …
所以Xcode 8最近发布了,我仍然不确定究竟是什么原因造成了这个问题(可能只是因为它是Xcode的beta版本,或者我可能在某种程度上做错了什么).
手头的问题是我正在尝试创建一个新的SceneKit应用程序,而我正在使用.scn文件.
我在"hero.scnassets"中创建了一个.scn文件"hero.scn",并在hero.scnassets文件夹中提供了一个名为"heroTexture.png"的.png文件
Xcode 8.0 beta 1通常为"GameViewController.swift"文件中的此项目提供的代码编辑如下:
原始代码:
...
let scene = SCNScene(named: "art.scnassets/ship.scn")!
...
let ship = scene.rootNode.childNode(withName: "ship", recursively: true)!
ship.run(SCNAction.repeatForever(SCNAction.rotateBy(x: 0, y: 2, z: 0, duration: 1)))
Run Code Online (Sandbox Code Playgroud)
编辑代码:
...
let scene = SCNScene(named: "hero.scnassets/hero.scn")!
...
let hero = scene.rootNode.childNode(withName: "hero", recursively: true)!
hero.run(SCNAction.repeatForever(SCNAction.rotateBy(x: 0, y: 2, z: 0, duration: 1)))
Run Code Online (Sandbox Code Playgroud)
收到错误:
.../Xapp.app: resource fork, finder information, or similar detritus not allowed
Command /usr/bin/codesign failed with exit code 1
Run Code Online (Sandbox Code Playgroud)
问题结论:
当我所做的只是替换文件时,为什么我会收到签名错误?
旁注:我知道如何让代码签名问题消失,但这涉及重新启动整个项目(我不介意).然而,我遇到的问题是每当我更改文件时,我都会收到此错误.
在Xcode7中,单击"窗口" - >"项目",然后选择要删除派生数据的项目.
但是使用Xcode8 beta 2,Windows菜单下不再存在项目菜单.有没有通过Xcode8接口删除派生数据的快捷方法?
我刚刚将Xcode项目从Xcode 7.3转换为Xcode 8 GM,我收到了超过80个约束警告.在Xcode 7中,我的故事板是"大方块"而不是特定的iPhone大小.现在,使用Xcode 8,您可以更改为不同的iPhone和iPad尺寸.我的约束仍然出现,因为它们与Xcode 7中更平方的VC有关.是否有"快速"修复或者我是否需要通过我的整个应用并修复每个约束(远远超过80)?
更新:2016年9月20日 - >根据此 Feed 提交了许多错误报告,Apple应该知道这个问题.一旦问题得到解决,我将立即更新答案.
将xcode升级到8.0后,我的应用程序项目构建时出现了设备目标错误,但成功构建了模拟器.
错误如下:
ld:找不到-lcrt1.3.1.o的库
这个错误的解决方案是什么?
当我们将视图控制器嵌入导航控制器时.然后面对导航栏的问题.
Xcode 8问题:"导航栏"的框架在运行时会有所不同.
注意:当我们隐藏导航栏并再次显示它时,问题就消失了.在我们打开故事板之后再发出加薪.
我也尝试过这里给出的答案.它不起作用.如果再次打开故事板,则此问题再次出现.
Xcode 8.1也存在同样的问题
我们如何解决这个问题?
我刚刚将我的项目迁移到swift 3中,发现"看到"的快速帮助标注没有显示出来.在以前版本的swift中,一切都完美无缺.以下是我的代码
/**
Adds a See also callout to the Quick Help for a symbol using the See Also delimiter. Multiple See also callouts appear in the description section in the same order as they do in the markup..
- author: Tapas Pal
- remark: Use the callout to add references to other information.
- seealso: [The Swift Standard Library Reference](https://developer.apple.com/library/prerelease/ios//documentation/General/Reference/SwiftStandardLibraryReference/index.html)
*/
class SeeAlsoMarkup: NSObject {
static func doSomething() {}
}
Run Code Online (Sandbox Code Playgroud)
输出就像
Apple是否通过此标记更改了任何内容?但是它的文档仍然显示相同.
使用不可编辑的UITextView,我想在iOS9 +中嵌入这样的文本:
只需点击这里注册
我可以创建一个函数并操作文本但是有更简单的方法吗?
我看到我可以使用NSTextCheckingTypeLink,因此在Interface Builder中可以直接获取文本而无需"click here"部分:
只需http://example.com即可注册
我正在使用Xcode 8和Swift 3,如果这是相关的.
在iPad iOS 10应用程序中,如果我们不提供任何启动屏幕,则将应用程序图标显示为启动屏幕/启动画面.
我没有设置任何启动屏幕或图像.
而LaunchImage资产是空白的.
看起来很奇怪.
看到
是bug吗?或功能?
FYI
应用程序不在App Store中的企业应用程序中.