Post

Replies

Boosts

Views

Activity

Intent Handler not called
Hi, I have an intent in my app that does not allow background execution. When the user taps a notification, runs a shortcut, etc. I want it to open my app to perform the action. I have activated "Display Donations on Lock Screen" and when I tap the notification my app is opening, but the intent handler in AppDelegate is never called. Any ideas why? func application(_ application: UIApplication, handlerFor intent: INIntent) -> Any? {         switch intent {         case is OpenPassIntent:             return OpenPassIntentHandler()         default:             return nil         }  }
3
0
1.8k
Jul ’21
Updating coordinate of a annotation
I've been testing out the Map in SwiftUI, but there are some things I cannot figure out if it's possible or not. I have a lot of MapAnnotations in the map, which represent vehicles. I update it's coordinate to reflect the current location for the vehicle. However: When I update the coordinate for one vehicle, it seems like SwiftUI redraws all annotations and not only the one that has changed. The vehicle annotation does indeed update it's location when I change the coordinate, but I cannot find a way to animate it? Now it just jumps to the next location. I guess that's related to the point above. Any suggestion on how I could solve this? Or is the only way to use UIKit MapView?
0
0
789
Jun ’21
Force blurred NavigationBar?
Hi, Is it possible to control how the navigation bar appears in SwiftUI? When I present a view using NavigationLink, the entire navigation bar becomes transparent and making it hard to differentiate between the items in the navigation bar and the actual content below. I want the Navigation Bar to be blurred.         VStack {                          Map(coordinateRegion: $region, annotationItems: rekoRings.filter({ searchBar.text.isEmpty || $0.name.localizedStandardContains(searchBar.text) })) { ring in                 MapAnnotation(coordinate: CLLocationCoordinate2D(latitude: ring.latitude, longitude: ring.longitude),                               anchorPoint: CGPoint(x: 0.5, y: 0.5)) {                                          NavigationLink(                         destination: RekoRingDetailView(rekoRing: ring),                         label: {                             VStack {                                 Image(systemName: "smallcircle.fill.circle.fill")                                     .frame(width: 22, height: 22, alignment: .center)                                     .foregroundColor(.red)                                                                  if !disableInteraction {                                     Text(ring.name)                                         .font(.caption)                                         .foregroundColor(.primary)                                 }                             }                         })                 }             }             .edgesIgnoringSafeArea(.all)             .disabled(disableInteraction)         }         .add(searchBar)         .onAppear(perform: {             fetchRings()         })         .navigationTitle(Text("Delivery Locations"))     }
2
1
1.4k
Dec ’20
Back button disappears when I have items in the toolbar
Hi, When I navigate between views, sometimes the back button disappears after 1 sec. From what I can see, this happens when I have items in the toolbar. If I remove the toolbar, it works as it should. Are my code below wrong, or is this a bug with iOS 14? .toolbar {             ToolbarItem(placement: .primaryAction) {                                  HStack(spacing: 40) {                                          #if DEBUG && os(iOS)                     Button(action: {                         demodemo()                     }) {                         Label("Find artwork", systemImage: "scribble")                             .labelStyle(IconOnlyLabelStyle())                     }                     #endif                                          #if !os(watchOS) && !os(tvOS)                     if let providerUrl = provider.url, let url = URL(string: providerUrl) {                         Button(action: {                             openURL(url)                         }) {                             Label("View \(provider.name) in Safari", systemImage: "safari")                                 .labelStyle(IconOnlyLabelStyle())                         }                         .accessibility(label: Text("View \(provider.name) in Safari"))                     }                     #endif                 }             }         }
2
0
2.3k
Sep ’20
App on Apple Watch crashes when installed via TestFlight
Hi! I have a Apple Watch app that is bundled with my iOS app. However, when I install the app using TestFlight it crashes on launch. The app runs fine when launching directly from Xcode. Any tips on how to investigate the cause of this problem? I have exported the diagnosis log for the app, but that doesn't say me much: Exception Type: EXCCRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXCCORPSE_NOTIFY Termination Reason: Namespace WATCHKIT, Code 0x1 Triggered by Thread: 0 Thread 0 Crashed: 0	 libsystem_kernel.dylib				 0x1e3fe060 0x1e3d5000 + 168032 1	 libsystem_kernel.dylib				 0x1e40297c 0x1e3d5000 + 186748 2	 libsystem_kernel.dylib				 0x1e402918 0x1e3d5000 + 186648 3	 WatchKit											 0x33b49df4 0x33a8a000 + 785908 4	 WatchKit											 0x33b4af38 0x33a8a000 + 790328 5	 libdispatch.dylib						 0x1e22c658 0x1e229000 + 13912 6	 libdispatch.dylib						 0x1e22dcbc 0x1e229000 + 19644 7	 WatchKit											 0x33aa75f0 0x33a8a000 + 120304 8	 WatchKit											 0x33aa7384 0x33a8a000 + 119684 9	 UIKitCore										 0x3f226e78 0x3e848000 + 10350200 10	UIKitCore										 0x3f22cc40 0x3e848000 + 10374208 11	UIKitCore										 0x3ea3b74c 0x3e848000 + 2045772 12	UIKitCore										 0x3f228960 0x3e848000 + 10357088 13	UIKitCore										 0x3f228d9c 0x3e848000 + 10358172 14	UIKitCore										 0x3f22ea68 0x3e848000 + 10381928 15	WatchKit											 0x33aa6af8 0x33a8a000 + 117496 16	libdyld.dylib								 0x1e269de8 0x1e269000 + 3560 Thread 1: 0	 libsystem_pthread.dylib			 0x1e4835b4 0x1e479000 + 42420 Thread 2: 0	 libsystem_pthread.dylib			 0x1e4835b4 0x1e479000 + 42420 Thread 3: 0	 libsystem_pthread.dylib			 0x1e4835b4 0x1e479000 + 42420 Thread 4: 0	 libsystem_pthread.dylib			 0x1e4835b4 0x1e479000 + 42420 Thread 5 name:	com.apple.uikit.eventfetch-thread Thread 5: 0	 libsystem_kernel.dylib				 0x1e3db8a4 0x1e3d5000 + 26788 1	 libsystem_kernel.dylib				 0x1e3dad00 0x1e3d5000 + 23808 2	 CoreFoundation								 0x1e7f2a0c 0x1e75d000 + 612876 3	 CoreFoundation								 0x1e7ed414 0x1e75d000 + 590868 4	 CoreFoundation								 0x1e7ecb70 0x1e75d000 + 588656 5	 Foundation										 0x1f313fc0 0x1f30c000 + 32704 6	 Foundation										 0x1f313ea0 0x1f30c000 + 32416 7	 UIKitCore										 0x3f2c2074 0x3e848000 + 10985588 8	 Foundation										 0x1f4738a0 0x1f30c000 + 1472672 9	 libsystem_pthread.dylib			 0x1e47af04 0x1e479000 + 7940 10	libsystem_pthread.dylib			 0x1e4835c8 0x1e479000 + 42440 Thread 0 crashed with ARM Thread State (64-bit): 		x0: 0x0000000000000016	 x1: 0x0000000000000001	 x2: 0x0000000000000000	 x3: 0x0000000000000000 		x4: 0x000000001766dc29	 x5: 0x0000000000000002	 x6: 0x0000000000000000	 x7: 0x0000000000000000 		x8: 0x0000000000000020	 x9: 0x0000000089b10070	x10: 0x000000004bee7c00	x11: 0x0000000000000000 	 x12: 0x0000000000ff0007	x13: 0x000000001a321000	x14: 0x0000000000033fe8	x15: 0x0000000000000000 	 x16: 0x0000000000000209	x17: 0x0000000000000001	x18: 0x0000000000000000	x19: 0x0000000000000002 	 x20: 0x000000001766dc29	x21: 0x0000000000000000	x22: 0x0000000000000000	x23: 0x0000000000000001 	 x24: 0x0000000000000016	x25: 0x000000004d237ef0	x26: 0x0000000017670310	x27: 0x000000000000000c 	 x28: 0x000000004ef60000	 fp: 0x0000000004abf320	 lr: 0x000000001e40297c 		sp: 0x0000000004abf2e0	 pc: 0x000000001e3fe060 cpsr: 0x40000000 	 esr: 0x56000080	Address size fault
6
0
1.7k
Jul ’20
Scrolling in parent view does not work
I have a macOS app built with SwiftUI, that targets macOS 11. In this app I have a ScrollView that contains several other ScrollViews, but these are only scrollable horizontally. If I mouse over these views, I cannot scroll up/down in the parent view. Only If I move the mouse pointer away from these views, I can scroll. I want it like, if the user scrolls up/down in the horizontal ScrollViews, the scroll event should be passed to the parent view. Is there a way I can fix this?
2
0
794
Jun ’20
Test app in sandbox
Hello,How can I test my Catalyst app in Sandbox mode on macOS? When running the app from Xcode, it already has access to for example location without asking for permissions.If I archive the app and select distribution method "Developer ID" I get the following error message:"Profile doesn't include the com.apple.developer.nfc.readersession.formats and com.apple.developer.siri entitlements."I have tried deleting all of the profiles and let Xcode manage them, but still get the same error message - so I'm unable to export the app to other destinations than the App Store.
2
0
1.1k
Apr ’20
Resize SF Symbol in Mac Catalyst Toolbar
Is there a way to resize the symbols in a toolbar within a Mac Catalyst app? When I use SF Symbols in a UIBarButton item, it does not look correct - especially when comparing to Apple apps with the same icons. I have tried applying configurations to the image, without luck.let item = UIBarButtonItem(image: UIImage(systemName: "exclamationmark.bubble"), style: .plain, target: self, action: nil) let button = NSToolbarItem(itemIdentifier: itemIdentifier, barButtonItem: item) return button
2
0
1.5k
Apr ’20
Segmentation fault: 11 in Xcode 10 beta
Hello,I'm trying to build my app using Xcode 10 beta - but I get an error wich I don't get on the previous versions. Any idea of what it could be?While silgen emitConstructor SIL function "@$S14PROJECT25SBMonitoredVehicleJourneyV12directionRef04lineG017publishedLineName9monitored0L4Call15monitoringError24originAimedDepartureTime011destinationq7ArrivalS05delay08courseOfeG00pG00pK00tG00tK005routeG015vehicleLocation0Z4Mode0zG0AcA011SBDirectionG0OSg_SSSgAYSbAA0cM0VAA012SBMonitoringO0OSgA9yA17SBVehicleLocationVSgAA13SBVehicleModeOAYtcfC". for 'init(directionRef:lineRef:publishedLineName:monitored:monitoredCall:monitoringError:originAimedDepartureTime:destinationAimedArrivalTime:delay:courseOfJourneyRef:originRef:originName:destinationRef:destinationName:routeRef:vehicleLocation:vehicleMode:vehicleRef:)' at /Users/name/Developer/PROJECT/PROJECT/Models/SBMonitoredVehicleJourney.swift:11:8 error: Segmentation fault: 11struct SBMonitoredVehicleJourney: Equatable, Codable { let directionRef: SBDirectionRef? /// Identifies the Line. let lineRef: String? /// Name or Number by which the line is known to the public. let publishedLineName: String? /// Whether there is real-time information available for journey; if not present, not known. let monitored: Bool let monitoredCall: SBMonitoredCall let monitoringError: SBMonitoringError? let originAimedDepartureTime, destinationAimedArrivalTime, delay, courseOfJourneyRef: String? let originRef, originName, destinationRef, destinationName: String? /// Identifier of Route that Journey follows. let routeRef: String? let vehicleLocation: SBVehicleLocation? let vehicleMode: SBVehicleMode /// Reference to a vehicle let vehicleRef: String? lazy var departureStatus: SBDepartureStatus = { if delay != nil { let startDate = Date() let components = NSDateComponents.duration(from: delay!) let endDate = NSCalendar.current.date(byAdding: components as DateComponents, to: startDate) if let timeInterval = endDate?.timeIntervalSince(startDate) { switch timeInterval { case ...(-60): return .early case 0...120: return .ontime case 120...: return .delayed default: return .noreport } } } return .noreport }() enum CodingKeys: String, CodingKey { case courseOfJourneyRef = "CourseOfJourneyRef" case delay = "Delay" case destinationAimedArrivalTime = "DestinationAimedArrivalTime" case destinationName = "DestinationName" case destinationRef = "DestinationRef" case directionRef = "DirectionRef" case lineRef = "LineRef" case monitored = "Monitored" case monitoredCall = "MonitoredCall" case monitoringError = "MonitoringError" case originAimedDepartureTime = "OriginAimedDepartureTime" case originName = "OriginName" case originRef = "OriginRef" case publishedLineName = "PublishedLineName" case routeRef = "RouteRef" case vehicleLocation = "VehicleLocation" case vehicleMode = "VehicleMode" case vehicleRef = "VehicleRef" } }
18
0
20k
Jun ’18