ios8

NetworkExtension - NEVPNManager

本小妞迷上赌 提交于 2019-12-05 16:29:36
问题 Apple published with iOS 8 a new Framework "NetworkExtension". I want to start a VPN Connection out of an app with the NEVPNManager, or has this Framework another use? Has somebody information or an example about this Framework? I can´t find information about it on the developer.apple.com website, only in the header files. Thanks 回答1: The code would look something like this (exact implementation depends on the type of VPN): NEVPNManager *manager = [NEVPNManager sharedManager]; [

Search Bar disappears after tap on it

混江龙づ霸主 提交于 2019-12-05 16:25:27
Am trying to implement search nearby places using google maps. The below is the code what I have done so far override func viewDidLoad() { super.viewDidLoad() //Adding Mapview mapView = GMSMapView(frame: CGRectMake(0, 120, self.view.bounds.width, self.view.bounds.height - 120)) self.view.addSubview(mapView) mapView.mapType = kGMSTypeNormal locationManager.delegate = self locationManager.requestWhenInUseAuthorization() let resultTableView = UITableView(frame: CGRectMake(10, 100, 300, 60)) self.searchResultController = UITableViewController() self.searchResultController?.tableView =

UIScrollView scrolls on all the simulators but not on my iPhone

家住魔仙堡 提交于 2019-12-05 16:02:30
So after figuring out how scrollView works, I've implemented it with the following code: self.scrollView.delegate = self; self.scrollView.userInteractionEnabled = YES; CGRect view = CGRectMake(0, 0, 320, 750); self.scrollView.contentSize = view.size; The above code works as intended on ALL simulators in Xcode 6. However, when I run it my phone (iphone4s on ios7), the scroll does not function at all. Are people experiencing the same problems since the new release? Or am I missing something I've learned from the documentation? Had the same issue here. Just need to resize the scrollview's frame

For iOS healthkit how to save systolic and diastolic blood pressure values?

两盒软妹~` 提交于 2019-12-05 15:57:07
Here is code for saving blood pressure data in health kit HKUnit *BPunit = [HKUnit millimeterOfMercuryUnit]; HKQuantity *BPSysQuantity = [HKQuantity quantityWithUnit:BPunit doubleValue:150.0]; HKQuantityType *BPSysType = [HKQuantityType quantityTypeForIdentifier:HKQuantityTypeIdentifierBloodPressureSystolic]; HKQuantitySample *BPSysSample = [HKQuantitySample quantitySampleWithType:BPSysType quantity:BpsysQuantity startDate:now endDate:now]; [self.healthStore saveObject:BPSysSample withCompletion:^(BOOL success, NSError *error) same way for diastolic also, But how to save both combine as single

How can I fix “fatal error: can't index empty buffer”

自古美人都是妖i 提交于 2019-12-05 15:51:22
I try to develop a custom autocompletion for a textfield. The code works but if I delete all my input, the debugger says: "fatal error: can't index empty buffer" in the line where is written: if createdArrayInDependencyOfInput[indexOfArray] == textFieldText && indexOfArray >= 0 && currentCountOfInput >= 1 Here is the whole code: @IBOutlet weak var MyTextField: UITextField! @IBOutlet weak var MyPlaceholderTextField: UITextField! var arrayOfSubjects: [String] = ["Informatik", "Italienisch", "Lateinisch", "Biologie", "Mathematik"] var createdArrayInDependencyOfInput: [String] = [] var

iOS 8 devices aren't being recognized by iPhone Configuration Utility

二次信任 提交于 2019-12-05 15:49:59
问题 With the recent update to iOS 8 I have been unable to load my test devices using the iPhone Configuration Utility. Devices with iOS 8 are simply not recognized within the program. When iOS 7 was released there was no required update for the iPCU, though it did work with iOS 7. The latest version on Apple's support site (3.6.2) says that it supports up to iOS 6.1. Does anyone have any insight? Alternatives? 回答1: Apple deprecated iPhone Configuration Utility, and released Apple Configurator for

Can't install Provisioning Profiles on iPhone (iOS 8 beta 4 / Xcode 6 Beta 4)

吃可爱长大的小学妹 提交于 2019-12-05 15:45:41
问题 I can't install any of my iOS developer distribution or developer linked provisioning profiles onto my iPhone 5S running iOS beta 4 with Xcode beta 4 on OS X Yosemite dev preview 4. I have reinstalled iOS 8 with a restore, same for yosemite and Xcode betas, revoked and created new dev certificates, deleted and added new certificates to my Keychain access, and made sure all my new provisioning profiles are for the correct certificates. Yes I am a developer and have my iPhone udid added to by

Extension in iOS8 - Terminating since there is no system app

白昼怎懂夜的黑 提交于 2019-12-05 15:42:00
问题 Trying to run my iOS widget that is a "Today" extension. Every time i try to add it to the notification center, i keep getting the message "Terminating since there is no System App Any ideas on how to fix this? Im trying to make an extension that has a tableview in it 回答1: In your project settings look for a setting that says "Launch Screen File" and remove anything so it is blank then clean and build. 回答2: I was having the same problem - Are you using swift? Commenting out the "init(nibName

How to use requestAccessToEntityType method in Swift iOS 8

我们两清 提交于 2019-12-05 13:07:13
I'm trying to get a list of events by using EKEventStore using Swift in iOS8, and the documentation is not updated yet as far as I can tell. This is what I'm trying to do: let eventStore = EKEventStore() eventStore.requestAccessToEntityType(EKEntityType(), EKEventStoreRequestAccessCompletionHandler(Bool(), NSError(){})) This is the error I get: 'EKEventStoreRequestAccessCompletionHandler' is not constructible with '(Bool, NSError) Do you know how can I use the method or the handler correctly in Swift? Try this please: func handler(granted: Bool, error: NSError!) { // put your handler code here

Save order of UITableViewCells

帅比萌擦擦* 提交于 2019-12-05 12:52:11
I added the option in my tableview to sort/reorder cells. I used this tutorial: http://www.ioscreator.com/tutorials/reordering-rows-table-view-ios8-swift . Now I'd like to ask how I can save the sorting/order of the cells? I also use Core Data and the fetchedResultsController . Add an extra attribute to your Core Data model object that is used to store the sort order. For example, you could have an orderIndex attribute: class MyItem: NSManagedObject { @NSManaged var myOtherAttribute: String @NSManaged var orderIndex: Int32 } Then, use this attribute in your sort descriptor for your fetched