Post

Replies

Boosts

Views

Activity

Reply to [Beginner] Unsure if I need Foundation import, and how to auto-import it
What happens if you ignore the warning ? What happens if you import Foundation at top of the file ? import Foundation not needed if for instance you already import UIKit Which version of Xcode ? If you use Xcode 26 (with Swift 6.1), you should check in your build settings the MemberImportVisibility flag. See details here: https://www.hackingwithswift.com/articles/276/whats-new-in-swift-6-1, reading Member import visibility
Oct ’25
Reply to App sometimes crashes when inserting String into Set with assertion ELEMENT_TYPE_OF_SET_VIOLATES_HASHABLE_REQUIREMENTS
I notice the exception is on: NativeSet.insertNew(_:at:isUnique:) + 376 (/:0) Looking at this thread: https://forums.swift.org/t/substring-violates-hashables-requirements-stdlib-compiler-bug/58046/7 I wonder if the compiler is not confused and considering you try to insert a substring. To make sure, could you try: let sub = self[index...] // a substring let theStr = String(sub) return if index == endIndex || basePath == "/" { theStr // String(self[index...]) // for sure, a String } else if let index = self[index...].range(of: "/", options: .anchored)?.upperBound { theStr // String(self[index...]) } else { nil } If that works, you should file a bug report.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’25
Reply to App sometimes crashes when inserting String into Set with assertion ELEMENT_TYPE_OF_SET_VIOLATES_HASHABLE_REQUIREMENTS
I miss something: relativePath may return nil you force unwrap, which could cause a crash scanErrorPaths.insert(path.relativePath(from: basePath)!) Could you try replacing by: guard let index = range(of: basePath, options: .anchored)?.upperBound else { return "" } and have relativePath return a String, not optional ?
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’25
Reply to app to restriction student phone use in schools
My understanding, AFAIK: if iPhone belongs to the student, that should not be possible, (it would mean any app can get control of your iPhone, with all privacy and security issues it would raise) but if the iPhone is supervised, that should be possible. But likely too heavy constraint on users (and school). Get first look here: https://support.apple.com/en-us/102291#:~:text=If%20your%20iPhone%20or%20iPad%20is%20supervised%2C%20the%20organization%20that,need%20to%20check%20your%20settings.
Oct ’25
Reply to Resubmitting for Apple review
Welcome to the forum.   getting past the demo login on my app. when I press enter demo or sign in Is it SwiftUI or UIKit app ? If UIKit, have you checked the buttons are properly connected to their IBAction ? If UIKit, please show the code of the buttons if SwiftUI please show the code of the view where they are defined.   I can’t enter my app to see what’s wrong with it. What do you mean ? That you cannot test beyond this demo or sign in ? You give almost no information except declaring "it does not work". How could someone help ? Please read this: https://developer.apple.com/forums/thread/706527 and complete your post accordingly.
Oct ’25
Reply to Primeira publicação de app na loja apple
Para as capturas de ecrã, o melhor é gerá-las com o simulador. Assim, tem a certeza de que está no formato correto. Então, tem uma empresa e um número DUNS? Qual é o nome comercial? É o nome comercial da empresa? Onde aparece nos metadados? Provavelmente seria mais simples ter o mesmo nome para ambos. For the screenshots, the best is to generate them with the simulator. You are thus sure it is the correct format. So you have a company and a DUNS number ? What is the trade name ? Is it the commercial name of the company ? Where does it appear in Metadata ? It would probably be simpler to have the same name for both.
Oct ’25
Reply to [Beginner] Unsure if I need Foundation import, and how to auto-import it
What happens if you ignore the warning ? What happens if you import Foundation at top of the file ? import Foundation not needed if for instance you already import UIKit Which version of Xcode ? If you use Xcode 26 (with Swift 6.1), you should check in your build settings the MemberImportVisibility flag. See details here: https://www.hackingwithswift.com/articles/276/whats-new-in-swift-6-1, reading Member import visibility
Replies
Boosts
Views
Activity
Oct ’25
Reply to App sometimes crashes when inserting String into Set with assertion ELEMENT_TYPE_OF_SET_VIOLATES_HASHABLE_REQUIREMENTS
I notice the exception is on: NativeSet.insertNew(_:at:isUnique:) + 376 (/:0) Looking at this thread: https://forums.swift.org/t/substring-violates-hashables-requirements-stdlib-compiler-bug/58046/7 I wonder if the compiler is not confused and considering you try to insert a substring. To make sure, could you try: let sub = self[index...] // a substring let theStr = String(sub) return if index == endIndex || basePath == "/" { theStr // String(self[index...]) // for sure, a String } else if let index = self[index...].range(of: "/", options: .anchored)?.upperBound { theStr // String(self[index...]) } else { nil } If that works, you should file a bug report.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to App sometimes crashes when inserting String into Set with assertion ELEMENT_TYPE_OF_SET_VIOLATES_HASHABLE_REQUIREMENTS
I miss something: relativePath may return nil you force unwrap, which could cause a crash scanErrorPaths.insert(path.relativePath(from: basePath)!) Could you try replacing by: guard let index = range(of: basePath, options: .anchored)?.upperBound else { return "" } and have relativePath return a String, not optional ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to openAppWhenRun = true is wrong
Could this help find out the solution ? https://www.createwithswift.com/integrating-app-intents-with-control-action/
Replies
Boosts
Views
Activity
Oct ’25
Reply to Help me
It is not possible to install iOS 17 on iPhone X.
Replies
Boosts
Views
Activity
Oct ’25
Reply to app to restriction student phone use in schools
If you ask for a user action, there may be some possibilities: https://support.apple.com/en-gb/guide/iphone/iph3ff83f3b1/ios But I do not see if white lists are possible or only black lists.
Replies
Boosts
Views
Activity
Oct ’25
Reply to app to restriction student phone use in schools
My understanding, AFAIK: if iPhone belongs to the student, that should not be possible, (it would mean any app can get control of your iPhone, with all privacy and security issues it would raise) but if the iPhone is supervised, that should be possible. But likely too heavy constraint on users (and school). Get first look here: https://support.apple.com/en-us/102291#:~:text=If%20your%20iPhone%20or%20iPad%20is%20supervised%2C%20the%20organization%20that,need%20to%20check%20your%20settings.
Replies
Boosts
Views
Activity
Oct ’25
Reply to Beginner’s question on learning philosophy.
Welcome to the forum. I would advise you to learn and understand the basics, how it works and not look for already cooked solutions. A good way is to use pathways: https://developer.apple.com/pathways/
Replies
Boosts
Views
Activity
Oct ’25
Reply to ResignFirstResponder doesn't animate keyboard dismissal on iOS26
OK, noticed the difference in animation / no animation between the 2 OS versions. Is it a constraint due to liquid glass (would be bad news). Did you file a bug report, at least against documentation if that's on purpose ? Please note reference here.
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Oct ’25
Reply to ResignFirstResponder doesn't animate keyboard dismissal on iOS26
Which resign ? Line 34 or 38 ? On device or in simulator ? Could you add a log in both cases to check which is called ? I tested on simulators for iOS 18 and 26.0. In both cases, dismiss is called and hides keyboard shouldReturn is called in both cases when typing Return on keyboard
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Oct ’25
Reply to Long hang in SwiftUI Dev
in SwiftUI Development? So is it in Preview ? In simulator ? On device ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to Apple Store
Deve contactar o suporte técnico. https://developer.apple.com/contact/
Replies
Boosts
Views
Activity
Oct ’25
Reply to App Store Connect UI Broken - Cannot Attach Build or Subscription for 10+ Days
If you can contact support by phone, it is much better than by mail.
Replies
Boosts
Views
Activity
Oct ’25
Reply to Resubmitting for Apple review
Welcome to the forum.   getting past the demo login on my app. when I press enter demo or sign in Is it SwiftUI or UIKit app ? If UIKit, have you checked the buttons are properly connected to their IBAction ? If UIKit, please show the code of the buttons if SwiftUI please show the code of the view where they are defined.   I can’t enter my app to see what’s wrong with it. What do you mean ? That you cannot test beyond this demo or sign in ? You give almost no information except declaring "it does not work". How could someone help ? Please read this: https://developer.apple.com/forums/thread/706527 and complete your post accordingly.
Replies
Boosts
Views
Activity
Oct ’25
Reply to Primeira publicação de app na loja apple
Para as capturas de ecrã, o melhor é gerá-las com o simulador. Assim, tem a certeza de que está no formato correto. Então, tem uma empresa e um número DUNS? Qual é o nome comercial? É o nome comercial da empresa? Onde aparece nos metadados? Provavelmente seria mais simples ter o mesmo nome para ambos. For the screenshots, the best is to generate them with the simulator. You are thus sure it is the correct format. So you have a company and a DUNS number ? What is the trade name ? Is it the commercial name of the company ? Where does it appear in Metadata ? It would probably be simpler to have the same name for both.
Replies
Boosts
Views
Activity
Oct ’25