问题
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. 😬
回答1:
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>
来源:https://stackoverflow.com/questions/35810216/where-does-the-title-in-universal-link-smart-banners-come-from