I've updated my old gist for script generating Root.strings from the Root.plist file. You can check it here:
genstringsforsettingsbundle.swift.
After using that script I'm adding Root.strings to the project (I've used an empty project instead of my main project to not mess up anything). After that, you can right-click on the Root.strings file in the Xcode and use the "Migrate to String Catalog..." option. You will end up with proper Root.xcstrings file which will work as your base for translations.
Post
Replies
Boosts
Views
Activity
Hi,
This is a tricky one. As for Xcode 15.1 I did not find any way to do it semi-automatically like for Info.plist file. The sync seems not possible for Settings.bundle or Root.strings.
But you can use string catalog for Settings.bundle manually. You just need to do some additional work.
What I did is as follows:
In my Resources folder (where I also have the whole Settings.bundle) I've added Root.xcstrings file manually (all languages, keys and strings). Because it will not be populated automatically as InfoPlist.xcstrings I had to manually copy all keys and strings from the original Root.plist. Please remember to NOT add Root.xcstrings to any target because it will trigger automatic stringfile compilation and you will find Root.strings inside your *.lproj folders in your final build. You don't want Root.strings in the top-level *.lproj but inside Settings.bundle.
Next, I've added a custom build phase to manually trigger xcstrings compilation with xcstringstool compile command like this:
#!/bin/bash
SETTINGS_BUNDLE="$CODESIGNING_FOLDER_PATH/Settings.bundle"
SETTINGS_XCSTRINGS="$SRCROOT/My App/Resources/Root.xcstrings"
xcstringstool compile "$SETTINGS_XCSTRINGS" --output-directory "$SETTINGS_BUNDLE"
This phase has to be added after Copy Bundle Resources.
As you can see, the generated Root.strings file lands in the build folder ($CODESIGNING_FOLDER_PATH) not in the source code. You don't need to commit them to your repo.
Next, I'll try to make an automatic sync Root.plist with my Root.xcstrings. I don't know how to extract all localizable texts from the Root.plist yet. I'll work on this. This way we could have the same functionality as for any swift files or storyboard/xib files.
It's a shame Apple did not give us automatic use of string catalog for Settings.bundle but at least it's possible to use it.
Is there any progress on this issue? My company have exactly the same problem. Self-hosted Bitbucket Server is perfectly accessible from around the world but somehow Xcode Cloud cannot connect. Could you share any light on this issue? Is there any configuration which can be changed on the Bitbucket Server side or is this an Apple issue?
Isn't PKPassLibrary.passes() method enough? You will simply not find the card anymore.
Hi. Did anyone find a solution to this issue? I'm also developing a banking app. All PNO Pass Metadata seems configured correctly. My entitlements also seems configured correctly but for some reason the passes() always return an empty list even if I have the bank card added to the wallet. Did you GGutierrez or anyone find a solution to this? Should this method work with debug build or only production build? I've tested the TestFlight build but got an empty list as well.