Post

Replies

Boosts

Views

Activity

Reply to TextField Binding
When you say: let textModel = textModels[index] ...you are creating a temporary "textModel", which only lives for 1 pass of your ForEach. So you can't use it as a Binding (because it won't exist, when you try and access it later). (I'm away from Xcode, but) I would omit the line above, and try: TextField("", text: $textModels[index].name)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’22
Reply to How to use Timer when app is in background
As you know, Timer does not work in the background. One common workaround is: Detect when the app is going into the background Convert each live timer into a local notification (at the timer's activation time) Cancel the timer On foregrounding the app: Convert any outstanding local notifications back into Timers Cancel the local notification Of course, if the local notification fires while the app is backgrounded, it will require user intervention, before it can carry out any functionality. Also of course, this workaround may not be suitable for your purpose (but perhaps the principle is helpful)?
Apr ’22
Reply to Bundle.main.url returning nil
When adding resources to a Swift Package, you need to configure the manifest, to explicitly declare the resources. Have you done this? Perhaps something like... targets: [ .target( name: "MyLibrary", resources: [ .process("Audios/Completed.mp3")] ), ] Then you can refer to the resources in code. See: https://developer.apple.com/documentation/swift_packages/bundling_resources_with_a_swift_package
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’22
Reply to Apple Code Change
the Apple store changes its code requirements every couple years true it will require practically a complete rewrite of the original code false In the early years of Swift, the language evolved very quickly, requiring major changes each year. We may now be seeing a similar evolution with SwiftUI. Related (non-code) issues also change, like privacy and App Tracking Transparency requirements. Existing apps will often continue to run, but changes to iOS, and new device sizes, can require an app update.
Apr ’22
Reply to How to change the IOS version in Xcode 13 simulation
To add a new simulated device, with a different version of iOS From Xcode: Window > Devices and Simulators > Simulators Click the "+" (at the bottom-left) Enter a new "Simulator Name" Choose "Device Type" Choose "OS Version"... ...if necessary, "Download more simulator runtimes...", and choose the versions of iOS that you want) Click "Create" The simulator acts like an iPhone (or iPad). It's a very accurate simulation, but of course some features are not available (like the on-device cameras)
Apr ’22
Reply to UIButton action is not working in SwiftUI application.
Show your code, then we can suggest why it is not working.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’22
Reply to TextField Binding
When you say: let textModel = textModels[index] ...you are creating a temporary "textModel", which only lives for 1 pass of your ForEach. So you can't use it as a Binding (because it won't exist, when you try and access it later). (I'm away from Xcode, but) I would omit the line above, and try: TextField("", text: $textModels[index].name)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’22
Reply to Can a friend do an artwork for me?
If you are looking to be a long-term member of the Apple Developer Forum, and make a contribution, is this how you want to be known?
Replies
Boosts
Views
Activity
Apr ’22
Reply to How to use Timer when app is in background
As you know, Timer does not work in the background. One common workaround is: Detect when the app is going into the background Convert each live timer into a local notification (at the timer's activation time) Cancel the timer On foregrounding the app: Convert any outstanding local notifications back into Timers Cancel the local notification Of course, if the local notification fires while the app is backgrounded, it will require user intervention, before it can carry out any functionality. Also of course, this workaround may not be suitable for your purpose (but perhaps the principle is helpful)?
Replies
Boosts
Views
Activity
Apr ’22
Reply to Bundle.main.url returning nil
When adding resources to a Swift Package, you need to configure the manifest, to explicitly declare the resources. Have you done this? Perhaps something like... targets: [ .target( name: "MyLibrary", resources: [ .process("Audios/Completed.mp3")] ), ] Then you can refer to the resources in code. See: https://developer.apple.com/documentation/swift_packages/bundling_resources_with_a_swift_package
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’22
Reply to Can a friend do an artwork for me?
Is that really the second-best username you could think of?
Replies
Boosts
Views
Activity
Apr ’22
Reply to What are the methods for jumping a page?
That depends on what you mean by "jumping a page". I don't think that's a recognized developer term, can you clarify your question?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’22
Reply to Smartly converted EDB File to PST
Reported as spam.
Replies
Boosts
Views
Activity
Apr ’22
Reply to EML File Duplicate Remover
Reported as spam.
Replies
Boosts
Views
Activity
Apr ’22
Reply to Is there an API for third-party apps to use NFC?
Look at the CoreNFC Framework. https://developer.apple.com/documentation/corenfc There is no fee for using this Framework.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’22
Reply to Apple Code Change
the Apple store changes its code requirements every couple years true it will require practically a complete rewrite of the original code false In the early years of Swift, the language evolved very quickly, requiring major changes each year. We may now be seeing a similar evolution with SwiftUI. Related (non-code) issues also change, like privacy and App Tracking Transparency requirements. Existing apps will often continue to run, but changes to iOS, and new device sizes, can require an app update.
Replies
Boosts
Views
Activity
Apr ’22
Reply to How to change the IOS version in Xcode 13 simulation
To add a new simulated device, with a different version of iOS From Xcode: Window > Devices and Simulators > Simulators Click the "+" (at the bottom-left) Enter a new "Simulator Name" Choose "Device Type" Choose "OS Version"... ...if necessary, "Download more simulator runtimes...", and choose the versions of iOS that you want) Click "Create" The simulator acts like an iPhone (or iPad). It's a very accurate simulation, but of course some features are not available (like the on-device cameras)
Replies
Boosts
Views
Activity
Apr ’22
Reply to Build Application in Window OS
What challenge? What app? Please provide some context for your question (more than "Organizer Window")...
Replies
Boosts
Views
Activity
Apr ’22
Reply to designing this gadget for iOS Lightning
My understanding is: the technical information is made available once you join the MFI program... ...at which point it is all under a non-disclosure agreement. I think you will find it difficult to get specific information, outside the MFI program.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Apr ’22