小编vin*_*h87的帖子

适用于ios的NFC标签编写器示例或教程?

我想将一组NSDictionary数据写入NFC标签,并在点击NFC贴纸时获取.

如何从我的iOS应用程序中编写NFC标签数据?搜索谷歌后,我找不到任何将我的iOS应用程序中的数据写入NFC标签的参考.Google提供的示例仅用于通过iOS11应用阅读NFC标签.但iTunes中的一些应用程序可以选择读取和写入NFC标签数据.他们是怎么做到的?

提前致谢!

iphone nfc ios swift ios11

6
推荐指数
2
解决办法
7487
查看次数

我的应用程序进入暂停状态的原因?

我创建了一个位置跟踪 ios 应用程序(使用 CocoaLumberjack 库写入日志文件)。因此启用了后台位置更新并用于我的测试(我几乎在后台运行了 8 小时)。当应用程序进入实时商店时。我们的应用程序中发生了很多问题。当应用程序转到后台位置跟踪无法正常工作时。它不会在一段时间内将用户位置发送到服务器。所以我从客户端获取日志文件并查看日志文件中是否存在时间间隔。我经常获取用户位置(每隔一秒)。所以我认为应用程序在日志文件中出现间隙时进入暂停状态?为什么即使我经常在后台获取位置,应用程序也会进入暂停状态?应用程序是否有理由进入暂停状态?搜索了很多找不到任何有效的详细信息?

 func startTimer()
{
    if bgTimer == nil
    {
        bgTimer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(self.startLocationChanges), userInfo: nil, repeats: true)
    }
}

func stopTimer()
{
    if bgTimer != nil
    {
        bgTimer?.invalidate()
        bgTimer = nil
    }
}

@objc func startLocationChanges() {
    locationManager.delegate = self
    locationManager.allowsBackgroundLocationUpdates = true
    locationManager.pausesLocationUpdatesAutomatically = false
    locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers
    locationManager.requestAlwaysAuthorization()
    locationManager.startUpdatingLocation()
}

func locationManager(_ manager: CLLocationManager,  didUpdateLocations locations: [CLLocation]) {
    //let lastLocation = locations.last!

    // Do something with the location. …
Run Code Online (Sandbox Code Playgroud)

background core-location cllocationmanager ios swift

1
推荐指数
1
解决办法
1103
查看次数

标签 统计

ios ×2

swift ×2

background ×1

cllocationmanager ×1

core-location ×1

ios11 ×1

iphone ×1

nfc ×1