Post

Replies

Boosts

Views

Activity

Reply to DateFormatter doesn't work on certain device
Even better, don’t use DateFormatter to parse internet dates; use the newer ISO8601DateFormatter (link) instead. It Just Works™. Your example date almost works with the default options in ISO8601DateFormatter except that it’s missing a time zone marker on the end. So this is what Just Works™: let f = ISO8601DateFormatter() f.formatOptions.remove(.withTimeZone) print(f.date(from: "2023-04-25T02:07:29")!) // 2023-04-25 02:07:29 +0000 Note the formatter defaults to GMT, so you may also need to set timeZone. (This is different from DateFormatter which defaults to your local time zone, not GMT.) @eskimo: Maybe that old tech note could use an update to mention ISO8601DateFormatter?
Topic: App & System Services SubTopic: General Tags:
Apr ’23
Reply to Scanning for Available Networks
First, read this: TN3111 - iOS Wi-Fi API overview. Then if what are you trying to do falls under one of the specific use cases it covers, then you may be able to find a way to do it in Flutter. But if not (and this may be the case, based on your description) then there’s no solution no matter what toolchain you use.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’23
Reply to software differences between 8th and 9th generation iPads?
It's using dataWithContentsOfURL I’d stop investigating right there and just switch to a modern network API immediately. Consider that API a ticking bomb, as the documentation warns: Don't use this synchronous method to request network-based URLs. For network-based URLs, this method can block the current thread for tens of seconds on a slow network, resulting in a poor user experience, and in iOS, may cause your app to be terminated.
Topic: App & System Services SubTopic: General Tags:
Apr ’23
Reply to Prevent uninstall app by "Offload unused apps"
There’s no documented setting for that. Imagine if there were: many apps would use it and thus defeat the purpose of the offload feature. For now your best bet is to advise the user to disable the global offload feature, with a detailed explanation of the motivation for doing so. But it’s still the user's choice. You could also file a Feedback requesting support for this, such as a hard-to-get entitlement for apps like yours.
Apr ’23
Reply to Xcode 14.3: App built is not able to open on iOS 13.6
And by the way, this list on 14.3 is not showing enough simulators. You can create more simulators yourself. Click Manage Run Destinations at the bottom of that list, then switch to the Simulators tab and hit the + button at the bottom. It looks like the oldest simulator supported is iOS 13.7, but this may be sufficient to reproduce the problem. BTW, the App Store usage chart shows very few people are still on iOS 13. And as you can see it’s a pain to support such old versions. Just something to think about.
Apr ’23