xcode

Xcode 12: iOS 14 Widget all black in simulator. How to fix?

怎甘沉沦 提交于 2020-12-13 04:41:42
问题 I want to add some iOS 14 widgets to my existing iOS app. When testing the widget in simulator it frequently happen, that the widget is not displayed correctly but is all black. Both in the widget selection dialog and in the actual widget that is shown on the homescreen. Re-running the app does not solve the problem. In most cases the problem goes away when deleting the app and restarting the simulator. However, in some rare cases only deleting the simulator and adding a new one solved the

XCTest: running tests fails with Cycle inside X; building could produce unreliable results in project with CocoaPods and Carthage

こ雲淡風輕ζ 提交于 2020-12-13 03:39:56
问题 After upgrading my project to Xcode 12, the test suite stopped working. The tests target doesn't compile, fails with: Cycle inside <redacted>Tests; building could produce unreliable results. This usually can be resolved by moving the shell script phase '[CP] Embed Pods Frameworks' so that it runs before the build phase that depends on its outputs. Cycle details: → Target '<redacted>Tests' has copy command from '/Applications/Xcode12.app/Contents/Developer/Platforms/iPhoneSimulator.platform

XCTest: running tests fails with Cycle inside X; building could produce unreliable results in project with CocoaPods and Carthage

空扰寡人 提交于 2020-12-13 03:39:55
问题 After upgrading my project to Xcode 12, the test suite stopped working. The tests target doesn't compile, fails with: Cycle inside <redacted>Tests; building could produce unreliable results. This usually can be resolved by moving the shell script phase '[CP] Embed Pods Frameworks' so that it runs before the build phase that depends on its outputs. Cycle details: → Target '<redacted>Tests' has copy command from '/Applications/Xcode12.app/Contents/Developer/Platforms/iPhoneSimulator.platform

ITMS-90747: Basic sticker pack with no code, yet App Store Connect thinks there's 32bit code in there

北战南征 提交于 2020-12-13 03:15:54
问题 Received this error: ITMS-90863: Apple silicon Macs support issue - The app has LSApplicationLaunchProhibited set to true. This is not supported on Mac. ITMS-90747: Architecture incompatible with MinimumOSVersion. The app bundle specifies a MinimumOSVersion of '14.1' but contains a 32-bit architecture that is unsupported on iOS 12 and later. I have seen the first warning addressed elsewhere (with no answer yet) but I'm getting both errors, always together, and they feel like they might be

How to get XY value from ct in Philips Hue?

纵饮孤独 提交于 2020-12-13 03:13:49
问题 How to get XY value from ct. Ex: ct = 217, I want to get x="0.3127569", y= "0.32908". I'm able to convert XY value into ct value using this below code. float R1 = [hue[0] floatValue]; float S1 = [hue[1] floatValue]; float result = ((R1-0.332)/(S1-0.1858)); NSString *ctString = [NSString stringWithFormat:@"%f", ((-449*result*result*result)+(3525*result*result)-(6823.3*result)+(5520.33))]; float micro2 = (float) (1 / [ctString floatValue] * 1000000); NSString *ctValue = [NSString

How to get XY value from ct in Philips Hue?

妖精的绣舞 提交于 2020-12-13 03:11:17
问题 How to get XY value from ct. Ex: ct = 217, I want to get x="0.3127569", y= "0.32908". I'm able to convert XY value into ct value using this below code. float R1 = [hue[0] floatValue]; float S1 = [hue[1] floatValue]; float result = ((R1-0.332)/(S1-0.1858)); NSString *ctString = [NSString stringWithFormat:@"%f", ((-449*result*result*result)+(3525*result*result)-(6823.3*result)+(5520.33))]; float micro2 = (float) (1 / [ctString floatValue] * 1000000); NSString *ctValue = [NSString

Get alarm time set in Clock app from another app in objective c using IOS sdk

南笙酒味 提交于 2020-12-12 15:54:22
问题 How to get alarm time set in default Clock app available in iPhone programatically inside another iphone application. I have found someone say that CFPreferences api can be used but cannot find the exact way of using it to get alarm time from Clock app. Any help is much appreciated. 回答1: Looks like there's no straightforward solution to what you're looking for. Regarding CFPreferences API, you'll first need to know how the Clock app stores the alarm information, or even if it does use the

How to make a button draggable/movable with SwiftUI?

狂风中的少年 提交于 2020-12-12 15:52:12
问题 I am trying to make a Button Movable with SwiftUI. From what it looks like this should work. I have tried putting the Button with Text inside another ZStack and for a second it was working but as soon as I released the button, the dragging stopped and I couldn't drag anymore. I noticed that the tap was remaining in the center despite the button had moved. Also the dragging looked buggy. struct CircleButton: View { @State private var dragAmount = CGSize.zero var body: some View { ZStack {

Shortcut for switching between tabs in Xcode now?

老子叫甜甜 提交于 2020-12-12 05:41:18
问题 I need to set default behavior of the Xcode to switch between tabs. I check out this What is the way to quick-switch between tabs in Xcode 4 but this is seeems to me old answer and when i try to set new shortcuts it is being conflict. Still is the same or something changed after Xcode12 switching between tabs in Xcode 12 now. ? 回答1: Yeah you right , the answer you share the link should be updated. Actually default one is coming with two options : First one is most of developers prefers just

Shortcut for switching between tabs in Xcode now?

烂漫一生 提交于 2020-12-12 05:38:23
问题 I need to set default behavior of the Xcode to switch between tabs. I check out this What is the way to quick-switch between tabs in Xcode 4 but this is seeems to me old answer and when i try to set new shortcuts it is being conflict. Still is the same or something changed after Xcode12 switching between tabs in Xcode 12 now. ? 回答1: Yeah you right , the answer you share the link should be updated. Actually default one is coming with two options : First one is most of developers prefers just