Post

Replies

Boosts

Views

Activity

MacBook Air icon does not show in airdrop
That is not exactly a development issue, but more a Mac configuration (which may hide other problems ?). I use a new MacBookAir with MacOS 26. When I Airdrop from another Mac (15.7.8) the MacBookAir does not show any icon but a blank area, whilst other devices show their icons: That seems an old issue with MacBookAir: https://www.reddit.com/r/macbookair/comments/1benu4o/blank_airdrop_icon/ Beside this, Airdrop works OK. Just as if the MacBookAir icon was missing in some system file ? Has anyone a solution ? I filed a bug report FB24034384
1
0
78
3d
Images in segmentedControl segments do not draw properly
This is UIKit app, in Xcode 26.3 (but same issue in 16.4). I create (in IB) a segmentedControl, with 2 segments. I set the images that are stored in assets. They show properly in Xcode. But when running (26.1 simulator), they just show a black image. In Xcode                                                                           On simulator at runtime I've tried to set background to clear as well as tint, to no avail. What am I missing ?
0
0
117
1w
preferredLanguages incorrectly read in iOS 26.1 simulators ?
I have to use the user preferred language (the first, here French). In didFinishLaunchingWithOptions, I select the first in the array of languages. print(#function, Locale.preferredLanguages) let prefLanguage = Locale.preferredLanguages.count > 0 ? Locale.preferredLanguages[0] : "en" So I expect to get Français. That works OK in iOS 16 (both on device and simulator) as well as on iPad iOS 26, but not on iOS 26.1 simulator. log for iOS 16 simulator or on devices: application(_:didFinishLaunchingWithOptions:) ["fr-FR", "en-FR", "es-FR", "it-FR", "de-FR", "el-FR"] log for iOS 26 (Xcode 26.3) application(_:didFinishLaunchingWithOptions:) ["en-FR", "fr-FR", "es-FR", "de-FR", "it-FR", "el-FR"] Order is changed. Is this a known bug or am I missing something ?
1
0
397
3w
Emoji rotated variation
Emoji are very convenient to be used instead of image, directly as String. In some cases, a variation to show them rotated (but still as String, not converted as image) would be useful. Examples may be arrows or flags if you need to show them floating from the top and not from the side of the pole. And I would declare: flag = "🇺🇸" or So the question; is it possible to generate new emoji as rotated initial emojis ? Or better, do such extensions already exist.
2
1
447
Jun ’26
Subclassing UISegmentedControl in Xcode 26 strange behavior
UIKit application. I have a UISegmentedControl which displays flags, using the emoji for the text of the segment (SegmentedControl defined in stroryboard). Depending app is in Portrait or Landscape, the segmented control is displayed vertically or horizontally. When horizontal, nothing to do, direct display from stroryboard, works as expected. When vertical (Portrait), I have to rotate the UISegmentedControl π/2. And To get the flags properly oriented, I rotate each image -π/2. That works fine when compiling with Xcode 16.4. But when compiling with Xcode 26.3, rotation of segments do not work. Here is the illustration, compile on target simulators 26.2 in both cases (3rd image explained below):                             Xcode 16.4           -               Xcode 26.3 subviews rotated   -     removed subviews rotation Now the code. I subclassed UISegmentedControl to draw at will. class SegmentedControlRotable: UISegmentedControl { @IBInspectable var vertical : Bool = false // IBInspectable is now ignored override func draw(_ rect: CGRect) { if vertical { self.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2.0) for subview in self.subviews { subview.transform = CGAffineTransform(rotationAngle: -CGFloat.pi / 2.0) // reverse rotate // 3rd picture: this line commented out. } } else { // does no change self.transform = CGAffineTransform(rotationAngle: 0.0) for subview in self.subviews { subview.transform = CGAffineTransform(rotationAngle: 0.0) } } } // More code with touchesEnded, works OK in both cases } In fact, with Xcode 26, segments are always drawn on an horizontal line. l I noticed that the structure of self.subviews is different. 19 subviews in Xcode 16, 12 in Xcode 26. I removed the rotation of subviews, and it's OK. Just flags are now vertical (as illustrated above). What do I miss ? How to rotate the subviews in Xcode 26 ?
0
0
169
Jun ’26
Localising UISegmentedControl (storyboard based)
In this iOS app, with UIKit in Swift, I create a UISegmentedControl in stroryboard. I define the text for each segmentTitles in IB ,and need to localise. I have tried in the main.xxx files "id.segmentTitles" = ["a", "b", "c", "d", "e"]; to no avail. I understand this is a very very old issue that UISegmentedControl are not localized from stroryboard: https://stackoverflow.com/questions/12884751/uisegmentedcontrol-and-localization I tried to use a similar approach as for UITextView (which are not either localized) helpTextView.text = NSLocalizedString("id.text", tableName: "Main", comment: "helpTextView") But cannot make it. I found a work around, by localising in code: let seg0 = NSLocalizedString("a", comment: "Segment") segmentedControl.setTitle(seg0, forSegmentAt: 0) However, I get error messages in log unless I clear the segment titles in IB: ERROR: id.segmentTitles[0] not found in table Main of bundle CFBundle 0x600003b101c0 Is there a solution to this ?
4
0
417
Jun ’26
func scene(_ scene: UIScene, openURLContexts URLContexts: Set) not called
This is an iOS app that runs on Mac in iPad mode. on Mac, I want to be able to drop a file (pdf) on the app icon and see it in the app to display some notification that operation was OK. For this, I use notification, sent from sceneDelegate. All VC add observer for the notification, allowing to display whatever the front VC is. It works OK in most cases, except when: I drop a file on the app icon in the dock (app launched from Xcode which creates the icon in dock) In this case, I need to repeat the drop to get the notification sent. After that, it works systematically. The problem does not come from notification, but because func scene(_ scene: UIScene, openURLContexts URLContexts: Set) is not called, as I could test with: func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) { print("dropped") } dropped is logged only on second drop. Why does this occur only for the dock icon ?
0
0
355
May ’26
New AppStore Connect Welcome page layout bugged
The Welcome page of AppStoreConnect has slightly changed. Analysis section is out, with an explanation message: News Access Analytics in the Apps section Analytics is now available in the Apps section. Get access to over 100 new metrics, improved filtering capabilities, and new monetization benchmarking reports. Learn more Problem: link does not work. https://developer.apple.com/news/?id=hh6v4b55 And I found nothing in the apps section… Same for you ?
0
0
308
Mar ’26
Is it a bug in UIActivityViewController to Airdrop ?
Context: Xcode 26.3, iOS 18.7.6 on iPhone Xs In this iOS app, I call UIActivityViewController to let user Airdrop files from the app. When trying to send a URL whose file name contains some characters like accentuated (-, é, '), the transfer fails. Removing those characters makes it work without problem. The same app running on Mac (in iPad mode) works with both cases. I also noticed that even when airdrop fails, there is no error reported by activityVC.completionWithItemsHandler = { activity, success, items, error in } Are those known issues ?
Topic: UI Frameworks SubTopic: UIKit Tags:
4
0
489
Mar ’26
Where are the forums heading to ?
Since a few weeks, I feel the content of the forums is less and less interesting. Probably 80% (not to say 90%) of the posts are about complains about review process, a serious question for those who have a problem but questions on which other developers can do absolutely nothing even if they bothered. Forum is becoming a wailing wall. With such a trend (but what to do to change it ?), forums will soon be of no interest at all, which is really unfortunate for the developers community.
4
1
735
Mar ’26
Putting 2 existing pdf pages side by side (half size) in a new pdf
In Swift, iOS, I have a pdf file. I want to take the pages 2 by 2 and put them side by side, on the new page. For this, I have to scale initial pages half size and rotate .pi/2. I managed to achieve this by converting pdf pages to UIImages and using a UIGraphicsImageRenderer. But with a critical loss of resolution. I've tried improving the resolution by creating images as jpegData(withCompressionQuality: 1.0), to no avail. So I would need to work directly on the pdf pages using CGPDFDocument format. The code structure is as follows, to insert a single scaled page: for iPage in … { if let _page = theCGPdfDocument.page(at: 1) { var _pageRect: CGRect = _page.getBoxRect(CGPDFBox.mediaBox) writeContextInDestination!.beginPage(mediaBox: &_pageRect) // translate to compensate for the flip caused displacement writeContextInDestination!.translateBy(x: _pageRect.size.width, y: _pageRect.size.height) Scale (-1, -1) // rotate 180° // add rotate as needed writeContextInDestination!.scaleBy(x: -1, y: -1) writeContextInDestination!.clip(to: _pageRect) writeContextInDestination!.drawPDFPage(_page) writeContextInDestination!.endPage() // end the current page } } writeContextInDestination!.closePDF() But I do not succeed in inserting the drawing of the second page. I've tried repeating lines 7 to 11 for a second page at line 13. No success. What is the direction to look for ?
1
0
801
Mar ’26
init?(coder: NSCoder) or init?(coder: (NSCoder?))
In this code, I use in some places required init?(coder: (NSCoder?)) { // Init some properties super.init(coder: coder!) } And in other places required init?(coder: NSCoder) { super.init(coder: coder) // Init some properties } Both seem to work. Is there a preferred one ? In which cases ? Or should I always use the second one ? And can super be called at anytime ?
2
0
1.3k
Feb ’26
MacBook Air icon does not show in airdrop
That is not exactly a development issue, but more a Mac configuration (which may hide other problems ?). I use a new MacBookAir with MacOS 26. When I Airdrop from another Mac (15.7.8) the MacBookAir does not show any icon but a blank area, whilst other devices show their icons: That seems an old issue with MacBookAir: https://www.reddit.com/r/macbookair/comments/1benu4o/blank_airdrop_icon/ Beside this, Airdrop works OK. Just as if the MacBookAir icon was missing in some system file ? Has anyone a solution ? I filed a bug report FB24034384
Replies
1
Boosts
0
Views
78
Activity
3d
Images in segmentedControl segments do not draw properly
This is UIKit app, in Xcode 26.3 (but same issue in 16.4). I create (in IB) a segmentedControl, with 2 segments. I set the images that are stored in assets. They show properly in Xcode. But when running (26.1 simulator), they just show a black image. In Xcode                                                                           On simulator at runtime I've tried to set background to clear as well as tint, to no avail. What am I missing ?
Replies
0
Boosts
0
Views
117
Activity
1w
How to know gender of system voice
I would need to know which gender is used by the iOS system for speechSynthesis. I have tried let aVoice = AVSpeechSynthesisVoice() print(#function, #line, aVoice.gender.rawValue) But always get 0, for unspecified
Replies
1
Boosts
0
Views
223
Activity
2w
preferredLanguages incorrectly read in iOS 26.1 simulators ?
I have to use the user preferred language (the first, here French). In didFinishLaunchingWithOptions, I select the first in the array of languages. print(#function, Locale.preferredLanguages) let prefLanguage = Locale.preferredLanguages.count > 0 ? Locale.preferredLanguages[0] : "en" So I expect to get Français. That works OK in iOS 16 (both on device and simulator) as well as on iPad iOS 26, but not on iOS 26.1 simulator. log for iOS 16 simulator or on devices: application(_:didFinishLaunchingWithOptions:) ["fr-FR", "en-FR", "es-FR", "it-FR", "de-FR", "el-FR"] log for iOS 26 (Xcode 26.3) application(_:didFinishLaunchingWithOptions:) ["en-FR", "fr-FR", "es-FR", "de-FR", "it-FR", "el-FR"] Order is changed. Is this a known bug or am I missing something ?
Replies
1
Boosts
0
Views
397
Activity
3w
Emoji rotated variation
Emoji are very convenient to be used instead of image, directly as String. In some cases, a variation to show them rotated (but still as String, not converted as image) would be useful. Examples may be arrows or flags if you need to show them floating from the top and not from the side of the pole. And I would declare: flag = "🇺🇸" or So the question; is it possible to generate new emoji as rotated initial emojis ? Or better, do such extensions already exist.
Replies
2
Boosts
1
Views
447
Activity
Jun ’26
Subclassing UISegmentedControl in Xcode 26 strange behavior
UIKit application. I have a UISegmentedControl which displays flags, using the emoji for the text of the segment (SegmentedControl defined in stroryboard). Depending app is in Portrait or Landscape, the segmented control is displayed vertically or horizontally. When horizontal, nothing to do, direct display from stroryboard, works as expected. When vertical (Portrait), I have to rotate the UISegmentedControl π/2. And To get the flags properly oriented, I rotate each image -π/2. That works fine when compiling with Xcode 16.4. But when compiling with Xcode 26.3, rotation of segments do not work. Here is the illustration, compile on target simulators 26.2 in both cases (3rd image explained below):                             Xcode 16.4           -               Xcode 26.3 subviews rotated   -     removed subviews rotation Now the code. I subclassed UISegmentedControl to draw at will. class SegmentedControlRotable: UISegmentedControl { @IBInspectable var vertical : Bool = false // IBInspectable is now ignored override func draw(_ rect: CGRect) { if vertical { self.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2.0) for subview in self.subviews { subview.transform = CGAffineTransform(rotationAngle: -CGFloat.pi / 2.0) // reverse rotate // 3rd picture: this line commented out. } } else { // does no change self.transform = CGAffineTransform(rotationAngle: 0.0) for subview in self.subviews { subview.transform = CGAffineTransform(rotationAngle: 0.0) } } } // More code with touchesEnded, works OK in both cases } In fact, with Xcode 26, segments are always drawn on an horizontal line. l I noticed that the structure of self.subviews is different. 19 subviews in Xcode 16, 12 in Xcode 26. I removed the rotation of subviews, and it's OK. Just flags are now vertical (as illustrated above). What do I miss ? How to rotate the subviews in Xcode 26 ?
Replies
0
Boosts
0
Views
169
Activity
Jun ’26
Localising UISegmentedControl (storyboard based)
In this iOS app, with UIKit in Swift, I create a UISegmentedControl in stroryboard. I define the text for each segmentTitles in IB ,and need to localise. I have tried in the main.xxx files "id.segmentTitles" = ["a", "b", "c", "d", "e"]; to no avail. I understand this is a very very old issue that UISegmentedControl are not localized from stroryboard: https://stackoverflow.com/questions/12884751/uisegmentedcontrol-and-localization I tried to use a similar approach as for UITextView (which are not either localized) helpTextView.text = NSLocalizedString("id.text", tableName: "Main", comment: "helpTextView") But cannot make it. I found a work around, by localising in code: let seg0 = NSLocalizedString("a", comment: "Segment") segmentedControl.setTitle(seg0, forSegmentAt: 0) However, I get error messages in log unless I clear the segment titles in IB: ERROR: id.segmentTitles[0] not found in table Main of bundle CFBundle 0x600003b101c0 Is there a solution to this ?
Replies
4
Boosts
0
Views
417
Activity
Jun ’26
func scene(_ scene: UIScene, openURLContexts URLContexts: Set) not called
This is an iOS app that runs on Mac in iPad mode. on Mac, I want to be able to drop a file (pdf) on the app icon and see it in the app to display some notification that operation was OK. For this, I use notification, sent from sceneDelegate. All VC add observer for the notification, allowing to display whatever the front VC is. It works OK in most cases, except when: I drop a file on the app icon in the dock (app launched from Xcode which creates the icon in dock) In this case, I need to repeat the drop to get the notification sent. After that, it works systematically. The problem does not come from notification, but because func scene(_ scene: UIScene, openURLContexts URLContexts: Set) is not called, as I could test with: func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) { print("dropped") } dropped is logged only on second drop. Why does this occur only for the dock icon ?
Replies
0
Boosts
0
Views
355
Activity
May ’26
Window size of iOS app running on Mac
I need constraint the window size for an iOS app running on Mac. That's easy for a MacApp, using self.window?.minSize.width = 450 self.window?.maxSize.width = 450 or use func windowDidResize(_ notification: Notification) { } but how to achieve it in UIKit ?
Replies
3
Boosts
0
Views
871
Activity
Apr ’26
New AppStore Connect Welcome page layout bugged
The Welcome page of AppStoreConnect has slightly changed. Analysis section is out, with an explanation message: News Access Analytics in the Apps section Analytics is now available in the Apps section. Get access to over 100 new metrics, improved filtering capabilities, and new monetization benchmarking reports. Learn more Problem: link does not work. https://developer.apple.com/news/?id=hh6v4b55 And I found nothing in the apps section… Same for you ?
Replies
0
Boosts
0
Views
308
Activity
Mar ’26
Is it a bug in UIActivityViewController to Airdrop ?
Context: Xcode 26.3, iOS 18.7.6 on iPhone Xs In this iOS app, I call UIActivityViewController to let user Airdrop files from the app. When trying to send a URL whose file name contains some characters like accentuated (-, é, '), the transfer fails. Removing those characters makes it work without problem. The same app running on Mac (in iPad mode) works with both cases. I also noticed that even when airdrop fails, there is no error reported by activityVC.completionWithItemsHandler = { activity, success, items, error in } Are those known issues ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
4
Boosts
0
Views
489
Activity
Mar ’26
Where are the forums heading to ?
Since a few weeks, I feel the content of the forums is less and less interesting. Probably 80% (not to say 90%) of the posts are about complains about review process, a serious question for those who have a problem but questions on which other developers can do absolutely nothing even if they bothered. Forum is becoming a wailing wall. With such a trend (but what to do to change it ?), forums will soon be of no interest at all, which is really unfortunate for the developers community.
Replies
4
Boosts
1
Views
735
Activity
Mar ’26
Putting 2 existing pdf pages side by side (half size) in a new pdf
In Swift, iOS, I have a pdf file. I want to take the pages 2 by 2 and put them side by side, on the new page. For this, I have to scale initial pages half size and rotate .pi/2. I managed to achieve this by converting pdf pages to UIImages and using a UIGraphicsImageRenderer. But with a critical loss of resolution. I've tried improving the resolution by creating images as jpegData(withCompressionQuality: 1.0), to no avail. So I would need to work directly on the pdf pages using CGPDFDocument format. The code structure is as follows, to insert a single scaled page: for iPage in … { if let _page = theCGPdfDocument.page(at: 1) { var _pageRect: CGRect = _page.getBoxRect(CGPDFBox.mediaBox) writeContextInDestination!.beginPage(mediaBox: &_pageRect) // translate to compensate for the flip caused displacement writeContextInDestination!.translateBy(x: _pageRect.size.width, y: _pageRect.size.height) Scale (-1, -1) // rotate 180° // add rotate as needed writeContextInDestination!.scaleBy(x: -1, y: -1) writeContextInDestination!.clip(to: _pageRect) writeContextInDestination!.drawPDFPage(_page) writeContextInDestination!.endPage() // end the current page } } writeContextInDestination!.closePDF() But I do not succeed in inserting the drawing of the second page. I've tried repeating lines 7 to 11 for a second page at line 13. No success. What is the direction to look for ?
Replies
1
Boosts
0
Views
801
Activity
Mar ’26
NSMENUITEMTITLEABOUT, NSMENUITEMTITLE in menu bar when running iOS app on Mac
I have an iOS app that runs on Mac, in iPad mode. In the menubar, some subitems are improperly labelled, featuring NSMENUITEMTITLEABOUT or NSMENUITEMHIDE or NSMENUITEMTITLE instead. Looks like it cannot find the name of the app. I have tried to set display name to no avail. Or is it a localisation issue ? How to correct this ?
Replies
1
Boosts
0
Views
250
Activity
Mar ’26
init?(coder: NSCoder) or init?(coder: (NSCoder?))
In this code, I use in some places required init?(coder: (NSCoder?)) { // Init some properties super.init(coder: coder!) } And in other places required init?(coder: NSCoder) { super.init(coder: coder) // Init some properties } Both seem to work. Is there a preferred one ? In which cases ? Or should I always use the second one ? And can super be called at anytime ?
Replies
2
Boosts
0
Views
1.3k
Activity
Feb ’26