💡Кастомізація тем у SwiftUI з використанням ShapeStyle
У SwiftUI налаштування зовнішнього вигляду додатка на базі кастомної теми безумовно покращить користувацький досвід.
Початковий підхід до управління цими налаштуваннями передбачає монотонне повторення одних і тих же дій для різних екранів.
📖 У цій статті розглянуто спосіб з використанням кастомного ShapeStyle для створення власних тем у всьому додатку.
🇺🇦 iOSDevUA
У SwiftUI налаштування зовнішнього вигляду додатка на базі кастомної теми безумовно покращить користувацький досвід.
Початковий підхід до управління цими налаштуваннями передбачає монотонне повторення одних і тих же дій для різних екранів.
📖 У цій статті розглянуто спосіб з використанням кастомного ShapeStyle для створення власних тем у всьому додатку.
🇺🇦 iOSDevUA
👍1
💡Стаття, яку запропонував наш підписник. Вона допомогла йому в роботі. Впевнений, що допоможе ще комусь.
Якщо ви використовуєте CoreData у своєму проєкті і працюєте (а можливо, після прочитання статті почнете) з Diffable Data Sources, то цей матеріал точно буде вам корисним.
Diffable Data Sources — це заміна табличних дата сорсов, щоб відображати контент у форматі таблиці або колекції та брати дані з CoreData, власне. В загальному у статті все детально описано 👍
👉 https://www.avanderlee.com/swift/diffable-data-sources-core-data/
🇺🇦 iOSDevUA
Якщо ви використовуєте CoreData у своєму проєкті і працюєте (а можливо, після прочитання статті почнете) з Diffable Data Sources, то цей матеріал точно буде вам корисним.
Diffable Data Sources — це заміна табличних дата сорсов, щоб відображати контент у форматі таблиці або колекції та брати дані з CoreData, власне. В загальному у статті все детально описано 👍
👉 https://www.avanderlee.com/swift/diffable-data-sources-core-data/
🇺🇦 iOSDevUA
SwiftLee
How-to use Diffable Data Sources with Core Data
Diffable Data Sources can be used in Core Data by using an NSFetchedResultsController. Prevent common pitfalls and performance drains.
💡SwiftPM Snippets
Сніппети з’явилися ще у Swift 5.7, але вони використовуються рідко, а офіційної документації мало, тому стаття – на вагу золота. Автор розбирає, як додавати сніппети до пакетів, вбудовувати їх у документацію DocC та використовувати купу їх маловідомих особливостей.
🇺🇦 iOSDevUA
Сніппети з’явилися ще у Swift 5.7, але вони використовуються рідко, а офіційної документації мало, тому стаття – на вагу золота. Автор розбирає, як додавати сніппети до пакетів, вбудовувати їх у документацію DocC та використовувати купу їх маловідомих особливостей.
🇺🇦 iOSDevUA
👍2
This media is not supported in your browser
VIEW IN TELEGRAM
💡Створення секундоміра та таймера на базі SystemFormatStyles у Xcode 16
Коротко кажучи, стилі форматування (format styles) — це заміна на Swift старих класів Objective-C Formatter від Apple.
Вони дозволяють швидко і легко створювати локалізовані відображення різних типів даних.
Вони безпечні, продуктивні та дуже прості у використанні в коді для перетворення одного типу в інший.
Але документація Apple не завжди описує всі нововведення відразу ж (або взагалі ніколи).
📖 У цьому прикладі вже зараз можна познайомитися з двома новими стилями
🇺🇦 iOSDevUA
Коротко кажучи, стилі форматування (format styles) — це заміна на Swift старих класів Objective-C Formatter від Apple.
Вони дозволяють швидко і легко створювати локалізовані відображення різних типів даних.
Вони безпечні, продуктивні та дуже прості у використанні в коді для перетворення одного типу в інший.
Але документація Apple не завжди описує всі нововведення відразу ж (або взагалі ніколи).
📖 У цьому прикладі вже зараз можна познайомитися з двома новими стилями
SystemFormatStyle.Stopwatch та SystemFormatStyle.Timer.🇺🇦 iOSDevUA
Hello iOS developers! New iOS news digest is here!
How to Measure Design System at Scale
The Uber Rider app launches features simultaneously on a global scale, changing details across hundreds of screens using thousands of feature flags. It is no longer possible for any designers, engineers, quality assurance, or product managers to fully visualize every single user flow. Uber needs an observability system of similar scale for measuring design quality to prevent subpar user experience, especially when it comes to adopting the existing UI libraries and accessibility best practices packaged under the Uber’s Design System, Base. Without such an observability system–let’s call it Design System Observability–it could be too late when Uber learned through complaints and public media about the end users who would suffer confusing onboarding rides, inconsistent layouts, and frustrating voiceovers/talkbacks sessions:
https://www.uber.com/en-UA/blog/design-system-at-scale
Great article about preventing app removal on iOS. But be aware to use this feature in a wrong way:
https://tinycoder.pika.page/posts/preventing-app-removal-on-ios
Server side Live Activities guide
iOS 17.2 gained the capability to start Live Activities from a server, which is pretty cool and handy:
https://christianselig.com/2024/09/server-side-live-activities
Managing Themes in React Native Using Context API
In modern React Native apps, managing global states like themes can be cumbersome if not done efficiently. One of the most elegant solutions for managing application-wide states is the Context API. In this article, we’ll explore how to implement dark and light themes in a React Native app using the Context API and React Native’s Appearance module:
https://dev.to/amitkumar13/managing-themes-in-react-native-using-context-api-3dk2
Introduction to Communication Patterns in SwiftUI
SwiftUI provides a powerful and declarative way to build UIs, allowing views to react to state changes automatically. However, managing communication between views, especially when passing data or events from one view to another, can be challenging if not handled properly. In this article, we’ll explore several communication patterns in SwiftUI that enable seamless data flow between views, ensuring that updates occur efficiently and in a way that aligns with SwiftUI’s architecture:
https://azamsharp.com/2024/09/22/introduction-to-communication-patterns-in-swiftui.html
Using the #expect macro for Swift Testing
Swift Testing is Apple’s Swift framework for writing tests and introduces several macros, including the #expect macro. Where we had to use all kinds of XCAssert variations before, we can now rely on a powerful replacement that will help us debug tests more quickly:
https://www.avanderlee.com/swift-testing/expect-macro
Why is my Task running on the main thread?
Building an intuition for Swift Concurrency
https://blog.jacobstechtavern.com/p/why-is-task-running-on-main-thread
How to Measure Design System at Scale
The Uber Rider app launches features simultaneously on a global scale, changing details across hundreds of screens using thousands of feature flags. It is no longer possible for any designers, engineers, quality assurance, or product managers to fully visualize every single user flow. Uber needs an observability system of similar scale for measuring design quality to prevent subpar user experience, especially when it comes to adopting the existing UI libraries and accessibility best practices packaged under the Uber’s Design System, Base. Without such an observability system–let’s call it Design System Observability–it could be too late when Uber learned through complaints and public media about the end users who would suffer confusing onboarding rides, inconsistent layouts, and frustrating voiceovers/talkbacks sessions:
https://www.uber.com/en-UA/blog/design-system-at-scale
Great article about preventing app removal on iOS. But be aware to use this feature in a wrong way:
https://tinycoder.pika.page/posts/preventing-app-removal-on-ios
Server side Live Activities guide
iOS 17.2 gained the capability to start Live Activities from a server, which is pretty cool and handy:
https://christianselig.com/2024/09/server-side-live-activities
Managing Themes in React Native Using Context API
In modern React Native apps, managing global states like themes can be cumbersome if not done efficiently. One of the most elegant solutions for managing application-wide states is the Context API. In this article, we’ll explore how to implement dark and light themes in a React Native app using the Context API and React Native’s Appearance module:
https://dev.to/amitkumar13/managing-themes-in-react-native-using-context-api-3dk2
Introduction to Communication Patterns in SwiftUI
SwiftUI provides a powerful and declarative way to build UIs, allowing views to react to state changes automatically. However, managing communication between views, especially when passing data or events from one view to another, can be challenging if not handled properly. In this article, we’ll explore several communication patterns in SwiftUI that enable seamless data flow between views, ensuring that updates occur efficiently and in a way that aligns with SwiftUI’s architecture:
https://azamsharp.com/2024/09/22/introduction-to-communication-patterns-in-swiftui.html
Using the #expect macro for Swift Testing
Swift Testing is Apple’s Swift framework for writing tests and introduces several macros, including the #expect macro. Where we had to use all kinds of XCAssert variations before, we can now rely on a powerful replacement that will help us debug tests more quickly:
https://www.avanderlee.com/swift-testing/expect-macro
Why is my Task running on the main thread?
Building an intuition for Swift Concurrency
https://blog.jacobstechtavern.com/p/why-is-task-running-on-main-thread
tiny coder
Preventing app removal on iOS - tiny coder
[You can still remove the app from Home Screen, but it is not uninstalled.]These days, I am developing an alarm app called ‘SuperAlarm’. To ensure a user is awake, SuperAlarm can...
💡AVAudioEffectNode: створення низькорівневих аудіоефектів у Swift
При створенні аудіоефектів можна використовувати Audio Units.
І хоча Apple надає приклади того, як це зробити, вони можуть бути складними для початківців.
Дотримуючись аналогічного підходу з бібліотеки Novocaine, автор ділиться прикладом зручного API для створення аудіоефектів у Swift за допомогою AVFoundation.
📖 Дослідження доступне тут, а код — ось тут.
🇺🇦 iOSDevUA
При створенні аудіоефектів можна використовувати Audio Units.
І хоча Apple надає приклади того, як це зробити, вони можуть бути складними для початківців.
Дотримуючись аналогічного підходу з бібліотеки Novocaine, автор ділиться прикладом зручного API для створення аудіоефектів у Swift за допомогою AVFoundation.
📖 Дослідження доступне тут, а код — ось тут.
🇺🇦 iOSDevUA
💡Зміни структури проекту в Xcode 16
У Xcode 16 змінився стандартний спосіб організації структури проекту – замість груп тепер ви працюєте з реальними папками. У статті розглядаються наслідки цього рішення.
👉 https://troz.net/post/2024/xcode_folders_groups/
🇺🇦 iOSDevUA
У Xcode 16 змінився стандартний спосіб організації структури проекту – замість груп тепер ви працюєте з реальними папками. У статті розглядаються наслідки цього рішення.
👉 https://troz.net/post/2024/xcode_folders_groups/
🇺🇦 iOSDevUA
👍2
💡Офіційна специфікація для Lottie
У Lottie тепер є офіційна специфікація версії 1.0. Вона включає всі базові функції, такі як layers, shapes, transforms. Сама специфікація описана тут, а майбутній роадмап – тут.
🇺🇦 iOSDevUA
У Lottie тепер є офіційна специфікація версії 1.0. Вона включає всі базові функції, такі як layers, shapes, transforms. Сама специфікація описана тут, а майбутній роадмап – тут.
🇺🇦 iOSDevUA
👍1
🕵️♂️ Історія одного розслідування
Або як автор статті шукав і виправляв витік пам’яті у своєму додатку 🔥
👉 https://www.emergetools.com/blog/posts/the-memory-leak-an-xcode-detective-story
🇺🇦 iOSDevUA
Або як автор статті шукав і виправляв витік пам’яті у своєму додатку 🔥
👉 https://www.emergetools.com/blog/posts/the-memory-leak-an-xcode-detective-story
🇺🇦 iOSDevUA
Emergetools
Emerge Tools Blog | The Memory Leak: An Xcode Detective Story
A deep-dive into debugging on iOS
💡Створення масштабних додатків на SwiftUI: Керівництво по модульній архітектурі
Архітектура — це завжди тема для гарячих суперечок, особливо коли у нас є багато варіантів.
У фундаментальній статті ви зможете знайти:
🔗 Що таке модульна архітектура?
🔗 Які можуть бути проблеми з MVVM зі SwiftUI
🔗 Як можна розуміти патерн MV
🔗 Screens vs Views (плюси і мінуси назв)
🔗 Приклади створення та використання моделей
🔗 Логіка, спеціалізована на View
🔗 Валідація
🔗 Навігація (і приклад з TabView)
🔗 Відображення помилок
🔗 Групування подій
🔗 Форматування
🔗 Тестування
🇺🇦 iOSDevUA
Архітектура — це завжди тема для гарячих суперечок, особливо коли у нас є багато варіантів.
У фундаментальній статті ви зможете знайти:
🔗 Що таке модульна архітектура?
🔗 Які можуть бути проблеми з MVVM зі SwiftUI
🔗 Як можна розуміти патерн MV
🔗 Screens vs Views (плюси і мінуси назв)
🔗 Приклади створення та використання моделей
🔗 Логіка, спеціалізована на View
🔗 Валідація
🔗 Навігація (і приклад з TabView)
🔗 Відображення помилок
🔗 Групування подій
🔗 Форматування
🔗 Тестування
🇺🇦 iOSDevUA
❤1👍1
💡У Swift тепер є інтероп з Java
На конференції про server-side Swift анонсували новий проєкт – офіційний інтероп Swift з Java. Працює в обидві сторони, подробиці можна прочитати тут.
🇺🇦 iOSDevUA
На конференції про server-side Swift анонсували новий проєкт – офіційний інтероп Swift з Java. Працює в обидві сторони, подробиці можна прочитати тут.
🇺🇦 iOSDevUA
GitHub
GitHub - swiftlang/swift-java: Java interopability support for Swift
Java interopability support for Swift. Contribute to swiftlang/swift-java development by creating an account on GitHub.
This media is not supported in your browser
VIEW IN TELEGRAM
💡Реалізація перетягування елементів за допомогою жестів у SwiftUI
📖 Не складний приклад, у якому показано один з можливих підходів, як працювати з перетягуванням елементів інтерфейсу за допомогою жестів у SwiftUI.
🛠 Саме рішення доступне на GitHub.
🇺🇦 iOSDevUA
📖 Не складний приклад, у якому показано один з можливих підходів, як працювати з перетягуванням елементів інтерфейсу за допомогою жестів у SwiftUI.
🛠 Саме рішення доступне на GitHub.
🇺🇦 iOSDevUA
❤2
💡Дуже корисний та інформативний матеріал про анімації в SwiftUI від автора, який колись давно розповів нам всю базу Objective-C.
Текстовий опис швидше нагадує контент-план, але варто дивитися відео, якщо тема вам цікава. Там є і приклади коду, і результат, і пояснення.
👉 https://chris.eidhof.nl/presentations/swiftui-animations/
🇺🇦 iOSDevUA
Текстовий опис швидше нагадує контент-план, але варто дивитися відео, якщо тема вам цікава. Там є і приклади коду, і результат, і пояснення.
👉 https://chris.eidhof.nl/presentations/swiftui-animations/
🇺🇦 iOSDevUA
💡Traits у Swift Testing
Traits – різні атрибути тестів, які можна налаштовувати через спеціальний макрос. Наприклад, автоматичне вимкнення тесту залежно від оточення, асоціація його з конкретним багом у вашому трекері або обмеження на час його виконання.
🇺🇦 iOSDevUA
Traits – різні атрибути тестів, які можна налаштовувати через спеціальний макрос. Наприклад, автоматичне вимкнення тесту залежно від оточення, асоціація його з конкретним багом у вашому трекері або обмеження на час його виконання.
🇺🇦 iOSDevUA
SwiftLee
Using Traits to annotate and customize test behavior
Customize and annotate tests with traits in the Swift Testing framework. Learn how to configure behaviors and skip certain tests.
💡Приклад кросплатформного додатку для macOS та Windows. Написано на Swift 6!
👉 https://forums.swift.org/t/example-of-a-cross-platform-macos-windows-application-developed-using-swift-6/74591
🇺🇦 iOSDevUA
👉 https://forums.swift.org/t/example-of-a-cross-platform-macos-windows-application-developed-using-swift-6/74591
🇺🇦 iOSDevUA
Swift Forums
Example of a Cross-Platform macOS/Windows Application Developed Using Swift 6
Hey there, This is the source code and documentation for a cross-platform macOS/Windows application implemented in Swift 6. It’s an LLM client. I’ve been playing with it for some time in my spare time and I’m happy to share it publicly now! https://git…
💡Коротенький матеріал про expect macro для тестування у Swift.
Замінник частини функціональності старих XCAssertEqual та XCAssertTrue.
Використовується ось так:
Докладніше – у самому матеріалі!
👉 https://www.avanderlee.com/swift-testing/expect-macro/
🇺🇦 iOSDevUA
Замінник частини функціональності старих XCAssertEqual та XCAssertTrue.
Використовується ось так:
#expect(someBoolean == true)
Докладніше – у самому матеріалі!
👉 https://www.avanderlee.com/swift-testing/expect-macro/
🇺🇦 iOSDevUA
SwiftLee
Using the #expect macro for Swift Testing
Improve your testing workflow with the #expect macro in Swift Testing. Simplify your assertions and debug tests with ease.
Hello iOS developers! New iOS news digest is here!
Are Android apps THAT much smaller than iOS?
Emerge Tools who are creators of a suite of developer tools designed to supercharge mobile apps and the teams that build them released great article analyzing why iOS application are so heavy weight
"People ask why an app is large on Twitter and we at Emerge break it down. It's kind of become our bat signal":
https://www.emergetools.com/blog/posts/are-android-apps-really-that-much-smaller-than-ios
Navigation Patterns in SwiftUI
Super detailed article from Mohammad Azam about navigation in SwiftUI:
https://azamsharp.com/2024/07/29/navigation-patterns-in-swiftui.html
Migrating Combine to AsyncAlgorithms
Future-proof your pipeline operations
If you are looking for an example of migrating Combine to AsyncAlgorithms please check this great detailed article from Jacob Bartlett:
https://blog.jacobstechtavern.com/p/migrating-combine-to-asyncalgorithms
How to keep Date’s microseconds precision in Swift
DateFormatter is used for converting string representation of date and time to a Date type and visa-versa. Something to be aware of is that the conversion loses microseconds precision. This is extremely important if we use these Date values for sorting and therefore ending up with incorrect order:
https://augmentedcode.io/2024/09/23/how-to-keep-dates-microseconds-precision-in-swift
Security-scoped bookmarks for URL access
Security-scoped bookmarks allow you to store access to a given user-selected URL. They are commonly used on macOS to store access information for a user-selected directory. Restoring the security-scoped bookmark data allows you to regain access to a folder previously selected by the user:
https://www.avanderlee.com/swift/security-scoped-bookmarks-for-url-access
React at Meta Connect 2024
At a recent event, Meta announced:
- New Instagram and Facebook mixed-reality apps for the Meta Quest headset
- A new Meta Horizon RN app that performs on par with their main native Facebook app
- Meta Horizon Store for web/mobile/HorizonOS
- Meta Spatial Editor built on top of React Native Windows/macOS enables them to integrate natively their custom 3D rendering engine
https://engineering.fb.com/2024/10/02/android/react-at-meta-connect-2024
How to build a Safari extension with SwiftUI
https://www.polpiella.dev/safari-extensions-swiftui
Are Android apps THAT much smaller than iOS?
Emerge Tools who are creators of a suite of developer tools designed to supercharge mobile apps and the teams that build them released great article analyzing why iOS application are so heavy weight
"People ask why an app is large on Twitter and we at Emerge break it down. It's kind of become our bat signal":
https://www.emergetools.com/blog/posts/are-android-apps-really-that-much-smaller-than-ios
Navigation Patterns in SwiftUI
Super detailed article from Mohammad Azam about navigation in SwiftUI:
https://azamsharp.com/2024/07/29/navigation-patterns-in-swiftui.html
Migrating Combine to AsyncAlgorithms
Future-proof your pipeline operations
If you are looking for an example of migrating Combine to AsyncAlgorithms please check this great detailed article from Jacob Bartlett:
https://blog.jacobstechtavern.com/p/migrating-combine-to-asyncalgorithms
How to keep Date’s microseconds precision in Swift
DateFormatter is used for converting string representation of date and time to a Date type and visa-versa. Something to be aware of is that the conversion loses microseconds precision. This is extremely important if we use these Date values for sorting and therefore ending up with incorrect order:
https://augmentedcode.io/2024/09/23/how-to-keep-dates-microseconds-precision-in-swift
Security-scoped bookmarks for URL access
Security-scoped bookmarks allow you to store access to a given user-selected URL. They are commonly used on macOS to store access information for a user-selected directory. Restoring the security-scoped bookmark data allows you to regain access to a folder previously selected by the user:
https://www.avanderlee.com/swift/security-scoped-bookmarks-for-url-access
React at Meta Connect 2024
At a recent event, Meta announced:
- New Instagram and Facebook mixed-reality apps for the Meta Quest headset
- A new Meta Horizon RN app that performs on par with their main native Facebook app
- Meta Horizon Store for web/mobile/HorizonOS
- Meta Spatial Editor built on top of React Native Windows/macOS enables them to integrate natively their custom 3D rendering engine
https://engineering.fb.com/2024/10/02/android/react-at-meta-connect-2024
How to build a Safari extension with SwiftUI
https://www.polpiella.dev/safari-extensions-swiftui
Emergetools
Emerge Tools Blog | Are Android apps THAT much smaller than iOS?
An in-depth analysis of Android vs. iOS app sizes and why Android apps might be larger than they appear
👍1
💡Swift Container Plugin
Плагін для SwiftPM, за допомогою якого можна збирати контейнери з вашими серверними додатками та публікувати їх у потрібні хмари. Доповідь з деталями можна переглянути тут.
🇺🇦 iOSDevUA
Плагін для SwiftPM, за допомогою якого можна збирати контейнери з вашими серверними додатками та публікувати їх у потрібні хмари. Доповідь з деталями можна переглянути тут.
🇺🇦 iOSDevUA
💡Як заборонити видаляти ваш додаток
Виявляється, в iOS є офіційний API, за допомогою якого можна заборонити видаляти ваш додаток. Він входить до Screen Time API. Але є два нюанси. По-перше, потрібно отримати спеціальний апрув від Apple, по-друге, користувач також повинен дати явну згоду на цей забор.
🇺🇦 iOSDevUA
Виявляється, в iOS є офіційний API, за допомогою якого можна заборонити видаляти ваш додаток. Він входить до Screen Time API. Але є два нюанси. По-перше, потрібно отримати спеціальний апрув від Apple, по-друге, користувач також повинен дати явну згоду на цей забор.
🇺🇦 iOSDevUA
tiny coder
Preventing app removal on iOS - tiny coder
[You can still remove the app from Home Screen, but it is not uninstalled.]These days, I am developing an alarm app called ‘SuperAlarm’. To ensure a user is awake, SuperAlarm can...
💡Як працювати з MeshGradient у iOS 18
У iOS 18 з’явилася можливість створювати mesh-градієнти.
Загалом, це легкий у використанні спосіб створення незвичайних ефектів.
У цьому пості досить детально описано, що таке mesh-градієнти, як їх можна використовувати та анімувати, щоб вони виглядали дійсно приємно.
🇺🇦 iOSDevUA
У iOS 18 з’явилася можливість створювати mesh-градієнти.
Загалом, це легкий у використанні спосіб створення незвичайних ефектів.
У цьому пості досить детально описано, що таке mesh-градієнти, як їх можна використовувати та анімувати, щоб вони виглядали дійсно приємно.
🇺🇦 iOSDevUA
👍2🔥2
💡Стаття про те, чим поганий UserDefaults
Заголовок трохи кричущий, звісно, а ще в кінці автор «продає» свою кастомну бібліотеку, але це вам вирішувати, пропускати цю частину чи ні. А в решті цікавими речами про UserDefaults пише. Може бути корисно 👍
👉 https://christianselig.com/2024/10/beware-userdefaults/
🇺🇦 iOSDevUA
Заголовок трохи кричущий, звісно, а ще в кінці автор «продає» свою кастомну бібліотеку, але це вам вирішувати, пропускати цю частину чи ні. А в решті цікавими речами про UserDefaults пише. Може бути корисно 👍
👉 https://christianselig.com/2024/10/beware-userdefaults/
🇺🇦 iOSDevUA
Christianselig
Beware UserDefaults: a tale of hard to find bugs, and lost data
Excuse the alarmist title, but I think it’s justified, as it’s an issue that’s caused me a ton of pain in both support emails and actually tracking it down, so I want to make others aware of it so they don’t similarly burned.
Brief intro
For the uninitiated…
Brief intro
For the uninitiated…