-
Re: Double Length Pseudolanguage and Non-localized string on device
KMT Dec 22, 2016 1:56 PM (in response to jobvite_bhavik)It's just meant to be a stress test, and I think it's hit/miss when targetting a device, so in this this case, you may need to settle for sim testing only.
-
Re: Double Length Pseudolanguage and Non-localized string on device
jobvite_bhavik Dec 22, 2016 2:23 PM (in response to KMT)What do you mean when you say hit/miss? Does it mean it might work in some cases? For me it has never worked.
I am asking whether it is possible to achieve this on a device or not. It can be some other flag that enables this on device.
Regards,
Bhavik
-
Re: Double Length Pseudolanguage and Non-localized string on device
KMT Dec 22, 2016 2:45 PM (in response to jobvite_bhavik)Depending on Xcode version, in the past, others have reported success and others have gone wanting.
Outside of taking a shot w/an option-clean build folder shot (after deleting all builds off the device), there is no secret additional warranted to work lever to pull, once you've got a working scheme that sims respect.
-
Re: Double Length Pseudolanguage and Non-localized string on device
jobvite_bhavik Dec 22, 2016 2:52 PM (in response to KMT)I have done all of that. Deleted the application on device, cleaned up build folders on local machine etc. But doesnt work. Everyone on web seems to be showing these options on simulator. I have not seen anyone showing it on device.
One thing I missed pointing out was that I am compiling and building the application through command line and not through Xcode. Does it matter? I guess it would, right?
-
Re: Double Length Pseudolanguage and Non-localized string on device
KMT Dec 22, 2016 3:18 PM (in response to jobvite_bhavik)Ah - info that would have helped earlier
I can imagine it matters - only one way to confirm.
-
-
-
-
-
Re: Double Length Pseudolanguage and Non-localized string on device
eskimo Dec 22, 2016 3:09 PM (in response to jobvite_bhavik)Let’s split this up. Are you having problems with:
Show non-localized strings
Double Length Pseudolanguage
The combination of both
I just did a quick test of Double Length Pseudolanguage and it worked on my device. It was a really simple test:
Xcode 8.2 on macOS 10.12.2 targeting iOS 10.1.1.
Created a new project from the Single View Application template.
Added a label in the UI and then constrained it to the centre, leaving the text as the default “Label”.
Editing the scheme to Double Length Pseudolanguage.
Ran it on my device.
The label displays as “Label Label”.
One thing I missed pointing out was that I am compiling and building the application through command line and not through Xcode. Does it matter? I guess it would, right?
If you’re building it from the command line, how are you installing it? These options don’t affect the built code, but rather set environment variables to enable the feature. Thus, if you run from outside of Xcode you won’t get the feature.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: Double Length Pseudolanguage and Non-localized string on device
jobvite_bhavik Dec 27, 2016 10:44 AM (in response to eskimo)Thanks Quinn and KMT. I understand the problem better now. I was trying to build the application using command line and install it using over the air installation or manually using iTunes. Since I was specifying these parameters inside a scheme and I was building a scheme I assumed that these parameters will be available when I install and run the application on device. But it is not the case since these parameters are environment variables injected by Xcode.
I was trying to setup a pseduo locale testing build (combination of Double Length Pseudolanguage and Show non-localized strings) on my Jenkins CI that my QA team can use to test different localization issues such as layouts, missing strings etc. And hence I was trying to build from command line and not via Xcode. But I guess that there is no way to enable these parameters when running application outside of Xcode.
Regards,
Bhavik
-
Re: Double Length Pseudolanguage and Non-localized string on device
eskimo Dec 28, 2016 2:37 PM (in response to jobvite_bhavik)But I guess that there is no way to enable these parameters when running application outside of Xcode.
You can do this if you’re prepared to build your app differently. The basic strategy is:
Run your app from Xcode with the debug options you want.
In your app, dump the environment variables that got set by Xcode. You can use the standard C
environ
global variable for this.Modify your app so that, right at the start of
main
, you set those same environment variables usingsetenv
.
There’s two things to watch out for:
You must set the environment variables before anything uses Foundation. For most apps the start of
main
is fine. However, if your app has code that runs at load time (the most common examples are C++ static initialises and framework init functions), things get trickier.In many cases these environment variables are not documented API. It’s fine to use this approach as part of a debug build you ship to testers, but don’t use it for code you distribute to users.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: Double Length Pseudolanguage and Non-localized string on device
jobvite_bhavik Dec 28, 2016 5:08 PM (in response to eskimo)Thanks Quinn for the reply. I would use a bow emoticon if there was one.
Regards,
Bhavik
-
Re: Double Length Pseudolanguage and Non-localized string on device
SunnyLlama Jan 10, 2017 7:05 AM (in response to eskimo)I have the same issue- but I need/want to be able to send a debug build out via TestFlight. XCode has no ability to use/create an imaginary language. So for example I can't use Klingon for a test language, or insert my own .strings file for a language that show "**KEYNAME**" for a strings key, instead of the actual translated phrase. My translation team is asking for this kind of functionality (we are a global company). We can make sure all the layouts are properly translated this way.
We have added some debug code to override the system language (it's a little hacky, sure) but with it we could debug all of our strings easily, if there was a way to even include a fake language. But we cannot.
I realize this is a bug report, but wanted to add my comment to this topic.
-
Re: Double Length Pseudolanguage and Non-localized string on device
eskimo Jan 10, 2017 1:03 PM (in response to SunnyLlama)I’m a bit confused as to what you’re trying to do here. If you’re trying to engage the double length pseudolanguage mode in a TestFlight build, I recommend you try the the approach I outlined in my post of 28 Dec. OTOH, if you just want to create a dummy localisation that happens to be very long, it seems like you could do that by picking an obscure language (one that none of your testers use) and putting your dummy localisation there.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
-