32
Charles Petzold www.charlespetzold.com Marketplace Deployment

Charles Petzold Marketplace Deployment

Embed Size (px)

Citation preview

Page 1: Charles Petzold  Marketplace Deployment

Charles Petzoldwww.charlespetzold.com

Marketplace Deployment

Page 2: Charles Petzold  Marketplace Deployment

Agenda

• The Windows Phone Marketplace• Preparing for deployment

– Trial versions– Application manifest and capabilities– Certification requirements– Artwork and iconography

• Submitting your app for certification• Deploying updates

Page 3: Charles Petzold  Marketplace Deployment

• The only way to distribute apps to users– http://marketplace.windowsphone.com/

Default.aspx• Developer account required to publish apps

– 100 free apps and unlimited paid apps per year

The Windows Phone Marketplace

Page 4: Charles Petzold  Marketplace Deployment

• Test and debug the application– Optionally include support for trial versions– Test with manifest modified to list capabilities

• Use Capability Detection tool to detect capabilities

• Make sure app meets certification requirements

• Prepare the application artwork– Artwork submitted to Marketplace– Iconography in app itself

Preparing for Deployment

Page 5: Charles Petzold  Marketplace Deployment

• Windows phone apps have the option of supporting trial versions ("try before you buy")– http://msdn.microsoft.com/en-us/library/

ff967554(VS.92).aspx

• LicenseInformation.IsTrial method tells you whether app is running as a trial version– Might offer reduced functionality, or– Might expire after a specified period of time

• MarketplaceDetailTask.Show method takes user to your app in the Marketplace for purchase

Trial Versions

Page 6: Charles Petzold  Marketplace Deployment

Detecting Trial Versions

LicenseInformation license = new LicenseInformation()

if (license.IsTrial()){ // Trial version}else{ // Licensed version}

Page 7: Charles Petzold  Marketplace Deployment

Implementing "Buy Now"

private MarketplaceDetailTask _task = new MarketplaceDetailTask(); . . .LicenseInformation license = new LicenseInformation()

if (license.IsTrial() && IsExpired){ // If trial period has expired, let the user buy the app _task.Show();}

Page 8: Charles Petzold  Marketplace Deployment

• WMAppManifest.xml– Generated by Visual Studio– Embedded in application's XAP file

• Contains information about the app, including:– Capabilities (features and services it uses)– Title, description, version, unique ID, and more

• Test with modified <Capabilities> section• Microsoft modifies this section after

submission• http://msdn.microsoft.com/en-us/library/ff769509(VS.92).aspx

Application Manifest

Page 9: Charles Petzold  Marketplace Deployment

WMAppManifest.xml

<?xml version="1.0" encoding="utf-8"?><Deployment ... AppPlatformVersion="7.0"> <App xmlns="" ProductID="{430ae360-8d52-40b3-a92f-93854c239a86}" Title="RssNewsDemo" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="RssNewsDemo author" Description="Sample description" Publisher="RssNewsDemo"> <IconPath ...>ApplicationIcon.png</IconPath> <Capabilities> ... </Capabilities> <Tasks> <DefaultTask Name ="_default" NavigationPage="MainPage.xaml"/> </Tasks> <Tokens> <PrimaryToken TokenID="RssNewsDemoToken" TaskName="_default"> <TemplateType5> <BackgroundImageURI ...>Background.png</BackgroundImageURI> <Count>0</Count> <Title>RssNewsDemo</Title> </TemplateType5> </PrimaryToken> </Tokens> </App></Deployment>

Page 10: Charles Petzold  Marketplace Deployment

Application Capabilities

<Capabilities> <Capability Name="ID_CAP_GAMERSERVICES"/> <Capability Name="ID_CAP_IDENTITY_DEVICE"/> <Capability Name="ID_CAP_IDENTITY_USER"/> <Capability Name="ID_CAP_LOCATION"/> <Capability Name="ID_CAP_MEDIALIB"/> <Capability Name="ID_CAP_MICROPHONE"/> <Capability Name="ID_CAP_NETWORKING"/> <Capability Name="ID_CAP_PHONEDIALER"/> <Capability Name="ID_CAP_PUSH_NOTIFICATION"/> <Capability Name="ID_CAP_SENSORS"/> <Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/></Capabilities>

Page 11: Charles Petzold  Marketplace Deployment

• Command-line tool included in updates to Windows Phone Developer Tools– %Program Files%\Microsoft SDKs\Windows

Phone\v7.0\Tools\CapDetect\CapabilityDetection.exe

• Examines IL in generated assemblies and/or XAP file and determines application capabilities– Networking, location service, sensors, etc.– Outputs ID_CAPS enumerating capabilities

• Run tool and copy ID_CAPs to <Capabilities> section of WMAppManifest.xml for testing

Capability Detection Tool

Page 12: Charles Petzold  Marketplace Deployment

• Run CapabilityDetection.exe– Point it to phone project's bin folder

Using the Capability Detection Tool

Page 13: Charles Petzold  Marketplace Deployment

• Download PDF from http://go.microsoft.com/?linkid=9730558

• Study it; learn it; know it• Apps that don't meet

requirements are routinely rejected

• Read between the lines

Certification Requirements

Page 14: Charles Petzold  Marketplace Deployment

• Must run on any WP7 device of any screen size

• Must handle exceptions, not terminate unexpectedly, and present user-friendly error messages– "An application that displays generic or

unhelpful error messages will fail certification"• Display a visual progress indicator and a

means to cancel during "time-consuming activities" such as "downloading data over network connections"

Reliability (Section 5.1)

Page 15: Charles Petzold  Marketplace Deployment

• Must show first screen within 5 seconds of launch– First real screen, not splash screen

• Must be responsive to input within 20 seconds

• Must complete actions in response to Activated and Deactivated events within 10 seconds– Keep that tombstoning code tight!

• Must not hijack the Back button• Must not invoke trial APIs in a tight loop

Performance (Section 5.2)

Page 16: Charles Petzold  Marketplace Deployment

• Must "provide in-application settings that allow the user to enable and disable your application‟s access to and use of location from the Location Service API "

• Must not "hang or terminate unexpectedly when the Location Service is turned off on the phone"

Location-Aware Apps (2.10 and 6.1)

Page 17: Charles Petzold  Marketplace Deployment

• Must "ask the user for explicit permission" on first use of HttpNotificationChannel.BindtoShellToast– First use, not first use each time applications

runs– Use isolated storage to persist permission

• Must allow users to opt in to push notifications and disable them if desired– All push notifications, but toast notifications

especially• Must not "excessively use network capacity

or bandwidth"

Push Notifications (2.13 and 6.2)

Page 18: Charles Petzold  Marketplace Deployment

• Must minimize power usage while under lock– App must "stop any UI updates, active timers,

and other non-critical processing"– Use Obscured and Unobscured events

• Must not reduce battery life to less than 120 hours– Unless app plays audio, in which case battery

life must be at least 6 hours

Running While Locked (Section 6.3)

Page 19: Charles Petzold  Marketplace Deployment

• Must consist of type-safe MSIL code (5.4)– Code can be obfuscated if desired

• Must not P/Invoke, use undocumented APIs, or contain debugging symbols (4.2)– Submit release-build XAPs only!

• Must allow users to opt in if app publishes personal data or location data (2.10.5 and 2.11)– Requires published privacy policy, too

• XAP size can't exceed 225 MB (4.1.1)

Additional Requirements

Page 20: Charles Petzold  Marketplace Deployment

• Required artwork– PC tile – 200 x 200 PNG– Large mobile tile – 173 x 173 PNG– Small mobile tile – 99 x 99 PNG– Screen shots – One to eight 480 x 800 PNGs

• Optional artwork– Background art – 1000 x 800 PNG

• Shown if app is featured in the Marketplace• Do not use transparent pixels in these

images

Application Artwork

Page 21: Charles Petzold  Marketplace Deployment

Sample Tiles and Screens

PC Tile(200 x 200)

Large Mobile Tile(173 x 173)

Small Mobile Tile(99 x 99)

Screen Shot (480 x 800)

Page 22: Charles Petzold  Marketplace Deployment

Tiles in Action

Page 23: Charles Petzold  Marketplace Deployment

• Application icons– Background.png - 173 x 173 tile shown if app is

pinned– ApplicationIcon.png - 62 x 62 icon shown in apps

list– Icons can optionally use transparent pixels

• Allows phone accent color to shine through• Bug in WP7 prevents proper display in apps

list• Splash screen

– SplashScreenImage.jpg – 480 x 800 image shown while app loads

Iconography

Page 24: Charles Petzold  Marketplace Deployment

Sample Iconography

Background.png ApplicationIcon.png

Transparent pixels

White pixels

Page 25: Charles Petzold  Marketplace Deployment

• Five simple steps that start at:– https://windowsphone.create.msdn.com/-

AppSubmission#/Page1Upload• Walk-through and detailed instructions at:

– http://create.msdn.com/en-US/home/about/-app_submission_walkthrough_upload

• FAQ at:– http://create.msdn.com/en-US/home/faq/-

windows_phone_7

The Submission Process

Page 26: Charles Petzold  Marketplace Deployment

• Provide the app's name and version number• Upload the XAP (release build, max. 225

MB)• Request a "technical exception" if desired

Step 1: Upload Application

Page 27: Charles Petzold  Marketplace Deployment

• Enter title, category, description and other information that will appear in the Marketplace

Step 2: Provide Description

Page 28: Charles Petzold  Marketplace Deployment

• Upload large and small mobile tiles, PC tile, and at least one 480 x 800 screen shot

• Optionally upload Marketplace background art

Step 3: Upload Artwork

Page 29: Charles Petzold  Marketplace Deployment

• Price the application, specify where (in which countries) it will be sold, and indicate whether trial versions are supported

Step 4: Set Pricing

Page 30: Charles Petzold  Marketplace Deployment

• Indicate whether app should be published automatically if it is approved

• Click to submit!

Step 5: Submit

Page 31: Charles Petzold  Marketplace Deployment

• Updates work just like first submissions– Submit new version of app as if it were the first

• Users are notified that an update is available

• You are not allowed to charge for updates• Data in isolated storage is preserved

– Unless user uninstalls and reinstalls your app• For more info, see

http://msdn.microsoft.com/en-us/library/gg442301(v=vs.92).aspx

Application Updates

Page 32: Charles Petzold  Marketplace Deployment

Charles Petzoldwww.charlespetzold.com

Questions?