有没有办法知道我的应用程序的状态,如果它处于后台模式或前台.谢谢
我是快速编程的新手,我正在尝试开发app检测信标,但我仍然无法检测到任何信标.
let region = CLBeaconRegion(proximityUUID: NSUUID(UUIDString: "11111111-1111-1111-1111-111111111111")!,major: 1, minor: 1, identifier: "MyBeacon")
locationManager.startMonitoringForRegion(region)
locationManager.startRangingBeaconsInRegion(region)
Run Code Online (Sandbox Code Playgroud)