Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sistepar/cordova-plugin-privatevar
Plugin to set and obtain variables with sensitive data, such as API_KEY, API_RUL
https://github.com/sistepar/cordova-plugin-privatevar
cordova cordova-plugin
Last synced: 26 days ago
JSON representation
Plugin to set and obtain variables with sensitive data, such as API_KEY, API_RUL
- Host: GitHub
- URL: https://github.com/sistepar/cordova-plugin-privatevar
- Owner: SistePar
- License: mit
- Created: 2023-07-27T19:21:25.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-07-27T19:21:38.000Z (over 1 year ago)
- Last Synced: 2024-10-16T19:04:07.036Z (3 months ago)
- Topics: cordova, cordova-plugin
- Language: Java
- Homepage: https://sistepar.com
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CORDOVA - PRIVATE VARIABLE PLUGIN
The plugin is simple, a function "get" in JavaScript is created and it returns data of type JSON.
### INSTALL
To install from the Cordova CLI:>cordova plugin add cordova-plugin-privatevar
### SET DATA IN ANDROID
In the Java file in app Project _/src/java/com/sistepar/cordova/plugin/PrivatevarPlugin.java_ you can add all the data that you want to be returned in Json.
/* Edit here to return data in json */
json.put("apiUrl", "https://api.sistepar.com");
json.put("apiKey", "12345678");### SET DATA IN IOS
From the Xcode we enter the Plugins folder then _PrivateVar.m_ and in the getDatasToReturn() method we modify the datas to return./* Edit here to return data in json */
return @{
@"apiUrl": @"https://api.sistepar.com",
@"apiKey": @"12345",
};### USE PLUGIN
To use it from Cordova inside the _deviceredy_ event./* Call the plugin */
cordova.plugins.privatevar.get(function(data){
alert(JSON.stringify(data));
});>**License:** The MIT License
>
>**Made By** [sistepar.com](https://sistepar.com)