I repeat this older thread, as it does not show on the forum with my added post !https://forums.developer.apple.com/message/298938#298938I answered to KMT answer (I read the referenced thread)---------------Looks like that triggered the name change dialog.Can you just right click on the watch name without that happening? Try it on the phone, on the left so see what I'm looking for.Otherwise, this sounds like what others went thru (routine pairing v o o d o o ) in this SO thread - seen it ? [ filter does not like v o o …]https://stackoverflow.com/questions/30792520/in-xcode-i-see-no-paired-apple-watch-even-though-the-watch-is-paired-and-the-w-------------------------So, my question nowI run in the same problem.I just got the Apple Watch (4, OS 5.1.1) and use XCode 10.1. OSX 10.13.6I can create the app + WatchOS on simulator without problem. But not on device.The watch is paired with iPhone.I connect iPhone with USB=> get the message :The iPhone "iPhone XS" can not be used because it requires iTunes 12.9 or later. Do you want to download the latest version of iTunes now?I ignore the message (as I think iTunes 12.9 requires Mojave, isn't it ?). Could it be the problem ???In XCode, I select the scheme iPhone Xs of XXX + Apple Watch of XXXI run, it compiles OK, but at the end says:"Finished running myApp on Apple Watch of XXX" in the XCode barPlus alert:App installation failedThe host is not paired with the device.I have checked in XCode Devices:- on the left, I see iPhoneXS of XXX- but not the Watch- On the right of Devices window, I see the PAIRED WATCHES:Apple Watch of XXXI also checked that Apple Watch is listed with an UDID in the Devices listThe scheme was in Debug mode.So, I changed to release mode, and get the message in Scheme that paired devices not available for debug.So, Compile again, but then get message :Could not launch 'Autonomie' on iPhone XS XXXThere was an error preparing Apple Watch de XXX for development.Try reattaching the device to which Apple Watch de XXX is paired. The device rejected the pairing attempt.So I unpaired the device.ReattachedTruted the hostRun again, just to get again the messageThe host is not paired with the device.I do not see which and where I should pair.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
The new forum has been there for a week now.
I did wait to get accustomed to it so that my comments are not just due to the change factor.
I think it is now possible to make some assessment and I would appreciate others’ opinion to see if it is just me…
There are some good points: the editor is much less whimsical
the possibility to tag topic is a good thing
search has improved (a little).
But I find really frustrating points: Editor is better and has a live Preview. What a strange concept in the world of the inventor of WYSIWYG ! Did we return to the 90’s editors with their control characters ?
Tags are good, but IMHO it would be useful to have major and minor tags. That would help focus when we list threads by tag by making it possible to select only the major one
All posts are now reviewed to avoid spam. Good enough. But why can it take hours (in a case, already 5 hours and still in review) for a very simple answer post (no URL, no bizarre word) to be reviewed. A bit frustrating. And that does not allow for any rapidly going discussion.
Many features seem to be inspired from SO, but without some critical capabilities, as the inclusion of images.
The concept of upvote or downvote has been introduced as well. Was it really needed ? Won’t it lead to some regrettable side effects that we see in SO where some do not dare propose an answer or even ask a question for fear of a negative vote ? That’s particularly the case for anyone not very fluent in english who may not express properly his/her opinion. I did find that previous developers forum was a more welcoming place than SO. Hope that will not change.
There are also capabilities that are missing from previous forum (unless they are so well hidden I could not find them): because of increased spacing, there are now just 15 instead 25 posts per page. And you have to scroll a lot more to get at the end of the shorter list. That do slow down the screening.
how can one see the threads he contributed to ? Seems we can only filter the one we authored.
It seems now quasi impossible to edit a post, and of course delete it.
So at the end, instead of the whaooh effect I was expecting I have just a mixed feeling.
Since a few hours, forum has an hectic behaviour:
most often, returns "We'll be back." page
or completely unformatted page
or partially formatted
even post page is a mess
Is it a known problem or only on my side ?
In a SwiftUI project, I get the following runtime error:
2022-12-15 11:31:37.453318+0100 MyApp[7039:3585656] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
There are no scene in the project:
I have tried to change the settings,
To no avail.
I propose that we collectively build a list of most wanted XCode features. Those pain points that do make our life more difficult with XCode or less fun.The goal would not be to have a scientifically correct ranking of all those, but simply:- make visible many ideas that have probably been reported in improvement requests- expose in short why that would be a great evolution, what pain point it would solve (functional improvements, not bugs correction)- if possible, discuss the feasibility of each idea.I would agree to update this original post to include new inputs.To avoid a thread where new posts get smaller and smaller in width, would be great to post each new idea as an answer to this original post. Of course discuss an idea as a reply to this idea post itself.Rule of the game would be tolerance, not trying to argue indefinitely on one idea. And be concise in wanted feature descriptionThe ultimate goal would be to influence positively XCode development team to consider the most wanted proposals.At least, have them explain us that one wanted feature in on the way (let's dream), why such idea is not so great, or why it would be too complex to implement…_________________________________Here is a first wanted feature, inspired from a thread in IB forum: https://forums.developer.apple.com/thread/72495Wanted Feature : Storyboard zoom when editing macOS appPain point: makes navigating in MacOS storyboard extremely painful if more than a few windows. Does limit the use of storyboards for MacOS App. The IB post was seen more than 7500 times, so that seems a largely shared concern.Feasibility: done for iOS, so should be possible for MacOS._________________________________Wanted Feature : Automatic/1-button icon, logo, screenshot, launch image generation for all project related devices/screens as mandated by ASC. Current with each new release.Pain point: The number of individually required image-based assets involved for meta data submittals became a burden long ago and continues to require significant labor to suss and satisfy.Feasibility: Xcode already does some of this w/launchStoryboards for new Swift projects, it just needs to be ubiquitous for all similar assets. It's just scripting/image resizing, which should not be a problem on macOS. Yes, I know there are 3rd party tools that help, but they seem to not keep up w/new devices/screen sizes - if they can do it, so can Xcode._________________________________Wanted Feature : More explicit help message when an action cannot be completed in IBPain point: When XCode cannot complete an action (e.g., create an IBOutlet for an IB object), option-cleaning the build folder solves the problem. Numerous issues reported on the forum were solved with this simple action. However, messages from IDE never mention this solution.Feasibility: Just adding (when appropriate) a suggestion in the message._________________________________Wanted Feature : When build fails, propose automatic correction action whenever possiblePain point: As an example, if some asset contains Finder information, a build error occurs, with message "resource fork, Finder information, or similar detritus not allowed Command /usr/bin/codesign failed with exit code 1". One has to go to Terminal, use xattr command and clean laboriously the offending files.Feasibility: As XCode has detected the files, it could propose to do the cleaning itself…- if it can be done with terminal command, so can Xcode._________________________________Wanted Feature : When an API is deprecated, get information on how to replace.Pain point: Most often, when an API is deprecated and we get a warning from compiler, we get no hint on how to replace. Thus, requiring to post on forum (a lot of posts relate to this search for information), search on web to find some hints… At the end losing time and not being sure to make the best decision.Feasibility: Those who deprecated API for sure know how to handle this. Should be (relatively) easy to provide information in doc, and in the deprecation message._________________________________Wanted Feature : When a string is missing for an infoPlist key, give a warning.Pain point: If the required key is missing, app will crash (or be rejected at Appstore verification stage which is a minor harm). I had the case where I called imagePicker, but intended to use only photo, not video. But if user taps on video, that caused a crash.Feasibility: When UIImagePickerControllerDelegate is used, compiler could check that infoPlist is defined for the required keys.._________________________________All comments welcomed.
I have an image to fill the entire screen, even behind the notch.
So I set the Top margin to safe area to -44.
That works OH on all iPhones… except on iPhone 12 ProMax simulator.
Here I get a few pixels uncovered at top.
I had to change value to -48 to get everything OK.
So question is: has "notch area" which defines safe area increased 4 pixels on iPhone 12 Pro max ? If so, is it a hardware change ?
Here is the setup.
I have an UIImageView in which I write some text, using UIGraphicsBeginImageContext.
I pass this image to the OCR func:
func ocrText(onImage: UIImage?) {
let request = VNRecognizeTextRequest { request, error in
guard let observations = request.results as? [VNRecognizedTextObservation] else {
fatalError("Received invalid observations")
}
print("observations", observations.count)
for observation in observations {
if observation.topCandidates(1).isEmpty {
continue
}
}
} // end of request handler
request.recognitionLanguages = ["fr"]
let requests = [request]
DispatchQueue.global(qos: .userInitiated).async {
let ocrGroup = DispatchGroup()
guard let img = onImage?.cgImage else { return } // Conversion to cgImage works OK
print("img", img, img.width)
let (_, _) = onImage!.logImageSizeInKB(scale: 1)
ocrGroup.enter()
let handler = VNImageRequestHandler(cgImage: img, options: [:])
try? handler.perform(requests)
ocrGroup.leave()
ocrGroup.wait()
}
}
Problem is that observations is an empty array. I get the following logs:
img <CGImage 0x7fa53b350b60> (DP)
<<CGColorSpace 0x6000032f1e00> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; sRGB IEC61966-2.1)>
width = 398, height = 164, bpc = 8, bpp = 32, row bytes = 1600
kCGImageAlphaPremultipliedFirst | kCGImageByteOrder32Little | kCGImagePixelFormatPacked
is mask? No, has masking color? No, has soft mask? No, has matte? No, should interpolate? Yes 398
ImageSize(KB): 5 ko
2022-06-02 17:21:03.734258+0200 App[6949:2718734] Metal API Validation Enabled
observations 0
Which shows image is loaded and converted correctly to cgImage.
But no observations.
Now, if I use the same func on a snapshot image of the text drawn on screen, it works correctly.
Is there a difference between the image created by camera and image drawn in CGContext ?
Here is how mainImageView!.image (used in ocr) is created in a subclass of UIImageView:
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
// Merge tempImageView into mainImageView
UIGraphicsBeginImageContext(mainImageView!.frame.size)
mainImageView!.image?.draw(in: CGRect(x: 0, y: 0, width: frame.size.width, height: frame.size.height), blendMode: .normal, alpha: 1.0)
tempImageView!.image?.draw(in: CGRect(x: 0, y: 0, width: frame.size.width, height: frame.size.height), blendMode: .normal, alpha: opacity)
mainImageView!.image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
tempImageView?.image = nil
}
I also draw the created image in a test UIImageView and get the correct image.
Here are the logs for the drawn texte and from the capture:
Drawing doesn't work
img <CGImage 0x7fb96b81a030> (DP)
<<CGColorSpace 0x600003322160> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; sRGB IEC61966-2.1)>
width = 398, height = 164, bpc = 8, bpp = 32, row bytes = 1600
kCGImageAlphaPremultipliedFirst | kCGImageByteOrder32Little | kCGImagePixelFormatPacked
is mask? No, has masking color? No, has soft mask? No, has matte? No, should interpolate? Yes 398
ImageSize(KB): 5 ko
2022-06-02 15:38:51.115476+0200 Numerare[5313:2653328] Metal API Validation Enabled
observations 0
Screen shot : Works
img <CGImage 0x7f97641720f0> (IP)
<<CGColorSpace 0x60000394c960> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; iMac)>
width = 570, height = 276, bpc = 8, bpp = 32, row bytes = 2280
kCGImageAlphaNoneSkipLast | 0 (default byte order) | kCGImagePixelFormatPacked
is mask? No, has masking color? No, has soft mask? No, has matte? No, should interpolate? Yes 570
ImageSize(KB): 5 ko
2022-06-02 15:43:32.158701+0200 Numerare[5402:2657059] Metal API Validation Enabled
2022-06-02 15:43:33.122941+0200 Numerare[5402:2657057] [WARNING] Resource not found for 'fr_FR'. Character language model will be disabled during language correction.
observations 1
Is there an issue with kCGColorSpaceModelRGB ?
Learning Widgets, I try a simple pattern: get a textField in the app;
have the Widget updated when textField is changed.
App is UIKit.
Widget has No "included Configuration Intent".
It compiles and works. Widget is updated every 5 minutes as asked line 23 (final snippet).
But the message is never updated (line 48 of final snippet) with globalToPass (as expected from line 24): it always shows "Hello".
What I tried: Create a singleton to hold the data to pass:
class Util {
		
		class var shared : Util {
				struct Singleton {
						static let instance = Util()
				}
				return Singleton.instance;
		}
		
		var globalToPass = "Hello"
}
shared the file between the 2 targets App and WidgetExtension
In VC, update the singleton when textField is changed and ask for widget to reload timeline
		@IBAction func updateMessage(_ sender: UITextField) {
				
				Util.shared.globalToPass = valueToPassLabel.text ?? "--"
				WidgetCenter.shared.reloadTimelines(ofKind: "WidgetForTest")
				WidgetCenter.shared.reloadAllTimelines()
		}
Problem : Widget never updated its message field
Probably I need to have the message in @State var, but I could not get it work.
Here is the full widget code at this time:
import WidgetKit
import SwiftUI
struct LoadStatusProvider: TimelineProvider {
		
		func placeholder(in context: Context) -> SimpleEntry {
				
				SimpleEntry(date: Date(), loadEntry: 0, message: Util.shared.globalToPass)
		}
		func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> ()) {
				
				let entry = SimpleEntry(date: Date(), loadEntry: 0, message: Util.shared.globalToPass)
				completion(entry)
		}
		func getTimeline(in context: Context, completion: @escaping (Timeline<Entry>) -> ()) {
				var entries: [SimpleEntry] = []
				// Generate a timeline consisting of five entries an hour apart, starting from the current date.
				let currentDate = Date()
				for minuteOffset in 0 ..< 2 {
						let entryDate = Calendar.current.date(byAdding: .minute, value: 5*minuteOffset, to: currentDate)!
						let entry = SimpleEntry(date: entryDate, loadEntry: minuteOffset, message: Util.shared.globalToPass)
						entries.append(entry)
				}
				let timeline = Timeline(entries: entries, policy: .atEnd)
				completion(timeline)
		}
}
struct SimpleEntry: TimelineEntry {
		let date: Date
		let loadEntry: Int
		let message: String
}
struct WidgetForTestNoIntentEntryView : View {
		var entry: LoadStatusProvider.Entry
		var body: some View {
				let formatter = DateFormatter()
				formatter.timeStyle = .medium
				let dateString = formatter.string(from: entry.date)
				return
						VStack {
								Text(String(entry.message))
								HStack {
										Text("Started")
										Text(entry.date, style: .time)
								}
								HStack {
										Text("Now")
										Text(dateString)
								}
								HStack {
										Text("Loaded")
										Text(String(entry.loadEntry))
								}
						}
		}
}
@main
struct WidgetForTestNoIntent: Widget {
		let kind: String = "WidgetForTestNoIntent"
		var body: some WidgetConfiguration {
				StaticConfiguration(kind: kind, provider: LoadStatusProvider()) { entry in
						WidgetForTestNoIntentEntryView(entry: entry)
				}
				.configurationDisplayName("My Widget")
				.description("This is an example widget.")
		}
}
struct WidgetForTestNoIntent_Previews: PreviewProvider {
		static var previews: some View {
				
				WidgetForTestNoIntentEntryView(entry: SimpleEntry(date: Date(), loadEntry: 0, message: "-"))
						.previewContext(WidgetPreviewContext(family: .systemSmall))
		}
}
I have not defined extension for IntentHandler
We have been waiting for this for many years.
And the icon is there, at the right most
That's a GREAT plus for the forum.
After more than 2 years of intense use of SwiftUI I appreciate many of its features, particularly the speed at which I can get some code running.
But, there are some major buts …
Screen Position,
I keep struggling with try, test, error and retry to position views relative to each others, withy many iterations to tune the x and y parameters. And preview does not help when view is too complex: I find it more reliable to test in simulator.
At the end, my code is messed with .position, .offset, … that I manually adjusted but may break if I change something elsewhere in the body.
The fact that position is relative to center of view (different from UIKit) makes it even more mind boggling.
For sure, UIKit constraints were not so easy, but you got a very stable code. That's not the case with SwiftUI
z position
In some cases, I want the View to appear on front of all others.
It may be a very simple Rectangle() with overlay, e.g., to mimic an alert.
And I struggle with the Rectangle drawn behind another view, even trying to adjust the zIndex to no avail…
Should I create an explicit View instead of creating the Rectangle directly in the body ?
So am I misusing SwiftUI, or are they points that SwiftUI should improve in the future ?
I get this error in console in a SwiftUI MacApp on Xcode 15.0.1 and MacOS 14.1.2
FAULT: <NSRemoteView: 0x11f03bc00 com.apple.TextInputUI.xpc.CursorUIViewService TUICursorUIViewService> determined it was necessary to configure <TUINSWindow: 0x11f1b2390> to support remote view vibrancy
I found similar errors that seem to be harmless messages popping up: https://developer.apple.com/forums/thread/72133
No idea what can cause such message, even less how to correct it.
The UI of the forum is profoundly changed. For what benefit ? It seems forum is more and more painful to use at each major revamp.
Is it only me who cannot see the improvements ?
Not a question, but a surprise.
Did I miss something, but apparently there has been no new beta release (16.3) since Release of 16.2 on Dec 11. 2 months without betas is really unusual (in fact, it never happened and usually, next beta n+1 is even released before the final release of version n).
So does that mean 16.3 will be a major update ? Wait and see.
Since 2 hours (1:20 GMT July 18), I keep receiving the exact same message from iTunesStore every 5 minutes (30 received so far, with metronome regularity):
Your banking information was accepted
Thank you for providing the requested details for xxxxxx associated with your banking update in App Store Connect.
Any payments may take up to 2 payment cycles to send. If you have any questions, contact us at http://developer.apple.com/contact/.
I did not update any information since at least 6 weeks.
I contacted support, it seems to be widespread problem.
I filed a bug report: Jul 18, 2024 at 5:51 PM – FB14377820
I read in Xcode 14 release notes:
Fixed: WatchKit storyboards are deprecated in watchOS 7.0 and later. Please migrate to SwiftUI and the SwiftUI Lifecycle. (94058186)
And effectively, when adding a WatchOS target to an iOS app as a companion, it is now created as SwiftUI. In Xcode 13 we could still create as WatchKit (storyboard).
That raises a few questions:
what will happen to existing apps with companions ? Shall we have soon to redesign Watch part completely from storyboards to SwiftUI ?
What is the reason for such a deprecation ? That leads to have code with a part in storyboard the other in SwiftUI. Not ideal situation.
Is WatchKit deprecated completely ?
Personal opinion: with some present limitations of SwiftUI (such as in Lists), it will make it pretty hard to get the same flexibility in the designs that we had with WatchKit. I find it a regression not to leave both options possible.