I have my app localized in three languages and this runs as it should. I added a settings.bundle to the app and I can make changes in the settings and that works too. But I have serious problems with the localization. As suggested in other forums I created in Finder the two additional folders de.lproj and fr.lproj. Into them I copied the Root.strings. My Root.plist is a simple version with one group-item for the title and one Multi Value item with three titles/values inside. The titles/values doesn't need to be translated, but the both titles of the items.
My Root.strings have the following content:
"language" = "Sprache";
"selectedlanguage" = "Ihre Sprachwahl";
The "language" and the "selectedlanguage" are the values of the strings in the Root.plist wich shoulod be replaced:
<plist version=1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Title</key>
<string>language</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>selectedlanguage</string>
....
</dict>
</array>
<key>StringsTable</key>
<string>Root</string>
How can I set up the localization to work? Is there a specific way to create the Root.strings or to "implement" them?
Ok, seems to be a simulator problem. On my iPhone it works.
Related
When I look my Info.plist their is nothing about icon in it, but after I deployed the app, I look in it for the the Info.plist and I can see that it's contain :
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AppIcon60x60</string>
</array>
<key>CFBundleIconName</key>
<string>AppIcon</string>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AppIcon60x60</string>
<string>AppIcon76x76</string>
</array>
<key>CFBundleIconName</key>
<string>AppIcon</string>
</dict>
</dict>
I can see that also the root folder of my app contain 2 files :
AppIcon60x60#2x.png
AppIcon76x76#2x~ipad.png
but nothing in my project, in deployment option, is speaking about those 2 icons. so where they are coming from ? what process add the CFBundleIconFiles key value to the info.plist ?
I want to specify myself the icon (and not from the ide of delphi, I want to update myself the info.plist, and i want to deploy myself the icon), how can I do ?
I only have a partial answer but hopefully will point you in the right direction.
The default info.plist.TemplateiOS.xml contains:
<%VersionInfoPListKeys%>
<%ExtraInfoPListKeys%>
<%StoryboardInfoPListKey%>
Each of these is expanded with information from your project settings. By deleting the corresponding key, you can replace it with your own settings. It might take some trial and error to determine which one inserts the icons.
Hi I would like to implement check option like html radio button behavior where only one option is selectable at a time. I would like to implement this in ios app settings (Settings.bundle). I couldn't find a single example anywhere but I do see other apps have this implemented. Please see screenshot below.
Ok PSMultiValueSpecifier was the word that helped me. Thank you Rudedog.
To further add so it can help others. You can use below plist code to achieve. I got it from https://github.com/allanalves/Environment-Manager-iOS/blob/master/Settings.bundle/Root.plist
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Server</string>
<key>FooterText</key>
<string>Don't forget to choose the "Custom URL" option if you want to specify an URL above.</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Environment</string>
<key>Key</key>
<string>environment</string>
<key>DefaultValue</key>
<string>production</string>
<key>Values</key>
<array>
<string>production</string>
<string>homologation</string>
<string>development</string>
<string>custom</string>
</array>
<key>Titles</key>
<array>
<string>Production</string>
<string>Homologation</string>
<string>Development</string>
<string>Custom URL</string>
</array>
</dict>
My app is using a Siri extension with custom Siri intents, which is a new feature for Xcode 10 / iOS 12. I design my custom Siri intents in a .intentdefinition file (included for both app and extension targets).
My custom (not system) Siri intents are declared within the "Do" category.
A Siri intent also requires a AppIntentVocabulary.plist file with example phrases in it https://developer.apple.com/documentation/sirikit/registering_custom_vocabulary_with_sirikit
I've got my AppIntentVocabulary.plist included for the app target only. It looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IntentPhrases</key>
<array>
<dict>
<key>IntentName</key>
<string>MyIntentName1</string>
<key>IntentExamples</key>
<array>
<string>Do stuff with foo</string>
<string>Do stuff with fu</string>
</array>
</dict>
<dict>
<key>IntentName</key>
<string>MyIntentName2</string>
<key>IntentExamples</key>
<array>
<string>Do other stuff</string>
</array>
</dict>
</array>
<key>ParameterVocabularies</key>
<array>
<dict>
<key>ParameterNames</key>
<array>
<string>MyIntentName1.someParam</string>
</array>
<key>ParameterVocabulary</key>
<array>
<dict>
<key>VocabularyItemIdentifier</key>
<string>paramName</string>
<key>VocabularyItemSynonyms</key>
<array>
<dict>
<key>VocabularyItemPhrase</key>
<string>foo</string>
<key>VocabularyItemPronunciation</key>
<string>fu</string>
<key>VocabularyItemExamples</key>
<array>
<string>Do stuff with foo</string>
</array>
</dict>
<dict>
<key>VocabularyItemPhrase</key>
<string>bar</string>
<key>VocabularyItemPronunciation</key>
<string>bur</string>
<key>VocabularyItemExamples</key>
<array>
<string>Do stuff with bar</string>
</array>
</dict>
</array>
</dict>
</array>
</dict>
</array>
</dict>
</plist>
It builds fine and works ok too. But when I'm trying to submit it to App Store, I get:
[Transporter Error Output]: ERROR ITMS-90624: "Invalid Intent
Vocabulary. The AppIntentVocabulary.plist file in the
Payload/AppName.app/en.lproj folder can't contain the intent name
"MyIntentName1"."
And there are subsequent error messages repeating for every .lproj folder.
If it helps, my app is localized for 14 languages, the project is not using base localization.
I had a similar issue when not using Base Localization. As stated from the Apple Docs:
Place your AppIntentVocabulary.plist file in the language-specific
(.lproj) directory of your iOS app that corresponds to your base
development language.
Not using Base localization can create this kind of problems especially with key names, as it needs a neutral name (using the same English wording works as well) to link against all the localized keys.
For the moment, you can only define custom vocabulary on a few specific types of intents: see here under "Register User-Specific Vocabulary" for a list, but it's things like ride sharing, notes, workouts etc. In other words, not your custom intents (that you might want to expose to iOS 12's Siri shortcuts - that's not available... yet).
And the docs say you need to specify one of those intents as the Intent name in the plist. Likewise, the parameter names need to be specific parameters of just those permitted intents. So I'm guessing that's why you're getting errors on uploading to the App Store - it's checking to see if Siri supports custom vocabulary for "MyIntentName1". Not sure why it's working locally for you, or why this isn't a check built into Xcode. 🤷♀️
In Xcode 9, when you create a group it creates a linked folder in the file system, too. So you don't need to create folder for each group manually. A good explanation about the group and folder related changes in Xcode 9, see this.
I have a custom Xcode project template which generates a project and adds loads of Swift boilerplate source files in custom folders. My problem is that I can only create group folders like this: , which represents a Group not associated with a file system directory. It's not good because if you later rename a folder in Xcode, it will have no effect on the corresponding file system directory.
My goal is to write an Xcode project template that adds my custom boilerplate swift files in real reference folders like this: .
You can download my simplified template from here, place it under: ~/Library/Developer/Xcode/Templates
Then Xcode > File > New > Project, and select Custom-Template.
TemplateInfo.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kind</key>
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
<key>Concrete</key>
<true/>
<key>Identifier</key>
<string>custom-swift.xcodeTemplate</string>
<key>Description</key>
<string>Swift starter project for iOS projects</string>
<key>Ancestors</key>
<array>
<string>com.apple.dt.unit.cocoaTouchFramework</string>
</array>
<key>Nodes</key>
<array>
<string>Classes/Interfaces/CustomInterface.swift</string>
</array>
<key>Definitions</key>
<dict>
<key>Classes/Interfaces/CustomInterface.swift</key>
<dict>
<key>Group</key>
<array>
<string>Classes</string>
<string>Interfaces</string>
</array>
<key>Path</key>
<string>Classes/Interfaces/CustomInterface.swift</string>
</dict>
</dict>
</dict>
</plist>
It creates a project like this:
What I'd like to achieve:
Any help is much appreciated! :)
Update 1:
I found a small workaround.. Create your own complex folder hierarchy with the template script then simply delete the root folder - in my case "Classes". Then open the Trash and drag it back to Xcode, select "Copy items if needed" and select "Create groups". It will build the folder structure with real reference folders.
Here is what you need to do.
In the node section specify the group before naming the file.
<key>Nodes</key>
<array>
<string>MyGroup/File.swift:comments</string>
<array>
Next in the definitions provide the group name in the key like so:
<key>Definitions</key>
<dict>
<key>MyGroup/File.swift</key>
<dict>
<key>Path</key>
<string>File.swift</string>
<key>Group</key>
<string>MyGroup</string>
</dict>
Hopefully this will help.
For That purpose one can use Components as used in imessages template
Example of component is
<key>Components</key>
<array>
<dict>
<key>Identifier</key>
<string>com.apple.dt.unit.messagesextensioncomponentios</string>
<key>Name</key>
<string>___PACKAGENAME___ MessagesExtension</string>
<key>ProductBuildPhaseInjections</key>
<array>
<dict>
<key>TargetIdentifier</key>
<string>com.apple.dt.messagesOnlyApp</string>
</dict>
</array>
</dict>
</array>
When you setup Universal Link support in your iOS 9 app, by putting an apple-app-site-association file on your server and getting the app setup to handle the linking, you automatically also get smart banners on your site whenever you are viewing a page that is supported by your app.
Like this:
These are automatic banners that appear, without us putting any meta tags on our site. They only appear when the user is at the top of the page and pulls down (from what I can see).
My question: Where is Apple pulling the title for the banner from? In the above example, the "Yelp" that appears above the "Open in the Yelp app" line, where does that come from? What we're seeing on ours is: the app icon, the OPEN text on the right, the "Open in the XXXX app," but no title, just a blank area above that line.
I've tried adding some of the meta tags discussed here, but it still doesn't seem to work.
I'm a bit afraid that the answer is going to be that Apple indexes some property off your webpage to get the title. The reason I'm afraid is because these particular pages are not accessible to the general public. 😬
It looks like the title is coming from the iTunesMetadata.plist itemName key. I'm guessing this is only present in distribution ipa file.
<key>itemName</key>
<string>App Name</string>
The iTunesMetadata.plist Contents
The following is an example of of typical iTunesMetadata.plist file used to define the iTunes information for an Ad Hoc distribution:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIRequiredDeviceCapabilities</key>
<dict>
<key>armv7</key>
<true/>
<key>front-facing-camera</key>
<true/>
</dict>
<key>artistName</key>
<string>Company, Inc.</string>
<key>bundleDisplayName</key>
<string>App Name</string>
<key>bundleShortVersionString</key>
<string>1.5.1</string>
<key>bundleVersion</key>
<string>1.5.1</string>
<key>copyright</key>
<string>© 2015 Company, Inc.</string>
<key>drmVersionNumber</key>
<integer>0</integer>
<key>fileExtension</key>
<string>.app</string>
<key>gameCenterEnabled</key>
<false/>
<key>gameCenterEverEnabled</key>
<false/>
<key>genre</key>
<string>Games</string>
<key>genreId</key>
<integer>6014</integer>
<key>itemName</key>
<string>App Name</string>
<key>kind</key>
<string>software</string>
<key>playlistArtistName</key>
<string>Company, Inc.</string>
<key>playlistName</key>
<string>App Name</string>
<key>releaseDate</key>
<string>2015-11-18T03:23:10Z</string>
<key>s</key>
<integer>143441</integer>
<key>softwareIconNeedsShine</key>
<false/>
<key>softwareSupportedDeviceIds</key>
<array>
<integer>9</integer>
</array>
<key>softwareVersionBundleId</key>
<string>com.company.appid</string>
<key>subgenres</key>
<array>
<dict>
<key>genre</key>
<string>Puzzle</string>
<key>genreId</key>
<integer>7012</integer>
</dict>
<dict>
<key>genre</key>
<string>Word</string>
<key>genreId</key>
<integer>7019</integer>
</dict>
</array>
<key>versionRestrictions</key>
<integer>16843008</integer>
</dict>
</plist>