Discuss the latest Apple technologies announced at WWDC22.

Posts under WWDC22 tag

117 Posts

Post

Replies

Boosts

Views

Activity

Live Activities is not working with custom colours from Asset Catalog
When I try to use custom colours in Live Activities, the activity in the Lock Screen is not appear at all. In the code, I use an extension to conform Color to Codable, otherwise is not compile. public typealias TimeTrackingStatus = ContentState public struct ContentState: Codable, Hashable { var elapsedTime: Int var remainingTime: Int var meetingDuration: Double var mainColor: Color } } extension Color: Codable { // Full code in the link } And here is the Live Activity view: struct TimeTrackingWidgetView: View { let context: ActivityViewContext<MeetingTimerAttributes> var body: some View { VStack { Text("Total Time: \(Int(context.state.meetingDuration)) minutes") .padding(.top, 10) .bold() HStack { VStack(alignment: .leading) { Text("Minutes Elapsed") .font(.caption) Label("\(context.state.elapsedTime.secondsToMinutes())", systemImage: "hourglass.bottomhalf.fill") } Spacer() VStack(alignment: .trailing) { Text("Minutes Remaining") .font(.caption) Label("\(context.state.remainingTime.secondsToMinutes())", systemImage: "hourglass.tophalf.fill") .labelStyle(.titleAndIcon) } } .padding(.init(top: 5, leading: 15, bottom: 10, trailing: 15)) } .background(context.state.mainColor) <---- This line } } If I use .background(context.state.mainColor) the Live activity is not appear but if I use background(.red), for example, it works just fine. The color are sRGB created in the assets catalog, like this one: Any idea?
0
0
1.4k
Nov ’22
iCloud+ Custom Domain MX Record Verification Error
Hello everyone, I am having issues with setting up my custom email domain 'tuszy.com'. There seems to be an error regarding the MX record, but unfortunately I can't identify it by myself. It's been already 72h and the following alert is still popping up when triggering the verification. My current DNS settings according to the Apple instructions: Looking forward to solve that issue with you help. Thanks in advance. Regards Dennis
1
0
711
Nov ’22
NavigationSplitView sidebar Links not working after navigating back
Hi there, I'm struggling with the new NavigationSplitView. struct Team: Identifiable, Hashable {     let id = UUID()     var name: String     var players: [String] } struct SplitView3: View {     @State private var teams = [ Team(name: "Packers", players: ["Rodgers", "Alexander", "Dillon"]), Team(name: "Vikings", players: ["Ingram", "Cousins", "Berry"])     ]     @State private var selectedTeam: Team?     @State private var selectedPlayer: String?         var body: some View {             NavigationSplitView {                 List(teams, selection: $selectedTeam) { team in                     Text(team.name).tag(team).navigationTitle("Team")                 }.navigationBarHidden(true)                 .navigationSplitViewColumnWidth(250)             } content: {                 List(selectedTeam?.players ?? [], id: \.self, selection: $selectedPlayer) { player in                     Text(player).navigationTitle("Team Member")                 }             } detail: {                 Form{                     Text(selectedPlayer ?? "Choose a player.")                 }                 .navigationTitle("Player Detail").navigationBarTitleDisplayMode(.inline)             }             .navigationSplitViewStyle(.automatic)         } } When I run this in Simulator or Canvas I can navigate from Team (sidebar), trough Teammembers (content) to detail view and back to sidebar. But after I reach the sidebar again the links forward to content view don't work anymore. Did I miss something?
6
1
2.6k
Nov ’22
PushToTalk: Issues with beginning transmission
Hi, trying to implement a simple PushToTalk app but I cannot seem to begin transmitting. When I start a transmission programmatically in my app in the foreground: self.channelManager.requestBeginTransmitting(channelUUID: channelUUID) This throws an error: Error Domain=com.apple.pushtotalk.channel Code=1 "(null)" Which seems to map to the appNotForeground error? https://developer.apple.com/documentation/pushtotalk/ptchannelerror/code When I try transmitting from the background, nothing happens at all. Any thoughts?
6
0
3.2k
Nov ’22
iOS16 [MXMetricManager deliverMetricPayload:] Crash
We have use MetricKit API when app was launched. [[MXMetricManager sharedManager] addSubscriber:self]; the exception is here. Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Triggered by Thread: 27 Last Exception Backtrace: 0 CoreFoundation 0x18dbae248 __exceptionPreprocess + 164 (NSException.m:202) 1 libobjc.A.dylib 0x186fc3a68 objc_exception_throw + 60 (objc-exception.mm:356) 2 CoreFoundation 0x18dd19fec __NSFastEnumerationMutationHandler + 116 (NSEnumerator.m:130) 3 Foundation 0x18804d828 -[NSConcreteHashTable countByEnumeratingWithState:objects:count:] + 76 (NSHashTable.m:577) 4 MetricKit 0x1fddf8868 -[MXMetricManager deliverMetricPayload:] + 408 (MXMetricManager.m:336) 5 Foundation 0x1880b66c8 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 16 (NSXPCConnection.m:189) 6 Foundation 0x188686e34 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:reply:flags:] + 1644 (NSXPCConnection.m:705) 7 Foundation 0x188688608 message_handler_message + 88 (NSXPCConnection.m:826) 8 Foundation 0x188688074 message_handler + 152 (NSXPCConnection.m:797) 9 libxpc.dylib 0x1da21a18c _xpc_connection_call_event_handler + 152 (connection.c:834) 10 libxpc.dylib 0x1da21a5bc _xpc_connection_mach_event + 992 (connection.c:1445) 11 libdispatch.dylib 0x194ff609c _dispatch_client_callout4 + 20 (object.m:600) 12 libdispatch.dylib 0x195012830 _dispatch_mach_msg_invoke + 468 (mach.c:2462) 13 libdispatch.dylib 0x194ffd56c _dispatch_lane_serial_drain + 376 (inline_internal.h:0) 14 libdispatch.dylib 0x19501354c _dispatch_mach_invoke + 448 (mach.c:2784) 15 libdispatch.dylib 0x194ffd56c _dispatch_lane_serial_drain + 376 (inline_internal.h:0) 16 libdispatch.dylib 0x194ffe214 _dispatch_lane_invoke + 436 (queue.c:3940) 17 libdispatch.dylib 0x195008e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846) 18 libsystem_pthread.dylib 0x1da1c5df8 _pthread_wqthread + 288 (pthread.c:2618) 19 libsystem_pthread.dylib 0x1da1c5b98 start_wqthread + 8 how to fix this issues?
11
1
3.5k
Oct ’22
.onTapGesture doesn't work on Stepper, only on its text
The .onTapGesture below only gets called when I tap on the text "Min. amount: $0.01", but when I tap the + or - it doesn't. How can I get it to work on the + or - as well? I tried setting a frame below the Stepper with: .frame(maxWidth: .infinity, maxHeight: .infinity) or setting the foreground color but made no difference. Any idea? Its code: @ViewBuilder var minCoinAmount: some View { // Min coin amount Stepper(value: $smallBalanceLimitDefinedByUser, in: range, step: step) { // Separated in two texts so it can be localized properly HStack { Text("Min. amount:") Text(utils.formatDoubleTo2DigitsString(amount: smallBalanceLimitDefinedByUser)) } } } and I'm calling it with: minCoinAmount .disabled(true) .onTapGesture { // Presents the Premium page store.premiumIsPresented.toggle() } Note: On iOS 15 I had it working with: .contentShape(Rectangle()) // << here !! .onTapGesture { But that trick no longer works, what's the right way now?
0
0
1.1k
Oct ’22
SwiftUI 4: Set list background color
In SwiftUI 3 we used the following code snippet to set the background color of a list. struct ContentView: View {     var body: some View {         List {             Text("Hello World!")         }         .onAppear { // Placed here for sample purposes, normally set globally             UITableView.appearance().backgroundColor = .clear         }         .listStyle(.insetGrouped)         .background(Color.red)     } } This is not working anymore in SwiftUI 4 (FB10225556) as the List is not based on UITableView anymore. Any workaround ideas?
8
1
11k
Sep ’22
UIFindInteraction UI is not usable when Stage Manager is enabled
I have a problem with presenting the new find panel in an iPad app when Stage Manager is enabled. This happens both on device as well as in Simulator. The problem is that UIFindInteraction’s find panel only flicks (appears and disappears in a fraction of second) and thus is not usable for actually searching anything. Presumably, this is a UIKit bug. Has anyone found a way around it? I'm attaching a link to a demo project that does nothing special: setting isFindInteractionEnabled = true on a UITextView preseting the find panel via textView.findInteraction?.presentFindNavigator(showingReplace: false) https://github.com/tomaskraina/feedbackassistant.apple.com/tree/master/UIFindInteraction-StageManager-UIKit
5
0
1.6k
Sep ’22
How is one supposed to create a Background Assets extension? There's no extension type for this existing in Xcode beta 5
I want to use features described in the background assets WWDC22 session, however with Xcode 14 Beta 5 there is no application extension of this type. There was an application extension type with beta 4, but there are two problems with this firstly Testflight doesn't recognize it so its impossible to upload and therefore use (because some of the features are documented as only working when the app is installed from Testflight/App Store). secondly, if one creates an extension using Xcode beta 4, then it complies with beta 4, but it won't compile with beta 5. Therefore it is currently impossible to even begin to start working with the background assets extension framework.
3
0
1.1k
Sep ’22
Will Lock Screen Widgets be Configurable?
Will there be a user interface to configure lock screen widgets like home screen widgets? This seems to be implied as possible based on the stock apps, such as the Clock app lock screen widget saying "Add a clock for a city to check the time at that location." I could not figure out how to bring up the configuration GUI: long press various places has no effect.
5
1
2.1k
Sep ’22
XCode for iPad - ever going to happen?
Hi There I am aware that Xcode is not currently available for the iPad as yet; is there someone out there in the Apple community that has real knowledge of wether this is something that currently being looked at/developed by Apple? I do remember watching a WWDC once and heard this being mentioned by Apple that we will be able to create/code apps and publish to the App Store directly from the iPad Pro (may have been few years ago). Will this in fact become a reality?🤤 certainly this isn’t easy & will need to time to become a reality, I’m just hoping that is does in fact become a reality at some point- IT IS MUCH NEEDED!! Regards, Apple Fanatic, Justin James
1
0
1.5k
Aug ’22
Live Activities is not working with custom colours from Asset Catalog
When I try to use custom colours in Live Activities, the activity in the Lock Screen is not appear at all. In the code, I use an extension to conform Color to Codable, otherwise is not compile. public typealias TimeTrackingStatus = ContentState public struct ContentState: Codable, Hashable { var elapsedTime: Int var remainingTime: Int var meetingDuration: Double var mainColor: Color } } extension Color: Codable { // Full code in the link } And here is the Live Activity view: struct TimeTrackingWidgetView: View { let context: ActivityViewContext<MeetingTimerAttributes> var body: some View { VStack { Text("Total Time: \(Int(context.state.meetingDuration)) minutes") .padding(.top, 10) .bold() HStack { VStack(alignment: .leading) { Text("Minutes Elapsed") .font(.caption) Label("\(context.state.elapsedTime.secondsToMinutes())", systemImage: "hourglass.bottomhalf.fill") } Spacer() VStack(alignment: .trailing) { Text("Minutes Remaining") .font(.caption) Label("\(context.state.remainingTime.secondsToMinutes())", systemImage: "hourglass.tophalf.fill") .labelStyle(.titleAndIcon) } } .padding(.init(top: 5, leading: 15, bottom: 10, trailing: 15)) } .background(context.state.mainColor) <---- This line } } If I use .background(context.state.mainColor) the Live activity is not appear but if I use background(.red), for example, it works just fine. The color are sRGB created in the assets catalog, like this one: Any idea?
Replies
0
Boosts
0
Views
1.4k
Activity
Nov ’22
Xcode Cloud Security
I'm getting asked questions by our security team about Xcode Cloud. They want to do an audit before we let it have access to our locally hosted gitlab repo. Is there any kind of security white paper for this product that I can point them at? Web searches haven't turned anything up for me to show to them.
Replies
2
Boosts
1
Views
1.9k
Activity
Nov ’22
How to hide live activity from lock screen and only show dynamic island?
For example, Voice Memos and Timer both show up in dynamic island, but have different behaviors on lock screen: Timer shows up as a live activity, and Voice Memos shows up in dynamic island. How do I make my live activity show up in dynamic island on lock screen instead of as a live activity?
Replies
1
Boosts
3
Views
2.3k
Activity
Nov ’22
iCloud+ Custom Domain MX Record Verification Error
Hello everyone, I am having issues with setting up my custom email domain 'tuszy.com'. There seems to be an error regarding the MX record, but unfortunately I can't identify it by myself. It's been already 72h and the following alert is still popping up when triggering the verification. My current DNS settings according to the Apple instructions: Looking forward to solve that issue with you help. Thanks in advance. Regards Dennis
Replies
1
Boosts
0
Views
711
Activity
Nov ’22
NavigationSplitView sidebar Links not working after navigating back
Hi there, I'm struggling with the new NavigationSplitView. struct Team: Identifiable, Hashable {     let id = UUID()     var name: String     var players: [String] } struct SplitView3: View {     @State private var teams = [ Team(name: "Packers", players: ["Rodgers", "Alexander", "Dillon"]), Team(name: "Vikings", players: ["Ingram", "Cousins", "Berry"])     ]     @State private var selectedTeam: Team?     @State private var selectedPlayer: String?         var body: some View {             NavigationSplitView {                 List(teams, selection: $selectedTeam) { team in                     Text(team.name).tag(team).navigationTitle("Team")                 }.navigationBarHidden(true)                 .navigationSplitViewColumnWidth(250)             } content: {                 List(selectedTeam?.players ?? [], id: \.self, selection: $selectedPlayer) { player in                     Text(player).navigationTitle("Team Member")                 }             } detail: {                 Form{                     Text(selectedPlayer ?? "Choose a player.")                 }                 .navigationTitle("Player Detail").navigationBarTitleDisplayMode(.inline)             }             .navigationSplitViewStyle(.automatic)         } } When I run this in Simulator or Canvas I can navigate from Team (sidebar), trough Teammembers (content) to detail view and back to sidebar. But after I reach the sidebar again the links forward to content view don't work anymore. Did I miss something?
Replies
6
Boosts
1
Views
2.6k
Activity
Nov ’22
PushToTalk: Issues with beginning transmission
Hi, trying to implement a simple PushToTalk app but I cannot seem to begin transmitting. When I start a transmission programmatically in my app in the foreground: self.channelManager.requestBeginTransmitting(channelUUID: channelUUID) This throws an error: Error Domain=com.apple.pushtotalk.channel Code=1 "(null)" Which seems to map to the appNotForeground error? https://developer.apple.com/documentation/pushtotalk/ptchannelerror/code When I try transmitting from the background, nothing happens at all. Any thoughts?
Replies
6
Boosts
0
Views
3.2k
Activity
Nov ’22
Any xcode code samples for live activity on ios16?
I want to implement a live activity in Xcode, what documentation should I check?
Replies
4
Boosts
8
Views
3k
Activity
Nov ’22
Why Apple allow people share Passkeys?
I recently learned https://developer.apple.com/videos/play/wwdc2022/10092/?time=382 and don't understand why Apple thinks allowing share Passkeys would be a good feature. I feel this is a really bad practice that we allow them to share Passkeys. Is there possible the website could forbid them from sharing it?
Replies
0
Boosts
0
Views
1.2k
Activity
Oct ’22
iOS16 [MXMetricManager deliverMetricPayload:] Crash
We have use MetricKit API when app was launched. [[MXMetricManager sharedManager] addSubscriber:self]; the exception is here. Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Triggered by Thread: 27 Last Exception Backtrace: 0 CoreFoundation 0x18dbae248 __exceptionPreprocess + 164 (NSException.m:202) 1 libobjc.A.dylib 0x186fc3a68 objc_exception_throw + 60 (objc-exception.mm:356) 2 CoreFoundation 0x18dd19fec __NSFastEnumerationMutationHandler + 116 (NSEnumerator.m:130) 3 Foundation 0x18804d828 -[NSConcreteHashTable countByEnumeratingWithState:objects:count:] + 76 (NSHashTable.m:577) 4 MetricKit 0x1fddf8868 -[MXMetricManager deliverMetricPayload:] + 408 (MXMetricManager.m:336) 5 Foundation 0x1880b66c8 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 16 (NSXPCConnection.m:189) 6 Foundation 0x188686e34 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:reply:flags:] + 1644 (NSXPCConnection.m:705) 7 Foundation 0x188688608 message_handler_message + 88 (NSXPCConnection.m:826) 8 Foundation 0x188688074 message_handler + 152 (NSXPCConnection.m:797) 9 libxpc.dylib 0x1da21a18c _xpc_connection_call_event_handler + 152 (connection.c:834) 10 libxpc.dylib 0x1da21a5bc _xpc_connection_mach_event + 992 (connection.c:1445) 11 libdispatch.dylib 0x194ff609c _dispatch_client_callout4 + 20 (object.m:600) 12 libdispatch.dylib 0x195012830 _dispatch_mach_msg_invoke + 468 (mach.c:2462) 13 libdispatch.dylib 0x194ffd56c _dispatch_lane_serial_drain + 376 (inline_internal.h:0) 14 libdispatch.dylib 0x19501354c _dispatch_mach_invoke + 448 (mach.c:2784) 15 libdispatch.dylib 0x194ffd56c _dispatch_lane_serial_drain + 376 (inline_internal.h:0) 16 libdispatch.dylib 0x194ffe214 _dispatch_lane_invoke + 436 (queue.c:3940) 17 libdispatch.dylib 0x195008e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846) 18 libsystem_pthread.dylib 0x1da1c5df8 _pthread_wqthread + 288 (pthread.c:2618) 19 libsystem_pthread.dylib 0x1da1c5b98 start_wqthread + 8 how to fix this issues?
Replies
11
Boosts
1
Views
3.5k
Activity
Oct ’22
.onTapGesture doesn't work on Stepper, only on its text
The .onTapGesture below only gets called when I tap on the text "Min. amount: $0.01", but when I tap the + or - it doesn't. How can I get it to work on the + or - as well? I tried setting a frame below the Stepper with: .frame(maxWidth: .infinity, maxHeight: .infinity) or setting the foreground color but made no difference. Any idea? Its code: @ViewBuilder var minCoinAmount: some View { // Min coin amount Stepper(value: $smallBalanceLimitDefinedByUser, in: range, step: step) { // Separated in two texts so it can be localized properly HStack { Text("Min. amount:") Text(utils.formatDoubleTo2DigitsString(amount: smallBalanceLimitDefinedByUser)) } } } and I'm calling it with: minCoinAmount .disabled(true) .onTapGesture { // Presents the Premium page store.premiumIsPresented.toggle() } Note: On iOS 15 I had it working with: .contentShape(Rectangle()) // << here !! .onTapGesture { But that trick no longer works, what's the right way now?
Replies
0
Boosts
0
Views
1.1k
Activity
Oct ’22
SwiftUI 4: Set list background color
In SwiftUI 3 we used the following code snippet to set the background color of a list. struct ContentView: View {     var body: some View {         List {             Text("Hello World!")         }         .onAppear { // Placed here for sample purposes, normally set globally             UITableView.appearance().backgroundColor = .clear         }         .listStyle(.insetGrouped)         .background(Color.red)     } } This is not working anymore in SwiftUI 4 (FB10225556) as the List is not based on UITableView anymore. Any workaround ideas?
Replies
8
Boosts
1
Views
11k
Activity
Sep ’22
Customize menu : Using UIEditMenuInteraction in WKWebView (iOS 16)
I want to add custom menu when select text in WKWebView in iOS 16 with Xcode 14. How can I do it with UIEditMenuInteraction? Before I used canPerformAction + UIMenuController
Replies
2
Boosts
4
Views
1.5k
Activity
Sep ’22
ios 16 "Application circumvented Objective-C runtime dealloc"
When I run the program in Xcode beta4, I get an error with: "Application circumvented Objective-C runtime dealloc",How do I solve this problem
Replies
3
Boosts
2
Views
3.1k
Activity
Sep ’22
UIFindInteraction UI is not usable when Stage Manager is enabled
I have a problem with presenting the new find panel in an iPad app when Stage Manager is enabled. This happens both on device as well as in Simulator. The problem is that UIFindInteraction’s find panel only flicks (appears and disappears in a fraction of second) and thus is not usable for actually searching anything. Presumably, this is a UIKit bug. Has anyone found a way around it? I'm attaching a link to a demo project that does nothing special: setting isFindInteractionEnabled = true on a UITextView preseting the find panel via textView.findInteraction?.presentFindNavigator(showingReplace: false) https://github.com/tomaskraina/feedbackassistant.apple.com/tree/master/UIFindInteraction-StageManager-UIKit
Replies
5
Boosts
0
Views
1.6k
Activity
Sep ’22
How is one supposed to create a Background Assets extension? There's no extension type for this existing in Xcode beta 5
I want to use features described in the background assets WWDC22 session, however with Xcode 14 Beta 5 there is no application extension of this type. There was an application extension type with beta 4, but there are two problems with this firstly Testflight doesn't recognize it so its impossible to upload and therefore use (because some of the features are documented as only working when the app is installed from Testflight/App Store). secondly, if one creates an extension using Xcode beta 4, then it complies with beta 4, but it won't compile with beta 5. Therefore it is currently impossible to even begin to start working with the background assets extension framework.
Replies
3
Boosts
0
Views
1.1k
Activity
Sep ’22
Source code for Use Swift on AWS Lambda with Xcode
Does anyone know if the source code for the demo project shown in this video is available for download? https://developer.apple.com/videos/play/wwdc2020/10644/
Replies
1
Boosts
0
Views
803
Activity
Sep ’22
contentOverlayView doesn't work on iOS 16 Beta
Hello! We have figured out that contentOverlayView doesn't work as expected on iOS 16 Beta 8. It perfectly works on any iOS 15 version. Could you provide any docs/changelog or provide any info on what we should do to make it work again on iOS 16? Thanks a lot! Regards
Replies
1
Boosts
1
Views
844
Activity
Sep ’22
Will Lock Screen Widgets be Configurable?
Will there be a user interface to configure lock screen widgets like home screen widgets? This seems to be implied as possible based on the stock apps, such as the Clock app lock screen widget saying "Add a clock for a city to check the time at that location." I could not figure out how to bring up the configuration GUI: long press various places has no effect.
Replies
5
Boosts
1
Views
2.1k
Activity
Sep ’22
Apple Watch WidgetKit extension app group issue
Does Apple Watch WidgetKit extension, support app group for data sharing, as currently we get nil values for any stored data.
Replies
2
Boosts
1
Views
1.2k
Activity
Sep ’22
XCode for iPad - ever going to happen?
Hi There I am aware that Xcode is not currently available for the iPad as yet; is there someone out there in the Apple community that has real knowledge of wether this is something that currently being looked at/developed by Apple? I do remember watching a WWDC once and heard this being mentioned by Apple that we will be able to create/code apps and publish to the App Store directly from the iPad Pro (may have been few years ago). Will this in fact become a reality?🤤 certainly this isn’t easy & will need to time to become a reality, I’m just hoping that is does in fact become a reality at some point- IT IS MUCH NEEDED!! Regards, Apple Fanatic, Justin James
Replies
1
Boosts
0
Views
1.5k
Activity
Aug ’22