“没有这样的模块'LocalAuthentication'"尝试使用Swift导入Xcode 6时 [英] "No such module 'LocalAuthentication'" when trying to import in Xcode 6 using Swift
问题描述
我想使用新的LocalAuthentication框架和Swift构建一个简单的演示应用程序。我创建了一个新的Single View项目,并在ViewController.swift文件的顶部添加了一行:
I wanted to build a simple demo app using the new LocalAuthentication framework and Swift. I made a new Single View project, and added one line to the top of the ViewController.swift file:
import LocalAuthentication
因此,Xcode告诉我没有这样的模块。显然对Swift来说很新,我做错了什么?
Whereupon Xcode tells me there is no such module. Obviously very new to Swift, what am I doing wrong?
推荐答案
Objective-C代码也出现同样的问题。
好像它是beta 1的问题。如果你在iOS 8设备上运行你的项目(在5s iPhone上测试过),它就可以运行了。但它不适用于模拟器(无法找到框架)。
Same problem occurs with Objective-C code. Seems like it is an issue of beta 1. If you run your project on an iOS 8 device (tested on a 5s iPhone), it will work. But it doesn't with the Simulator (Framework can't be found).
这篇关于“没有这样的模块'LocalAuthentication'"尝试使用Swift导入Xcode 6时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!