“No such module 'LocalAuthentication'” when trying to import in Xcode 6 using Swift

梦想与她 提交于 2020-01-21 11:46:10

问题


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

Whereupon Xcode tells me there is no such module. Obviously very new to Swift, what am I doing wrong?


回答1:


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).




回答2:


Yes,Same Problem Occurs in Xcode 6. But It worked fine when I use an iPhone Device, change "Deployment target" on settings to iOS 7.0, build and run in Iphone device.

But Touch ID not Supported in my ipod Device and Simulator.. Its works only in iPhone 5s Device.



来源:https://stackoverflow.com/questions/24149563/no-such-module-localauthentication-when-trying-to-import-in-xcode-6-using-sw

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!