Skip to content

Commit

Permalink
Merge pull request #49 from MenelicSoftware/feature/npe-fix
Browse files Browse the repository at this point in the history
NPE fix
  • Loading branch information
arcadius authored Jul 28, 2022
2 parents d3b4189 + c2a6cfb commit 8216648
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,10 @@ interface Printer {

}
```
## iOS notes:
* You may get errors while compiling: you need to make sure the native lib is "embed and sign" .
see https://github.com/MenelicSoftware/cordova-plugin-brother-label-printer/issues/39
* If you are getting errors about unsupported architectures, please look at
http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-brother-label-printer",
"version": "1.6.0",
"version": "1.6.1",
"description": "Cordova plugin for brother label printers",
"cordova": {
"id": "cordova-plugin-brother-label-printer",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-brother-label-printer"
version="1.6.0">
version="1.6.1">

<name>BrotherPrinter</name>

Expand Down
2 changes: 1 addition & 1 deletion src/android/BrotherPrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ private void setPrinter(JSONArray args, final CallbackContext callbackctx) {
editor.putString("orientation", printer.orientation != null ? printer.orientation : PrinterInfo.Orientation.LANDSCAPE.toString());
editor.putString("numberOfCopies", printer.numberOfCopies);

if(!printer.customPaperFilePath.isEmpty()) {
if(printer.customPaperFilePath != null && !printer.customPaperFilePath.isEmpty()) {
String targetBinFolder = cordova.getActivity()
.getExternalFilesDir("customPaperFileSet/").toString();
copyBinFile("www/" + printer.customPaperFilePath, targetBinFolder);
Expand Down

0 comments on commit 8216648

Please sign in to comment.