xcode9

Reading from Keychain Xcode 9 simulators returns nothing

試著忘記壹切 提交于 2019-12-05 09:18:15
Since I'm using Xcode 9, all unit tests communicating with keychain are broken. It also happens with Xcode GM. As I traced, there is no OSStatus errors while reading and writing but reading from keychain returns nothing and causes failure for all unit tests using keychain. I've already faced something like this when Apple released Xcode 8 with iOS 10 simulator which keychain was not working and Apple fixed that in Xcode 8.2. Is anybody else facing this issue with iOS 11 simulator too? Any idea on this? Elyas Naranjee Sani Finally we found the problem. As @Gix said the problem is with unit

text field text in Xcode 9 storyboard off center (and clipping)

久未见 提交于 2019-12-05 08:49:20
Please try the following in Xcode 9 storyboard: drag a new text field somewhere in a ViewController set some placeholder text set border style to none (left dotted one) set a background color I always get the text off center and clipped like this: When I run the app it looks fine vertically centered as it should. Also when you increase the height the text eventually disappears altogether. Adding a left, top and right constraint helps because it makes the text field's height match the height of the text. The problem with this is the smaller tappable area of the text field. I couldn't find a

ARSessionConfiguration unresolved in Xcode 9 GM

早过忘川 提交于 2019-12-05 08:16:42
I have created an ARKit project using a beta version of Xcode 9, which I was able to run on my real device without issues. Yesterday, I upgraded to Xcode 9 GM, and without touching anything, Xcode shows multiple errors, saying it does not know ARSessionConfiguration i.e.: Use of undeclared type 'ARSessionConfiguration' and: Use of undeclared type 'ARWorldTrackingSessionConfiguration' ...for this code: let session = ARSession() var sessionConfig: ARSessionConfiguration = ARWorldTrackingSessionConfiguration() I have imported ARKit and am using the ARSCNViewDelegate in my ViewController. When

Xcode 9 iOS 10 / 11 Simulators - All Apps Crashing [duplicate]

别来无恙 提交于 2019-12-05 08:01:53
问题 This question already has an answer here : Xcode 9 iOS Simulator - Unable To Obtain Valid Process Handle (1 answer) Closed 2 years ago . I just installed Xcode 9 and tried running the iOS 11 and 10.3.1 simulators. Weirdly, ALL the stock apps in the simulator are crashing / force closing the moment I click on any of them, i.e. Safari, Photos, etc. I've tried it on iPhone X, iPhone 8/8+ and iPhone 6+ simulators with iOS 11 / 10.3.1, all with the same crashing result. If I try it on older iOS

“'NSOffState' is unavailable in Swift”

梦想的初衷 提交于 2019-12-05 05:24:49
I have an extension of NSView with a simple function called clearControllersInView() which takes all the controllers in the view and sets them to a default value (i.e. checkboxes to off, popups and combos to first menu item, textfields to empty string). I had no problems with this under Swift 3. I'm using the current beta of Xcode 9 and updating this extension to Swift 4. The problem is in the section handling checkboxes where I'm getting the error "'NSOffState' is unavailable in Swift" when trying to set the checkbox to NSOffState: if item is NSButton { let checkbox = item as? NSButton

How do I use Key-Value Coding in Swfit 4.0?

拜拜、爱过 提交于 2019-12-05 04:55:32
问题 I never used Swift4 before, and dont know how to use KVC in it. I try to create model with Dictionary, here the code: class Person : NSObject { var name: String = "" var age: Int = 0 init(dict: [String : Any]) { super.init() self.setValuesForKeys(dict) } } let dict: [String : Any] = ["name" : "Leon", "age" : 18] let p = Person(dict: dict) print(p.name, p.age) There I get two question: 1. Why dont I using AnyObject ? "Leon" and 18 was infer to String and Int , does it using in KVC? 2. @objc

'Invalid bitcode version (Producer: '902.0.39.2_0' Reader: '900.0.37_0')'

二次信任 提交于 2019-12-05 02:09:30
I'm using Xcode 9.0 . My pod file : pod 'Alamofire', '~> 4.3' pod 'SwiftyJSON' pod 'AlamofireSwiftyJSON' pod 'KSToastView', '0.5.7' pod 'SDWebImage', '~> 4.0' pod 'NVActivityIndicatorView' pod 'Firebase/Core' pod 'Firebase/Messaging' pod 'CarbonKit' pod 'SBPickerSelector' pod 'SwiftyStoreKit' pod 'Fabric' pod 'Crashlytics' pod 'SAMKeychain', '1.5.2' My error log: ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '902.0.39.2_0' Reader: '900.0.37_0')', using libLTO version 'LLVM version 9.0.0, (clang-900.0.37)' for architecture arm64 clang: error: linker

How to set up Xcode 9 for iphone 4 and iphone 4s development?

孤街醉人 提交于 2019-12-05 01:47:08
问题 At a loss here. I have to test an app on iphone 4 devices as well as newer ones. Can anyone advise me as to how to set Xcode 9 up to support ios 7 as a deployment target as well as up to the newer versions of ios? So that I can use iphone 4 simulator and later test on the iphone 4 device? 回答1: Can anyone advise me as to how to set Xcode 9 up to support ios 7 as a deployment target as well as up to the newer versions of ios? The advice is simple: You can't. (Okay, maybe you can, with some sort

Xcode 9 simulator remove frames

给你一囗甜甜゛ 提交于 2019-12-05 01:45:56
The new simulator comes with the frames that make it look more like a phone in Xcode 9 beta. Is there any way to remove this frames and make it look more like the simulator in Xcode 8? Yes there is and it was the first thing I removed. To remove the frames do the following: Click on the simulator Go to Window (top menu) Click on Show Device Bezels (which should have a checkmark on it) The simulator will now have the same look as the one in Xcode 8. 来源: https://stackoverflow.com/questions/44385390/xcode-9-simulator-remove-frames

Xcode 9 / iOS 11 “CALayer bounds contains NaN: [nan 0; nan 0]” when popping view controller with nested UINavigationController and UITabBarController

房东的猫 提交于 2019-12-04 21:18:36
问题 I am updating my application for Xcode 9, Swift 4, iOS 11 and the iPhone X. It seems to go relatively smooth all the way but whenever I hit the back button my application crashes. I can go forward 3-4 screens without any problem but the first back button crashes the application, always. It doesn't require the simulator to run as an iPhone X. It doesn't seem to dip into my code in the stack trace so this is in my opinion the redraw phase of the view controller I'm popping to but I'm not sure.