What Can I Do If My Joint Operations App/Game Is Rejected Due to Incorrect Provider Name in HMS Core (APK) Update? - huawei-mobile-services

When I submitted my game, which has HMS Core capabilities integrated, for review, it was rejected due to incorrect provider name during HMS Core (APK) update.
I use Android Studio and I can't find any solutions for this problem in the official documentation.

You don't need to be manually configured for HMS Core (APK) updates for version 4.0 and later.
The provider name is automatically configured in the manifest file after game packaging. To check whether the configuration exists, You need to decompile the game package and check whether the following configurations exist under the application element in the manifest file:
<provider
android:name="com.huawei.hms.update.provider.UpdateProvider"
<!-- Replace xxx.xxx.xxx with the actual game package name. -->
android:authorities="xxx.xxx.xxx.hms.update.provider"
android:exported="false"
android:grantUriPermissions="true" >
</provider>
<provider
android:name="com.huawei.updatesdk.fileprovider.UpdateSdkFileProvider"
<!-- Replace xxx.xxx.xxx with the actual game package name. -->
android:authorities="xxx.xxx.xxx.updateSdk.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
</provider>
If the configurations do not exist, packaging errors or other exceptions may have occurred. In this case, you would need to manually add the provider name.

Related

NU1101 erratically on MS Hosted windows agents

We have been erratically getting NU110 erros in our Azure DevOps pipeline for the MS hosted Windows (vs2017-win2016) based agents. This is been going on for a few days now
error NU1101: Unable to find package CommandLineParser. No packages exist with this id in source(s):
Is this some kind of a known issue and is there anything required from our end for addressing this?
Thanks
error NU1101: Unable to find package CommandLineParser. No packages exist with this id in source(s):
As far as I know, the CommandLineParser package exists in the nuget.org.
Here are two methods, you could refer to them.
When you use the feeds in Nuget Restore task. You could select the Use packages from NuGet.org.
When you use the Nuget.config file to restore the package, you could add the Nuget.org as the package source.
For example:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!-- remove any machine-wide sources with <clear/> -->
<clear />
<!-- get packages from the NuGet Gallery -->
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
Based on my test, the package could be found successfully.
Updates:
Now the "Dotnet Restore" task has some issues itself. It sometimes causes the Unable to find package issue. For more information, you could refer to this ticket.
Workaround:
You could change to use the Nuget Restore task. This task has the same function and it could work fine.

Cordova Facebook plugin: set APP_ID, APP_NAME in config.xml

1. What we want to achieve
Install a pre-configured cordova app using fb cordova plugin ( cordova-plugin-facebook4 - https://github.com/jeduan/cordova-plugin-facebook4 )
2. Problem
The problem derives from the "pre-configured" part.
As a default, the plugin required to being install passing it some configurations like APP_NAME / APP_ID values, as documentation at < https://ionicframework.com/docs/native/facebook > specified.
This is a problem for us because our application creation flow process is based mainly onto the Cordova's configuration config.xml where clearly all plugins are listed.
3. Question
Our need is to be able to pass some configuration directly inside the config.xml file, like for other plugins here below shown:
<plugin name="cordova-plugin-camera" spec="2.4.1">
<variable name="CAMERA_USAGE_DESCRIPTION" value="Allow the app to use your camera" />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="Allow the app to access your photos" />
</plugin>
In the previous lines, variables for cordova-plugin-camera is the way to configure the plugin.
4. Alternative solutions not adopted
Reading around, some solution required to change plugin.xml file of facebook-plugin.
The problem of this solution is the cost for the forked plugin maintenance.
5. Question-based on 4.
Avoiding to fork plugin for configuration setting purpose, can be HOOKS approach usefull? I mean, can we replace "preference" tag inside plugin.xml at some build / prepare / plugin install time as wrote in the second answer at the following link < Cordova Facebook plugin : missing variables APP_ID, APP_NAME > ?
thanks for reading!!
You can specify the APP_ID and APP_NAME in the config XML as following:-
Under Android Platforms:-
<config-file parent="/resources" target="./res/values/strings.xml">
<string name="fb_app_id">574355309670137</string>
<string name="fb_app_name">HUB App</string>
</config-file>
And outside the platform and at the bottom(when installed fb plugin) it would be defined as below:-
<plugin name="cordova-plugin-facebook4" spec="^3.1.0">
<variable name="APP_ID" value="574355309670137" />
<variable name="APP_NAME" value="HUB App" />
</plugin>
Please let me know if you have any questions.

Is not possible to use the WsdlService type provider on OSX/.NET Core 2.1?

I try use the WsdlService type provider from FSharp.Data on OSX in a .net core 2.1 console app, and get this error:
../Test.fs(16,16): Error FS3033: The type provider
'FSharp.Data.TypeProviders.DesignTime.DataProviders' reported an
error: The .NET SDK 4.0 or 4.5 tools could not be found (FS3033)
(Sync)
I try to apply the workaround at https://github.com/fsprojects/SQLProvider/tree/master/tests/SqlProvider.Core.Tests/MsSql after read the issue at https://github.com/Microsoft/visualfsharp/issues/3303. This is my project file (simplified):
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<ReleaseVersion>0.5</ReleaseVersion>
</PropertyGroup>
<PropertyGroup>
<FscToolPath>/Library/Frameworks/Mono.framework/Versions/Current/Commands</FscToolPath>
<FscToolExe>fsharpc</FscToolExe>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Data" Version="2.4.6" />
<PackageReference Include="FSharp.Data.TypeProviders" Version="5.0.0.6" />
</ItemGroup>
</Project>
Alternatively, what to use for manually do SOAP calls in F#?
Short Answer - Nope it isn't.
This is due to several reasons, the main one being svcutil.exe which the type provider uses to generate the type information. Doesn't generate code that is compatible with the .NET Core WCF libraries Dotnet Wcf. There is a new version of this being worked on but the last I checked it didn't work correctly outside of Visual Studio.
When the above work is completed or at least at a state where it is dependant of Visual Studio shouldn't be too hard to change the current TypeProvider to get it to work on .NET core.
As for actually making SOAP calls I typically use SOAP UI to generate the Envelope and save it it to a local file then just use the XML provider or simple string replacement to fill in the body of the envelop, then send it using a HTTP Client

Invalid .nuspec file: target framework `Unsupported,Version=v0.0` is not supported

So embarrassing to ask something that is that well documented, but I am lost with an error which I get when I push my NuGet package:
System.AggregateException: One or more errors occurred. --->
System.Net.Http.HttpRequestException: Response status code does not
indicate success: 400 (The NuGet package contains an invalid .nuspec
file. The error encountered was: 'The target framework
Unsupported,Version=v0.0 is not supported.'. Correct the error and try again.).
I use the VSTS NuGet task to push the package to NuGet.org which delivers the aforesaid error. There's nothing customized, just the default settings:
In my nuspec file I have listed dependencies, simplified example:
<dependencies>
<group targetFramework="netcoreapp">
<dependency id="Microsoft.NETCore.App" version="2.0.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net462" />
<group targetFramework="netstandard1.0" />
</dependencies>
I assume my targetFramework is set incorrectly yet it is as per documentation NuGet Target Frameworks. I tried target frameworks like netstandard and netcoreapp2.0, they all cause the same problem.
My package files:
<files>
<file src="bin\MINE.Core.dll" target="lib\netcoreapp\MINE.Core.dll" />
<file src="bin\MINE.Core.NetFX.dll" target="lib\net462\MINE.Core.NetFX.dll" />
<file src="bin\MINE.Core.PCL.dll" target="lib\netstandard1.0\MINE.Core.PCL.dll" />
<file src="readme.core.txt" target="" />
</files>
If I leave the dependencies section empty (<dependencies />) everything works perfectly fine except for the package doesn't list the dependencies which I'd like to include. Also, If I don't use groups and therefore don't target frameworks, but list all dependent packages, everything works fine.
Any hint to solve this (probably silly) issue would be warmly appreciated.
The release definition isn't the problem, the build definition is. When the to be pushed NuGet package gets packed, ensure the correct NuGet version is being used.
For example, the deprecated NuGet Packager task in VSTS used to package uses internally an older version of NuGet. Therefore, replacing the VSTS task with the recommended NuGet task solves the problem and NuGet.org won't complain about incorrectly nuspec files anymore.

How to run PostShard samples from 2.1 to 4.1?

After download samples from Download - Samples – PostSharp
a "PostSharp Required" dialog was shown asking to install PostSharp 2.1.
I have PostSharp 4.1 installed in my machine, is there a way to run those samples using PostSharp 4.1?
Most samples should be compatible, but are not currently officially supported.
To convert them to the new PostSharp version, you need to edit the csproj file remove the following XML:
<!-- The next section automatically prompts you to install PostSharp if needed. It is not required in normal projects. -->
<UsingTask AssemblyFile="lib\PostSharp.MSBuild.Samples.exe" TaskName="PostSharp.MSBuild.Samples.LaunchPostSharpInstaller" />
<Target Name="PostSharp21Check" Condition="'$(PostSharp21Imported)'==''" >
<LaunchPostSharpInstaller ProjectPath="$(MSBuildProjectFullPath)" Version="2.1" ProjectGuid="$(ProjectGuid)" BuildingProject="$(BuildingProject)" />
<Error Text="To build this project, you must install PostSharp 2.1 on your machine or add it as a NuGet package to this project." />
</Target>
<PropertyGroup >
<ResolveReferencesDependsOn>PostSharp21Check;$(ResolveReferencesDependsOn)</ResolveReferencesDependsOn>
</PropertyGroup>
Additionally, you need to remove all referenced PostSharp assemblies - most likely only PostSharp.dll (either when editing the csproj file or after reopening).
After reopening the project, you should add PostSharp NuGet package, which will install the current version of PostSharp.