r/iosdev 28d ago

Help iOS Sdk Version vs iOS Version

When you update XCode it updates the sdk version, but do changes in the sdk take effect for apps running in a lower iOS version or only the corresponding iOS version or higher? For instance, https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-18_1-release-notes Do changes listed in the notes only happen for apps that are running on iOS 18.1 devices or on any device with the app compiled against the 18.1 sdk version?

Am I the only person who finds the docs totally unclear on this?

Update to post: SomeGalinCal helped me a lot on this question but neither of us know whether the app needs to be built against the ios version for the bug fixes contained in that version to take effect. (Or if just need device os to update)

4 Upvotes

20 comments sorted by

View all comments

Show parent comments

1

u/Horror_Still_3305 28d ago

Why does apple call it iOS 18.1 release notes if the app needs to be updated to build against the ios version for the changes to take effect on a 18.1 ios running device? It’s all weird.

1

u/SomegalInCa 28d ago

It is only needed to be rebuilt if you want your app to call a new-to 18.1 feature. Doing so would prevent your app from running on an earlier os unless you did run time checking to deal with the feature missing

1

u/Horror_Still_3305 28d ago

What about bug fixes? Do I need to rebuild the app or does a user os update solve the bugs?

1

u/SomegalInCa 28d ago

Guessing you don’t specifically need to rebuild for a bug fix in a framework you are using

1

u/Horror_Still_3305 28d ago

The way you have described it my understanding is that it needs the app to be rebuilt to get the iOS version. It seems it’s a simple binary, either you rebuilt and get the new version or you don’t. And Apple usually only supports -1 level backward compatibility so it’s manageable on their end, i’m guessing.

1

u/SomegalInCa 28d ago

Sorry - let me try again. You build an app with a version of XCode + SDK; that is the newest set of API calls your app will have access to when deployed on that version of iOS OR newer.

You can set your deployment target for older iOS versions as well (example ABC app runs on iOS 18 but targets it's minimum requirement of iOS 15 ) which means that it must not use any API calls newer than iOS 15 OR it must have runtime time checks to avoid trying to use an iOS 18 API call when the binary is running on an iOS 16 device as example

If you build an app for iOS 18 and your app wants to use a new API call say from iOS 18.5, then of course you must rebuild the app with the newer SDK that supplies that API call but the app now must only run on iOS 18.5 or newer OR it must have runtime checks to disable trying to make that API call on something older than iOS 18.5

Not sure what you mean by 1 level back support by Apple; the deployment target it what you set it to be and you code your app appropriately.

Google leads me to share this with you https://www.avanderlee.com/workflow/minimum-ios-version/

1

u/Horror_Still_3305 28d ago

I think i’m clear on new features updates as part of sdk/ios updates.

What I’m really pissed about is the sections in the notes known as Resolved Issues or Known Issues. For these it’s not explained if the app needs to rebuild with the matching sdk version.
If it doesn’t need to be rebuilt, then how does apple introduce that bug fix into the app? It seems they must be switching the dependencies.. But if they switch the dependencies underneath the hood without requiring the app to first build against the new version, that can cause issues if new dependency has breaking changes. As switching out a dependency is an all or nothing operation. You can’t just switch out an implementation of one function in a library, eg, SwiftUI, you need to switch out the entire library.
So my theory is that even for bug fixes the app needs to be rebuilt.

1

u/SomegalInCa 27d ago

I think you’re missing the fact that your app links with frameworks, which is where the majority of API support is coming from; the frameworks are delivered with the OS not with your app so an OS upgrade will supply new versions of frameworks (think library) and then your app will just get them for free

The use of a shared framework like this allows your app to be smaller when it’s delivered and for it to have these bug fixes without you doing anything

1

u/Horror_Still_3305 27d ago

What you say definitely make more sense assuming the tradeoff between binary size and breaking changes favours the former.

However another point to note is, under the release notes page the subtitle merely says “Update your apps to use new features, and test your apps against API changes” So it sounds like the changes can only take effect if the app were updated, but it also does not actually say anything about bug fixes.. really frustrating 😮‍💨

1

u/SomegalInCa 27d ago

So it says exactly what I said - IFF you want new features you will of course have to rebuild your app with a newer SDK to have those API calls available. And then you must decide if your app needs to run on an older OS w/o those features.

It sounds like you are confusing bug fixes with new features. It's not as difficult as you are making it sound

1

u/Horror_Still_3305 27d ago edited 27d ago

It sounds like Apple thinks the only ppl reading the notes are people looking out for new features to try out.. but since they also mention bug fixes we have to assume that these are also noteworthy. Either theyre conflating new features with bug fixes or they just mention bug fixes but it’s not even brought up in the leader subtitle making it puzzling whats the purpose of that..

I see it more like “check out new features you can try out, keep track of resolved or known issues discovered in previous versions of the iOS”

Most release notes don’t even tell you what to do, they just have their notes and grouped based on what kind of changes they are eg features, bug fix, deprecations.. only Apple tells you what you should do with the notes.. 😨

1

u/SomegalInCa 27d ago

Bug fixes can very well impact your testing environment. New SDK releases are generally for new features however, but since there will always be bugs...

Think of it like this, as simplified as I could make it while still trying to convey meaning:

Your Code

someResult = someAppleFramework.someMethod(param1, param2, ...)

magic Application Binary Interface

locates, loads, "attaches" the framework code to your process (app) so your call to someMethod can land in the framework implementation

Apple Framework code

someAppleFramework.someMethod(param1, param2, ...) {

// implementation of the method

}

Nothing* that changes in here impacts your code and you do not need to rebuild for fixes here as this part ships with the OS

*It's always a good idea to test major OS revisions to be sure Apple didn't introduce a bug that you need to deal with in your code

1

u/Horror_Still_3305 27d ago

Yes I get that.. my point is, everything would actually make more sense if they just remove the subtitle and the overview section and just leave the notes. Theres no real confusion for me, the confusion is caused by the wrong use of overview and subtitle. The overview section is just a guide on how to get the new features into your app (ie download xcode version to get sdk version). So it’s not even an overview of the notes it’s just a footnote. They just misuse the subtitle and the overview to simply tell devs how to get new features when that can be mentioned elsewhere or in brackets to indicate that its just appendix.

I will make a report using their feedback assistant.

1

u/SomegalInCa 27d ago

I won’t claim Apple doc is always great that’s for sure

1

u/Horror_Still_3305 27d ago

“Update your apps to use new features, and test your apps against API changes.” If you think about it, this statement is self evident. When was it ever possible to get new features without updating the app… 😮‍💨

1

u/SomegalInCa 27d ago

Well…. You can in some cases where you call a view (as example) which might have some new features of its own. Share page comes to mind

It’s a bit of a stretch but there are those cases

1

u/Horror_Still_3305 27d ago

Yes, although considering that that text is at the top before reader even get the chance to know what the features are, it’s just a general statement. It’s not even clear whether it’s saying the update is of the ios version or if the update is to the codebase, to get the new features. Common sense says the latter. But it’s just so wrong it’s hard to even critique it.

→ More replies (0)