Better AppStore rating

16bebb36e0e28572a316ba0450e190d1?s=47 Khoa Pham
February 06, 2020

Better AppStore rating

- Automate screenshot capturing
- AppStore review
- BDD testing with Spek
- Automate with Puma

16bebb36e0e28572a316ba0450e190d1?s=128

Khoa Pham

February 06, 2020
Tweet

Transcript

  1. BETTER APPSTORE RATING

  2. ABOUT > Khoa Pham > https://onmyway133.github.io/

  3. AGENDA > AppStore rating > Automate screenshot > Advertisements

  4. RATING AND REVIEW

  5. RATING AND REVIEW > Rate 1 to 5 stars >

    Optionally write a review > Specific to each country on the App Store > Can reset summary rating when submit new version release > Past written reviews remain
  6. ASK import StoreKit SKStoreReviewController.requestReview()

  7. TRACK USER REVIEW? > Use provided dialog > Can request

    max 3 times a year > Out of process, not available to view debugging or other inspections
  8. TIPS > Respond to reviews > Prioritize reviews > Choose

    when to ask > Link to AppStore review page > A/B testing
  9. RESPOND TO REVIEWS

  10. DEMO RATING > Feature toggling > Dependency injection > Conditions

    > Periodic > Unit Testing
  11. SPEK https://github.com/onmyway133/Spek BDD function builder testing framework in Swift

  12. SPEK import XCTest @testable import Spek final class SpekTests: XCTestCase

    { func testExample() { var left = 1 var right = 1 spec { Describe("math") { BeforeEach { left = 2 } Describe("basic") { BeforeEach { right = 3 } AfterEach { } It("adds correctly") { XCTAssertEqual(left + right, 5) } It("multiplies correctly") { XCTAssertEqual(left * right, 6) } } } } } }
  13. AUTOMATE SCREENSHOTS

  14. SCENARIOS n languages * m screen sizes

  15. XCATTACHMENT func takeScreenshot(_ name: String) { let screenshot = XCUIScreen.main.screenshot()

    let attachment = XCTAttachment(screenshot: screenshot) attachment.lifetime = .keepAlways attachment.name = name add(attachment) }
  16. UITESTS SCHEME > Run and Test actions > Application data

    > Routing App Coverage File > Application language > Application region
  17. LAUNCH ARGUMENTS final class ScreenshotUITests: XCTestCase { var app: XCUIApplication!

    override func setUp() { continueAfterFailure = false app = XCUIApplication() app.launchArguments.append("--uitesting") app.launch() } }
  18. XCRESULT Xcode 11 release notes The format of result bundles

    changed in Xcode 11. A result bundle is an asset produced by Xcode 11 with the xcresult file extension that contains information about the build, tests, code coverage, and more
  19. XCRESULTTOOL xcresulttool get --format json --path ./Example.xcresult

  20. TESTING IN XCODE 11 WWDC 2019 Testing in Xcode >

    Test plan > Gather screenshots for localization
  21. DEMO UITESTS > XCTContext > Swizzle > Parallel on multiple

    simulators
  22. PUMA https://github.com/pumaswift/Puma

  23. PUMA SCREENSHOT TASK Screenshot { $0.configure( projectType: .project("TestApp"), appScheme: "TestApp",

    uiTestScheme: "TestAppUITests", saveDirectory: Directory.downloads.appendingPathComponent("PumaScreenshots").path ) $0.add(scenarios: [ .init( destination: .init( name: Destination.Name.iPhone11, platform: Destination.Platform.iOSSimulator, os: Destination.OS.iOS13_2_2 ), language: Language.en_US, locale: Locale.en_US ), .init( destination: .init( name: Destination.Name.iPhone11Pro, platform: Destination.Platform.iOSSimulator, os: Destination.OS.iOS13_2_2 ), language: Language.ja, locale: Locale.ja ) ]) }
  24. BUILD TOOL WITH PUMA swift package init --type executable swift

    package generate-xcodeproj swift build swift run
  25. READ MORE > Ratings, Reviews, and Responses

  26. THANKS May your code continue to compile