jueves, 17 de noviembre de 2022

React Native run-android notes

 

  • runAndroid:
    • ...logger.info('JS server already running.')...
    • buildAndRun
      • cmd = process.platform.startsWith('win') ? 'gradlew.bat' : './gradlew';
      • runOnAllDevices
        • ...logger.info('Installing the app...');...
        • tryLaunchAppOnDevice
          • ...const {appId, appIdSuffix} = args;...
          • ...shell am start -n...

viernes, 4 de noviembre de 2022

capacitor-community / text-to-speech: "Not yet initialized or not available on this device"

Sending plugin error: {"save":false,"callbackId":"...","pluginId":"TextToSpeech",
"methodName":"speak","success":false,"error":{"message":"Not yet initialized or
not available on this device.","code":"UNAVAILABLE"}}

It happened to me only on the emulator. On a real device, it worked.


miércoles, 1 de junio de 2022

Re: How to bundle and use custom web fonts in SPFx projects (Prod mode)

SPFx: 1.14/1.15.0-rc.0 

I followed How to bundle and use custom web fonts in SPFx projects but didn't work for me in "Prod mode" (gulp bundle --ship && gulp package-solution --ship). It worked for me at "Dev time" (gulp serve in Workbench or in a Sharepoint page in "full trust client-side solution" mode, no --ship).

To make it work I had to change the outputPath value (in fontLoaderConfig) from 'fonts/' to '/'.


const fontLoaderConfig = {
test: /\.(woff(2)?)(\?v=\d+\.\d+\.\d+)?$/, // I'm only checking for woff2
use: [{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: '/'
}
}]
};


I noticed that the runtime font references were like: https://[mySite].sharepoint.com/sites/appcatalog/ClientSideAssets/[GUID]/fonts/[myFont].woff2 but visiting https://[mySite].sharepoint.com/sites/appcatalog/ClientSideAssets/[GUID], all the assets were at the same level, like https://[mySite].sharepoint.com/sites/appcatalog/ClientSideAssets/[GUID]/[myFont].woff2.


jueves, 17 de febrero de 2022

AWS SES MessageRejected 400 Bad Request

 Are you on the SES sandbox and trying to send messages to an email address different than the verified one? Or to a domain different than the verified one? 😛