XCODE and Sonoma

Folks, I'm planning to purchase Mac Book Pro M3 Pro but have a question about a SCENARIO BASED SITUTATION.
What if I bought MacBook Pro and a couple of months later Apple changes the OS along with Xcode version and Xcode OS compatibility requirement? (they tend to come up with a new OS every 10 months)
Will it be possible to reload a new OS without loosing my data(draft App) if Apple decides to replace Sonoma?
Will it be possible to update an already downloaded version of Xcode to publish an app to the App Store?

Apple products and software are closely correlated so If I want to publish an app to the App Store I need the latest version of Xcode and to get the latest version of Xcode I need the latest OS.
I don't want to pay a steep price and end up with a product that is not compatible with Apple requirement to publish an app. Please Advise

If you want to publish an app (built with AI2 for iOS) in the App Store, you don't need Xcode, the latest MacOS or a Mac at all. However, if you want to create your app natively, i.e. with Xcode and Swift, as I have done so far, then you should actually keep Xcode and MacOS up to date. Of course, AppInventor also has to do this regularly with the build server (https://iosbuildservertest.appinventor.mit.edu).

Anke, thank You so much for your response. Is IOS version of AI2 up and running? The link that you kindly shared has the word "test" in it. Apple says that the only way to make IOS apps is Xcode. Also, based on your experience with Apple products and software what should be the plan if I bought a MacBook Pro and Apple replaces the current OS and changes Xcode compatibility requirements? Am I gonna be stuck with a useless device? Will I be able to upgrade to a new OS and update an already downloaded version of Xcode? I've never had any Apple products. PC and Windows always seemed a lot more flexible. There're way too many unnecessary limitations with Apple products.

Where, source?
Btw, you can also build iOS apps with Thunkable.

Of course.

Obviously, we cannot make any claims about what Apple is going to do in the future respecting macOS and Xcode support.

I can offer some observations that can be helpful. I have both the first generation (2016) and last generation (2019) of the MacBook Pro with the touchbar. These are both Intel based processors. The former cannot be upgraded and isn't running the latest Xcode but the latter one is (in fact, it is the one I use to publish the MIT App Inventor companion app to the store). So realistically you're likely to see 5 years of support but 8 is pushing it.

Apple Mac mini (3.0 GHz 6-core Intel Core i5 processor, 256 GB), purchased October 2019. Can be updated to Sonoma and Xcode 15.

Hi Anke, here's the link to the Apple app store submission requirements
Latest News - Apple Developer The first line of the announcement states that:
Starting April 25, 2023, iOS, iPadOS, and watchOS apps submitted to the App Store must be built with Xcode 14.1 or later. ---- now it's Xcode 15.3 and Sonoma but the whole approach remains the same. I checked Thunkable before and it is not as good and user friendly as AI2 which is an awesome software. You guys did a tremendous job which made the IT world a better place for beginners.
Anke, may I kindly ask you to share the link with more information about
iosbuildservertest. May be I don't really need to pay $2160 after all, I'd be happy not to.

P.s. I stopped in at our local Apple Corporate Store(Philadelphia) to ask the sales staff the same questions that I'm asking you and believe it or not but No One Knows Nothing. They couldn't tell me the difference between M3 and M3 Pro chip. They've never even heard about Xcode. The only things they know well are pricing and credit card application.

Thank You so much for taking your time and responding back to me.

Thank you so much Evan! The plan was to build an IOS app within a month from the day of the purchase. I know what has to be done programmatically . So my understanding is that the most recent model should be compatible with all of the Apple's new stuff for up to 5 years, right? Evan, your response is a huge help! Thanks a million for taking time and sharing a few thoughts with me

thank you Anke, this sounds very encouraging!!

Fantastic News, thanks for sharing Anke!! I'm gonna have to carefully read about it. I know this was a plan in 2019 and had know idea you guys have come so far with it.
THANKS a million!