This is a Cordova application that wraps the original Cboard React application to bring native mobile and desktop support. The Cboard react app is maintained to support Cordova detection, setup and bindings.
Text-to-speach (TTS) support is provided via phonegap-plugin-speech-synthesis
. This plugin bridges the native operating system TTS functionality to browser app, in a way that mimics W3C Web Speech API: SpeechSynthesis
. It uses the android.speech.tts.TextToSpeech
interface on Android.
- Android
- Electron - Windows
You will need to modify the next files:
- In
/cboard/package.json
change"homepage": "https://app.cboard.io"
to"homepage": "."
- In
/cboard/public/index.html
add<script src="cordova.js"></script>
below<head>
tag
git submodule update
- Get Cboard appnpm i
mkdir -p www
- Make root cordova app foldercordova platform add android
orcordova platform add electron@2.0.0
- Add Cordova platforms.www
folder must be present.cd cboard
npm i
You need to build the react.js app, and after that copy un cordova project:
cd cboard
- Release
npm run build
/ Debugnpm run build-cordova-debug
cp -r ./build/* ../www
cd ..
Android:
cordova run android --emulator
Electron:
cordova build electron --release
For releasecordova build electron --debug
For enable the dev tools
-
Build
cordova build android --release
-
Copy
cp platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk ccboard.apk
-
Sign
- Generate self-signed keys
keytool -genkey -v -keystore ccboard.keystore -alias ccboard -keyalg RSA -keysize 2048 -validity 100000
- Sign
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ccboard.keystore ccboard.apk ccboard
- Generate self-signed keys
For emulator console.log output, you can either run in the debugging under eg. Android Studio
, or in Chrome, navigate to chrome://inspect
, and select the remote target that shows up once the emulator starts.
You can find the documentation here
In the root folder, you will find the file settings.json
where are the configurations of the BrowserWindow. This contains all the graphics options to modify the electron window.
You can find the documentation here
A) Install cocoapods using sudo gem install cocoapods
.
B) On Xcode open AAC Cboard.xcworkspace
-
Select a group for the iOS sign-in certificate.
-
Add the environment variables for the 'Google Plus Plugin' to XCODE: Open your Xcode project and select the project from the project navigator. Select the "Build Settings" tab in the main area of the window. Search for "User-Defined" in the search bar. Click the "+" button to add a new user-defined setting. Enter the name of the environment variable you want to set, such as MY_ENV_VAR. Enter the value of the environment variable you want to set, such as my-value. Save the changes.
set the envs using values from
credentials.plist
file. (Obtain the file from firebase console): IOS_REVERSED_CLIENT_ID IOS_WEB_APPLICATION_CLIENT_IDUsing this plugin, it is not possible to use the device simulator (at least for now).
-
Some targets within pods will require enabling 'bitcode', including one in AAC Cboard => libCordova.a
-
Set a swift-language-version >= 4.2 . This should be settled on AAC Cboard Target under swift compiler - language Close
-
Update to recommended settings and not allow changes on 'always embed swift standards libraries' to not break the voice record feature
- To enable Facebook sign in the 'fbXXXXXXXXXXXXX' URL Scheme should be registered. In order to do it: Under AAC Cboard Target > info > URL TYPES > add a new one with our APP bundle identifier and set the 'fbXXXXXXXXXXXXX' for the URL SCHEME field.
![configure_FB_login](https://private-user-images.githubusercontent.com/21298844/242418539-d306ba8a-d903-4ef2-b6d5-80f221338572.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4MDAyMzYsIm5iZiI6MTcyNDc5OTkzNiwicGF0aCI6Ii8yMTI5ODg0NC8yNDI0MTg1MzktZDMwNmJhOGEtZDkwMy00ZWYyLWI2ZDUtODBmMjIxMzM4NTcyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDIzMDUzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNmNjY3MWNlMTU1YjVjNDEyYjE2Mjg0ZDc2NzIwM2IwMWYwYzdlOGRkM2IzNDcyYjdlMzdjY2VhMzJlNmIyNzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.WvlsA_b4BNb1o-1hjT3SBpO9kub9ga8XPdXvWFBymiw)
In case to deploy for production. Under cordova-util.js from cboard app source replace the FACEBOOK_APP_ID and FACEBOOK_APP_NAME with the production values.
- In order to allow users to open files created by the Export feature: Edit the plist file 'AAC Cboard-Info.plist' under platforms/ios/AAC Cboard/ adding this keys and values
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>UIFileSharingEnabled</key>
<true/>
In order to know the size of the app before submitting it to the app store connect. Follow this steps: https://developer.apple.com/documentation/xcode/reducing-your-app-s-size#Create-the-app-size-report
Some plugins cause conflict to run Cboard on an IOS simulator. Only in order to test the app delete cordova-plugin-googleplus and cordova-plugin-iosrtc running these commands. Pay attention to don't preserve these changes after the test.
cordova plugin rm cordova-plugin-googleplus --save --variable WEB_APPLICATION_CLIENT_ID=${IOS_WEB_APPLICATION_CLIENT_ID} --variable REVERSED_CLIENT_ID=${IOS_REVERSED_CLIENT_ID}
cordova plugin rm cordova-plugin-iosrtc