xcode10

Writing to build directory info.plist using Xcode's “New Build System”

浪尽此生 提交于 2019-12-30 10:53:28
问题 Before using the "New Build System", we had a build phase script like this: infoplist="$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH" builddate=`date` /usr/libexec/PlistBuddy -c "Set :BuildDateString $builddate" "${infoplist}" The point of this way to write to the plist at runtime without dirtying the project and having to stash the changes. This still works well and perfectly when using the "Legacy Build System". On the "New Build System", this script does not work. The directory variables and writing

Writing to build directory info.plist using Xcode's “New Build System”

為{幸葍}努か 提交于 2019-12-30 10:53:28
问题 Before using the "New Build System", we had a build phase script like this: infoplist="$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH" builddate=`date` /usr/libexec/PlistBuddy -c "Set :BuildDateString $builddate" "${infoplist}" The point of this way to write to the plist at runtime without dirtying the project and having to stash the changes. This still works well and perfectly when using the "Legacy Build System". On the "New Build System", this script does not work. The directory variables and writing

Image suggestions are not working Xcode 10

假如想象 提交于 2019-12-30 04:17:28
问题 I am trying to set image to UIImageView . Its working well in older version. In Xcode 9.4.1 But in Xcode 10 When I am trying to type name of image, image suggestion is not showing. Even "Image Literal" is not working. Double clicking on above icon also not working. Is there any setting in Xcode preferences? How to enable image suggestion like before? 回答1: In Xcode 10 and Swift 4.2, only the code completion function (or auto-complete) of the Xcode IDE has been discontinued for the old way.

preferredStatusBarStyle var not working in iOS12?

时光毁灭记忆、已成空白 提交于 2019-12-28 13:51:47
问题 Adding application.statusBarStyle = .lightContent to my AppDelegate's didFinishLaunchingWithOptions method nor adding override var preferredStatusBarStyle: UIStatusBarStyle { return UIStatusBarStyle.lightContent } to the VC no longer works on iOS12/Xcode10 Any ideas? 回答1: If you choose a same status bar color for each View Controller: <key>UIViewControllerBasedStatusBarAppearance</key> <false/> Ad this to your Info.plist and set status bar color from Project -> Targets -> Status Bar Style by

preferredStatusBarStyle var not working in iOS12?

柔情痞子 提交于 2019-12-28 13:51:29
问题 Adding application.statusBarStyle = .lightContent to my AppDelegate's didFinishLaunchingWithOptions method nor adding override var preferredStatusBarStyle: UIStatusBarStyle { return UIStatusBarStyle.lightContent } to the VC no longer works on iOS12/Xcode10 Any ideas? 回答1: If you choose a same status bar color for each View Controller: <key>UIViewControllerBasedStatusBarAppearance</key> <false/> Ad this to your Info.plist and set status bar color from Project -> Targets -> Status Bar Style by

Xcode 9 and Xcode 10 giving different results, even with same swift version

安稳与你 提交于 2019-12-28 06:44:11
问题 I am running this code in both xcode 9.3 and xcode 10 beta 3 playground import Foundation public protocol EnumCollection: Hashable { static func cases() -> AnySequence<Self> } public extension EnumCollection { public static func cases() -> AnySequence<Self> { return AnySequence { () -> AnyIterator<Self> in var raw = 0 return AnyIterator { let current: Self = withUnsafePointer(to: &raw) { $0.withMemoryRebound(to: self, capacity: 1) { $0.pointee } } guard current.hashValue == raw else { return

Command CompileSwiftSources failed with a nonzero exit code Xcode 10 [duplicate]

前提是你 提交于 2019-12-28 04:14:34
问题 This question already has answers here : Xcode 10 build fails with 'Command CompileSwift failed with a nonzero exit code (14 answers) Closed 9 months ago . I read some same issue but their solutions did not work for me. My project works in Xcode 9.4, but when I come to Xcode 10 and recreate my project, I get this Error. My project must add /usr/include/libxml2 , and if I add this, I get a different Error redefinition of madule libxml2 . The log is: Add "-Xcc -I$(SDKROOT)/usr/include/libxml2"

Xcode 10 Migration Errors

五迷三道 提交于 2019-12-25 04:08:48
问题 I am getting build errors after migrating to Xcode 10 (Multiple commands produce...). How do I resolve them? Showing All Messages :-1: Multiple commands produce '/Users/deepaksharma/Library/Developer/Xcode/DerivedData/MyProject- ekrrzesacinkoeffhnglauydvxex/Build/Products/Debug-iphoneos/MyProject.app/tint.png': 1) Target 'MyProject' (project 'MyProject') has copy command from '/Users/deepaksharma/MyProject/MyProject/png/White Balance/tint.png' to '/Users/deepaksharma/Library/Developer/Xcode

Is it possible to have 2 view controllers from 2 different storyboards to be active on the screen simultaneously?

流过昼夜 提交于 2019-12-25 01:44:47
问题 I am trying to develop something on the lines of the Uber app. I have to keep the 2 view controllers in separate storyboards. I need to pull up a drawer like in Uber over a View controller which has a scnview. In simpler term and taking Uber as an example, I need a way to accomplish the same interaction where the mapViewController is in one storyboard and the drawer having the driver details to be in another storyboard. 回答1: You can implement this feature in many other ways as well, But

How can I remove or ignore arguments from the swift compiler

可紊 提交于 2019-12-25 00:05:42
问题 Im trying to use an older xcode toolchain (3.1) with my latest xcode version (10). Starting with a blank project and trying to build I get the following error. <unknown>:0: error: unknown argument: '-enable-batch-mode' <unknown>:0: error: unknown argument: '-enforce-exclusivity=checked' <unknown>:0: error: unknown argument: '-index-store-path' Command CompileSwiftSources failed with a nonzero exit code When I look at the compiler output I can clearly see these parameters being passed (cropped