ios8

Prompt asking user if they want to continue letting your app collect background location - How often does this occur?

北慕城南 提交于 2019-12-13 13:08:57
问题 As you probally already know, one of the new features in iOS 8 is that Apple will occasionally ask the user something along the lines of: "Weather" has been using your location in the background. Do you want to continue allowing this? How often does Apple ask this and how do they determine when to ask? I can't find any documentation and my own testing has shown that it can range quite a bit. Thanks in advance. 回答1: I have same problem with that alert. When app request always authorization, OS

Calculating IOS signal strength using CTGetSignalStrength()

六月ゝ 毕业季﹏ 提交于 2019-12-13 12:22:32
问题 I have begun developing a non-Apple store app for iOS 8.3 that measures and returns the Received Signal Strength Indicator (RSSI) value in dB. I got access to a git repository for an Xcode project named VAFieldTest that uses the Core Telephony framework in order to get access to information such as cell ID, serving mnc, RSSI, etc. However, the build of the project fails and returns the following error: Ld /Users/rajesh/Library/Developer/Xcode/DerivedData/VAFieldTest

Insert a UISearchBar in IOS 8, Xcode 6 [closed]

我们两清 提交于 2019-12-13 10:14:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . What is the best most efficient way to implement a UISearchBar ? I check all over the internet, and all the tutorials are for the ios 7 version, and a lot of the methods are deprecated in ios 8 . Can someone please provide a library, or a sample of how to implement a searchBar in xcode for ios 8 ? 回答1: I had to

Can a custom keyboard extension communicate with the companion app at runtime?

痞子三分冷 提交于 2019-12-13 09:04:39
问题 Can a custom keyboard communicate with the companion app at runtime? Can a custom keyboard dynamically display content based on states set in the companion app? If so, what API’s/documentation is available for this communication between the extension and app? 回答1: Here is a nice paragraph from the documentation that could get you started in sharing data with your companion app: https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG

How do I properly pass a NSMutableArray to NSUserDefaults with a custom data model?

浪尽此生 提交于 2019-12-13 07:48:55
问题 Let me preface that my code has been obscured a little on purpose. I know the name won't be good. I am trying to add a widget to my app with the new iOS 8 functionality. I am using this link as a tutorial Now, so far I have this in my ViewController when my submit button is called in my app. By this time I have all my data in that array to be passed on. //Passes the array of times to the shared group to be called by the notification center widget. NSUserDefaults *sharedDefaults = [

how do conditional segue in swift

℡╲_俬逩灬. 提交于 2019-12-13 07:20:10
问题 I need to have a conditional Segue. The possible options are: If link have a children link -> I should only reload the UICollectionView. If the link do not have a children link -> Go to other windows. This is my code. override func viewDidLoad() { super.viewDidLoad() self.loaddata(self.url) } func loaddata(url: String){ var loaded: Bool = false api.remoteUrl = url + self.end_url println(api.remoteUrl) api.getData({data, error -> Void in println("entro aqui") if (data != nil){ println(data) //

Saving NSDate error in Swift 3 and iOS 10

心不动则不痛 提交于 2019-12-13 07:11:02
问题 I believe this is a bug introduced in the new stack probably Swift 3 / iOS 10. I am running on XCode8 / Swift3 / iPhone 7 (Simulator) / ios 10.0 I have not found any related report of it. set the value let dt : Date? = Date() UserDefaults.standard.set(dt, forKey: "test-date") Get the value let dt = UserDefaults.standard.object(forKey: "test-date") if dt == nil { return false } else { let date = dt! as Date // FAILED } The failed message is: Could not cast value of type '__NSCFData'

SceneKit shader not working

空扰寡人 提交于 2019-12-13 06:59:53
问题 I'm trying to work with shaders in SceneKit on iOS 8. Here is my code: let sphere = SCNSphere(radius: 6) sphere.segmentCount = 100 sphere.firstMaterial?.diffuse.contents = UIImage(named: "noise.png") sphere.firstMaterial?.diffuse.wrapS = SCNWrapMode.Repeat sphere.firstMaterial?.diffuse.wrapT = SCNWrapMode.Repeat sphere.firstMaterial?.reflective.contents = UIImage(named: "envmap3") sphere.firstMaterial?.fresnelExponent = 1.3 let sphereNode = SCNNode(geometry: sphere) sphereNode.position =

UIAlertController title is always nil with iOS8

半城伤御伤魂 提交于 2019-12-13 06:58:41
问题 I have a problem since iOS8 and Xcode 6.0.1, the title of my alert dialogs doesn't appear. So I changed my UIAlertView to UIAlertController but I have the same issue... The title of my alert is always to nil and the displaying is very ugly because I don't have the serparator lines. Do you know why i have this ? UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"title" message:@"message" preferredStyle:UIAlertControllerStyleAlert]; [alert addAction:[UIAlertAction

presentViewController not working in viewDidLoad

∥☆過路亽.° 提交于 2019-12-13 06:55:36
问题 In this code the alert action is shown every time the app become active: - (void)viewDidLoad { [super viewDidLoad]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:UIApplicationDidBecomeActiveNotification object:nil]; } - (void)applicationDidBecomeActive:(NSNotification *)notification { UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Please make your choice" message:@"Would you like a cup of coffee?