Open itlancer opened 2 years ago
So I think there are two options here. Firstly though - the application descriptor XML needs to have the below line added to it to proceed:
<supportedLanguages>en fr</supportedLanguages>
Then if I try building with the folders and InfoPlist.string files, it tells me:
The path en.lproj/InfoPlist.strings is restricted. Choose another name for this file.
So the two options: 1) we can remove the restriction on that file path, so that you can add the manual string files in locale-specific folders or 2) we can instead add support for that purposeStrings.xml mechanism so that iOS and macOS platforms work the same..
Any preference?
@ajwfrost, I thing for now purposeStrings.xml support for macOS could be preferable. So we can reuse iOS mechanism.
Second this, good to keep the approach similar if possible.
Yes that's what I thought. But it's a bit harder to do ... and I'm actually struggling to find documentation on the purposeStrings mechanism! The only reference I can find is to your comment https://github.com/airsdk/Adobe-Runtime-Support/issues/345#issuecomment-643022825 but the release notes have now disappeared so I'm glad you copied that snippet...
thanks
Gosh, was always a bit of a mysterious one, took a bit of pestering for Adobe to do it and obviously never got properly documented. Will try and gather what I can and put it up on airsdk.dev.
Issue still exists with latest AIR SDK 50.2.4.5.
Problem Description
To support permissions requests (Camera, Microphone, etc) on different languages for macOS you need to add to application resources languages folders (
en.lproj
,fr.lproj
etc) withInfoPlist.strings
files. It described here https://stackoverflow.com/questions/56048180/how-to-localize-info-plist-content-in-visual-studio. But trying to add such directories to package AIR app cause error. So you cannot localize permissions requests for your apps.Tested with AIR 33.1.1.929 with different AIR applications. Trying to add
purposeStrings.xml
(which works with iOS) doesn't work - application not use it. Trying to addpurposeStrings.xml
related content to application descriptor XML to macOSInfoAdditions
section also doesn't work - packaging error.Steps to Reproduce
Try to package macOS application with code below and include localization directories (
en.lproj
andfr.lproj
for example). Packaging command:adt -package -storetype pkcs12 -keystore cert.p12 -storepass pass -keypass pass -target bundle macos_multiple_languages_bug macos_multiple_languages_bug-app.xml macos_multiple_languages_bug.swf en.lproj fr.lproj
Application example with sources attached. macos_multiple_languages_bug.zip
Actual Result: You will get packaging error:
If you try to package via Animate you will get error:
Expected Result: Application will be packaged. If you launch it with French locale device and click anywhere on stage - localized permission request will be prompted.
Known Workarounds
Package AIR application without these resources and then add it to
.app
resources and sign application again.