Post

Replies

Boosts

Views

Activity

Reply to How to solve this NSKeyedArchiver warning
SOLVED. I did log a message before each call of decoder.decodeObject(of: key:) That let me find the issue, and replace: self.aVar = decoder.decodeObject(of: NSArray.self, forKey: someKey) as? someClass by self.aVar = decoder.decodeObject(of: [NSArray.self, NSSet.self, NSNumber.self], forKey: someKey) as? someClass   Effectively, someClass has properties that have NSSet properties as well as Int. That was my error, but I still think that Xcode should be able to guess this and provide clearer messages or propose autocompletion. Not yet the case in Xcode 16.4 nor 26.2. I'll file a bug report for enhancement.
Topic: App & System Services SubTopic: General Tags:
Jan ’26
Reply to How to solve this NSKeyedArchiver warning
Thanks Albert for replying.   Is it an array where you use NSKeyedUnarchiver validateAllowedClass:forKey:? I have a lot of classes with SecureCoding, and I cannot find from the warning in the log where it comes from. What is surprising is that I have commented out all the NSNumber.self in any list of decoder.decodeObject(of:, key:) like if let format = decoder.decodeObject(of: [NSArray.self/*, NSNumber.self*/], forKey: formatKey) as? [[Int]] { And still get the log. *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x204cdbeb8) [/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set: '{( "'NSArray' (0x204cd5598) [/System/Library/Frameworks/CoreFoundation.framework]" )}'. This will be disallowed in the future. *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x204cdbeb8) [/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set: '{( "'NSArray' (0x204cd5598) [/System/Library/Frameworks/CoreFoundation.framework]" )}'. This will be disallowed in the future. So the questions: does the alert ask to include NSNumber.self in some decoder.decodeObject(of:) ? How can I find where the message triggers ? I will try to locate by setting breakpoints at decoder.decodeObject(of:, key:) calls, but there maybe a simpler way ? PS: this new API for secure coding makes it really difficult. It would be great if Xcode could propose the list of Types to include in decoder.decodeObject(of:, key:).
Topic: App & System Services SubTopic: General Tags:
Jan ’26
Reply to How to encode / decode Array < Array < SomeStruct > >
I have tried also: if let format = decoder.decodeObject(of: Array<any AnyObject.Type>.self, forKey: someKey) { I get the compiler error: Cannot convert value of type 'Array<any AnyObject.Type>.Type' to expected argument type '[AnyClass]' (aka 'Array<any AnyObject.Type>')   I then tried if let format = decoder.decodeObject(of: [AnyClass].self, forKey: someKey) { and got Cannot convert value of type '[AnyClass].Type' (aka 'Array<any AnyObject.Type>.Type') to expected argument type '[AnyClass]' (aka 'Array<any AnyObject.Type>')    And a last try: if let formatI = decoder.decodeObject(of: [AnyClass], forKey: someKey) { and got Cannot convert value of type '[AnyClass].Type' (aka 'Array<any AnyObject.Type>.Type') to expected argument type '[AnyClass]' (aka 'Array<any AnyObject.Type>')   What should I pass as of: argument?
Topic: App & System Services SubTopic: General Tags:
Jan ’26
Reply to App Store Connect rejects screenshot upload: “incorrect size” (subscription purchase flow) — tried all documented sizes
Welcome to the forums. So just select a simulator in Xcode for iPhone and iPad (e.g., iPhone 16 Plus 6.7" and iPad Air 13") and run the app on them. The screenshots generated by the simulator (cmd-S) will provide the right sized images. Note that you have to provide only one size for iPhone and one size for iPad.
Jan ’26
Reply to NSKeyedArchiving issue
Hey Quinn, thanks for all the material. I realize that I have a basic issue in my code. data is not loaded. In the previous version, archiver had a connection to data let archiver = NSKeyedArchiver(forWritingWith: data) That's no more the case, so data is empty, hence the problems. let data = NSMutableData() let archiver = NSKeyedArchiver(requiringSecureCoding: true) archiver.encode(myObject, forKey: theKey) archiver.encode(myObject2, forKey: theKey2) archiver.finishEncoding() do { try data.write(to: an uRL, options: []) // data is empty of course ! } catch { } So should I replace: archiver.encode(myObject, forKey: theKey) archiver.encode(myObject2, forKey: theKey2) archiver.finishEncoding() do { try data.write(to: anURL, options: []) // So object and object2 are on file with let data = try! NSKeyedArchiver.archivedData(withRootObject: myObject, requiringSecureCoding: true) let data2 = try! NSKeyedArchiver.archivedData(withRootObject: myObject2, requiringSecureCoding: true) archiver.finishEncoding() If so, how do I write object and object2 in a single file properly ? Would I have to include all in a single root class ? Also, when I compare to https://developer.apple.com/forums/thread/759746, my required init(coder decoder: NSCoder) is different. required init(coder decoder: NSCoder) { super.init() var1 = decoder.decodeObject(forKey: key) as? [someType] var2 = decoder.decodeObject(forKey: key2) as? [someType2] } I do not use decodeObject(of:) as in the reference let identifier = decoder.decodeObject(of: NSString.self, forKey: "identifier"), let codeDataModels = decoder.decodeArrayOfObjects(ofClass: CodeDataModel.self, forKey: "codeDataModels") Is it OK ?
Topic: App & System Services SubTopic: General Tags:
Jan ’26
Reply to Tools to create awesome "Previews and Screenshots" images.
It is very explicit in guidelines, if your Previews don't show real screenshots, the app risks being rejected. 2.3 ASR & NR Accurate Metadata.                  Customers should know what they’re getting when they download or buy your app, so make sure all your app metadata, including privacy information, your app description, screenshots, and previews accurately reflect the app’s core experience and remember to keep them up-to-date with new versions. You can add drawing in screenshot overlay: 2.3.3 Screenshots should show the app in use, and not merely the title art, login page, or splash screen. They may also include text and image overlays (e.g. to demonstrate input mechanisms, such as an animated touch point or Apple Pencil) and show extended functionality on device, such as Touch Bar. You can use AI to generate images to include in the app and they will show on screenshots. Or some image to partially overlay the screenshot. But not substitute to screenshots.   it just ignores the dimensions I tell it to use That's not the issue as it is so easy to resize to the exact dimensions. The issue is the content.
Jan ’26
Reply to App stuck in 'Ready for Distribution'
@petriniemela Welcome to the forum. How do you see your app is not distributed ? It does not appear on the AppStore ? Have you checked that you have set the countries for distribution properly (is Finland in your list) ? You answered in the comments (better to answer with a reply, more visible). Ready for distribution is the last stage, no need for more. Did you receive a mail notification ? If you still have issue, the best is to contact support. https://developer.apple.com/contact/ If you want someone else to check, could you give the name of your app ? Note: avoid duplicating posts.
Jan ’26
Reply to App multiple times rejected - 4.3.0 Design: Spam
That's really painful situation to get such a rejection after a long development. The fact that Apple maintained that the app “duplicates the content and functionality of similar apps in a saturated category." may hint that rejection was because your app is in a very saturated category, where all apps end up looking similar, even when you really did your own design without any copying. Could you tell what type of app it is. Unless you change the app to get out of this category (easy to say, hard to achieve), I fear it will not be accepted. From my experience, I found that posting a message for the reviewer in the submission file may help. So, what I would try in your case: Make some change to the app (not a complete redesign, but something visible), to have a reason to resubmit May be change the name of the app so that it looks more different in the category Explain, in the notes to reviewer, how your app is different from others in the category, what changes you made to make it different (this is more to prove your goodwill than to provide in depth analysis). Good luck.
Topic: Design SubTopic: General Tags:
Jan ’26
Reply to Guidance on implementing Declared Age Range API in response to Texas SB2420
I just tested on an iOS 26.2 device. It seems that try await AgeRangeService.shared.isEligibleForAgeFeatures does nor respond. Is it because Apple has paused on SB2420 ? In this code func testAgeRange() async -> Bool { do { print("Calling isEligibleForAgeFeatures") // show on console var isEligible = false print("iOS 26.2 or later") // show on console isEligible = try await AgeRangeService.shared.isEligibleForAgeFeatures print("isEligible", isEligible) // Does not show on console if !isEligible { print("Not in Texas") return true // Not in Texas, so we can proceed } } catch { print("error", AgeRangeService.Error.notAvailable) // Does not show on console return true // we accept anyway if no ageRange provided, in order not to cause problem out of Texas ? } Here is the console content: Calling isEligibleForAgeFeatures iOS 26.2 or later
Jan ’26
Reply to Swift Student Challenge Questions
Is it acceptable to include placeholders for features that aren’t supported by Swift Playgrounds, or features I planned but didn’t have time to fully implement (as long as the core experience works)? IMHO, that would be a bad idea, even if it were not forbidden; what would be the value for reviewer?   My app relies a lot on user inputs. Is it okay to include a button that loads sample data for reviewers, or is there a preferred approach for this? App must be tested in 3 minutes. No time for a lot of user data. So, providing demo data may be a workaround, but capability to enter personal data is part of user experience. Couldn't you have some predefined (but modifiable) data but let user enter a few (less than 10) important data to experiment your app ?   Besides the known constraints (< 25 MB, experienceable within ~3 minutes), are there any other limits, e.g. lines of code or overall app complexity All requirements are in the terms and conditions for submission. Read them carefully. If I remember well, there are also requirements on copyright. Check you meet these conditions: If your submission includes any open source software, music, photos, artwork, or any other content that you do not have ownership rights in, you agree to (a) comply with all applicable licensing terms and copyright obligations and (b) provide an explanation of why it was used.   Can AI-generated assets (e.g. images) be used if they’re clearly labeled as such inside the app? What type of asset beyond images do you mean? If they are illustration images, I don't think it is a problem.   Do we need to explicitly document where AI was used (assets, code, etc.) as part of the submission? AFAIK, no. Notably because Xcode uses AI for predictive coding. However, you should avoid to have the app fully generated by AI which would probably be a negative point if detected.   My app uses the Foundation Model: On what device is the submission evaluated and should the usage of the Foundation Model be explicitly marked for reviewers? In the terms and conditions "On-device Apple Intelligence frameworks and other Apple technologies may be used. So no need to mark it. Good luck.
Jan ’26
Reply to Array of Bool require NSNumber.self in NSKeyedArchiver decoding list of types
Thanks for the reply. But the question is: why NSNumber for Bool ? Likely because Bool is cast to NSNumberfor coding/decoding: https://stackoverflow.com/questions/45610119/swift-casts-bool-to-nsnumber-using-as-operator
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to Cannot close my own threads
Seems to be solved now on Jan 24.
Replies
Boosts
Views
Activity
Jan ’26
Reply to How to solve this NSKeyedArchiver warning
SOLVED. I did log a message before each call of decoder.decodeObject(of: key:) That let me find the issue, and replace: self.aVar = decoder.decodeObject(of: NSArray.self, forKey: someKey) as? someClass by self.aVar = decoder.decodeObject(of: [NSArray.self, NSSet.self, NSNumber.self], forKey: someKey) as? someClass   Effectively, someClass has properties that have NSSet properties as well as Int. That was my error, but I still think that Xcode should be able to guess this and provide clearer messages or propose autocompletion. Not yet the case in Xcode 16.4 nor 26.2. I'll file a bug report for enhancement.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to How to solve this NSKeyedArchiver warning
Thanks Albert for replying.   Is it an array where you use NSKeyedUnarchiver validateAllowedClass:forKey:? I have a lot of classes with SecureCoding, and I cannot find from the warning in the log where it comes from. What is surprising is that I have commented out all the NSNumber.self in any list of decoder.decodeObject(of:, key:) like if let format = decoder.decodeObject(of: [NSArray.self/*, NSNumber.self*/], forKey: formatKey) as? [[Int]] { And still get the log. *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x204cdbeb8) [/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set: '{( "'NSArray' (0x204cd5598) [/System/Library/Frameworks/CoreFoundation.framework]" )}'. This will be disallowed in the future. *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x204cdbeb8) [/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set: '{( "'NSArray' (0x204cd5598) [/System/Library/Frameworks/CoreFoundation.framework]" )}'. This will be disallowed in the future. So the questions: does the alert ask to include NSNumber.self in some decoder.decodeObject(of:) ? How can I find where the message triggers ? I will try to locate by setting breakpoints at decoder.decodeObject(of:, key:) calls, but there maybe a simpler way ? PS: this new API for secure coding makes it really difficult. It would be great if Xcode could propose the list of Types to include in decoder.decodeObject(of:, key:).
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to How to encode / decode Array < Array < SomeStruct > >
I have tried also: if let format = decoder.decodeObject(of: Array<any AnyObject.Type>.self, forKey: someKey) { I get the compiler error: Cannot convert value of type 'Array<any AnyObject.Type>.Type' to expected argument type '[AnyClass]' (aka 'Array<any AnyObject.Type>')   I then tried if let format = decoder.decodeObject(of: [AnyClass].self, forKey: someKey) { and got Cannot convert value of type '[AnyClass].Type' (aka 'Array<any AnyObject.Type>.Type') to expected argument type '[AnyClass]' (aka 'Array<any AnyObject.Type>')    And a last try: if let formatI = decoder.decodeObject(of: [AnyClass], forKey: someKey) { and got Cannot convert value of type '[AnyClass].Type' (aka 'Array<any AnyObject.Type>.Type') to expected argument type '[AnyClass]' (aka 'Array<any AnyObject.Type>')   What should I pass as of: argument?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to App Store Connect rejects screenshot upload: “incorrect size” (subscription purchase flow) — tried all documented sizes
Welcome to the forums. So just select a simulator in Xcode for iPhone and iPad (e.g., iPhone 16 Plus 6.7" and iPad Air 13") and run the app on them. The screenshots generated by the simulator (cmd-S) will provide the right sized images. Note that you have to provide only one size for iPhone and one size for iPad.
Replies
Boosts
Views
Activity
Jan ’26
Reply to NSKeyedArchiving issue
Hey Quinn, thanks for all the material. I realize that I have a basic issue in my code. data is not loaded. In the previous version, archiver had a connection to data let archiver = NSKeyedArchiver(forWritingWith: data) That's no more the case, so data is empty, hence the problems. let data = NSMutableData() let archiver = NSKeyedArchiver(requiringSecureCoding: true) archiver.encode(myObject, forKey: theKey) archiver.encode(myObject2, forKey: theKey2) archiver.finishEncoding() do { try data.write(to: an uRL, options: []) // data is empty of course ! } catch { } So should I replace: archiver.encode(myObject, forKey: theKey) archiver.encode(myObject2, forKey: theKey2) archiver.finishEncoding() do { try data.write(to: anURL, options: []) // So object and object2 are on file with let data = try! NSKeyedArchiver.archivedData(withRootObject: myObject, requiringSecureCoding: true) let data2 = try! NSKeyedArchiver.archivedData(withRootObject: myObject2, requiringSecureCoding: true) archiver.finishEncoding() If so, how do I write object and object2 in a single file properly ? Would I have to include all in a single root class ? Also, when I compare to https://developer.apple.com/forums/thread/759746, my required init(coder decoder: NSCoder) is different. required init(coder decoder: NSCoder) { super.init() var1 = decoder.decodeObject(forKey: key) as? [someType] var2 = decoder.decodeObject(forKey: key2) as? [someType2] } I do not use decodeObject(of:) as in the reference let identifier = decoder.decodeObject(of: NSString.self, forKey: "identifier"), let codeDataModels = decoder.decodeArrayOfObjects(ofClass: CodeDataModel.self, forKey: "codeDataModels") Is it OK ?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to Tools to create awesome "Previews and Screenshots" images.
It is very explicit in guidelines, if your Previews don't show real screenshots, the app risks being rejected. 2.3 ASR & NR Accurate Metadata.                  Customers should know what they’re getting when they download or buy your app, so make sure all your app metadata, including privacy information, your app description, screenshots, and previews accurately reflect the app’s core experience and remember to keep them up-to-date with new versions. You can add drawing in screenshot overlay: 2.3.3 Screenshots should show the app in use, and not merely the title art, login page, or splash screen. They may also include text and image overlays (e.g. to demonstrate input mechanisms, such as an animated touch point or Apple Pencil) and show extended functionality on device, such as Touch Bar. You can use AI to generate images to include in the app and they will show on screenshots. Or some image to partially overlay the screenshot. But not substitute to screenshots.   it just ignores the dimensions I tell it to use That's not the issue as it is so easy to resize to the exact dimensions. The issue is the content.
Replies
Boosts
Views
Activity
Jan ’26
Reply to App stuck in 'Ready for Distribution'
@petriniemela Welcome to the forum. How do you see your app is not distributed ? It does not appear on the AppStore ? Have you checked that you have set the countries for distribution properly (is Finland in your list) ? You answered in the comments (better to answer with a reply, more visible). Ready for distribution is the last stage, no need for more. Did you receive a mail notification ? If you still have issue, the best is to contact support. https://developer.apple.com/contact/ If you want someone else to check, could you give the name of your app ? Note: avoid duplicating posts.
Replies
Boosts
Views
Activity
Jan ’26
Reply to Swift Student Challenge
It is stated effectively that "All content must be in English." IMHO proper names can (should) be in their native language, as long as it is clear that these are names and not some casula text.
Replies
Boosts
Views
Activity
Jan ’26
Reply to App multiple times rejected - 4.3.0 Design: Spam
That's really painful situation to get such a rejection after a long development. The fact that Apple maintained that the app “duplicates the content and functionality of similar apps in a saturated category." may hint that rejection was because your app is in a very saturated category, where all apps end up looking similar, even when you really did your own design without any copying. Could you tell what type of app it is. Unless you change the app to get out of this category (easy to say, hard to achieve), I fear it will not be accepted. From my experience, I found that posting a message for the reviewer in the submission file may help. So, what I would try in your case: Make some change to the app (not a complete redesign, but something visible), to have a reason to resubmit May be change the name of the app so that it looks more different in the category Explain, in the notes to reviewer, how your app is different from others in the category, what changes you made to make it different (this is more to prove your goodwill than to provide in depth analysis). Good luck.
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to Guidance on implementing Declared Age Range API in response to Texas SB2420
I just tested on an iOS 26.2 device. It seems that try await AgeRangeService.shared.isEligibleForAgeFeatures does nor respond. Is it because Apple has paused on SB2420 ? In this code func testAgeRange() async -> Bool { do { print("Calling isEligibleForAgeFeatures") // show on console var isEligible = false print("iOS 26.2 or later") // show on console isEligible = try await AgeRangeService.shared.isEligibleForAgeFeatures print("isEligible", isEligible) // Does not show on console if !isEligible { print("Not in Texas") return true // Not in Texas, so we can proceed } } catch { print("error", AgeRangeService.Error.notAvailable) // Does not show on console return true // we accept anyway if no ageRange provided, in order not to cause problem out of Texas ? } Here is the console content: Calling isEligibleForAgeFeatures iOS 26.2 or later
Replies
Boosts
Views
Activity
Jan ’26
Reply to App transfer
If you were to redevelop, that could not be the same app, as it would be rejected as spam.
Replies
Boosts
Views
Activity
Jan ’26
Reply to Swift Student Challenge Questions
Is it acceptable to include placeholders for features that aren’t supported by Swift Playgrounds, or features I planned but didn’t have time to fully implement (as long as the core experience works)? IMHO, that would be a bad idea, even if it were not forbidden; what would be the value for reviewer?   My app relies a lot on user inputs. Is it okay to include a button that loads sample data for reviewers, or is there a preferred approach for this? App must be tested in 3 minutes. No time for a lot of user data. So, providing demo data may be a workaround, but capability to enter personal data is part of user experience. Couldn't you have some predefined (but modifiable) data but let user enter a few (less than 10) important data to experiment your app ?   Besides the known constraints (< 25 MB, experienceable within ~3 minutes), are there any other limits, e.g. lines of code or overall app complexity All requirements are in the terms and conditions for submission. Read them carefully. If I remember well, there are also requirements on copyright. Check you meet these conditions: If your submission includes any open source software, music, photos, artwork, or any other content that you do not have ownership rights in, you agree to (a) comply with all applicable licensing terms and copyright obligations and (b) provide an explanation of why it was used.   Can AI-generated assets (e.g. images) be used if they’re clearly labeled as such inside the app? What type of asset beyond images do you mean? If they are illustration images, I don't think it is a problem.   Do we need to explicitly document where AI was used (assets, code, etc.) as part of the submission? AFAIK, no. Notably because Xcode uses AI for predictive coding. However, you should avoid to have the app fully generated by AI which would probably be a negative point if detected.   My app uses the Foundation Model: On what device is the submission evaluated and should the usage of the Foundation Model be explicitly marked for reviewers? In the terms and conditions "On-device Apple Intelligence frameworks and other Apple technologies may be used. So no need to mark it. Good luck.
Replies
Boosts
Views
Activity
Jan ’26
Reply to Technical Inquiry regarding iPhone LiDAR Specifications and ARKit Data Integrity
Who do you ask the questions to ? If the spec is not published (I assume you did perform a web search), developers here will not likely have the information. If you want to ask directly to Apple, the forums is for developers and may not be the best place "for academic verification"
Replies
Boosts
Views
Activity
Jan ’26