Post

Replies

Boosts

Views

Activity

Reply to LiveActivity using colorScheme to adapt to dark mode in iOS 26 system does not work
Yes,I have same problem. Any one fix the problem? Here is my sample code: struct BroadcastLiveActivityGradientLayerView: View { @Environment(.colorScheme) var colorScheme private var localImageName: String { colorScheme == .light ? "icon_LiveActivity_broadcast_grid_light" : "icon_LiveActivity_broadcast_grid_dark" } private var baseBackgroundColor: Color { colorScheme == .dark ? .black : .white } var body: some View { ZStack(alignment: .topTrailing) { baseBackgroundColor let colors = LiveActivityColor.broadcastBackgroundColors(colorScheme) LinearGradient( stops: [ .init(color: colors.last ?? .clear, location: 0.0), .init(color: colors.first ?? .clear, location: 1.0) ], startPoint: UnitPoint(x: 0.81, y: 1.29), endPoint: UnitPoint(x: 1.29, y: 0.17) ) Image(localImageName) .resizable() .aspectRatio(contentMode: .fill) .frame(width: 179, height: 149) } } }
4d
Reply to Xcode 15 iOS 12 app crash
I have find a way to fix the bugs , see more in https://github.com/Alamofire/Alamofire/issues/3258 The way by jshier commented on Jul 21, 2020: Actually, it looks like adding the framework again doesn't add it to any targets, but the build still works. Adding it to the watch extension does break the build in general. You can manually work around the linking error by adding -framework CFNetwork to the "Other Linker Flags" setting on your extension target. As I relink the CFNetwork, app can run in iOS 12 device. But this is still a bug, can Xcode fix the bug?
Topic: App & System Services SubTopic: General Tags:
Mar ’24