I tried following this documentation for Localization in Xamarin but it seems that it does not work for me for some reason.
What I did is adding a Localizable.strings and infoPlist.strings files in both folders that I have Resources/ar.lproj and Resources/en.lproj, I checked that the build action in bundleResources. But it seems that the message presented where it asks for permission is the same entered in the info.plist and not the one declared in the strings files.
Anyone had the same issue ?
Related
I have an Android App and need a JSON configuration file for AAD B2C in the raw directory which is called by like this:
PublicClientApplication.createMultipleAccountPublicClientApplication(activity.getApplicationContext(),
R.raw.auth_config_multiple_account,...)
I need a R.raw.auth_config_multiple_account for each buildType (and possibly flavor). Let's just assume I need a dev, test, prod. I read this article on providing alternate resources and this one for Configure build types, but I don't know exactly how this is supposed to work.
I assumed it might be a subdirectory in raw which is named for the buildType, but that does not seem to be the case. Does anybody have a simple example of this?
Also which buildType is used when you press play on Android Studio and run the app in the emulator?
I figured it out in case anybody else has questions around this. This article and this documentation helped.
I went into the project view in Project explorer, created a debug directory (to match my debug buildType in the build.gradle) in the src directory (making it a peer of main, test and androidTest), created a res directory under the new debug directory and a raw directory under the new res directory. I copied the auth_config_multiple_account.json file into it and altered the configuration to test it. All worked ok.
I"m trying to Create a sample data directory, using Android Studio, by clicking on app in the project view and then right mouse click to find the menu item New > Sample Data Directory.
It is not working.
Creating the directory via android studio doesn't always work. You may need to create the directory manually in your directory structure (at /app/sampledata/) without using Android Studio. Once you create it (e.g., via Windows Explorer) it should show up in Android Studio. See the the following answer for more information about sample data in general: How to put new placeholder resources into Android Studio project ("tools:sample" resources)?
"Unlike resources like images, fonts, etc. The sample data does not go in /res/ (they are not compiled with the app, hence. It is probably easier to filter them out by putting them in a totally separate directory). They go in /app/sampledata/, for example: /app/sampledata/image.png."
You can create a sample data directory in Android Studio itself by following the below steps:
Change the view of directory structure from Android to Project as follows
Right click app folder and select New->Directory
Finally, give a name to your directory, in your case, it should be sampledata
I have already created sampledata directory that's why it says "Directory already exists".
That's it. You have done it. Remember that Android Studio also supports loading sample data from a json file. All you have to give is fully qualified name of the key residing in the json file.
Ex- if your json file contains key name inside a Json Array student, then you have to specify it as "#sample/your_student_file.json/student/name" to use values present in key name.
Unless your issue happens to be different, this is a known issue that only affects Windows. As I've found, it has something to do with 'C:\' in the file path.
https://issuetracker.google.com/issues/124553391
As Shawn mentioned, you need to manually create the directory.
I've been unable to get the images to actually display in the previewer, which I suspect may also be caused by the file path bug.
Inside the app folder in file explorer, You can create a new folder (sample data) which will be reflected in your android studio.
for my xamarin forms ios project I am getting an error when uploading an ipa file via the application uploader to apple.
missing required icon file ipad of exactly 167x167 for ipad pro.
The weird thing is I have actually included this file already in the media.xcassets.
any idea how to fix this?
So here is what I have found regarding this:
First, I would check that all the information found in this article is done (it talks about making sure your .csproj file has the needed references to the files):
https://alexdunn.org/2020/01/06/xamarin-tip-fixing-missing-ios-app-icons/
Second, I would check for miss-match of the case of letters in the file name between the json file in the Assets.xcassets/AppIcons.appiconset folder and your ios csproj file. For example ipad176.png is not the same as iPad176.png. This article explains it well.
https://blog.mzikmund.com/2020/05/the-mystery-of-the-missing-ios-app-icon/
Finally, neither of these resolved my problem. For me it seemed that one of the entries in my json file had something weird about it (event though visually it looked fine). I noticed that every icon entry in the json file AFTER the one that had something weird about it, showed as missing when I attempt to publish the archive. For me the easiest way to find the offending entry was to look for the first (i.e. earliest in the json list) icon entry that generated a missing icon error message when I published. Then, I unloaded my iOS project, opened the .csproj file for the iOS project in Visual Studio, and found the entry for that first app icon. I then copied the file name from the .csproj file and replace the file name in the json with the copied name, saved the json file and magically, I could publish my archive to the App Store.
We've recently created a second Company (id=3) based on a snapshot of our original company (id=2). I am attempting to publish a change to one of the Customization Projects in the new company. The file upload/save worked fine, but publishing leads to this error:
Publish Customization
Compiled projects: AA, BB, CC, DD
Validation has been started.
PX.Data.PXException: Cannot access the uploaded file. Failed to get the
latest revision of the file 9a65331c-ad34-477c-9759-2c414dead49f
at Customization.CstBinFile.GetFileFromDb()
at Customization.CstBinFile.SaveFiles(FilesCollection context)
at Customization.CstDocument.GetFiles(FilesCollection context)
at Customization.CstManager.ValidateDocument(CstDocument doc, Action`1
logMessageDelegate, Boolean patchLibInDB)
at PX.Customization.CstValidationProcess.ValidateCurrentDocument(Action`1
logMessage)
at PX.Customization.CstValidationProcess.CompileInternal()
at PX.Customization.CstValidationProcess.<>c__DisplayClass6_0.
<ProcessRequest>b__0()
This attempt represents the first publish within this Company.
I retried the upload/save, but still no luck.
Our version is: 6.10.0010.
How do I overcome this error?
Any help would be great. Thanks.
This can happen when the customization projects reference a file that has been removed from the database. Customization project still has the file reference ID but the database doesn't contain a file associated with that ID anymore.
If this is the cause of your error, you can correct it by removing and adding back missing files. To do this, go to the Files section of your customization project. Click on each file link.
If the file is missing in database, an error message popup will appear. For these, remove the file link reference and add it back again. When files are not missing, they will appear like in the screenshots below.
I am developing Xamarin Ios app.I am getting the below error when upload .ipa file to application loader.And i dont have Ipad pro in my Info.plist like below:
how can i solve this please help me.
I've encountered some weird behaviour with this icon size as well related to Visual Studio.
Make sure you have another icon named Icon-83.5#2x.png in your Resources folder and set the build action to BundleResource.
Now rebuild your project. Check in the info.plist file if you have a entry like this: <string>Icon-83.5#2x.png</string>.
If you do you can submit that ipa. If it isn't in there, put it in manually under the CFBundleIconFiles key and then rebuild again.
<key>CFBundleIconFiles</key>
<array>
<string>Icon-72#2x.png</string>
<string>Icon-72.png</string>
<string>Icon#2x.png</string>
<string>Icon.png</string>
<string>Icon-60#2x.png</string>
<string>Icon-76.png</string>
<string>Icon-76#2x.png</string>
<string>Icon-83.5#2x.png</string>
<string>Default-568h#2x.png</string>
<string>Icon-Small-50#2x.png</string>
<string>Icon-Small-50.png</string>
<string>Icon-Small-40.png</string>
<string>Icon-Small-40#2x.png</string>
<string>Icon-Small.png</string>
<string>Icon-Small#2x.png</string>
</array>
Double-check that the entry wasn't erased by the build process. If it wasn't submit your ipa to the store.
Downside to all of this is, as I have encountered it, is that the entry gets deleted from the list by the build process. Or more specifically, when I change anything in the project options that influences the info.plist file.
Another way to go about this is to switch to a Asset Catalog.