Fastlane: Snapshot not working in localized versions

Created on 18 Jun 2016  路  3Comments  路  Source: fastlane/fastlane

New Issue Checklist

I'm trying to use Snapshot to create screenshots from my app in all it's localized versions, but it only opens the english version of the app, the app is already internationalized and localized for both spanish and english, when I build it using the scheme configured for the Spanish language and Mexico as the region it works properly and all the strings are in spanish but when I run snapshot I only get english text, although according to Snapshot the Spanish version should have opened:

15:20:04: --- iPhone 4s - es-ES ---

Any fix to this issue?

Configuration Files

Please copy the complete content of your Fastfile and any other configuration files you use below:

Snapfile:

 devices([
  "iPhone 6",
   "iPhone 6 Plus",
  "iPhone 5",
  "iPhone 4s", 
])

languages([
  "en-US",
  "es-ES ",
])

Environment

fastlane version (run fastlane -v):

Fastlane 1.94

Do you use bundler to execute fastlane (i.e. bundle exec fastlane)?

No

Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)?

No

Most helpful comment

Found the solution:

After this argument in my UITests file

 private let app = XCUIApplication()

override func setUp() {
    super.setUp()
    app.launchArguments += ["UI-Testing"]
    setupSnapshot(app)
    app.launch()

I had this argument

XCUIApplication().launch()

this argument was overriding the language in the simulator, removing it took care of the problem.

All 3 comments

Found the solution:

After this argument in my UITests file

 private let app = XCUIApplication()

override func setUp() {
    super.setUp()
    app.launchArguments += ["UI-Testing"]
    setupSnapshot(app)
    app.launch()

I had this argument

XCUIApplication().launch()

this argument was overriding the language in the simulator, removing it took care of the problem.

@tattva20 Awesome! Really glad to hear you got up and running. Hope that you have a wonderful day! 馃憤

@TKBurner Thank you so much! Now everything is running smoothly and fastlane is working perfectly, have a wonderful week!

Was this page helpful?
0 / 5 - 0 ratings