Posts

Post not yet marked as solved
2 Replies
998 Views
I've just update Xcode to Version 13.0 (13A233) release candidate, but now I cannot select MacOS 12 as target, nor for MacCatalyst, it only shows up to 11.3. So all the latest SwiftUI for MacOS 12 is unavailable. ios-15 is present, but not MacCatalyst 12 or even 11.4. Is there a trick or something I have to do or download, to make macos 12 available as target, like it used to do in the beta? Alternatively, is there a way to download the previous beta version. By mistake I deleted mine.
Posted Last updated
.
Post not yet marked as solved
0 Replies
536 Views
On Macos Monterey, 12 beta7, I typed the character w in the search bar of Finder, and after a few seconds (while I was looking for the other characters to type in) it went into a locked mad spin forever. Took me a while to find a way to force quit Finder. This seems to be a real bug to me. Has anyone experienced this? Is there a quick way to force quit Finder, some magic key combinations?
Posted Last updated
.
Post not yet marked as solved
2 Replies
7.9k Views
I'm targeting iPad ios 14, with this test code: struct ContentView: View { 		 				@State var arr1: [String] = ["one", "two", "three"] 				@State var arr2: [String] = ["four", "five", "six"] 		 		var body: some View { 				List { 						Section(header: Text("first section")) { 								ForEach(arr1, id: \.self) { s in 										Text(s) 								} 						} 						Section(header: Text("second section")) { 								ForEach(arr2, id: \.self) { s in 										Text(s) 								} 						} 				} 		} 		} Is there a way to make the section headers display what I put in the Text, not change it to uppercase?
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.7k Views
Using xcode 12.3, target macOS 11.1. I have the following test code showing the ProgressView as black not red as expected. struct ContentView: View { 		var body: some View { 				HStack { 						Spacer() 						ProgressView().progressViewStyle(CircularProgressViewStyle(tint: .red)) 						Spacer() 				}.frame(width: 333, height: 333) 		} } Is there a way to make the ProgressView a given color? Is this another bug in SwiftUI?
Posted Last updated
.
Post not yet marked as solved
1 Replies
929 Views
I've just upgraded my iMac to macos 11.1 beta and noticed that the Universal Clipboard doesn't work anymore between my mac and ios 14.3 devices. Not working when I copy on mac and try to paste on my iPhone or iPad. It used to be so useful. I followed again the instructions at: https://support.apple.com/en-us/HT209460#:~:text=On%20your%20Mac%3A%20Choose%20Apple,Handoff%2C%20then%20turn%20on%20Handoff. Is there a way to bring this functionality back?
Posted Last updated
.
Post not yet marked as solved
0 Replies
769 Views
I'm developing an app to parse package.swift files. When I run the following test code with "App Sandbox=NO" all works well. But I get the dreaded "xcrun: error: cannot be used within an App Sandbox" when "App Sandbox=YES". Fair enough. So what I'm trying to do is to run "swift" inside my sandbox. To do this, I added the small "swift" command file into my Assets and in my project, and using that. However I still get the same error. How can I run "swift" in my sandbox? or is there another way to parse package.swift files with "App Sandbox=YES"? import SwiftUI import Foundation struct ContentView: View { 		var body: some View { 				Text("do the test").onAppear(perform: doTest) 		} 		 		func doTest() { 				if let swiftURL = Bundle.main.url(forResource: "swift", withExtension: nil) { 						let task = Process() 						task.executableURL = URL(fileURLWithPath: swiftURL.absoluteString) 						// path to my local .cachesDirectory, where I added a Package.swift file 						// e.g. FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask) 						let arg3 = "/Users/......" 						task.arguments = ["package", "--package-path", arg3, "dump-package"] 						let pipe = Pipe() 						task.standardOutput = pipe 						do { 								try task.run() 						} catch (let error) { 								print("======> error \(error.localizedDescription)") 						} 						task.waitUntilExit() 						let data = pipe.fileHandleForReading.readDataToEndOfFile() 						print("---> data:	\(data)") 				} 		} } Using Xcode 12.2 beta, macos 10.15.6 app.
Posted Last updated
.
Post not yet marked as solved
0 Replies
595 Views
With the latest iOS 14.2 and Xcode 12.2 beta, I'm trying to save a file with: .fileExporter(isPresented: ....) all works well on iPad, but not on iPhone simulator. The file "chooser" does not appear, and so nothing is saved. According to the doc, availability iOS 14+. Is this correct behaviour?
Posted Last updated
.
Post not yet marked as solved
0 Replies
1.4k Views
I can't find a way to get my buttonView (just a Button) on top of the map so I can tap it. In another more complicated setup, the button somehow turnup on top and I can tap it, but this is by luck not by design. How to get my buttonView on the map so I can tap it? Xcode 12 beta-3, mac catalina, target ios 14. import Foundation import SwiftUI import MapKit import CoreLocation @main 	 struct TestMapApp: App { 		var body: some Scene { 				WindowGroup { 						MapViewer() 				} 		} } struct MapViewer: View { 		@State var cityAnno = [CityMapLocation(title: "Tokyo", subtitle: "Japan", lat: 35.685, lon: 139.7514)] 		@State var region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 35.685, longitude: 139.7514),span: MKCoordinateSpan(latitudeDelta: 1.0, longitudeDelta: 1.0)) 		 		var body: some View { 				Map(coordinateRegion: $region, annotationItems: cityAnno) { city in 						MapAnnotation(coordinate: city.coordinate) { 								buttonView(cityName: city.title!) 								// tried this, does not work 								// Image(systemName:"dot.circle.and.cursorarrow").foregroundColor(.white).scaleEffect(2.2) 								//	 .onTapGesture { print("----> onTapGesture") } 						} 				} 		} 		func buttonView(cityName: String) -> some View { 				Button(action: {print("----> buttonView action")}) { 						VStack { 								Text(cityName) 								Image(systemName: "dot.circle.and.cursorarrow") 						}.foregroundColor(.red).scaleEffect(1.2) 				}.frame(width: 111, height: 111) 				// tried combinations of these, without success //				.background(Color.gray).opacity(0.8) //				.border(Color.white) //				.contentShape(Rectangle()) //				.clipShape(Rectangle()) //				.zIndex(1) //				.buttonStyle(PlainButtonStyle()) //				.layoutPriority(1) //				.allowsHitTesting(true) //				.onTapGesture { //						print("----> onTapGesture") //				} 		} 		} 		class CityMapLocation: NSObject, MKAnnotation, Identifiable { 		var id = UUID().uuidString 		var title: String? 		var subtitle: String? 		dynamic var coordinate: CLLocationCoordinate2D 		 		 init(title: String?, subtitle: String?, lat: Double, lon: Double) { 				self.id = UUID().uuidString 				self.title = title 				self.subtitle = subtitle 				self.coordinate = CLLocationCoordinate2D(latitude: lat, longitude: lon) 		} 		}
Posted Last updated
.