xcode9

Xcode 9 Swift Language Version (SWIFT_VERSION)

≯℡__Kan透↙ 提交于 2019-11-26 06:04:55
问题 I\'ve recently updated xcode to version 9. Before that in Xcode 8.x whenever I use to do pod update it shows me an update code to convert the code to Swift 3 and doing that solve the errors. But now it is giving me this 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. For this error I\'ve tried Build Settings > Swift Language Version and it was Swift 3.2 But as

How do you perform wireless debugging in Xcode 9 with iOS 11, Apple TV 4K, etc?

空扰寡人 提交于 2019-11-26 05:56:58
问题 Wireless debugging was recently added as a feature in Xcode 9, iOS 11, and tvOS 11. Apple TV 4K doesn\'t have a USB port, so it requires wireless debugging. How do you perform this wireless debugging in Xcode? 回答1: Set up a device for network debugging from help.apple.com NOTE: Mac system and iPhone/iPad should share same network to use wireless debugging. Debug your app running on an iOS or tvOS device over a WiFi or other network connection. Note: Network debugging requires Xcode 9.0 or

How to resize the iPhone/iPad Simulator?

核能气质少年 提交于 2019-11-26 04:39:50
问题 The iPad-simulator is really small (like one third the size of the real iPad screen) on my 23\" Full-HD screen (and also on the 15\" MacBook Pro ). Is there a way to resize it? I know it must maintain size and dpi-ratio to prevent sub-pixels, but I can hardly see anything withoout a magnifier. 回答1: ⌘ + 1 for 100% ⌘ + 2 for 75% ⌘ + 3 for 50% 回答2: It's more flexible with Xcode 9-Simulator.Just pick & drag any corner of simulator to resize it and set it according to your requirement. Look at

How to use swift 4 Codable in Core Data?

情到浓时终转凉″ 提交于 2019-11-26 03:27:49
问题 Codable seems a very exciting feature. But I wonder how we can use it in Core Data? In particular, is it possible to directly encode/decode a JSON from/to a NSManagedObject? I tried a very simple example: and defined Foo myself: import CoreData @objc(Foo) public class Foo: NSManagedObject, Codable {} But when using it like this: let json = \"\"\" { \"name\": \"foo\", \"bars\": [{ \"name\": \"bar1\", }], [{ \"name\": \"bar2\" }] } \"\"\".data(using: .utf8)! let decoder = JSONDecoder() let foo

Safe Area of Xcode 9

社会主义新天地 提交于 2019-11-26 00:17:35
问题 While exploring Xcode9 Beta Found Safe Area on Interface builders View hierarchy viewer. Got curious and tried to know about Safe Area on Apples documentation, in gist the doc says \"The the view area which directly interacts with Auto layout\" But it did not satisfy me, I want to know Practical use of this new thing. Do any one have some clue? Conclusion paragraph from Apple doc for Safe area. The UILayoutGuide class is designed to perform all the tasks previously performed by dummy views,

Seeing black bars at the top and bottom of the iPhone X Simulator

白昼怎懂夜的黑 提交于 2019-11-25 23:34:51
问题 Running my App in the iPhone X Simulator (GM Seed) I am noticing two strange effects: the App does not use the full screen space (top and bottom area is black) a strange white bar beneath the title bar Does anybody know what is happening here and how to resolve this? I can\'t find any new settings in Interface Builder. 回答1: When using launch images (instead of the much easier Launch screen file), you need to provide the properly sized launch image for each device size you wish to support.