xcode

Xcode 10 and super.tearDown

♀尐吖头ヾ 提交于 2021-01-27 05:45:05
问题 Since Xcode 10.1(maybe 10) when I create a Unit test file I don't have calls super.tearDown() and super.setUp() . I've not seen such changes in release notes. In documentation https://developer.apple.com/documentation/xctest/xctestcase/understanding_setup_and_teardown_for_test_methods are still here. So my question should I still write super.tearDown() and super.setUp()? class SomethingTests: XCTestCase { override func setUp() { // Put setup code here. This method is called before the

Debug System Pref Pane w/10.11 and System Integrity Protection

亡梦爱人 提交于 2021-01-27 05:17:21
问题 One of my projects is a System Preference Pane. With 10.11, Xcode's debugger can't debug it as I get a "can't attach to System Preferences because of System Integrity Protection". How can I debug my prefpane under 10.11, as I have done in every OS back to 10.3? 回答1: I ended up making a copy of System Preferences, called it "System Preferences (Signed)" and then signed it with my DeveloperID which replaces the old code signature and allows it to run normally without SIP getting in the way. 回答2

Debug System Pref Pane w/10.11 and System Integrity Protection

我只是一个虾纸丫 提交于 2021-01-27 05:15:32
问题 One of my projects is a System Preference Pane. With 10.11, Xcode's debugger can't debug it as I get a "can't attach to System Preferences because of System Integrity Protection". How can I debug my prefpane under 10.11, as I have done in every OS back to 10.3? 回答1: I ended up making a copy of System Preferences, called it "System Preferences (Signed)" and then signed it with my DeveloperID which replaces the old code signature and allows it to run normally without SIP getting in the way. 回答2

Debug System Pref Pane w/10.11 and System Integrity Protection

末鹿安然 提交于 2021-01-27 05:14:25
问题 One of my projects is a System Preference Pane. With 10.11, Xcode's debugger can't debug it as I get a "can't attach to System Preferences because of System Integrity Protection". How can I debug my prefpane under 10.11, as I have done in every OS back to 10.3? 回答1: I ended up making a copy of System Preferences, called it "System Preferences (Signed)" and then signed it with my DeveloperID which replaces the old code signature and allows it to run normally without SIP getting in the way. 回答2

ld: -bundle and -bitcode_bundle cannot be used together

空扰寡人 提交于 2021-01-27 04:51:32
问题 i'm building llvm/clang 3.7 with bitcode support ( -fembed-bitcode ). Some modules can't be linked due to error: ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together clang: error: linker command failed with exit code 1 (use -v to see invocation) Full error output: Linking CXX shared module ../../lib/BugpointPasses.dylib cd /Volumes/Transcend/dev/src/llvm_37_ios_any_build/tools/bugpoint-passes && /usr/local/Cellar/cmake/2.8.12.2/bin/cmake -E cmake_link

ld: -bundle and -bitcode_bundle cannot be used together

北城余情 提交于 2021-01-27 04:51:28
问题 i'm building llvm/clang 3.7 with bitcode support ( -fembed-bitcode ). Some modules can't be linked due to error: ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together clang: error: linker command failed with exit code 1 (use -v to see invocation) Full error output: Linking CXX shared module ../../lib/BugpointPasses.dylib cd /Volumes/Transcend/dev/src/llvm_37_ios_any_build/tools/bugpoint-passes && /usr/local/Cellar/cmake/2.8.12.2/bin/cmake -E cmake_link

How to hide shadows in UITableViewCell when cell is dragging

我的梦境 提交于 2021-01-27 04:41:23
问题 I have UITableView with hided separator line, and when I dragging cell, shadows appears some kind as borders comes out on up and down. How to hide this? Please see example: Great thanks! 回答1: So, I have answer, just subclass of UITableView with method: - (void) didAddSubview:(UIView *)subview { [super didAddSubview:subview]; if([subview.class.description isEqualToString:@"UIShadowView"]) { subview.hidden = YES; } } 回答2: NoShadowTableView.m #import "NoShadowTableView.h" @interface

How to hide shadows in UITableViewCell when cell is dragging

一笑奈何 提交于 2021-01-27 04:41:01
问题 I have UITableView with hided separator line, and when I dragging cell, shadows appears some kind as borders comes out on up and down. How to hide this? Please see example: Great thanks! 回答1: So, I have answer, just subclass of UITableView with method: - (void) didAddSubview:(UIView *)subview { [super didAddSubview:subview]; if([subview.class.description isEqualToString:@"UIShadowView"]) { subview.hidden = YES; } } 回答2: NoShadowTableView.m #import "NoShadowTableView.h" @interface

preferredContentSize does not shrink

时光怂恿深爱的人放手 提交于 2021-01-27 04:21:30
问题 I use UIPopoverController to popover a window. I use preferredContentSize to set the size. Then, I use Push a new view controller with larger size. When the child view pop up, I like to recover the window to original size. But seems not work. I already put the self.preferredContentSize = myWindowSize; But it seems can not recover. In iOS6 or before, I set the contentSizeForViewInPopover to CGSizeZero, then set the proper size. But on iOS7, it will make the popup disappear. 回答1: This solved it

Xcode 11.3 - Unable to run on device

你说的曾经没有我的故事 提交于 2021-01-27 04:14:30
问题 I've been working on an app within Xcode that runs fine on the simulator. I wanted to try it on my device. However, I've been encountering a frustratingly vague issue every time I try to install/run it on my device. The installation fails and the message I get includes: Unable to install "AppName" Domain: com.apple.dtdevicekit Code: -402620415 -- App installation failed Domain: com.apple.dtdevicekit Code: -402620415 Failure Reason: An unknown error has occurred. The target deployment is set