About the SwiftUI Apprentice category

This is the official forum for our book, SwiftUI Apprentice, available here: raywenderlich.com/books/swiftui-apprentice

Chapter 5 on Localization apparently does not match my version of software (Xcode 12.5.1). It does not map into my XCode, e.g. p.156: doesn’t produce changed Localizable.strings. I had to copy from your github file. P. 161 shows “Export for Localization” menu option, but this appears under Product for me. Where do I find the results shown on p. 162. Testing my code was only partially successful. Your code in Final folder was complete.

hi Gary, thanks for posting this!

Yes, Xcode menus have changed since we wrote this book. I’ll update the screenshots and instructions when we update the book later this year.

The instructions in Generating Localizable.strings content still work for me.

The Exported folder is HIITFit in the location you specify in the Where field of the Export Localizations… window. The Export options screenshot shows this as Desktop, but the Note says it’s in Preview Content in the final-loc project.

WWDC21 had a session on Localization, so there’ll be bigger changes in this chapter. Looking forward to Apple making it ever easier to do!

Also, I got to p. 214, with the replacement text at the top, but the compiler doesn’t like the entry. It complains about non-conformance with a protocol. When looking through the GitHub code to see what you did, the code is different. There are no references to @AppStorage use in “final” versions of code from this chapter.

Hi Gary

I’m confused. I just worked through the starter project up to the section “Thinking of possible errors”, and didn’t have that error.

Are you able to upload your zipped project here or maybe a Dropbox link if you don’t have permission here?

Sorry. It was a mistake. Turns out I forgot to type “return” in the function. Probably I should only do this stuff when I’m not so tired. You can delete my message from before. I wish Xcode’s error messages were more to the point.

1 Like

Export for Localization feature in Xcode 14.3.

In Xcode 14.3, the Export for Localization feature has been moved to the “Product” menu. Here’s how you can access it:

  1. Open your Xcode project.
  2. Select “Product” from the menu bar.
  3. Hover your mouse over the “Archive” option.
  4. Click on the “Export for Localization…” option in the dropdown menu.

Hi Abdullah, are you reading the first edition? Localization isn’t in the second edition.

yes, unfurtunatly. What should I do now?

if you’re reading online, on the website, at the top of the page, just under the banner/toolbar, you should see:

There is an updated edition of this book available! View latest edition

If you bought a physical book from Amazon, I don’t think you get updates.

1 Like

I have had subscription for online, and I reviewed previously chapter on second edition yesterday. I am study on the second edition now. thank you to mention that point.

1 Like