xcode9

Enable code-folding by default

ぐ巨炮叔叔 提交于 2019-11-29 21:15:38
Is there a way to tell XCode fold methods/functions by default when opening a file? Not sure if this is an OS change, or an Xcode change, but on Lion with Xcode 4 , some of these commands cited by Griffo are performed with the Option modifier (the ⌥ key), not control. I've made some changes to reflect this: Fold ⌥⌘← option+command+left Unfold ⌥⌘→ option+command+right Unfold All ⌥U option+U Fold Methods/Functions ⌥⌘↑ option+command+up Unfold Methods/Functions ⌥⌘↓ option+command+down Sorry to necro a thread, but I thought this was worthwhile to revise. If you want to fold / unfold specific

How do I toggle between Debug and Release builds in Xcode 6 / 7 / 8?

北战南征 提交于 2019-11-29 21:09:56
How do I get Xcode to build an OS X app in release mode? I can only seem to find instructions for earlier versions and none of the screenshots match. I didn't see anything when I put "release" into the help menu's search. skyline75489 In Xcode 6 - 10: Choose Product -> Scheme -> Edit Scheme . Change the Build Configuration under the Info tab. Shortcut: hold Alt ⌥ and click the run button ▶ . The easiest way with a project that has the default set up for schemes is just to do Product -> Build For -> Profiling. When you want to generate a release build, choose Product -> Archive. That is a

iOS Simulator crashes after boot with “available but has no defaultDisplay”

China☆狼群 提交于 2019-11-29 20:55:05
While running a project into the simulator, it crashes after booting: Crash: 'NSInternalInconsistencyException', reason: 'Device <redacted>, Booted) is available but has no defaultDisplay' I already cleaned the project files and changed the iOS image but it crashes anyway. Any clue? ricardopereira Close all simulators and just run sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService to restart the service. All simulators will launch as usual. 来源: https://stackoverflow.com/questions/51708445/ios-simulator-crashes-after-boot-with-available-but-has-no-defaultdisplay

CoreData: annotation: Failed to load optimized model at path with Xcode 9 GM

核能气质少年 提交于 2019-11-29 20:43:46
Failed to load OMO warning (potential crash): Project with xcode 9 following warning is observed in the console during debug/release builds (iOS 11 GM/beta & iOS 10): CoreData: annotation: Failed to load optimized model at path "/Users/xyz.abc/Library/Developer/CoreSimulator/Devices/A-GUID/data/Containers/Bundle/Application/B-GUID/app-name.app/Frameworks/framework-name/mystorename.momd/mystorename 6.omo" Any custom framework (e.g. GoogleMaps, etc) that uses CD also results in this warning and potential crashes. Update: Using Xcode Version 9.1 beta (9B46) doesn't result in this warning. Note:

Xcode 9 Autocomplete Not Working 100% - Partially Working

微笑、不失礼 提交于 2019-11-29 20:25:10
This morning, Xcode 9.0 (9A235) shows a new/strange Auto Complete box that is not at all what it used to be. How do I get the full auto-complete box so that autocomplete looks like how it usually does? Try: Go to Xcode > Preferences > Text Editing Under Code completion - Uncheck 'Suggest completions while typing' Quit out of Xcode and then relaunch Xcode. Go to Xcode > Preferences > Text Editing again Quit out of Xcode and then relaunch Xcode. Now go to Code completion and check 'Suggest completions while typing'. Try typing library function or enum and enjoy! Deleting the DERIVED DATA folder

Xcode 9 Bug: Cannot find cdtool

南笙酒味 提交于 2019-11-29 19:39:55
After installing Xcode 9 beta, Xcode 8 gives me an error when compiling a project: Cannot find cdtool at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/cdtool': Cannot find a simulator runtime for platform <DVTPlatform:0x7fd67af0a930:'com.apple.platform.iphonesimulator':<DVTFilePath:0x7fd67af0a7c0:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform'>> . I suspect Xcode 9 modified some shared state with Xcode 8 (set a path, overwrote a file, etc.). But I've tried deleting and both Xcodes to no avail. The

ios 11 navigation bar overlap status bar

℡╲_俬逩灬. 提交于 2019-11-29 19:35:23
问题 In ios 11 navigation bar is overlapping status bar. If any body faced the same issue kindly help. 回答1: Not sure if this is the same issue, but we ran into this as well when upgrading to iOS 11. See ios 11 custom navbar goes under status bar We were manually setting nav bar height to 64 and pinning to the superview edges. Conforming to the UINavigationBarDelegate protocol and implementing the UIBarPositioningDelegate delegate method solved it for us. We replaced navigationBar

Safe area layout guides in xib files - iOS 10

末鹿安然 提交于 2019-11-29 19:25:09
I started adapting my app for iPhone X and found an issue in Interface Builder. The safe area layout guides are supposed to be backwards compatible, according to official Apple videos. I found that it works just fine in storyboards. But in my XIB files, the safe area layout guides are not respected in iOS 10. They work fine for the new OS version, but the iOS 10 devices seem to simply assume the safe area distance as zero (ignoring the status bar size). Am I missing any required configuration? Is it an Xcode bug, and if so, any known workarounds? Here is a screenshot of the issue in a test

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

一个人想着一个人 提交于 2019-11-29 17:37:27
问题 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? 回答1: Those messages come from a function msgtracer_domain_new in /usr/lib/libDiagnosticMessagesClient.dylib . Run your application on

Custom Fonts Bug

陌路散爱 提交于 2019-11-29 15:01:13
TL;DR: Custom fonts couldn't be used programmatically before using them in a Storyboard/xib. Note: I've checked out this , tried the answers and they didn't work. I've also made sure that they're in target membership. I've noticed a strange bug while changing segment control title a custom font: segmentedControl.titleTextAttributes = NSDictionary(objects: [UIFont.init(name: "Comfortaa-Regular", size: UIFont.systemFontSize)!, UIColor.white], forKeys: [NSAttributedStringKey.font as NSCopying, NSAttributedStringKey.foregroundColor as NSCopying]) as? [AnyHashable : Any] It couldn't find the font,