Friday, September 11, 2020

iOS build X Code versions and supported sdks

 The page below lists different X Code versions and corresponding SDKs. This information is necessary when using X Code build task in DevOps

https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md

Sign Android apps using upload_cert.der from Google Play Console

To publish an android app on production track, it needs to be signed with the right key. Google can automatically manage signing key in the play console for. But we also need to import the key used by google in our local keystore where android studio is generating the apk file.

http://tigar.nl/2018/05/15/android-app-signing/

 

Sunday, August 16, 2020

Async multipart image upload: method not found error

In a strange issue, we would get an error while trying to upload an image using multipart async methods in web api.

  • ExceptionMessage: "Method not found: 'System.Collections.ObjectModel.Collection`1<System.Net.Http.HttpContent> System.Net.Http.MultipartStreamProvider.get_Contents()'."
  • ExceptionType: "System.MissingMethodException"
  • Message: "An error has occurred."
  • Finally we found out that the problem was with System.Net.Http.dll versions not working correctly, the problem and solutions are mentioned at 

    https://stackoverflow.com/questions/54205285/why-im-getting-a-method-not-found-exception-into-production-iis-but-not-in-my-vs

    It was resolved after we added this entry to web.config file

    <configuration>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    </configuration>

    Regex Email validation in c# dot net core

     Use this regex /^_?[a-zA-Z0-9]([a-zA-Z0-9]*[._+-])*[a-zA-Z0-9_]+@(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.(?!-)[A-Za-z0-9-]{1,63}(?<!-))*\.[A-...