xcode8-beta4

Xcode 8 beta 4: Calendar.Unit vs Calendar.Component

瘦欲@ 提交于 2019-12-18 11:19:46
问题 This Swift 3 code worked until XCode 8 beta 3: let calendar = Calendar.current let anchorComponents = calendar.components([Calendar.Unit.day, Calendar.Unit.month, Calendar.Unit.year, Calendar.Unit.hour], from: self) In Xcode 8 beta 4 Calendar.Unit appears to be renamed to Calendar.Component . Now this code let calendar = Calendar.current let anchorComponents = calendar.components([Calendar.Component.day, Calendar.Component.month, Calendar.Component.year, Calendar.Component.hour], from: self)

GIDSignIn keychain error iOS 10 Xcode 8

对着背影说爱祢 提交于 2019-12-06 17:33:36
问题 In iOS 10 and xcode 8 when I try to sign in to google services I get "keychain error" func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!){ if error != nil { print("\(error!.localizedDescription)") } } Offered and accepted solutions on SO are to run the app direct from simulator and not via Xcode. This I have tried and have had no success hence posting this question here in the hope someone has a more recent solution or experience. 回答1: The problem you

Xcode 8 beta 4: “Could not attach to pid : 1110” when running on physical device

和自甴很熟 提交于 2019-11-30 15:55:18
问题 I made a messages extension and when I run it on the iOS simulator everything runs no problem. When I try to run it on my phone, it compiles and says running for about 5 seconds before crashing and giving me a pop down message in Xcode saying Could not attach to pid Here is a screenshot: I am using Xcode 8 beta 4 with iOS 10. Everything runs fine in simulator this is on physical device. I have rebooted and restarted everything. I have even tried on two phones. Anyone know the solution? Thanks

Xcode 8 beta 4: “Could not attach to pid : 1110” when running on physical device

穿精又带淫゛_ 提交于 2019-11-30 15:37:19
I made a messages extension and when I run it on the iOS simulator everything runs no problem. When I try to run it on my phone, it compiles and says running for about 5 seconds before crashing and giving me a pop down message in Xcode saying Could not attach to pid Here is a screenshot: I am using Xcode 8 beta 4 with iOS 10. Everything runs fine in simulator this is on physical device. I have rebooted and restarted everything. I have even tried on two phones. Anyone know the solution? Thanks Okay this is a tough one. I went searching though the Xcode beta 4 release notes and found the answer

Array of implicitly unwrapped optionals iterates forever in Xcode 8 beta 4

与世无争的帅哥 提交于 2019-11-30 09:47:17
问题 My code (fragment below) causes the Simulator to Hang. What am I doing wrong? To reproduce the problem, cut and paste into the Simulator. class INK { var test = 1 } var array = [INK!](repeating: nil, count: 1) for idx in 0..<array.count { array[idx] = INK() } var idx2 = 0 for ink_item in array { idx2 += 1 print("idx2=\(idx2)") } 回答1: This is a known bug, see SR-1635. Since an IUO is no longer a distinct type, it shouldn't really be possible to have an array of them in the first place. This is

Xcode 8 beta 4: Calendar.Unit vs Calendar.Component

房东的猫 提交于 2019-11-30 02:59:00
This Swift 3 code worked until XCode 8 beta 3: let calendar = Calendar.current let anchorComponents = calendar.components([Calendar.Unit.day, Calendar.Unit.month, Calendar.Unit.year, Calendar.Unit.hour], from: self) In Xcode 8 beta 4 Calendar.Unit appears to be renamed to Calendar.Component . Now this code let calendar = Calendar.current let anchorComponents = calendar.components([Calendar.Component.day, Calendar.Component.month, Calendar.Component.year, Calendar.Component.hour], from: self) produces the compiler error cannot convert value of type Calendar.Component to NSCalendar.Unit Am I

Array of implicitly unwrapped optionals iterates forever in Xcode 8 beta 4

我是研究僧i 提交于 2019-11-29 16:49:29
My code (fragment below) causes the Simulator to Hang. What am I doing wrong? To reproduce the problem, cut and paste into the Simulator. class INK { var test = 1 } var array = [INK!](repeating: nil, count: 1) for idx in 0..<array.count { array[idx] = INK() } var idx2 = 0 for ink_item in array { idx2 += 1 print("idx2=\(idx2)") } Hamish This is a known bug, see SR-1635 . Since an IUO is no longer a distinct type , it shouldn't really be possible to have an array of them in the first place. This is confirmed by the fact that the following code fails to compile: // compiler error: Implicitly

Use of undeclared type 'AttributedString'

百般思念 提交于 2019-11-29 10:02:51
Xcode 8 beta 4 no longer recognizes Foundation class AttributedString . I've reproduced it in this simple playground example: //: Playground - noun: a place where people can play import Foundation let attrStr1 = NSAttributedString() let attrStr2 = AttributedString() // Use of undeclared type 'AttributedString' Since AttributedString was available in older Xcode 8 Swift 3 betas, I imagine this is a Foundation bug that needs to be fixed, rather than some source code error in Playground? Although undocumented in the Xcode release notes, a version 2 update to Swift evolution proposal SE-0086 Drop

preferredStatusBarStyle removed in Swift 3?

十年热恋 提交于 2019-11-28 08:52:10
so I recently just updated to Xcode 8 and I just got this error for the following code. The error is that the method doesn't override any method from it's superclasses. override func preferredStatusBarStyle() -> UIStatusBarStyle { return UIStatusBarStyle.lightContent } I would really appreciate help, thanks! In iOS 10, preferredStatusBarStyle is a property, not a method. So instead of overriding it with a func declaration as you've done, you override the getter with a var declaration: override var preferredStatusBarStyle: UIStatusBarStyle { return .lightContent } The Swift compiler's error

xcode8 list of simulators not showing

亡梦爱人 提交于 2019-11-27 19:57:51
I have been only recently working with Xcode 8 beta 4 but it has been working fine up until now. The list of simulators is not showing for any of my projects. I already tried Creating a new Scheme and it did not work. How do I fix this? Deleting derived data and restarting Xcode worked in my case. rm -rf ~/Library/Developer/Xcode/DerivedData/* Ensure your Deployment Target version in Build Settings is also set to the desired version (and that you have that version of the respective simulator installed). In the below example, if that were set to 10.3 and I didn't have an iOS 10.3 simulator