xcode9-beta

How to quit or close single simulator from opened multiple simulator in Xcode 9?

╄→尐↘猪︶ㄣ 提交于 2019-12-02 14:59:00
I run multiple simulator and I need to close one of them. How can i do this? Because I tried to close it like we does in older version of Xcode but can't close. Select Simulator.. Go into File Menu -> Close window or press [Command + W ]. It will close the simulator which is on top . Go into Windows menu -> uncheck Show Device Bezels. Then you can close using red cross icon on simulator. There are two ways to close particular Simulator form Multiple simulators Long-press power button on the right-top of simulator , then slide to turn off power, a single simulator will be close. Go into File

Filtering dictionary in Swift 4 fails in Xcode, but succeeds in Playground

孤者浪人 提交于 2019-12-02 10:12:48
问题 In a Swift 4 Playground this code: let time = 1234 let description: String? = nil let keyed: [String : Any?] = [ "time": time, "description": description ] let filtered: [String : String] = keyed .filter{ _, value in value != nil } .mapValues { value in return String(describing: value!) } print(keyed) print(filtered) Produces this output: ["description": nil, "time": Optional(1234)] ["time": "1234"] Which is exactly what I want (only key-value pairs where the original value is not nil , with

iOS11 UIBarButtonItem action not get called

南楼画角 提交于 2019-12-01 04:09:08
I used Xcode9 Beta6 to build the project, the action was called correctly on iOS10 device, however it is not work on iOS11 device. In My project, there are some viewControllers have a UIToolBar on the top, and the toolBar contains some UIBarButtonItems. There is one this kind of viewController, whose UIBarButtonItem action is not called when I tap the UIBarButtonItem. I can see the tapping animation (the icon become dim first and back to normal after finger released) At the end of viewDidLoad , I print the info of toolbar.items to indicate that target action are set properly. Debug Output I

Xcode 9: Swift dependency analysis error

若如初见. 提交于 2019-12-01 03:42:36
I have an iOS-app written in obj-C and UI-tests for the app in Swift. I recently installed Xcode 9 beta 2 and wanted to compile the app. I get the following error: "Dependency Analysis Error > The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor." When I go to build settings there isn't any possibility to set a version for Swift language. Does this represent a bug? Furthermore the app itself doesn't use Swift, only the automated UI_tests. It tells that you need to specify

Hide large title when scrolling up

こ雲淡風輕ζ 提交于 2019-12-01 03:29:58
I have a normal view controller that is embedded in a navigation controller. In this view controller, I have a table view that is using the constraints of the safe area. (I don't use a table view controller) The navigation controller is set to prefer large titles and the mode is set to .always. In beta 2 this worked perfectly, So when I came in the title was large and when I scrolled down it became small (Like the normal one). But since beta 3 this doesn't work anymore. Anyone know how to turn this back on, or how to make it so when I scroll the table view it will become smaller. Like the

How can I use Realm with Swift 4?

不想你离开。 提交于 2019-12-01 03:22:42
I'm trying to run my current project in the new Xcode 9 beta, but when I do so it says Module compiled with Swift 3.1 cannot be imported in Swift 4.0 . How can I solve this problem? I'm not using cocoapods. Update : As of v2.10.1, released 2017-09-14, Realm's prebuilt binaries include frameworks built with Xcode 9 for Swift 3.2 and 4.0. It's no longer necessary to build them yourself. The information below remains relevant to anyone looking to use Realm with prerelease versions of Xcode in the future. If you're currently integrating Realm's prebuilt binaries, you'll need to switch to building

Overlapping accesses to 'urlComponents', but modification requires exclusive access

青春壹個敷衍的年華 提交于 2019-12-01 03:14:02
I am trying to use the Lyft API with iOS 11 and Swift 4, and am receiving an error on the second line, which is Overlapping accesses to 'urlComponents', but modification requires exclusive access; consider copying to a local variable. I am unsure what this means, and how I can get around it. Any help is appreciated, thanks! let queryItems = parameters .sorted { $0.0 < $1.0 } .flatMap { components(forKey: $0, value: $1) } var urlComponents = URLComponents(url: mutableURLRequest.url!, resolvingAgainstBaseURL: false) urlComponents?.queryItems = (urlComponents?.queryItems ?? []) + queryItems /

Xcode 9: Swift dependency analysis error

强颜欢笑 提交于 2019-12-01 00:25:56
问题 I have an iOS-app written in obj-C and UI-tests for the app in Swift. I recently installed Xcode 9 beta 2 and wanted to compile the app. I get the following error: "Dependency Analysis Error > The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor." When I go to build settings there isn't any possibility to set a version for Swift language. Does this represent a bug?

Vision Framework Barcode detection for iOS 11

假如想象 提交于 2019-11-30 15:14:02
问题 I've been implementing a test of the new Vision framework which Apple introduced in WWDC2017. I am specifically looking at the barcode detection - I've been able to get after scanning the image from Camera/Gallery that it's a barcode image or not. However, I can't see what the actual barcode value or the payload data when looking at the barcodeDescriptor. There appears to be nothing exposed on the https://developer.apple.com/documentation/coreimage/cibarcodedescriptor page to identify any of

Technique World tracking performance is being affected by resource constraints

不羁岁月 提交于 2019-11-30 13:01:38
问题 While running an ARKit session with world tracking enabled, the Xcode console shows log messages about (I presume: reduced) tracking performance , even though the AR Session is in Normal tracking state, I am using the device in a well-lit office room with plenty of "features" to detect, and The device moves only subtly. TLDR: I want to understand what can be causing them, what impact they have, and how to prevent them, or (re)act on them when they do occur— NB. not simply hide the error.