Post

Replies

Boosts

Views

Activity

Reply to Have 2 Task with for loops run concurrently?
EDIT: see my comments below to this post. Interesting. What I got this with this code both in a Xcode playground project and from a command line build is: task a begin task b begin chirp a @ 0 chirp b @ 0 chirp a @ 10000 chirp b @ 10000 chirp b @ 20000 chirp a @ 20000 chirp b @ 30000 chirp a @ 30000 chirp b @ 40000 chirp a @ 40000 chirp b @ 50000 chirp a @ 50000 chirp b @ 60000 chirp a @ 60000 chirp a @ 70000 chirp b @ 70000 chirp a @ 80000 chirp b @ 80000 chirp b @ 90000 chirp a @ 90000 chirp a @ 100000 chirp b @ 100000 task b end task a end swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) Target: x86_64-apple-macosx13.0 (OS X 13.2.1) In a command line build I added at the end: while true { } To keep the process running until the output came, then ctrl-c to abort.
Topic: App & System Services SubTopic: Core OS Tags:
Mar ’23
Reply to Failed to build ContentView.swift
Usually, a build error indicates that you have syntax errors in your code, missing things, typos, whatever. So what you can do is to fix those errors and try again. Would be lots easier to help if you show 1) the error message 2) you code. If you can show the code, may be against your company (if any) policy to show code on public discussion forums.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’23
Reply to XCODE and IOS coding question
Hi, You posted this under the tag "Interface Builder", but I'll answer in general and provide also links to SwiftUI. Using it you could perhaps be able to implement what you wish to, and perhaps a bit easier. Maybe others can provide more relevant pointers to Interface Builder specific things. You'll find a good tutorial right here at the Apple Developer site: https://developer.apple.com/tutorials/swiftui Check these too: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/ https://developer.apple.com/swift/resources/ Also, you want to check out many good persons offering hints and tips on programming at YouTube, for example Paul Hudson, Sean Allen, Stewart Lynch, Tundsdev, Mikaela Caron, Karin Prater, Mark Moeykens, etc. I'm sure others may provide other good sources for learning. At least Paul and Mark also write excellent books on the topic, surely also the others but these I know myself. https://www.youtube.com/@twostraws https://www.youtube.com/@seanallen https://www.youtube.com/@StewartLynch https://www.youtube.com/@tundsdev https://www.youtube.com/@MikaelaCaron https://www.youtube.com/@SwiftyPlace Furthermore, you'll find many open source projects at GitHub where you can start learning and including those in your future apps. Good luck and perseverance in your learning path!
Apr ’23
Reply to Can someone explain this message
Happens with my app too on macOS (Ventura 13.3 (22E252), Xcode Version 14.3 (14E222b)). My app is a SwiftUI app. This is printed in the log every time I close a sheet opened from a View. Doesn't matter if the sheet is closed by pressing a button on view (dismiss() is called) or by pressing esc on keyboard. App file looks like this, if that matters: import SwiftUI @main struct MyBlahBlahApp: App { var body: some Scene { WindowGroup { ContentView() .environment(\.managedObjectContext, BlahBlahContainer.shared.persistentContainer.viewContext) } } }
Topic: Graphics & Games SubTopic: General Tags:
Apr ’23
Reply to Swift UI
Well if you try to imagine us imagining what your code looks like, you would see some confused faces. We have no idea without seeing your code. It could be anything.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’23
Reply to Symbol not found : Crash app on real device debug
If you take a look at the documentation for that symbol, it says it is from iOS 14.0+.
Replies
Boosts
Views
Activity
Mar ’23
Reply to Why do I get a "Publishing changes from within view updates is not allowed" when moving my @Bindings to @Published in an @ObservableObject?
Should the BarcodeScannerViewModel be the ScannerVCDelegate instead of the view? The delegate then updates the published values, view getting the updates through that.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to How to identify users connected to Macbook via screen share app
Does the terminal w or who commands provide what you need?
Topic: Media Technologies SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Why wont my decoder parse .json files
As you can see from Claude31's answer, your JSON contains an array so instead of let decodedObject = try decoder.decode(T.self, from: data) you need to: let decodedObjects = try decoder.decode([T].self, from: data)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Darksky API not responding (HTTP 503 Service Unavailable)
A bit earlier than announced at https://blog.darksky.net unless they have an issue? As previously announced, the Dark Sky iOS app will no longer be available beginning on December 31st, 2022 and, as of this date, already purchased versions of the app will no longer provide weather data. The Dark Sky API and website will continue to function until March 31st, 2023.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Storage in WatchKit App
You can save to the file system using FileManager API as usual. Format could be e.g. JSON.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Have 2 Task with for loops run concurrently?
EDIT: see my comments below to this post. Interesting. What I got this with this code both in a Xcode playground project and from a command line build is: task a begin task b begin chirp a @ 0 chirp b @ 0 chirp a @ 10000 chirp b @ 10000 chirp b @ 20000 chirp a @ 20000 chirp b @ 30000 chirp a @ 30000 chirp b @ 40000 chirp a @ 40000 chirp b @ 50000 chirp a @ 50000 chirp b @ 60000 chirp a @ 60000 chirp a @ 70000 chirp b @ 70000 chirp a @ 80000 chirp b @ 80000 chirp b @ 90000 chirp a @ 90000 chirp a @ 100000 chirp b @ 100000 task b end task a end swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) Target: x86_64-apple-macosx13.0 (OS X 13.2.1) In a command line build I added at the end: while true { } To keep the process running until the output came, then ctrl-c to abort.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Hosting an app for a small number of internal users
Unlisted app perhaps? https://developer.apple.com/support/unlisted-app-distribution/
Replies
Boosts
Views
Activity
Mar ’23
Reply to Xcode SwiftUI app has black background and inverted text
So are all your apps in night mode, but not others? If everything is in night mode, perhaps you accidentally switched night mode on?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Custom framework naming conflicts with Apple's private frameworks
Don't have a link for you, but remember vaguely reading that all two caps prefixed framework names are reserved for Apple and others should use names prefixed with three or more caps letters. So a name for a non-Apple framework should be something like FMXCoreLite or something. Forgive me if this is rubbish, cannot check at this time.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to no eligible devices connected to my mac
You need to select "My Mac" from the list, not "Any Mac" which is for building distributables. Can't you see that on the list? Is your macOS version compatible with your app deployment version the same or lower than your macOS version?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Failed to build ContentView.swift
Usually, a build error indicates that you have syntax errors in your code, missing things, typos, whatever. So what you can do is to fix those errors and try again. Would be lots easier to help if you show 1) the error message 2) you code. If you can show the code, may be against your company (if any) policy to show code on public discussion forums.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to XCODE and IOS coding question
Hi, You posted this under the tag "Interface Builder", but I'll answer in general and provide also links to SwiftUI. Using it you could perhaps be able to implement what you wish to, and perhaps a bit easier. Maybe others can provide more relevant pointers to Interface Builder specific things. You'll find a good tutorial right here at the Apple Developer site: https://developer.apple.com/tutorials/swiftui Check these too: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/ https://developer.apple.com/swift/resources/ Also, you want to check out many good persons offering hints and tips on programming at YouTube, for example Paul Hudson, Sean Allen, Stewart Lynch, Tundsdev, Mikaela Caron, Karin Prater, Mark Moeykens, etc. I'm sure others may provide other good sources for learning. At least Paul and Mark also write excellent books on the topic, surely also the others but these I know myself. https://www.youtube.com/@twostraws https://www.youtube.com/@seanallen https://www.youtube.com/@StewartLynch https://www.youtube.com/@tundsdev https://www.youtube.com/@MikaelaCaron https://www.youtube.com/@SwiftyPlace Furthermore, you'll find many open source projects at GitHub where you can start learning and including those in your future apps. Good luck and perseverance in your learning path!
Replies
Boosts
Views
Activity
Apr ’23
Reply to Can someone explain this message
Happens with my app too on macOS (Ventura 13.3 (22E252), Xcode Version 14.3 (14E222b)). My app is a SwiftUI app. This is printed in the log every time I close a sheet opened from a View. Doesn't matter if the sheet is closed by pressing a button on view (dismiss() is called) or by pressing esc on keyboard. App file looks like this, if that matters: import SwiftUI @main struct MyBlahBlahApp: App { var body: some Scene { WindowGroup { ContentView() .environment(\.managedObjectContext, BlahBlahContainer.shared.persistentContainer.viewContext) } } }
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Swift UI
Well if you try to imagine us imagining what your code looks like, you would see some confused faces. We have no idea without seeing your code. It could be anything.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’23