Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
David PHAM-VAN
2021-03-06 08:12:58 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d66410e0ebfac7d351913f39a5c2d3e3a82aa918
d66410e0
1 parent
2c7a2c18
Fix iOS/macOS release build not working
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
33 deletions
printing/CHANGELOG.md
printing/ios/Classes/PrintingPlugin.m
printing/ios/Classes/PrintingPlugin.swift
printing/macos/Classes/PrintingPlugin.m
printing/macos/Classes/PrintingPlugin.swift
printing/pubspec.yaml
printing/CHANGELOG.md
View file @
d66410e
# Changelog
## 5.0.2
-
Fix iOS/macOS release build not working
## 5.0.1
-
Update dependencies
...
...
printing/ios/Classes/PrintingPlugin.m
0 → 100644
View file @
d66410e
/*
* Copyright (C) 2017, David PHAM-VAN <dev.nfet.net@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <printing/printing-Swift.h>
// Dart:ffi API
void
net_nfet_printing_set_document
(
uint32_t
job
,
const
uint8_t
*
doc
,
uint64_t
size
)
{
[
PrintingPlugin
setDocumentWithJob
:
job
doc
:
doc
size
:
size
];
}
void
net_nfet_printing_set_error
(
uint32_t
job
,
const
char
*
message
)
{
[
PrintingPlugin
setErrorWithJob
:
job
message
:
message
];
}
...
...
printing/ios/Classes/PrintingPlugin.swift
View file @
d66410e
...
...
@@ -17,29 +17,26 @@
import
Flutter
import
Foundation
// Dart:ffi API
private
var
_printingPlugin
:
PrintingPlugin
?
@_cdecl("net_nfet_printing_set_document")
func
setDocument
(
job
:
UInt32
,
doc
:
UnsafePointer
<
UInt8
>
,
size
:
UInt64
)
{
_printingPlugin
!.
jobs
[
job
]?
.
setDocument
(
Data
(
bytes
:
doc
,
count
:
Int
(
size
)))
}
@_cdecl("net_nfet_printing_set_error")
func
setError
(
job
:
UInt32
,
message
:
UnsafePointer
<
CChar
>
)
{
_printingPlugin
!.
jobs
[
job
]?
.
cancelJob
(
String
(
cString
:
message
))
}
// End of Dart:ffi API
@objc
public
class
PrintingPlugin
:
NSObject
,
FlutterPlugin
{
private
static
var
instance
:
PrintingPlugin
?
private
var
channel
:
FlutterMethodChannel
public
var
jobs
=
[
UInt32
:
PrintJob
]()
init
(
_
channel
:
FlutterMethodChannel
)
{
self
.
channel
=
channel
super
.
init
()
_printingPlugin
=
self
PrintingPlugin
.
instance
=
self
}
@objc
public
static
func
setDocument
(
job
:
UInt32
,
doc
:
UnsafePointer
<
UInt8
>
,
size
:
UInt64
)
{
instance
!.
jobs
[
job
]?
.
setDocument
(
Data
(
bytes
:
doc
,
count
:
Int
(
size
)))
}
@objc
public
static
func
setError
(
job
:
UInt32
,
message
:
UnsafePointer
<
CChar
>
)
{
instance
!.
jobs
[
job
]?
.
cancelJob
(
String
(
cString
:
message
))
}
/// Entry point
...
...
printing/macos/Classes/PrintingPlugin.m
0 → 100644
View file @
d66410e
/*
* Copyright (C) 2017, David PHAM-VAN <dev.nfet.net@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <printing/printing-Swift.h>
// Dart:ffi API
void
net_nfet_printing_set_document
(
uint32_t
job
,
const
uint8_t
*
doc
,
uint64_t
size
)
{
[
PrintingPlugin
setDocumentWithJob
:
job
doc
:
doc
size
:
size
];
}
void
net_nfet_printing_set_error
(
uint32_t
job
,
const
char
*
message
)
{
[
PrintingPlugin
setErrorWithJob
:
job
message
:
message
];
}
...
...
printing/macos/Classes/PrintingPlugin.swift
View file @
d66410e
...
...
@@ -17,29 +17,26 @@
import
FlutterMacOS
import
Foundation
// Dart:ffi API
private
var
_printingPlugin
:
PrintingPlugin
?
@_cdecl("net_nfet_printing_set_document")
func
setDocument
(
job
:
UInt32
,
doc
:
UnsafePointer
<
UInt8
>
,
size
:
UInt64
)
{
_printingPlugin
!.
jobs
[
job
]?
.
setDocument
(
Data
(
bytes
:
doc
,
count
:
Int
(
size
)))
}
@_cdecl("net_nfet_printing_set_error")
func
setError
(
job
:
UInt32
,
message
:
UnsafePointer
<
CChar
>
)
{
_printingPlugin
!.
jobs
[
job
]?
.
cancelJob
(
String
(
cString
:
message
))
}
// End of Dart:ffi API
@objc
public
class
PrintingPlugin
:
NSObject
,
FlutterPlugin
{
private
static
var
instance
:
PrintingPlugin
?
private
var
channel
:
FlutterMethodChannel
public
var
jobs
=
[
UInt32
:
PrintJob
]()
init
(
_
channel
:
FlutterMethodChannel
)
{
self
.
channel
=
channel
super
.
init
()
_printingPlugin
=
self
PrintingPlugin
.
instance
=
self
}
@objc
public
static
func
setDocument
(
job
:
UInt32
,
doc
:
UnsafePointer
<
UInt8
>
,
size
:
UInt64
)
{
instance
!.
jobs
[
job
]?
.
setDocument
(
Data
(
bytes
:
doc
,
count
:
Int
(
size
)))
}
@objc
public
static
func
setError
(
job
:
UInt32
,
message
:
UnsafePointer
<
CChar
>
)
{
instance
!.
jobs
[
job
]?
.
cancelJob
(
String
(
cString
:
message
))
}
/// Entry point
...
...
printing/pubspec.yaml
View file @
d66410e
...
...
@@ -7,7 +7,7 @@ description: >
homepage
:
https://github.com/DavBfr/dart_pdf/tree/master/printing
repository
:
https://github.com/DavBfr/dart_pdf
issue_tracker
:
https://github.com/DavBfr/dart_pdf/issues
version
:
5.0.
1
version
:
5.0.
2
environment
:
sdk
:
"
>=2.12.0-0
<3.0.0"
...
...
Please
register
or
login
to post a comment