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.
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.
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.
It is stated that
From Fall 2023 you’ll receive an email from Apple if you upload an app to App Store Connect that uses required reason API without describing the reason in its privacy manifest file. From Spring 2024, apps that don’t describe their use of required reason API in their privacy manifest file won’t be accepted by App Store Connect.
There are some answers here : https://developer.apple.com/videos/play/wwdc2023/10060/ but far from answering all questions.
I have questions on how to implement:
Where exactly is the privacy manifest ? How to create it, from which file template in Xcode ? WWDC speaks of a PrivacyInfo.xcprivacy (does it require a more recent version of Xcode than 14.2).
WWDC describes a framework case. Is it the same for a "final" app ?
is there a specific format for describing the reason ? Or just plain text.
Is this text visible to the user or only to reviewer ?
does it apply retroactively to apps already in AppStore (do they need to be resubmitted ?). It seems not.
So I tried, in an iOS App, to declare the PrivacyInfo.xcprivacy as explained, with Xcode 14.2, using plist template, to no avail.
Really not clear on how to proceed or even start… We would need a clear step by step tutorial with all prerequisites (Xcode or MacOS versions needed for instance).
There are at the moment a lot of spams for a bank phone number.
https://developer.apple.com/forums/thread/769506
What is really surprising is to read App Store Connect Engineer answer, each time the same:
We appreciate your interest in participating in the forums! These forums are for questions about developing software and accessories for Apple platforms. Your question seems related to a consumer feature and is better suited for the Apple Support Communities
Is it an automatic answer (I cannot believe anyone who read the post did not notice it was a spam) ? If so, couldn't it simply detect it is a spam (Apple Intelligence could come to help) and delete the message (or the account) ?
PS: it would also be a spam in Apple Support Communities
PS2: I note the message has been deleted very rapidly.
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.
Since the maintenance 2 days ago, it seems editor has issues. Is it only me ?
Marking a text as quote does nothing. I mark this sentence as Quote to illustrate.
Just installed XCode 10.I receive the following warning:2018-06-05 13:25:47.686865+0200 simpleTest[14581:1428592] libMobileGestalt MobileGestalt.c:875: MGIsDeviceOneOfType is not supported on this platform.Cannot find what MGIsDeviceOneOfType is about.Edited : is it related to Mapping and Geographical Information System (“MGIS”) ?
Today, on Dec 14, when I look for units or sales, all that occurred after December 3rd is ignored.
Tens were downloaded since dec 3rd, and I could see them when connecting earlier today.
When I want to set the time period, I see that any date beyond Dec 3rd is greyed (see attached screenshot).
It used to work a few hours ago. This occurred immediately after updating MacOS to 14.2, but I tested on a Mac running 12.6 with the same result.
Is it only me or does anyone see the same issue ? I filed a bug report: FB13468285
In this app, I set the preferredColorScheme in main
@main
struct TheApp: App {
@AppStorage("isDarkMode") private var isDarkMode = false
var body: some Scene {
WindowGroup {
ContentView()
.preferredColorScheme(isDarkMode ? .dark : .light)
}
}
}
isDarkMode is changed dynamically in code.
When code is compiled with Xcode 15.3, the background of ContentView changes from light to dark or vice versa.
When compiled with Xcode 16, no more change.
However, direct changes to objects do work, such as:
TextField("N", value: $t, format: .number)
.frame(width: 40)
.background(isDarkMode ? .gray : .white)
What has changed in Xcode 16 ? Is it documented somewhere ?
I saw this SO thread which describe similar problem.
https://www.reddit.com/r/swift/comments/upkprg/preferredcolorscheme_toggle_not_working/
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 ?
That's an old question (this thread https://developer.apple.com/forums/thread/16375 dates back iOS9 or this other thread https://stackoverflow.com/questions/67249956/uisearchbar-warning-uitexteffectswindow-should-not-become-key-please-file-a-bu), but I've not found a comprehensive answer yet.
I need to add a Return key to a numeric keyboard (BTW, how is it it does not exist in standard ?)
I used to do it using
let keyBoardWindow = UIApplication.shared.windows.last
to get the keyboard window and then adding the subview (self.returnButton) to it
keyBoardWindow?.addSubview(self.returnButton)
Worked great and still works OK with iOS 15.
But we are told to use connectedScenes instead…
So I adapt code:
var keyBoardWindow: UIWindow? = nil
if #available(iOS 13.0, *) { // use connectedScenes
let scenes = UIApplication.shared.connectedScenes
let windowScene = scenes.first as? UIWindowScene
if let kbWindow = windowScene?.windows.last {
keyBoardWindow = kbWindow
}
} else {
keyBoardWindow = UIApplication.shared.windows.last
}
It runs, but subview does not show.
The problem is that keyboardWindow used to be a UIRemoteKeyboardWindow (the true keyboard window) and now is UITextEffectsWindow, which is not the real keyboardWindow. So adding subview to it adds improperly in the hierarchy.
Note: someone detailed the view hierarchy here: https://developer.apple.com/forums/thread/664547
UIWindow
UITextEffectsWindow
UIInputWindowController
UIInputSetContainerView
UIInputSetHostView
UIEditingOverlayViewController
UIEditingOverlayGestureView
I guess I have to add subview to something else than UITextEffectsWindow (keyBoardWindow), but to what ?
I tried
keyBoardWindow = kbWindow.superview as? UIWindow
to no avail.
I also tried to debug view hierarchy, but keyboard does not show in debugView.
I noticed today that font has changed in some sections of this forum.
2 examples:
in forums tag: https://developer.apple.com/forums/
font is apparently Times-Roman
in Swift tag: https://developer.apple.com/forums/tags/swift
font is apparently SFProText-Medium
I tried to reply to a post : https://developer.apple.com/forums/thread/728329
But clicking on Reply button does nothing. ANd the Reply section does not show. No issue to answer to other threads.
Is it only me ?
I tried to post a reply to a thread. It seems to be posted, but does not appear in the thread once sent…