xcode

Team City CI with Xcode workspace - Scheme “My Scheme” is not configured for running

旧时模样 提交于 2021-02-18 20:49:47
问题 I have a workspace with few projects that must be built as static libraries and I have schemes with tests for them. I want to configure TeamCity to build and test each of those libraries, but it does not work with following error: ... /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace code/MyApplication/My Framework.xcworkspace -scheme One Of Tests TEST_AFTER_BUILD=YES clean build -configuration Debug -sdk iphonesimulator6.1 in directory: /Users/Me/TeamCity/buildAgent

What causes “unrecognized selector sent to class” error on Xamarin Forms build?

夙愿已清 提交于 2021-02-18 20:48:05
问题 A few things about my system first: Mac OS version 10.13.6 Xcode version 10 Visual Studio for mac 7.6.6 I'm completely new to Xamarin forms and want to play around and learn. All I'm trying to do is simply create a new xamarin forms solution and get it to build. Here are the steps I went through: create new project choose "blank forms app" in C# from the app submenu of multplatform target platforms both Andriod and iOs; shared code .NET Standard don't bother with version control or app centre

Cant change navigation bar height ios 11

微笑、不失礼 提交于 2021-02-18 19:12:27
问题 I cant change navigation bar frame in ios 11. Here is sample of my code for ios 10: if let navigationBar = self.navigationController?.navigationBar { let frame = CGRect(x: navigationBar.frame.origin.x, y: navigationBar.frame.origin.y, width: navigationBar.frame.width, height: navigationBar.frame.height + 100) navigationBar.frame = frame } ios 10 and ios 11 screenshots respectively 回答1: Changing the height of the UINavigationBar is no longer directly supported in iOS 11 (see here, here & here)

SwiftUI - is it possible to get didSet to fire when changing a @Published struct?

人走茶凉 提交于 2021-02-18 11:23:05
问题 I have just updated to XCode 11.4 and some of my code has stopped working. I have some @Published struct variables in an ObservableObject . Previously, when I updated properties on the struct, the didSet method would fire on the published property, but that's not the case anymore. Is it possible that this behaviour has changed by design in the latest update to Swift? Here's a trivial example: import SwiftUI struct PaddingRect { var left: CGFloat = 20 var right: CGFloat = 20 } final class

Merging branch into master in Xcode 11?

Deadly 提交于 2021-02-18 11:23:05
问题 I must be missing something very simple here. I never had a problem merging branches into master on earlier versions of Xcode, but I don't have the option on any projects while using Xcode 11. How should I merge into master? Thanks. 回答1: This is a frustrating Xcode 11 issue. As a workaround you can checkout master first and then merge the required branch into it. 来源: https://stackoverflow.com/questions/58606559/merging-branch-into-master-in-xcode-11

Code coverage in Xcode without tests (for manual run)

一世执手 提交于 2021-02-18 10:44:29
问题 Code Coverage is commonly used with tests in Xcode. I would like to use it for manually executed app. Can I do it, possibly with third-party tools? For example: I build and launch the app on device, perform some actions with it and then look at code coverage results. 回答1: Code coverage will record which parts of your code your test have run. But you could Build some UITests which would preform some actions as you said. UI can record UI tests to repeat the actions you perform on the simulator

Xcode won't let me upload my app

*爱你&永不变心* 提交于 2021-02-18 08:58:13
问题 I have an iOS app created with Cordova, and have just paid my $99 to apple to upload it to the App Store. I've created the app archive, but in the Organizer Upload to App Store… is grayed out, and I've got "Distribution requires enrollment in the Apple Developer Program." Here is my account in preferences, which I have tried removing and re-adding What am I missing? 回答1: I see you have two Team entries. I believe the issue might be because you have the "Personal Team" option selected under

Xcode console empty after attaching to process [duplicate]

别说谁变了你拦得住时间么 提交于 2021-02-18 08:50:36
问题 This question already has answers here : Xcode attach to process doesn't display NSLog (7 answers) Closed 5 years ago . I build an app to my iPhone, quit it, launch it again and then I succesfully Attach to Process in Xcode. Now I have a running Debug in the Log Navigator, but my console is just empty. Shouldn't I see all my usual console outputs there? 回答1: You can see the logs in Device logs. Open xcode Window-->Devices (Select device)-->Device logs.Click on 'up' arrow button to see the

Xcode 9 update Swift, purple warning

本小妞迷上赌 提交于 2021-02-18 07:46:28
问题 Not sure why after updating to Xcode 9 my project (originally created in Swift 3) is showing purple warnings: UITextField.text must be used from main thread only I'm only checking in If statement if text field is empty... attaching screenshot. 回答1: The login manager is running your closure on a thread other than the main thread and you can't use user interface elements off the main thread. Others have said that it's OK just to read UI properties on side threads and they are probably right,

How to write to Google Sheets in Swift

假如想象 提交于 2021-02-18 06:58:27
问题 I'm trying to write to a Google Sheets document by following this google api, but I'm not having much success. I'm not even sure I'm following the right api, because it says "Appscript" and looks like Swift. I've been able to read in data from the sheets using: private let scopes = [kGTLRAuthScopeSheetsSpreadsheets] private let service = GTLRSheetsService() override func viewDidLoad() { super.viewDidLoad() self.service.authorizer = GIDSignIn.sharedInstance().currentUser.authentication