xcode9

Memory profiling doesn't work with Xcode 9

南笙酒味 提交于 2019-12-01 16:20:50
I am using the latest version of Xcode 9 and macOS 10.13. When I try to make a memory graph from the current state of my application, it shows an empty screen that says No Selection . I also tried to profile and work with Instruments, but it did not allow me to run due to a permission error. Target failed to run. Permission to debug [app name] was denied. I am aware of these threads and tried the suggestions available in them, but they didn't seem to work : Reddit - Has instruments stopped working for you in Xcode 9 due to a permission denied error? Is there a workaround for this? Apple

Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]

99封情书 提交于 2019-12-01 15:15:15
问题 Xcode 9 seems to be reporting a lot of Main thread calls to UIApplication properties. Even though the UI is not being updated this is particularly cumbersome due to the extension of logs it produces a default environment. 4 TestApp 0x0000000101c262e0 __39-[ViewController viewDidLoad]_block_invoke + 196 5 libdispatch.dylib 0x0000000102279654 _dispatch_call_block_and_release + 24 6 libdispatch.dylib 0x0000000102279614 _dispatch_client_callout + 16 7 libdispatch.dylib 0x0000000102289008

Memory profiling doesn't work with Xcode 9

流过昼夜 提交于 2019-12-01 14:44:04
问题 I am using the latest version of Xcode 9 and macOS 10.13. When I try to make a memory graph from the current state of my application, it shows an empty screen that says No Selection . I also tried to profile and work with Instruments, but it did not allow me to run due to a permission error. Target failed to run. Permission to debug [app name] was denied. I am aware of these threads and tried the suggestions available in them, but they didn't seem to work : Reddit - Has instruments stopped

ReplayKit: startRecording() completion handler is never entered

旧巷老猫 提交于 2019-12-01 06:09:37
问题 Problem description The startRecording() completion handler is never entered, even though the "Allow screen recording in $AppName" pop-up was shown. The "Allow screen recording in $AppName" pop-up is shown occasionally. This happens also when I remove the app, restart the device and do a clean/build on the project. I'm using an iPad Air 2 with iOS 11 and Xcode 9. Research This problem seemed to be an issue in earlier versions as well, see here: replaykit startrecording sometimes never enters

Make UIColor Codable

怎甘沉沦 提交于 2019-12-01 04:43:13
struct Task: Codable { var content: String var deadline: Date var color: UIColor ... } There are warnings saying "Type 'Task' does not conform to protocol 'Decodable'" and "Type 'Task' does not conform to protocol 'Encodable'". I searched and found that this is because UIColor does not conform to Codable. But I have no idea how to fix that. So... How to make UIColor Codable? If you care only about the 4 color components this is a simple solution using a wrapper struct struct Color : Codable { var red : CGFloat = 0.0, green: CGFloat = 0.0, blue: CGFloat = 0.0, alpha: CGFloat = 0.0 var uiColor :

How can I show C++ code documentation in Xcode 9.3?

放肆的年华 提交于 2019-12-01 04:19:02
I´m developing software based on C++ in Xcode and want to have (at least) the same convenience for code documentation as if I was developing for Swift or objc. Example: std::string myString("hello"); if (myString.empty()) { // do something } If I want to know exactly what .empty() does, I would like to Option-Click on the function and get the documentation overlay with information from e.g. http://en.cppreference.com/w/cpp/string/basic_string/empty , exactly as it does for objc and Swift. How is this possible? Current output just looks like this: You cannot. According to Apple's Xcode release

How can I update swift from 3.1 to 3.2, but not to 4.0

只愿长相守 提交于 2019-12-01 03:16:31
I have checked the question related to how to find the current Swift version by the command swift --version , but how can I upgrade my Swift version from 3.1 to 3.2? (because the Xcode 9 only supports Swift 4.0 & Swift 3.2) To build successfully both in Xcode 8 & Xcode 9, it's better to upgrade Swift from 3.1 to 3.2. But how? My target was to make sure build successfully both in Xcode 8 & Xcode 9, So that publish with Xcode 8 would be OK, and try out the feature of Xcode 9 is OK too. So I will not upgrade code to swift 4.0 yet until Xcode 9.0 official edition is published. After my test, I can

How can I update swift from 3.1 to 3.2, but not to 4.0

寵の児 提交于 2019-12-01 00:22:47
问题 I have checked the question related to how to find the current Swift version by the command swift --version , but how can I upgrade my Swift version from 3.1 to 3.2? (because the Xcode 9 only supports Swift 4.0 & Swift 3.2) To build successfully both in Xcode 8 & Xcode 9, it's better to upgrade Swift from 3.1 to 3.2. But how? My target was to make sure build successfully both in Xcode 8 & Xcode 9, So that publish with Xcode 8 would be OK, and try out the feature of Xcode 9 is OK too. So I

Objective-C @available guard AND'ed with more conditions

可紊 提交于 2019-11-30 14:35:18
问题 Objective-C has an @available expression in XCode 9+ / LLVM 5+ that allows you to guard a block of code to at least a certain OS version so that it won't emit unguarded availability warnings if you use APIs that are only available on that OS version. The problem is that this availability guarding is that it only works if it's the sole expression in the condition of an if . If you use it in any other context, you get a warning: @available does not guard availability here; use if (@available)

What is the meaning of: “Search tree file's format version number (0) is not supported”?

ⅰ亾dé卋堺 提交于 2019-11-30 11:31:51
In macOS 10.13 High Sierra on Xcode 9 I get this log message: 2017-09-28 15:19:28.246511+0800 wr[5376:128702] MessageTracer: load_domain_whitelist_search_tree:73: Search tree file's format version number (0) is not supported 2017-09-28 15:19:28.246541+0800 wr[5376:128702] MessageTracer: Falling back to default whitelist What is the meaning of this message? Those messages come from a function msgtracer_domain_new in /usr/lib/libDiagnosticMessagesClient.dylib . Run your application on Xcode 9. Stop it. In the the Debug navigator, click on NSApplicationMain just above main Set a breakpoint at the