xcode8-beta6

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

a 夏天 提交于 2019-12-02 20:19:32
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? iOS 12 SDK Update In the iOS 12 SDK (that ships with Xcode 10), UIApplicationLaunchOptionsKey has now been renamed to the nested type UIApplication

Usage of withMemoryRebound with Apples Swift 3 beta 6

假装没事ソ 提交于 2019-12-01 03:55:09
I have the following Problem. I want to convert my old function (worked until Swift 3 beta 5): func binarytotype <T> (_ value: [UInt8], _: T.Type) -> T { return value.withUnsafeBufferPointer { return UnsafePointer<T>($0.baseAddress!).pointee } } To Swift 3 beta 6 Syntax. This function converts an array of UInt8 to another type, for example: let b: [UInt8] = [1,2,3,4,5,6,7,8] var number: Double = binarytotype(b, Double.self) But for now this does not work any more in beta 6 and I have to use withMemoryRebound but I really do not know, how to make it run. Can anybody help me? The reverse

How to declare exponent/power operator with new precedencegroup in Swift 3?

旧城冷巷雨未停 提交于 2019-12-01 03:35:29
There's been a change in Swift 3 for Xcode 8 beta 6 and now I'm not able to declare my operator for power as I did before: infix operator ^^ { } public func ^^ (radix: Double, power: Double) -> Double { return pow((radix), (power)) } I've read a bit about it and there's a new change been introduced in Xcode 8 beta 6 From this I'm guessing I have to declare a precedence group and use it for my operator like this: precedencegroup ExponentiativePrecedence {} infix operator ^^: ExponentiativePrecedence public func ^^ (radix: Double, power: Double) -> Double { return pow((radix), (power)) } Am I

Usage of withMemoryRebound with Apples Swift 3 beta 6

别说谁变了你拦得住时间么 提交于 2019-12-01 01:09:58
问题 I have the following Problem. I want to convert my old function (worked until Swift 3 beta 5): func binarytotype <T> (_ value: [UInt8], _: T.Type) -> T { return value.withUnsafeBufferPointer { return UnsafePointer<T>($0.baseAddress!).pointee } } To Swift 3 beta 6 Syntax. This function converts an array of UInt8 to another type, for example: let b: [UInt8] = [1,2,3,4,5,6,7,8] var number: Double = binarytotype(b, Double.self) But for now this does not work any more in beta 6 and I have to use

UIImagePickerController's cameraViewTransform is ignoring 'scaling' and 'translation' on iOS 10 beta

两盒软妹~` 提交于 2019-11-30 18:43:29
I have been using below code to scale my UIImagePickerController's live preview to fill the entire screen. This worked perfectly till now. Before few days, I installed iOS 10 beta 7 on an iPhone 5 and it doesn't scale anymore. I can see black patch at the bottom of UIImagePickerController's view. Seems like cameraViewTransform is ignoring the CGAffineTransformMakeScale and CGAffineTransformMakeTranslation calls. This is how I initiate my camera controller. I have set both "allowsEditing" and "showsCameraControls" to 'NO' in order to provide my own custom overlay view. objImagePickerController

“Cannot inherit from non-open class” swift

笑着哭i 提交于 2019-11-30 16:24:39
问题 As of Xcode 8 beta 6 I now get the compile error "Cannot inherit from non-open class (Class)" outside of its defining module" The class I was inheriting from was part of a separate Swift framework but my project compiled for Xcode 8 beta 5. What do I need to change to get my project to compile again? 回答1: Found the answer myself. In Swift 3 you can now mark a class as open instead of public this allows files outside of the module to subclass that class. Simply replace public in your module

UIImagePickerController's cameraViewTransform is ignoring 'scaling' and 'translation' on iOS 10 beta

旧时模样 提交于 2019-11-30 02:33:32
问题 I have been using below code to scale my UIImagePickerController's live preview to fill the entire screen. This worked perfectly till now. Before few days, I installed iOS 10 beta 7 on an iPhone 5 and it doesn't scale anymore. I can see black patch at the bottom of UIImagePickerController's view. Seems like cameraViewTransform is ignoring the CGAffineTransformMakeScale and CGAffineTransformMakeTranslation calls. This is how I initiate my camera controller. I have set both "allowsEditing" and

How do I install Xcode 9 without updating macOS?

我的未来我决定 提交于 2019-11-28 19:11:55
Does anyone have any idea to install Xcode 8 OR Xcode 9 without updating macOS? I want to update my Xcode 7.1 to Xcode 8 or Xcode 9 (or 9.1) Beta. But it is not allowing me to update directly on OS X Yosemite 10.10. And I don't want to update my OS to El Capitan now, so how can I install Xcode 8 on OS X Yosemite 10.10. Naup Xcode 8 will work on OS X 10.11 (El Capitan) but the apps you build with won't, because the only SDK available is macOS 10.12 SDK, i.e. macOS Sierra's. From release notes: Compatibility Xcode 8 requires a Mac running macOS Sierra 10.12 or OS X El Capitan 10.11.5 or later.

Swift 3 UnsafePointer($0) no longer compile in Xcode 8 beta 6

╄→尐↘猪︶ㄣ 提交于 2019-11-28 19:04:08
My code snipet as follows …: let defaultRouteReachability = withUnsafePointer(to: &zeroAddress) { SCNetworkReachabilityCreateWithAddress(nil, UnsafePointer($0)) } … does no longer compile with the following error which I don't understand: "'init' is unavailable: use 'withMemoryRebound(to:capacity:_)' to temporarily view memory as another layout-compatible type." What to do to fix it? From the Release Notes of Xcode 8 beta 6: An Unsafe[Mutable]RawPointer type has been introduced, replacing Unsafe[Mutable]Pointer<Void> . Conversion from UnsafePointer<T> to UnsafePointer<U> has been disallowed.

xcode 8 push notification capabilities and entitlements file setting

六眼飞鱼酱① 提交于 2019-11-28 15:57:08
when using xcode 8 doing the push notification setting, unlike xcode 7 , xcode 8 need developer turn on push notifications capabilities switch ( located at TARGETS -> AppName -> Capabilities as following pic ), then it will generate AppName.entitlements file as following //AppName.entitlements <key>aps-environment</key> <string>development</string> but for production version App, if we change the string to //AppName.entitlements <key>aps-environment</key> <string>production</string> then the Capabilities show a warning and it seems no matter which string value specified in aps-environment, we