Posts
1574
Following
138
Followers
878
I'm a bit of an eclectic mess 🙂 I've been a programmer, journalist, editor, TV producer, and a few other things.

I'm currently working on my second novel which is complete, but is in the edit stage. I wrote my first novel over 20 years ago but then didn't write much till now.

I post about #Coding, #Flutter, #Writing, #Movies and #TV. I'll also talk about #Technology, #Gadgets, #MachineLearning, #DeepLearning and a few other things as the fancy strikes ...

Lived in: 🇱🇰🇸🇦🇺🇸🇳🇿🇸🇬🇲🇾🇦🇪🇫🇷🇪🇸🇵🇹🇶🇦🇨🇦
@jaywardell Isn’t that (almost) always how it goes? It’s like Schroedinger’s cat — the moment you try to explain/replicate the issue, it resolves itself 😛
0
1
1

Fahim Farook

Edited 2 years ago
So, I mentioned Xcode 15 beta console logging in my previous post …

With just NSLog statements (and without extra metadata options turned on) the console looks like the first screenshot.

But if you switch to unified logging (so that you can specify the type, subsystem, and category) for each log message, and then turn on the relevant metadata options in the Xcode 15 console, then the console logs look like the second screenshot 🙂

So much better, right? And it’s so much easier to filter too! I think, I’m going to find it hard to go back to Xcode 14.x now … 😛

#Apple #WWDC2023 #Xcode15Beta #Console #Logging
Bare console logs from Xcode 15…
Xcode 15 beta console logs for …
0
0
0

Fahim Farook

I want to start using Xcode 15 beta right now just for the console logging 😀

I was using NSLog (for the metadata) but had not moved on to using full-on logging because there didn’t seem to be a huge advantage (till now) with regards to how I used the Xcode console … that was until now 😛

The first screenshot shows console logs from Xcode 14.x for one of my projects.

The second screenshot shows console logs from Xcode 15 beta for the same project with no changes.

So much cleaner and easier to read, right?

But it doesn’t stop there! If you actually use the unified logging system instead of NSLog and tag your log messages with the type of log message, the subsystem and category, the console logging gets even more useful — and a lot more easier to filter.

I’ll post about that in another post once I’ve updated my project …

#Apple #WWDC2023 #Xcode15Beta #Logging #Console
Console logs in Xcode 14.x for …
Console logs in Xcode 15.x for …
0
0
2
@PixelJones The whole Vision Pro strategy seemed to be aimed at doing prestige stuff, honestly 🙂

Like the replaceable head bands, light seals, and audio straps (not sure about the last but I’m sure that the first two can be swapped out) looked very much like Apple’s approach to the watch — folks can have luxury elements that cost astronomical amounts and Apple can rake in the cash 😛

I’m sure in a few years there’ll be (slightly) more affordable items for those of us who don’t want to pay through our noses, but we’ll always have those feelings of “aspiration” to deal with 😀
0
0
1
@_holger Enjoy your time with your daughter and in-laws 🙂 They grow up so fast — not that we have any children, but I used to spend all my time with my nephews and but once they get to be about 10 years old, they have no time for you since they have other concerns 😀
0
0
1
@_holger A new baby is a blessing but I know that as a parent you’ll have very little time. Congratulations on the baby, by the way 🙂

I actually haven’t had the time to watch the videos from yesterday still either but will send links your way if I find a session that is relevant to the discussion, and hopefully, you can catch up later at your leisure …
2
0
1
@_holger Sure thing 🙂 I’m sure it will be covered in the SwiftData sessions from either yesterday or today but figured you’d like to know since that should set your mind at ease …
1
0
0
@kharrison Found the sample code you were talking about — Sorry, should have looked before asking 🙂 I’m sure it’ll be covered in the sessions too but was just wondering how I’d missed it since I thought I watched all the videos that have been released so far …
0
0
0
@_holger Apparently, it’s possible for Core Data and SwiftData to co-exist in the same app … Plus, the same sample also talks about converting from Core Data to SwiftData.

Sample code here:

https://developer.apple.com/documentation/coredata/adopting_swiftdata_for_a_core_data_app
1
0
1
@kharrison I think I missed that … which video was that? Or is this one of the sample apps provided for WWDC? I hadn’t looked at those …
1
0
0

Fahim Farook

I was curious as to what the underlying data format for SwiftData was …

Apparently, I missed this during the keynote (or I did hear it but didn’t pay enough attention) but it appears that SwiftData uses Core Data (or something pretty similar to Core Data) under the hood.

The screenshot shows the DB used by a sample SwiftData app and the file is simply an SQLite DB. And on a cursory inspection, the data structures look pretty similar to how Core Data stores data 🙂

Of course, I don’t use Core Data much, so I can’t be absolutely sure, but I do have to wonder how it would work if you had a Core Data-based app and simply wanted to switch over to SwiftData? Is there a way to use the existing data without any migration at all?

Interesting to consider …

At least one thing I know of for sure is that there’s an easy way to view/modify SwiftData persisted data since the underlying database is SQLite 🙂

#Apple #WWDC2023 #SwiftData #DataPersistence
Screenshot of an SQLite databas…
1
1
1
@_holger It might depend, at least to an extent, on what the underlying storage format for SwiftData is? Is it still SQLite? Or something else entirely?

I’m curious and this is something I wanted to dig into once I got a quick SwiftData project going. But haven’t gotten that far yet — so many shiny new things to look at in the Xcode beta 😛
1
0
1

Fahim Farook

Since the VisionOS SDK will not be released till later, I didn’t expect this to be there, but I was still curious 😛

Looks as if there is no option to add a Vision Pro destination for an Xcode 15 beta project yet …

#Apple #XcodeBeta #WWDC2023
Screenshot showing all the opti…
0
0
0
@_holger I generally don’t use CoreData 🙂 I use my own library which uses SQLite as the local storage and CloudKit as the remote storage. It works kind of like a very lightweight ORM. (Repo here: https://github.com/FahimF/SQLiteDB)

Since most of my code simply uses classes which represent the SQLite tables as models, switching to SwiftData should be fairly painless. Of course, converting existing data is going to be the hard part since I’m assuming I’m going to have to do that manually … as in read the data from SQLite and then save as SwiftData in the new version of the app before switching over to SwiftData.

But honestly, no idea of all the implications at this point since I just got Xcode 15 beta working and am just about to try doing some stuff with SwiftData 😛
1
0
1

Fahim Farook

In Xcode 15 beta, when you create a new project, you now can select storage options and can switch between SwiftData and Core Data 🙂

#Apple #WWDC2023 #SwiftData #Beta
New project options dialog in X…
1
0
0

Fahim Farook

OK, (hopefully) final note on Xcode 15 beta install issues 😛

This was my experience (see previous posts which might explain this a bit more in detail) — I opted to download both Xcode 15 beta and iOS 17 since the option was presented and I thought you had to select the items you needed. Multiple downloads were started but in my case, I didn’t get the necessary Xcode XIP file.

I eventually figured out how to get the XIP, extracted it and ran it and then it prompts me to download and install the simulators … including the iOS 17 simulator I’d already downloaded.

This was annoying and confusing. Why have the iOS 17 download under Xcode downloads if Xcode prompts you for it again? If you simply wanted to provide the simulators as separate downloads, then wouldn’t it have made better sense not to include this with the Xcode download. Very confusing ….

Since I already had the iOS 17 simulator downloaded, I opted not to download and install the simulator. Instead, I ran Xcode, let it complete the first run and then quit Xcode, opened the iOS beta DMG and copied the files to the relevant location (which was /Library/Developer/CoreSimulator/Profiles/Runtimes) and then restarted Xcode beta.

It detected the simulator and started verifying it but then says that it can’t verify the simulator because it wasn’t signed (or some similar error). But if I go to Settings in Xcode, it now shows the simulator as being present and installed.

I realize that this is a beta, but Apple used to have release notes which explained things but the Xcode 15 beta is just there with no explanations, and no notes. Some info would have eased the process for those who encounter errors?

#Apple #WWDC2023 #XcodeBeta #GettingItWorking
0
1
2

Fahim Farook

So … If you (or at least I) try to download Xcode 15 beta and select just iOS 17 beta, I get an xcdownloadmanifest file and the DMG for the iOS 17 simulator. But if I select both the iOS 17 beta and the watchOS 10 beta, then I get the previous items, a download for the watchOS simulator and an Xcode 15 XIP file.

Weird ….

And if I expand the XIP file, it does run on macOS 13.x … So that part appears to be OK. Just not sure why the download itself wouldn’t work for me. Since there are no complaints from others (at least that I could find), I assume it works OK for everybody else. So why me? I have no idea 😛

#Apple #WWDC2023 #XcodeBeta
0
0
0

Fahim Farook

If you are on macOS 13.x (Ventura) and tried to download the Xcode 15 beta after WWDC, you might have found that it downloads two files — a 105-byte .xcdownloadmanifest file and a 7+GB DMG named iOS_17_beta_simulator_Runtime … but nothing to show you how to install any of it 😛

I assume the DMG (or maybe the number of DMGs downloaded) will vary depending on whether you selected just iOS or if you opted for watchOS and tvOS too … I just wanted iOS.

Looking at the DMG, I realized that that’s just the iOS simulator part as it says on the tin, but where was Xcode?

The xcdownloadmanifest file is just a text file which indicates that the parent file is Xcode_15_beta.xip and that the iOS file is additional assets. But that didn’t help me much since I had no idea how I could get Xcode_15_beta.xip …

The compatibility info for the download says macOS 13.3 or later, but it doesn’t look as if you can download it at the moment, at least not from macOS 13.x … Maybe later? Or is it macOS 14.x only for the time being?

Guess I’ll keep digging till I find the answer or just get tired/bored? 😀

#Apple #WWDC2023 #Xcode #Betas
0
0
0

Fahim Farook

SwiftData … going through the documentation, it looks like it’s all I’d hoped it would be — automatic migration; the ability to define properties as transient, unique etc.; automatic handling of relationships; the ability to store primitive data types as well as complex data types such as structs or enums as long as they conform to Coddle …

The list just goes on …

I just wish that I could use this in production code now 😛

Also, I’m curious as to what format the final data is stored and if it’s possible to view the stored data, especially for debug purposes … I haven’t seen an answer to these two questions yet, but then again, I haven’t really done enough reading/exploration 🙂

I wish I had more brain power to devote to this, but I’ve only had 4 hours of sleep due to staying up to watch the keynote. So I guess I’ll have to wait till I’m more rested ...

#Coding #WWDC #Swift #SwiftData #Apple
0
0
2

Fahim Farook

So … I start working on my app which provides multiple timers and Apple finally adds support for multiple timers in the core OS 😛

I also start working on my database engine with CloudKit support for the timer app and Apple announces SwiftData 😀

But seriously, out of all the stuff announced for WWDC so far, SwiftData is what I’m most excited to learn more about …

I’m hoping that it’s going to be a way to add persistence to your apps and also be easy to integrate with CoreData. If that’s the case, I can stop working on my data library and simply switch to SwiftData. Guess we’ll see once I’ve had the chance to do some digging …

#Apple #WWDC #Swift #SwiftData
0
0
9
Show older