Post

Replies

Boosts

Views

Activity

Reply to Ad hoc App Distribution no Wifi connection?
Your app's network connectivity should not be affected by the distribution method. What platform does your app use? iOS? macOS? tvOS? watchOS? my error handling always tells me that I have no internet connection The first question is, does your app really have no internet connection, or is there an issue with your error handling code? If you could share your error handling code, and the details of how you are using the network connection, forum users may be able to help you.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’21
Reply to MapKit remove street names
When configuring an MKMapView, we have: showsBuildings showsCompass showsZoomControls showsScale showsTraffic showsPointsOfInterest showsPitchControl But no showsStreets (or equivalent). So no, it is not possible to remove the street names. You might try using an MKMapType of .mutedStandard "A street map where your data is emphasized over the underlying map details"
Oct ’21
Reply to Ad hoc App Distribution no Wifi connection?
Have you considered monitoring your network connectivity using NWPathMonitor? For example, to monitor WiFi and Cellular: var monitorWiFi = NWPathMonitor(requiredInterfaceType: .wifi) var monitorCellular = NWPathMonitor(requiredInterfaceType: .cellular) var isInternetAvailableOnWiFi: Bool = false var isInternetAvailableOnCellular: Bool = false Then... /// **startPathMonitors** /// Monitor the WiFi and Cellular connections /// Note: NWPathMonitor checks for connection to wider network /// func startPathMonitors() { /// WiFi monitorWiFi.pathUpdateHandler = { path in /// This closure is called every time the connection status changes DispatchQueue.main.async { switch path.status { case .satisfied: print("PathMonitor WiFi satisfied, interface: \(path.availableInterfaces) gateways: \(path.gateways)") default: print("PathMonitor WiFi not satisfied: \(path.unsatisfiedReason)") } self.isInternetAvailableOnWiFi = (path.status == .satisfied) } } monitorWiFi.start(queue: DispatchQueue(label: "monitorWiFi")) /// Cellular monitorCellular.pathUpdateHandler = { path in /// This closure is called every time the connection status changes DispatchQueue.main.async { print("PathMonitor Cellular: \(path.status)") self.isInternetAvailableOnCellular = (path.status == .satisfied) } } monitorCellular.start(queue: DispatchQueue(label: "monitorCellular")) }
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’21
Reply to CLGeocoder Segmentation fault: 11 swiftUI
Oh... you mean you get the error when you build the app... it would have been worth pointing that out! My first thought is that you are using a lot of force-unwrapping (!), and it would be better to avoid that. Try: if let pm = placemarks?.first { self.parent.userLocation = (pm.subThoroughfare ?? "") + (pm.thoroughfare ?? "") + (pm.locality ?? "") }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21