sábado, 9 de enero de 2021

CocoaPods could not find compatible versions for pod "FirebaseFirestore"

Seguiste la guía oficial de FlutterFire https://firebase.flutter.dev/docs/overview/#improve-ios-build-times Donde te dice que agregues esta línea a ios/Podfile

  • pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '6.26.0'

Instalaste Cocoapods https://josevibriezca.blogspot.com/2021/01/instalar-cocoapods-en-macos-1015.html

Y ahora tienes un nuevo error:

  • [!] CocoaPods could not find compatible versions for pod "FirebaseFirestore":
    • In Podfile:
      • FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `6.26.0`)
      • cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.14.4, which depends on
        • Firebase/Firestore (~> 6.33.0) was resolved to 6.33.0, which depends on
          • FirebaseFirestore (~> 1.18.0)

El problema esta en que tenemos instalada una versión diferente a la que especificamos en Pofdile

Para solucionarlo vamos al archivo Podfile (que está en la carpeta ios) del proyecto de Flutter y cambiamos:

  • pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '6.26.0'

por 6.33.0 (o cualquiera que sea la versión que el error nos indique – en mi caso me dice was resolved to 6.33.0)

  • pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '6.33.0'

Instalar cocoapods en macOS 10.15 Catalina

Tienes un proyecto en Flutter con Firebase y en Windows+Android funciona todo bien. Cuando lo intentas ejecutar en macOS con el emulador de iPhone falla porque no tienes Cocoapods instalado.

Al tratar de instalar cocoapods desde la terminal con el comando:

sudo gem install cocoapods

La instalación falla con los errores:

  • Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
  • /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.

Después de mucho googlear y que nada funciono, la respuesta la encontré en una pregunta de un curso de Fernando Herrera, gracias al alumno Alejandro César Valencia.

La solución está en https://www.udemy.com/course/flutter-ios-android-fernando-herrera/learn/lecture/14717920#questions/12534056 pero no podrás verla si no compraste el curso. A continuación, comparto la solución de Alejandro y si les sirve no se olviden de comprar el curso de Fernando que está muy bueno y agradecer a Alejandro.

  1. Actualiza Ruby a la última versión (en mi caso fue la 2.7.2). Teclea en la terminal:
    • curl -L https://get.rvm.io | bash -s stable
  2. Reinicia la terminal (clic derecho salir y vuelve a abrir)
  3. Ejecuta:
    • rvm install ruby-[version]
    Reemplaza versión por la más actual (sin los corchetes). Esto se tarda un rato.
    (o quita -[version] si no quieres especificar una versión)
  4. Ya que termina de instalar Ruby, ahora instala cocoapods:
    • sudo gem install cocoapods
    y listo. una vez que termine verifica con:
    • pod --version

lunes, 23 de noviembre de 2020

Dar formato a código HTML en NotePad++

Bueno como ya tiene mucho que no uso Dreamweaver aquí esta una versión más reciente de mi entrada antigua (Dar formato al código en Dreamweaver)
  • Menú Plugins / Plugins admin
  • Buscar e instalar XML Tools
  • Presionar la combinación de teclas Ctrl+Alt+Shift+B

viernes, 7 de febrero de 2020

Dynamics 365 - Consult TracingService logs

Steps to follow if you want to view log made by plugins with TracingService. Example:
serviceContext.TracingService.Trace("Test");

  1. Navigate to Settings > Administration > System Settings.
  2. Click Customization tab and locate the drop-down “Enable logging to plug-in trace log” and select “Exceptions” or “All” depending on what you need. Click OK.
  3. Run the plugin.
  4. Navigating to Settings > Plug-in Trace Log.

Dynamics 365 - Debug Plugin using Plugin Registration tool

I found this video on the youTube channel Magnifez Technologies

Dynamics 365 - Plugin development step by step

I found this interesting video on YouTube.

lunes, 20 de enero de 2020

Dynamics 365 - Create tests for 2 different CRMs

This entry is like Dynamics 365 - Install and configure EasyRepro with the difference that you will create two TestBase files reading different keys from app.config. All tests will inherit from one or another TestBase, depending in which namespace are located will point to one or another CRM.

This entry assumes that you have or at least you created a trial for Dynamics 365 CRM and signed in.
You can create a trial here: https://port.crm.dynamics.com/G/TrialInstances/TrialInstancePicker.aspx

You need to be System Administrator and System Customizer.
http://josevibriezca.blogspot.com/2020/01/promote-to-admin.html
http://josevibriezca.blogspot.com/2020/01/add-system-customizer-role.html

  1. Create a project of type Visual C# / Web / ASP.NET Web Application (.NET Framework)".
  2. Select template MVC for the project.
  3. Check "Add unit tests" checkbox.
  4. Open the App.config file located in the test project.
  5. In configuration / appSettings paste the following keys (replace the values with your own credentials).
    <add key="OnlineUsername_A" value="name@name.onmicrosoft.com" />
    <add key="OnlinePassword_A" value="*********" />
    <add key="OnlineCrmUrl_A" value="https://testcrmA.crm.dynamics.com/" />
    <!--.-->
    <add key="OnlineUsername_B" value="name@name.onmicrosoft.com" />
    <add key="OnlinePassword_B" value="*********" />
    <add key="OnlineCrmUrl_B" value="https://testcrmB.crm.dynamics.com/" />
    <!--.-->
    <add key="BrowserType" value="Chrome" />
    <add key="RemoteBrowserType" value="Chrome" />
    <add key="RemoteHubServer" value="http://1.1.1.1:4444/wd/hub" />
  6. Right click the test project and select "Manage NuGet Packages...".
  7. Install "Dynamics365.UIAutomation.Api" and "Selenium.Chrome.WebDriver".
  8. Right click your test project and select Add / New Folder. Name it "CRM_A" (or any name relevant to you).
  9. Download and add to the project (to the new folder CRM_A) the last version of the class TestBase from https://github.com/microsoft/EasyRepro/blob/develop/Microsoft.Dynamics365.UIAutomation.Sample/Web/Entity/TestBase.cs.
  10. Replace the namespace "namespace Microsoft.Dynamics365.UIAutomation.Sample.Web" with your own namespace, example "WebApplication1_EasyRepro_01.Tests.CRM_A". Make sure to end the namespace with the name of the new folder.
  11. Replace the strings "OnlineUsername", "OnlinePassword" and "OnlineCrmUrl" with "OnlineUsername_A", "OnlinePassword_A" and "OnlineCrmUrl_A" for the variables _username, _password and _xrmUri.
  12. Add a new class to the folder "CRM_A". I will call it SomethingToTest.cs but feel free to choose a name that works for you. Use "Microsoft.VisualStudio.TestTools.UnitTesting", add the [TestClass] decorator.
  13. Make sure to use "public" access modiffier for all test classes you create, other wise will not run.
  14. Implement TestSetup method and one method for each test you want to perform.
  15. Repeat steps 8 to 14 but this time use "_B" instead of "_A".