ios10

Swift 3 ObjC Optional Protocol Method Not Called in Subclass

橙三吉。 提交于 2019-11-27 19:09:15
I have the following class hierarchy: class ScrollableViewController: UIViewController, UITableViewDelegate { // ... } That implements one UITableViewDelegate protocol method, e.g. tableView:willDisplayCellAt: In my class SpecificScrollableViewController , which inherits from ScrollableViewController , new optional protocol methods don't get called any more, e.g. tableView(_:heightForRowAt:) tl;dr you need to prefix the function declaration with its Objective-C declaration, e.g. @objc(tableView:heightForRowAtIndexPath:) func tableView(_ tableView: UITableView, heightForRowAt indexPath:

Check internet connection (iOS 10)

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 19:07:40
问题 For iOS 9 I was using Reachability public class to check wether the device is connected to the internet or not. I converted my Swift 2 code to Swift 3, and the Reachability doesn't work anymore. Can someone tell me how to check the internet connection on iOS 10? Thanks! Here's the code snippet: open class Reachability { class func isConnectedToNetwork() -> Bool { var zeroAddress = sockaddr_in() zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress)) zeroAddress.sin_family = sa

libMobileGestalt MobileGestaltSupport.m:153 MobileGestalt.c:550 Xcode Console

女生的网名这么多〃 提交于 2019-11-27 18:43:39
I am getting Following messages on Xcode Console View libMobileGestalt MobileGestaltSupport.m:153: pid 231 (myproject) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see ) MacOs Sierra Version: 10.12.4 Xcode Version 8.3 Programming Language : Objective C I get this message after application launch, Device is plugged with xcode while running the application. It seems like a rare issue. Anyone can help me to solve this? I had a similar issue: 2017-08-04 12:02:44.936288+0100 Demos[1112

NSPhotoLibraryUsageDescription in Xcode8

放肆的年华 提交于 2019-11-27 17:59:05
Update : I attempt to add a String value to the "NSPhotoLibraryUsageDescription" key. And it works.My build version is now available on my TestFlight. ps: 构建版本 means Build Version But I want to know why Apple Store just let me add String value for "NSPhotoLibraryUsageDescription" key rather than "Camera Usage Description" or "Location When In Use Usage Description" ? And how to localize the info.plist. Old : I've uploaded many build versions to iTunes Connect.But TestFlight shows none of these build versions. Then I search this issue on stackoverflow. And I know this is caused by usage

The document Main.storyboard requires Xcode 8.0 or later

隐身守侯 提交于 2019-11-27 17:55:30
I downloaded Xcode beta and opened my existing project to see how it works with Xcode 8 beta (I opened Storyboard file from Xcode 8). Now when I open my project from Xcode 7.3 I am not able to open storyboard file , it gives me following error This version does not support documents saved in the Xcode 8 format. Open this document with Xcode 8.0 or later. What should I do to revert back, as I want to continue working on Xcode 7. In Xcode 8 I was prompted to select device and I selected iPhone 6S, I think that part is somehow responsible for storyboard file not opening in Xcode 7 Bhumit Mehta I

Error '_BSMachError: port 1607; (os/kern) invalid capability (0x14) “Unable to insert COPY_SEND” in Cordova app on iOS 10

眉间皱痕 提交于 2019-11-27 17:47:55
Everything works fine till I build my cordova application with Xcode 7.3.0 but it started crashing only on iOS 10 devices after building the same application with Xcode 8 whenever i'm changing the orientation from Portrait to Landscape where as it still working fine on iOS 9.3.1. In debugger i'm getting following logs: 2016-09-24 18:14:41.212470 MyApp[2542:1028606] [Common] _BSMachError: port 1607; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND" 2016-09-24 18:14:41.613460 MyApp[2542:1028606] [Common] _BSMachError: port 1607; (os/kern) invalid name (0xf) "Unable to insert COPY

Change the log level on iOS 10 (Unified Logging) with Console.app

帅比萌擦擦* 提交于 2019-11-27 17:29:59
问题 This is so simple but: how on earth do I set the level of log messages I see in Console.app, if I am trying to use iOS10's new "Unified Logging & Activity Tracing" API? In other words, if I have code running on iOS like so: fileprivate let logger = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "mycategory") fileprivate func logv(_ s:String) { os_log("%@",log:logger,type:.info,s) } Then what do I need to do to see the logged messages in Console.app? By default, only log messages of

iOS 10 doesn't print NSLogs

与世无争的帅哥 提交于 2019-11-27 17:19:25
Nothing prints from NSLog on Xcode 8.0 beta (8S128d). printf is unchanged Here's my code: NSLog(@"hello from NSLog"); printf("hello from printf"); Here's the output on iOS 9 Simulator: 2016-06-17 09:49:10.887 calmapp-dev[28517:567025] hello from NSLog hello from printf Here's the output on iOS 10 Simulator: hello from printf user6833743 It could be that you added the property "OS_ACTIVITY_MODE": "disable" in the Scheme environment variables (to hide OS output from the simulator) and forgot about it, and now are running on a real device. In Xcode 8: Product -> Scheme -> Edit Scheme -> Run ->

Check internet connection (iOS 10)

让人想犯罪 __ 提交于 2019-11-27 17:12:44
For iOS 9 I was using Reachability public class to check wether the device is connected to the internet or not. I converted my Swift 2 code to Swift 3, and the Reachability doesn't work anymore. Can someone tell me how to check the internet connection on iOS 10? Thanks! Here's the code snippet: open class Reachability { class func isConnectedToNetwork() -> Bool { var zeroAddress = sockaddr_in() zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress)) zeroAddress.sin_family = sa_family_t(AF_INET) let defaultRouteReachability = withUnsafePointer(to: &zeroAddress) {

Swift 2 to 3 Migration for prepareForSegue [duplicate]

拥有回忆 提交于 2019-11-27 15:53:01
This question already has an answer here: prepare(for segue: UIStoryboardSegue, sender: AnyObject?) missing in swift 3.0/Xcode 8 b6 1 answer This question might have been answered already but I could not find it. override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { } This code worked fine in swift 2 but now gives me an error to remove the override. Exact Error: "Method does not override any method from its superclass" What is the new correct method for swift 3 for this? I can't seem to find any documentation on it anywhere. Method signature is changed in swift 3.0