Post

Replies

Boosts

Views

Activity

Reply to Range For Keys and Values Of Dictionary
You may build something custom. Just for illustration: typealias FruitDict = [String: (String, Int)] let myFruitBasket : FruitDict = ["apple":("red", 1), "banana": ("yellow", 2), "budbeeri": ("dark violet", 3), "chikoo": ("brown", 4)] func subBasket(_ basket: FruitDict, range: ClosedRange<Int>) -> [String: String] { let filtered = basket.filter { $0.value.1 >= range.lowerBound && $0.value.1 <= range.upperBound } let sub = filtered.mapValues{ value in value.0 } return sub } let sub: [String: String] = subBasket(myFruitBasket, range: 1...3) print(sub) print("keys: ", sub.keys) print("values", sub.values) You get: ["banana": "yellow", "apple": "red", "budbeeri": "dark violet"] keys: ["banana", "apple", "budbeeri"] values ["yellow", "red", "dark violet"] Of course, that's not ordered (order does not mean anything with dictionaries), as Quinn explained. But if you plan to use the result as a dictionary, that doesn't matter. To get ordered, you have to convert to array. Or you can compute: let sortedKeys = sub.keys.sorted() print("sorted keys: ", sortedKeys) for key in sortedKeys { print("sorted values", sub[key] ?? "") } And get sorted keys: ["apple", "banana", "budbeeri"] values red values yellow values dark violet
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’25
Reply to Using Dynamic Member Lookup in a Superclass
Interesting question (would like to see the solution), so my 1 cent contribution. Sorry if it is worthless. In The Swift Programming Language (Swift 5.7) : struct Point { var x, y: Int } @dynamicMemberLookup struct PassthroughWrapper<Value> { var value: Value subscript<T>(dynamicMember member: KeyPath<Value, T>) -> T { get { return value[keyPath: member] } } } let point = Point(x: 381, y: 431) let wrapper = PassthroughWrapper(value: point) print(wrapper.x) Have you tried to mimic this, by adding a value property in ElectronicComponent and calling PassthroughWrapper(value: resistorA) ?
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’25
Reply to Guideline 4.3(a) - Design - Spam
Guideline 4.3 is pretty explicit: Don’t create multiple Bundle IDs of the same app. If your app has different versions for specific locations, sports teams, universities, etc., consider submitting a single app and provide the variations using in-app purchase. That seem to be precisely your case. Another thought: I don't know if it is the cause, but there is a Babbel app to train for foreign languages. The name of your app appears pretty close to it.
Jul ’25
Reply to Swift 6 Minimum Requirement for App Store
That seems a reasonable guess. So it's time to prepare: https://wwdcnotes.com/documentation/wwdcnotes/wwdc24-10169-migrate-your-app-to-swift-6/
Replies
Boosts
Views
Activity
Aug ’25
Reply to Range For Keys and Values Of Dictionary
You may build something custom. Just for illustration: typealias FruitDict = [String: (String, Int)] let myFruitBasket : FruitDict = ["apple":("red", 1), "banana": ("yellow", 2), "budbeeri": ("dark violet", 3), "chikoo": ("brown", 4)] func subBasket(_ basket: FruitDict, range: ClosedRange<Int>) -> [String: String] { let filtered = basket.filter { $0.value.1 >= range.lowerBound && $0.value.1 <= range.upperBound } let sub = filtered.mapValues{ value in value.0 } return sub } let sub: [String: String] = subBasket(myFruitBasket, range: 1...3) print(sub) print("keys: ", sub.keys) print("values", sub.values) You get: ["banana": "yellow", "apple": "red", "budbeeri": "dark violet"] keys: ["banana", "apple", "budbeeri"] values ["yellow", "red", "dark violet"] Of course, that's not ordered (order does not mean anything with dictionaries), as Quinn explained. But if you plan to use the result as a dictionary, that doesn't matter. To get ordered, you have to convert to array. Or you can compute: let sortedKeys = sub.keys.sorted() print("sorted keys: ", sortedKeys) for key in sortedKeys { print("sorted values", sub[key] ?? "") } And get sorted keys: ["apple", "banana", "budbeeri"] values red values yellow values dark violet
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to Using Dynamic Member Lookup in a Superclass
Interesting question (would like to see the solution), so my 1 cent contribution. Sorry if it is worthless. In The Swift Programming Language (Swift 5.7) : struct Point { var x, y: Int } @dynamicMemberLookup struct PassthroughWrapper<Value> { var value: Value subscript<T>(dynamicMember member: KeyPath<Value, T>) -> T { get { return value[keyPath: member] } } } let point = Point(x: 381, y: 431) let wrapper = PassthroughWrapper(value: point) print(wrapper.x) Have you tried to mimic this, by adding a value property in ElectronicComponent and calling PassthroughWrapper(value: resistorA) ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to New App Submission - Current Wait Time Approaching a Month
Welcome to the forum. So your wait time is about 1 week 1/2, not a month… I suspect reviewer is specially cautious about this type of app and how it is moderated. IMHO that's a legitimate concern. As it too 2 weeks the first time, wait for a few more days. After that, if no news, you could contact support. PS: avoid to duplicate posts.
Replies
Boosts
Views
Activity
Aug ’25
Reply to Xcode error uploading to App store connect
You cannot upload with a beta version. That's exactly what the message was telling you. PS:Thanks for reporting it's solved. But would even be better to tell how.
Replies
Boosts
Views
Activity
Aug ’25
Reply to App Review Delay – Stuck in “Waiting for Review” for Several Days
I submitted several apps recently and it proceeded rapidly. I advise you NOT to remove the current build. I once did and it caused me issues. If nothing happen in the next 24 hours, you should contact support.
Replies
Boosts
Views
Activity
Jul ’25
Reply to Detecting iOS screen sharing
Could you detect the green dot that's close to the notch or in Dynamic Island ? But maybe the simplest is to check if camera is active: https://stackoverflow.com/questions/16460705/check-which-camera-is-currently-in-use-in-ios-application
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to UIKit SegmentedControl weird UI on iOS 26
Yes, behaviour is "surprising". I had noticed other issues, like the content of a segment being hidden during move. Did you file a bug report ?
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Jul ’25
Reply to Legal action?
You'd better first contact support. Did you do it ?
Replies
Boosts
Views
Activity
Jul ’25
Reply to Architecture for app
Could you explain what you mean by "more architectures" ? Do you mean target more platforms ? Which ?
Replies
Boosts
Views
Activity
Jul ’25
Reply to Guideline 4.3(a) - Design - Spam
Guideline 4.3 is pretty explicit: Don’t create multiple Bundle IDs of the same app. If your app has different versions for specific locations, sports teams, universities, etc., consider submitting a single app and provide the variations using in-app purchase. That seem to be precisely your case. Another thought: I don't know if it is the cause, but there is a Babbel app to train for foreign languages. The name of your app appears pretty close to it.
Replies
Boosts
Views
Activity
Jul ’25
Reply to iOS App Stuck in "Waiting for Review" for 48+ Days - Need Help
You should contact support. They should find out what is blocking (may be some information missing ?). Did you receive an email stating that app was Ready for review ?
Replies
Boosts
Views
Activity
Jul ’25
Reply to Asking about computers model always refer to apple.com?
That's not a question for the developers' forum. Go to Apple support instead or file a bug report.
Replies
Boosts
Views
Activity
Jul ’25