xcode8-beta6

xcode8 beta 'Error' is ambiguous for type lookup in this context

拜拜、爱过 提交于 2019-12-08 17:22:51
问题 According to this article , I need to specify the module to lookup object type , but below function is call from apple api , should I need to wait until Xcode8 really release ? or am I miss anything ? function in AppDelegate.swift Import section 回答1: The Solution is to just type Swift.Error instead of Error . The issue occurs when one of your modules has its own Error Type...:/ For example: func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error:

Swift 3.1 - NSSuperScript in NSAttributedString not working as expected

谁说我不能喝 提交于 2019-12-08 06:56:33
问题 The application I am working on encountered an issue when testing with iOS 10.3 Simulator via XCode 8.3 beta 2, where the superscript in AttributedString displayed on the same line with normal text. For iOS 10.2.x and below, it is displaying correctly. iOS 10.3 screenshot: https://www.dropbox.com/s/p5v71g722cg5qhy/Screen%20Shot%202017-02-21%20at%2010.24.21%20AM.png?dl=0 iOS 10.2.x and below screenshot: https://www.dropbox.com/s/lcfsic6xyz953qp/Screen%20Shot%202017-02-21%20at%2010.19.17%20AM

Xcode 8: custom description in suggestion

非 Y 不嫁゛ 提交于 2019-12-07 16:07:19
问题 I'm trying to have custom description for my functions shown in the suggestions box which shows up as I type said function names, the same way it works for swift functions: e.g the UIActivityIndicatorView.startAnimating() description is shown both in the QuickHelp menu AND in the completion box in Xcode 7 I would just add a comment line with the /** */ tags prior to the function declaration and the ide would recognize it accordingly e.g. but for some reason doing so with Xcode 8 only shows

Unable to compile AWS CustomIdentityProvider on xcode 8 beta 6

喜欢而已 提交于 2019-12-07 06:31:57
问题 I am using Amazon Cognito and Facebook login in an ios app. Up until beta 5 this code from this SO thread worked: class CustomIdentityProvider: NSObject, AWSIdentityProviderManager { var tokens: [NSString: NSString]? init(tokens: [NSString: NSString]) { self.tokens = tokens } @objc func logins() -> AWSTask<NSDictionary> { return AWSTask(result: tokens) // Compile error in beta 6 } } In beta 6 I get this compile error: Cannot convert value of type '[NSString:NSString]?' to expected argument

HealthKit - requestAuthorization(toShare:read:completion:) always succeeds

China☆狼群 提交于 2019-12-06 02:49:43
问题 I'm using Xcode 8 beta 6 and I'm requesting access to the Health App. The method requestAuthorization(toShare:read:completion:) which asks for authorization always produces a true when the completion handler returns - success in my code below. Even when I decline everything in the simulator i get a true . Here is my code which handles the authorization. Is something in my code wrong or is this a Xcode bug? import Foundation import HealthKit class HealthManager { private let healthStore =

Xcode 8: custom description in suggestion

雨燕双飞 提交于 2019-12-05 23:00:55
I'm trying to have custom description for my functions shown in the suggestions box which shows up as I type said function names, the same way it works for swift functions: e.g the UIActivityIndicatorView.startAnimating() description is shown both in the QuickHelp menu AND in the completion box in Xcode 7 I would just add a comment line with the /** */ tags prior to the function declaration and the ide would recognize it accordingly e.g. but for some reason doing so with Xcode 8 only shows the custom description within the QuickHelp tab of the Utilities menu, and not in the suggestion box. Is

Unable to compile AWS CustomIdentityProvider on xcode 8 beta 6

。_饼干妹妹 提交于 2019-12-05 11:24:25
I am using Amazon Cognito and Facebook login in an ios app. Up until beta 5 this code from this SO thread worked: class CustomIdentityProvider: NSObject, AWSIdentityProviderManager { var tokens: [NSString: NSString]? init(tokens: [NSString: NSString]) { self.tokens = tokens } @objc func logins() -> AWSTask<NSDictionary> { return AWSTask(result: tokens) // Compile error in beta 6 } } In beta 6 I get this compile error: Cannot convert value of type '[NSString:NSString]?' to expected argument type '_?' When I change the line to return AWSTask(result: tokens! as [AnyObject: AnyObject]) I get the

Unrecognized selector UIDeviceRGBColor countByEnumeratingWithState:objects:count:

孤人 提交于 2019-12-04 23:40:52
I know this is kind of a dupe, but I don't have enough reputation yet to comment on the original post and, while I don't have an answer, I do have more useful information (a concrete example). Moderators, feel free to move this to the proper location. When compiling my code using the latest XCode 8 beta 6 (iOS 10 SDK), I get an exception "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDeviceRGBColor countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x600000071340'" This happens during the call: auto viewController = [[

Swift3 : how to handle precedencegroup now operator should be declare with a body?

£可爱£侵袭症+ 提交于 2019-12-03 09:38:47
Former Swift 3 code for operator was: infix operator × {associativity left precedence 150} But now, as per Xcode 8 beta 6, this generate the following warning: "operator should not be declared with body" What's the right way to use precedencegroup predicate as no doc exists right now? I have tried this, but does not work: infix operator × : times precedencegroup times { associativity: left precedence: 150 } As per SE-0077 , the precedence of an operator is no longer determined by a magic number – instead you now use the higherThan and (if the group resides in another module) lowerThan

application(_:didFinishLaunchingWithOptions:)' nearly matches optional requirement

半腔热情 提交于 2019-12-03 06:40:36
问题 After installing Xcode 8 beta 6, I'm getting a warning saying: Instance method 'application(_:didFinishLaunchingWithOptions:)' nearly matches optional requirement 'application(_:didFinishLaunchingWithOptions:)' of protocol 'UIApplicationDelegate' in my App Delegate. There are 2 suggested fixits to silence the warning: Mark the method as private Add @nonobjc to the method Doing either silences the warning. But why does this need to be done? 回答1: iOS 12 SDK Update In the iOS 12 SDK (that ships