xcode

How to make xcodebuild print compile errors and warnings to stderr?

与世无争的帅哥 提交于 2021-01-27 22:36:18
问题 Seems like xcodebuild prints everything to stdout. $ /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project test.xcodeproj build -target test -configuration Debug -jobs 3 2>err # xcodebuild stdout with bunch of warnings and errors $ cat err ** BUILD FAILED ** The following build commands failed: CompileC _build/test.build/Objects-normal/x86_64/test.o /Users/me/test/test.cpp normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure) That doesn't let my

Segmentation fault when converting to Swift 4

家住魔仙堡 提交于 2021-01-27 21:52:04
问题 I am in the process of updating a project to iOS 11/Swift 4. I have updated to Swift 3.2 and have a project that builds with one warning: "Conversion to Swift 4 available". So I click the warning and start the migration assistant with the option "Minimize Inference" when asked about Swift 4 @objc Inference. The build fails quite quickly with this message: Command failed due to signal: Segmentation fault: 11 Stack trace: 0 swift 0x000000010afabdba PrintStackTraceSignalHandler(void*) + 42 1

Why does a simple Swift arithmetic operation compile so slow?

ぐ巨炮叔叔 提交于 2021-01-27 21:38:54
问题 In an attempt to optimize the build time of my app I've added the following to my OTHER_SWIFT_FLAGS : OTHER_SWIFT_FLAGS = -Xfrontend -warn-long-expression-type-checking=75 -Xfrontend -warn-long-function-bodies=75 I got a warnings for this specific type checking being slow, and I cannot figure out if I can help the compiler in some way here. var delay: TimeInterval = TimeInterval(index) * 0.05 Any suggestions what can be done to speed up the compile time for such basic arithmetic operations up

rand() not giving random numbers depending on modulo in xcode

只谈情不闲聊 提交于 2021-01-27 20:24:40
问题 I have an array with 7 elements and I'm trying to get a random number between 0 - 6 so I can select an element in the array at random. #include <iostream> #include <cstdlib> #include <ctime> using namespace std; class Color{ public: Color(){ colors[0] = "red"; colors[1] = "orange"; colors[2] = "yellow"; colors[3] = "green"; colors[4] = "blue"; colors[5] = "indigo"; colors[6] = "violet"; } void printColors() { for (int i = 0; i<sizeof(colors)/sizeof(colors[0]); ++i) { cout << colors[i] << endl

react native ios build fails with error - 'EXUpdates/EXUpdatesAppController.h' file not found

為{幸葍}努か 提交于 2021-01-27 20:09:37
问题 react native ios build fails with error 'EXUpdates/EXUpdatesAppController.h' file not found file used in AppDelegate.h #import <Foundation/Foundation.h> #import <EXUpdates/EXUpdatesAppController.h> <--- here #import <React/RCTBridgeDelegate.h> #import <UIKit/UIKit.h> #import <UMCore/UMAppDelegateWrapper.h> @interface AppDelegate : UMAppDelegateWrapper <RCTBridgeDelegate, EXUpdatesAppControllerDelegate> @end Anyone solutions? 回答1: This error means that Xcode is unable to find the package that

Using a pod from inside a swift package

半腔热情 提交于 2021-01-27 19:35:08
问题 I'm making my app modularized using Swift Package Manager by separating various parts of the app into different layers (packages): Presentation, Business and Data to make it as clean as possible, and I link those manually created packages with the project in project settings -> Frameworks, Libraries and Embedded Content section. However, I'm still in need for Cocoa Pods in some parts of the project, for simplicity my pod file contains the following: target 'SampleApp' do use_frameworks! pod

Debugging Maya Plugin with Xcode

白昼怎懂夜的黑 提交于 2021-01-27 18:40:29
问题 I am trying to debug my Maya plugin that I build for Maya 2013 using Xcode 4.6.3 debugging features. I want to be able to set a breakpoint and trace through the plugin but I am not able to set Xcode up for Maya debugging. In the Edit Scheme section, I set the executable to Maya.app but that results in the following output in my Console window: Flags: -v prints the product version and cut number -batch for batch mode -prompt for interactive non-gui mode -proj [dir] look for files in the

How to get Rid of this error: not all code paths return a value?

血红的双手。 提交于 2021-01-27 17:01:34
问题 int search(string [][]mat, int n, string x){ //set indexes for top right element for(int i = 0; i<n; i++) { for(int j = n-1; j>=0; j--) { if ( mat[i][j] == x ) { Debug.Log(x +""+"Found at "+i +" "+j); // int[] n2 = new int[] {2, 4, 6, 8}; // int [] xyz = new int [] {i, j}; return i; } } }} How to get Rid of this error: not all code paths return a value? Error: * Assets/Scripts/Chess/Bishop.cs(237,22): error CS0161: `Bishop.search(string[][], int, string)': not all code paths return a value *

How do you set the accessibility label on an image that is drawn with Core Graphics?

廉价感情. 提交于 2021-01-27 15:03:24
问题 I am trying to write UIAutomation tests around some core graphics logic. Currently we are using core graphics to draw an image. I'm trying to set the accessibility label/identifier/value on the image so that I can verify its presence via a UIAutomation test, but no matter what I do I'm not getting the accessibility label/identifier/value on the DOM in my test. Here are the things I have tried: Setting directly on the image. UIImage *uiImage = [UIImage imageWithData:bfCaseStudy.image]; uiImage

Vapor 3 PostgreSQL CRUD without requests http

六眼飞鱼酱① 提交于 2021-01-27 14:48:24
问题 I am creating backend based on Vapor 3.1.10 using Xcode 11.2 and Swift 5.1, database is PostgreSQL 12. I have a question: how to interact with database (CRUD) without POST and GET requests. All tutorials show how to CRUD only based on Request through HTTPS. But what if my app needs to save something in database without interacting with network? Look at my code: import Vapor import FluentPostgreSQL final class Device: PostgreSQLModel { var id: Int? var isWorking: Bool var serial: Int init