@iftek/react-native-print 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/stale.yml +16 -0
- package/.github/workflows/windows-ci.yml +40 -0
- package/@iftek-react-native-print.podspec +19 -0
- package/LICENSE +21 -0
- package/README.md +230 -0
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +24 -0
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/christopherdro/RNPrint/RNPrintModule.java +237 -0
- package/android/src/main/java/com/christopherdro/RNPrint/RNPrintPackage.java +32 -0
- package/index.js +3 -0
- package/ios/RNPrint/RNPrint.h +15 -0
- package/ios/RNPrint/RNPrint.m +197 -0
- package/ios/RNPrint.xcodeproj/project.pbxproj +389 -0
- package/ios/RNPrint.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/RNPrint.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/RNPrintTests/Info.plist +24 -0
- package/package.json +23 -0
- package/scripts/examples_postinstall.js +117 -0
- package/types/index.d.ts +19 -0
- package/windows/README.md +57 -0
- package/windows/RNPrint/PropertySheet.props +16 -0
- package/windows/RNPrint/RNPrint.cpp +375 -0
- package/windows/RNPrint/RNPrint.def +3 -0
- package/windows/RNPrint/RNPrint.h +89 -0
- package/windows/RNPrint/RNPrint.vcxproj +163 -0
- package/windows/RNPrint/RNPrint.vcxproj.filters +33 -0
- package/windows/RNPrint/ReactPackageProvider.cpp +15 -0
- package/windows/RNPrint/ReactPackageProvider.h +16 -0
- package/windows/RNPrint/ReactPackageProvider.idl +9 -0
- package/windows/RNPrint/packages.config +4 -0
- package/windows/RNPrint/pch.cpp +1 -0
- package/windows/RNPrint/pch.h +16 -0
- package/windows/RNPrint62.sln +254 -0
- package/windows/RNPrint63.sln +226 -0
@@ -0,0 +1,197 @@
|
|
1
|
+
|
2
|
+
// Created by Christopher Dro on 9/4/15.
|
3
|
+
|
4
|
+
#import "RNPrint.h"
|
5
|
+
#import <React/RCTConvert.h>
|
6
|
+
#import <React/RCTUtils.h>
|
7
|
+
|
8
|
+
@implementation RNPrint
|
9
|
+
|
10
|
+
- (dispatch_queue_t)methodQueue
|
11
|
+
{
|
12
|
+
return dispatch_get_main_queue();
|
13
|
+
}
|
14
|
+
|
15
|
+
RCT_EXPORT_MODULE();
|
16
|
+
|
17
|
+
-(void)launchPrint:(NSData *) data
|
18
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
19
|
+
rejecter:(RCTPromiseRejectBlock)reject {
|
20
|
+
if(!_htmlString && ![UIPrintInteractionController canPrintData:data]) {
|
21
|
+
reject(RCTErrorUnspecified, nil, RCTErrorWithMessage(@"Unable to print this filePath"));
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
|
25
|
+
UIPrintInteractionController *printInteractionController = [UIPrintInteractionController sharedPrintController];
|
26
|
+
printInteractionController.delegate = self;
|
27
|
+
|
28
|
+
// Create printing info
|
29
|
+
UIPrintInfo *printInfo = [UIPrintInfo printInfo];
|
30
|
+
|
31
|
+
printInfo.outputType = UIPrintInfoOutputGeneral;
|
32
|
+
printInfo.jobName = _jobName;
|
33
|
+
printInfo.duplex = UIPrintInfoDuplexLongEdge;
|
34
|
+
printInfo.orientation = _isLandscape? UIPrintInfoOrientationLandscape: UIPrintInfoOrientationPortrait;
|
35
|
+
|
36
|
+
printInteractionController.printInfo = printInfo;
|
37
|
+
printInteractionController.showsPageRange = YES;
|
38
|
+
|
39
|
+
if (_htmlString) {
|
40
|
+
UIMarkupTextPrintFormatter *formatter = [[UIMarkupTextPrintFormatter alloc] initWithMarkupText:_htmlString];
|
41
|
+
printInteractionController.printFormatter = formatter;
|
42
|
+
} else {
|
43
|
+
printInteractionController.printingItem = data;
|
44
|
+
}
|
45
|
+
|
46
|
+
// Completion handler
|
47
|
+
void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) =
|
48
|
+
^(UIPrintInteractionController *printController, BOOL completed, NSError *error) {
|
49
|
+
if (!completed && error) {
|
50
|
+
NSLog(@"Printing could not complete because of error: %@", error);
|
51
|
+
reject(RCTErrorUnspecified, nil, RCTErrorWithMessage(error.description));
|
52
|
+
} else {
|
53
|
+
resolve(completed ? printInfo.jobName : nil);
|
54
|
+
}
|
55
|
+
};
|
56
|
+
|
57
|
+
if (_pickedPrinter) {
|
58
|
+
[_pickedPrinter contactPrinter:^(BOOL available) {
|
59
|
+
if (available) {
|
60
|
+
[printInteractionController printToPrinter:self->_pickedPrinter completionHandler:completionHandler];
|
61
|
+
} else {
|
62
|
+
reject(RCTErrorUnspecified, nil, RCTErrorWithMessage(@"Selected printer is unavailable"));
|
63
|
+
}
|
64
|
+
}];
|
65
|
+
} else if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) { // iPad
|
66
|
+
UIView *view = [[UIApplication sharedApplication] keyWindow].rootViewController.view;
|
67
|
+
[printInteractionController presentFromRect:view.frame inView:view animated:YES completionHandler:completionHandler];
|
68
|
+
} else { // iPhone
|
69
|
+
[printInteractionController presentAnimated:YES completionHandler:completionHandler];
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
RCT_EXPORT_METHOD(print:(NSDictionary *)options
|
74
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
75
|
+
rejecter:(RCTPromiseRejectBlock)reject) {
|
76
|
+
|
77
|
+
if (options[@"filePath"]){
|
78
|
+
_filePath = [RCTConvert NSString:options[@"filePath"]];
|
79
|
+
} else {
|
80
|
+
_filePath = nil;
|
81
|
+
}
|
82
|
+
|
83
|
+
if (options[@"html"]){
|
84
|
+
_htmlString = [RCTConvert NSString:options[@"html"]];
|
85
|
+
} else {
|
86
|
+
_htmlString = nil;
|
87
|
+
}
|
88
|
+
|
89
|
+
if (options[@"printerURL"]){
|
90
|
+
_printerURL = [NSURL URLWithString:[RCTConvert NSString:options[@"printerURL"]]];
|
91
|
+
_pickedPrinter = [UIPrinter printerWithURL:_printerURL];
|
92
|
+
}
|
93
|
+
|
94
|
+
if(options[@"isLandscape"]) {
|
95
|
+
_isLandscape = [[RCTConvert NSNumber:options[@"isLandscape"]] boolValue];
|
96
|
+
}
|
97
|
+
|
98
|
+
if(options[@"jobName"]) {
|
99
|
+
_jobName = [RCTConvert NSString:options[@"jobName"]];
|
100
|
+
} else {
|
101
|
+
_jobName = @"Document";
|
102
|
+
}
|
103
|
+
|
104
|
+
if ((_filePath && _htmlString) || (_filePath == nil && _htmlString == nil)) {
|
105
|
+
reject(RCTErrorUnspecified, nil, RCTErrorWithMessage(@"Must provide either `html` or `filePath`. Both are either missing or passed together"));
|
106
|
+
}
|
107
|
+
|
108
|
+
__block NSData *printData;
|
109
|
+
BOOL isValidURL = NO;
|
110
|
+
NSURL *candidateURL = [NSURL URLWithString: _filePath];
|
111
|
+
if (candidateURL && candidateURL.scheme && candidateURL.host)
|
112
|
+
isValidURL = YES;
|
113
|
+
|
114
|
+
if (isValidURL) {
|
115
|
+
NSURLSession *session = [NSURLSession sharedSession];
|
116
|
+
NSURLSessionDataTask *dataTask = [session dataTaskWithURL:[NSURL URLWithString:_filePath] completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
|
117
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
118
|
+
[self launchPrint:data resolver:resolve rejecter:reject];
|
119
|
+
});
|
120
|
+
}];
|
121
|
+
[dataTask resume];
|
122
|
+
} else {
|
123
|
+
printData = [NSData dataWithContentsOfFile: _filePath];
|
124
|
+
[self launchPrint:printData resolver:resolve rejecter:reject];
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
RCT_EXPORT_METHOD(selectPrinter:(NSDictionary *)options
|
129
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
130
|
+
rejecter:(RCTPromiseRejectBlock)reject) {
|
131
|
+
|
132
|
+
UIPrinterPickerController *printPicker = [UIPrinterPickerController printerPickerControllerWithInitiallySelectedPrinter: _pickedPrinter];
|
133
|
+
|
134
|
+
printPicker.delegate = self;
|
135
|
+
|
136
|
+
void (^completionHandler)(UIPrinterPickerController *, BOOL, NSError *) =
|
137
|
+
^(UIPrinterPickerController *printerPicker, BOOL userDidSelect, NSError *error) {
|
138
|
+
if (!userDidSelect && error) {
|
139
|
+
NSLog(@"Printing could not complete because of error: %@", error);
|
140
|
+
reject(RCTErrorUnspecified, nil, RCTErrorWithMessage(error.description));
|
141
|
+
} else {
|
142
|
+
[UIPrinterPickerController printerPickerControllerWithInitiallySelectedPrinter:printerPicker.selectedPrinter];
|
143
|
+
if (userDidSelect) {
|
144
|
+
_pickedPrinter = printerPicker.selectedPrinter;
|
145
|
+
NSDictionary *printerDetails = @{
|
146
|
+
@"name" : _pickedPrinter.displayName,
|
147
|
+
@"url" : _pickedPrinter.URL.absoluteString,
|
148
|
+
};
|
149
|
+
resolve(printerDetails);
|
150
|
+
}
|
151
|
+
}
|
152
|
+
};
|
153
|
+
|
154
|
+
if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) { // iPad
|
155
|
+
UIView *view = [[UIApplication sharedApplication] keyWindow].rootViewController.view;
|
156
|
+
CGFloat _x = 0;
|
157
|
+
CGFloat _y = 0;
|
158
|
+
if (options[@"x"]){
|
159
|
+
_x = [RCTConvert CGFloat:options[@"x"]];
|
160
|
+
}
|
161
|
+
if (options[@"y"]){
|
162
|
+
_y = [RCTConvert CGFloat:options[@"y"]];
|
163
|
+
}
|
164
|
+
[printPicker presentFromRect:CGRectMake(_x, _y, 0, 0) inView:view animated:YES completionHandler:completionHandler];
|
165
|
+
} else { // iPhone
|
166
|
+
[printPicker presentAnimated:YES completionHandler:completionHandler];
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
#pragma mark - UIPrintInteractionControllerDelegate
|
171
|
+
|
172
|
+
-(UIViewController*)printInteractionControllerParentViewController:(UIPrintInteractionController*)printInteractionController {
|
173
|
+
UIViewController *result = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
|
174
|
+
while (result.presentedViewController) {
|
175
|
+
result = result.presentedViewController;
|
176
|
+
}
|
177
|
+
return result;
|
178
|
+
}
|
179
|
+
|
180
|
+
-(void)printInteractionControllerWillDismissPrinterOptions:(UIPrintInteractionController*)printInteractionController {}
|
181
|
+
|
182
|
+
-(void)printInteractionControllerDidDismissPrinterOptions:(UIPrintInteractionController*)printInteractionController {}
|
183
|
+
|
184
|
+
-(void)printInteractionControllerWillPresentPrinterOptions:(UIPrintInteractionController*)printInteractionController {}
|
185
|
+
|
186
|
+
-(void)printInteractionControllerDidPresentPrinterOptions:(UIPrintInteractionController*)printInteractionController {}
|
187
|
+
|
188
|
+
-(void)printInteractionControllerWillStartJob:(UIPrintInteractionController*)printInteractionController {}
|
189
|
+
|
190
|
+
-(void)printInteractionControllerDidFinishJob:(UIPrintInteractionController*)printInteractionController {}
|
191
|
+
|
192
|
+
+(BOOL)requiresMainQueueSetup
|
193
|
+
{
|
194
|
+
return YES;
|
195
|
+
}
|
196
|
+
|
197
|
+
@end
|
@@ -0,0 +1,389 @@
|
|
1
|
+
// !$*UTF8*$!
|
2
|
+
{
|
3
|
+
archiveVersion = 1;
|
4
|
+
classes = {
|
5
|
+
};
|
6
|
+
objectVersion = 46;
|
7
|
+
objects = {
|
8
|
+
|
9
|
+
/* Begin PBXBuildFile section */
|
10
|
+
113258601B99F348005E19FE /* RNPrint.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1132585F1B99F348005E19FE /* RNPrint.h */; };
|
11
|
+
113258621B99F348005E19FE /* RNPrint.m in Sources */ = {isa = PBXBuildFile; fileRef = 113258611B99F348005E19FE /* RNPrint.m */; };
|
12
|
+
113258681B99F348005E19FE /* libRNPrint.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1132585C1B99F348005E19FE /* libRNPrint.a */; };
|
13
|
+
/* End PBXBuildFile section */
|
14
|
+
|
15
|
+
/* Begin PBXContainerItemProxy section */
|
16
|
+
113258691B99F348005E19FE /* PBXContainerItemProxy */ = {
|
17
|
+
isa = PBXContainerItemProxy;
|
18
|
+
containerPortal = 113258541B99F348005E19FE /* Project object */;
|
19
|
+
proxyType = 1;
|
20
|
+
remoteGlobalIDString = 1132585B1B99F348005E19FE;
|
21
|
+
remoteInfo = RNPrint;
|
22
|
+
};
|
23
|
+
/* End PBXContainerItemProxy section */
|
24
|
+
|
25
|
+
/* Begin PBXCopyFilesBuildPhase section */
|
26
|
+
1132585A1B99F348005E19FE /* CopyFiles */ = {
|
27
|
+
isa = PBXCopyFilesBuildPhase;
|
28
|
+
buildActionMask = 2147483647;
|
29
|
+
dstPath = "include/$(PRODUCT_NAME)";
|
30
|
+
dstSubfolderSpec = 16;
|
31
|
+
files = (
|
32
|
+
113258601B99F348005E19FE /* RNPrint.h in CopyFiles */,
|
33
|
+
);
|
34
|
+
runOnlyForDeploymentPostprocessing = 0;
|
35
|
+
};
|
36
|
+
/* End PBXCopyFilesBuildPhase section */
|
37
|
+
|
38
|
+
/* Begin PBXFileReference section */
|
39
|
+
1132585C1B99F348005E19FE /* libRNPrint.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNPrint.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
40
|
+
1132585F1B99F348005E19FE /* RNPrint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNPrint.h; sourceTree = "<group>"; };
|
41
|
+
113258611B99F348005E19FE /* RNPrint.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNPrint.m; sourceTree = "<group>"; };
|
42
|
+
113258671B99F348005E19FE /* RNPrintTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RNPrintTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
43
|
+
1132586D1B99F348005E19FE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
44
|
+
/* End PBXFileReference section */
|
45
|
+
|
46
|
+
/* Begin PBXFrameworksBuildPhase section */
|
47
|
+
113258591B99F348005E19FE /* Frameworks */ = {
|
48
|
+
isa = PBXFrameworksBuildPhase;
|
49
|
+
buildActionMask = 2147483647;
|
50
|
+
files = (
|
51
|
+
);
|
52
|
+
runOnlyForDeploymentPostprocessing = 0;
|
53
|
+
};
|
54
|
+
113258641B99F348005E19FE /* Frameworks */ = {
|
55
|
+
isa = PBXFrameworksBuildPhase;
|
56
|
+
buildActionMask = 2147483647;
|
57
|
+
files = (
|
58
|
+
113258681B99F348005E19FE /* libRNPrint.a in Frameworks */,
|
59
|
+
);
|
60
|
+
runOnlyForDeploymentPostprocessing = 0;
|
61
|
+
};
|
62
|
+
/* End PBXFrameworksBuildPhase section */
|
63
|
+
|
64
|
+
/* Begin PBXGroup section */
|
65
|
+
113258531B99F348005E19FE = {
|
66
|
+
isa = PBXGroup;
|
67
|
+
children = (
|
68
|
+
1132585E1B99F348005E19FE /* RNPrint */,
|
69
|
+
1132586B1B99F348005E19FE /* RNPrintTests */,
|
70
|
+
1132585D1B99F348005E19FE /* Products */,
|
71
|
+
);
|
72
|
+
sourceTree = "<group>";
|
73
|
+
};
|
74
|
+
1132585D1B99F348005E19FE /* Products */ = {
|
75
|
+
isa = PBXGroup;
|
76
|
+
children = (
|
77
|
+
1132585C1B99F348005E19FE /* libRNPrint.a */,
|
78
|
+
113258671B99F348005E19FE /* RNPrintTests.xctest */,
|
79
|
+
);
|
80
|
+
name = Products;
|
81
|
+
sourceTree = "<group>";
|
82
|
+
};
|
83
|
+
1132585E1B99F348005E19FE /* RNPrint */ = {
|
84
|
+
isa = PBXGroup;
|
85
|
+
children = (
|
86
|
+
1132585F1B99F348005E19FE /* RNPrint.h */,
|
87
|
+
113258611B99F348005E19FE /* RNPrint.m */,
|
88
|
+
);
|
89
|
+
path = RNPrint;
|
90
|
+
sourceTree = "<group>";
|
91
|
+
};
|
92
|
+
1132586B1B99F348005E19FE /* RNPrintTests */ = {
|
93
|
+
isa = PBXGroup;
|
94
|
+
children = (
|
95
|
+
1132586C1B99F348005E19FE /* Supporting Files */,
|
96
|
+
);
|
97
|
+
path = RNPrintTests;
|
98
|
+
sourceTree = "<group>";
|
99
|
+
};
|
100
|
+
1132586C1B99F348005E19FE /* Supporting Files */ = {
|
101
|
+
isa = PBXGroup;
|
102
|
+
children = (
|
103
|
+
1132586D1B99F348005E19FE /* Info.plist */,
|
104
|
+
);
|
105
|
+
name = "Supporting Files";
|
106
|
+
sourceTree = "<group>";
|
107
|
+
};
|
108
|
+
/* End PBXGroup section */
|
109
|
+
|
110
|
+
/* Begin PBXNativeTarget section */
|
111
|
+
1132585B1B99F348005E19FE /* RNPrint */ = {
|
112
|
+
isa = PBXNativeTarget;
|
113
|
+
buildConfigurationList = 113258701B99F348005E19FE /* Build configuration list for PBXNativeTarget "RNPrint" */;
|
114
|
+
buildPhases = (
|
115
|
+
113258581B99F348005E19FE /* Sources */,
|
116
|
+
113258591B99F348005E19FE /* Frameworks */,
|
117
|
+
1132585A1B99F348005E19FE /* CopyFiles */,
|
118
|
+
);
|
119
|
+
buildRules = (
|
120
|
+
);
|
121
|
+
dependencies = (
|
122
|
+
);
|
123
|
+
name = RNPrint;
|
124
|
+
productName = RNPrint;
|
125
|
+
productReference = 1132585C1B99F348005E19FE /* libRNPrint.a */;
|
126
|
+
productType = "com.apple.product-type.library.static";
|
127
|
+
};
|
128
|
+
113258661B99F348005E19FE /* RNPrintTests */ = {
|
129
|
+
isa = PBXNativeTarget;
|
130
|
+
buildConfigurationList = 113258731B99F348005E19FE /* Build configuration list for PBXNativeTarget "RNPrintTests" */;
|
131
|
+
buildPhases = (
|
132
|
+
113258631B99F348005E19FE /* Sources */,
|
133
|
+
113258641B99F348005E19FE /* Frameworks */,
|
134
|
+
113258651B99F348005E19FE /* Resources */,
|
135
|
+
);
|
136
|
+
buildRules = (
|
137
|
+
);
|
138
|
+
dependencies = (
|
139
|
+
1132586A1B99F348005E19FE /* PBXTargetDependency */,
|
140
|
+
);
|
141
|
+
name = RNPrintTests;
|
142
|
+
productName = RNPrintTests;
|
143
|
+
productReference = 113258671B99F348005E19FE /* RNPrintTests.xctest */;
|
144
|
+
productType = "com.apple.product-type.bundle.unit-test";
|
145
|
+
};
|
146
|
+
/* End PBXNativeTarget section */
|
147
|
+
|
148
|
+
/* Begin PBXProject section */
|
149
|
+
113258541B99F348005E19FE /* Project object */ = {
|
150
|
+
isa = PBXProject;
|
151
|
+
attributes = {
|
152
|
+
LastUpgradeCheck = 0640;
|
153
|
+
ORGANIZATIONNAME = "Blick Labs";
|
154
|
+
TargetAttributes = {
|
155
|
+
1132585B1B99F348005E19FE = {
|
156
|
+
CreatedOnToolsVersion = 6.4;
|
157
|
+
};
|
158
|
+
113258661B99F348005E19FE = {
|
159
|
+
CreatedOnToolsVersion = 6.4;
|
160
|
+
};
|
161
|
+
};
|
162
|
+
};
|
163
|
+
buildConfigurationList = 113258571B99F348005E19FE /* Build configuration list for PBXProject "RNPrint" */;
|
164
|
+
compatibilityVersion = "Xcode 3.2";
|
165
|
+
developmentRegion = English;
|
166
|
+
hasScannedForEncodings = 0;
|
167
|
+
knownRegions = (
|
168
|
+
en,
|
169
|
+
);
|
170
|
+
mainGroup = 113258531B99F348005E19FE;
|
171
|
+
productRefGroup = 1132585D1B99F348005E19FE /* Products */;
|
172
|
+
projectDirPath = "";
|
173
|
+
projectRoot = "";
|
174
|
+
targets = (
|
175
|
+
1132585B1B99F348005E19FE /* RNPrint */,
|
176
|
+
113258661B99F348005E19FE /* RNPrintTests */,
|
177
|
+
);
|
178
|
+
};
|
179
|
+
/* End PBXProject section */
|
180
|
+
|
181
|
+
/* Begin PBXResourcesBuildPhase section */
|
182
|
+
113258651B99F348005E19FE /* Resources */ = {
|
183
|
+
isa = PBXResourcesBuildPhase;
|
184
|
+
buildActionMask = 2147483647;
|
185
|
+
files = (
|
186
|
+
);
|
187
|
+
runOnlyForDeploymentPostprocessing = 0;
|
188
|
+
};
|
189
|
+
/* End PBXResourcesBuildPhase section */
|
190
|
+
|
191
|
+
/* Begin PBXSourcesBuildPhase section */
|
192
|
+
113258581B99F348005E19FE /* Sources */ = {
|
193
|
+
isa = PBXSourcesBuildPhase;
|
194
|
+
buildActionMask = 2147483647;
|
195
|
+
files = (
|
196
|
+
113258621B99F348005E19FE /* RNPrint.m in Sources */,
|
197
|
+
);
|
198
|
+
runOnlyForDeploymentPostprocessing = 0;
|
199
|
+
};
|
200
|
+
113258631B99F348005E19FE /* Sources */ = {
|
201
|
+
isa = PBXSourcesBuildPhase;
|
202
|
+
buildActionMask = 2147483647;
|
203
|
+
files = (
|
204
|
+
);
|
205
|
+
runOnlyForDeploymentPostprocessing = 0;
|
206
|
+
};
|
207
|
+
/* End PBXSourcesBuildPhase section */
|
208
|
+
|
209
|
+
/* Begin PBXTargetDependency section */
|
210
|
+
1132586A1B99F348005E19FE /* PBXTargetDependency */ = {
|
211
|
+
isa = PBXTargetDependency;
|
212
|
+
target = 1132585B1B99F348005E19FE /* RNPrint */;
|
213
|
+
targetProxy = 113258691B99F348005E19FE /* PBXContainerItemProxy */;
|
214
|
+
};
|
215
|
+
/* End PBXTargetDependency section */
|
216
|
+
|
217
|
+
/* Begin XCBuildConfiguration section */
|
218
|
+
1132586E1B99F348005E19FE /* Debug */ = {
|
219
|
+
isa = XCBuildConfiguration;
|
220
|
+
buildSettings = {
|
221
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
222
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
223
|
+
CLANG_CXX_LIBRARY = "libc++";
|
224
|
+
CLANG_ENABLE_MODULES = YES;
|
225
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
226
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
227
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
228
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
229
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
230
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
231
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
232
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
233
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
234
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
235
|
+
COPY_PHASE_STRIP = NO;
|
236
|
+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
237
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
238
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
239
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
240
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
241
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
242
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
243
|
+
"DEBUG=1",
|
244
|
+
"$(inherited)",
|
245
|
+
);
|
246
|
+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
247
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
248
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
249
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
250
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
251
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
252
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
253
|
+
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
|
254
|
+
MTL_ENABLE_DEBUG_INFO = YES;
|
255
|
+
ONLY_ACTIVE_ARCH = YES;
|
256
|
+
SDKROOT = iphoneos;
|
257
|
+
};
|
258
|
+
name = Debug;
|
259
|
+
};
|
260
|
+
1132586F1B99F348005E19FE /* Release */ = {
|
261
|
+
isa = XCBuildConfiguration;
|
262
|
+
buildSettings = {
|
263
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
264
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
265
|
+
CLANG_CXX_LIBRARY = "libc++";
|
266
|
+
CLANG_ENABLE_MODULES = YES;
|
267
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
268
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
269
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
270
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
271
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
272
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
273
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
274
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
275
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
276
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
277
|
+
COPY_PHASE_STRIP = NO;
|
278
|
+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
279
|
+
ENABLE_NS_ASSERTIONS = NO;
|
280
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
281
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
282
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
283
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
284
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
285
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
286
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
287
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
288
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
289
|
+
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
|
290
|
+
MTL_ENABLE_DEBUG_INFO = NO;
|
291
|
+
SDKROOT = iphoneos;
|
292
|
+
VALIDATE_PRODUCT = YES;
|
293
|
+
};
|
294
|
+
name = Release;
|
295
|
+
};
|
296
|
+
113258711B99F348005E19FE /* Debug */ = {
|
297
|
+
isa = XCBuildConfiguration;
|
298
|
+
buildSettings = {
|
299
|
+
HEADER_SEARCH_PATHS = (
|
300
|
+
"$(inherited)",
|
301
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
302
|
+
"$(SRCROOT)/../react-native/React/**",
|
303
|
+
"$(SRCROOT)/node_modules/react-native/React/**",
|
304
|
+
);
|
305
|
+
OTHER_LDFLAGS = "-ObjC";
|
306
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
307
|
+
SKIP_INSTALL = YES;
|
308
|
+
};
|
309
|
+
name = Debug;
|
310
|
+
};
|
311
|
+
113258721B99F348005E19FE /* Release */ = {
|
312
|
+
isa = XCBuildConfiguration;
|
313
|
+
buildSettings = {
|
314
|
+
HEADER_SEARCH_PATHS = (
|
315
|
+
"$(inherited)",
|
316
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
317
|
+
"$(SRCROOT)/../react-native/React/**",
|
318
|
+
"$(SRCROOT)/node_modules/react-native/React/**",
|
319
|
+
);
|
320
|
+
OTHER_LDFLAGS = "-ObjC";
|
321
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
322
|
+
SKIP_INSTALL = YES;
|
323
|
+
};
|
324
|
+
name = Release;
|
325
|
+
};
|
326
|
+
113258741B99F348005E19FE /* Debug */ = {
|
327
|
+
isa = XCBuildConfiguration;
|
328
|
+
buildSettings = {
|
329
|
+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
330
|
+
FRAMEWORK_SEARCH_PATHS = (
|
331
|
+
"$(SDKROOT)/Developer/Library/Frameworks",
|
332
|
+
"$(inherited)",
|
333
|
+
);
|
334
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
335
|
+
"DEBUG=1",
|
336
|
+
"$(inherited)",
|
337
|
+
);
|
338
|
+
INFOPLIST_FILE = RNPrintTests/Info.plist;
|
339
|
+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
340
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
341
|
+
};
|
342
|
+
name = Debug;
|
343
|
+
};
|
344
|
+
113258751B99F348005E19FE /* Release */ = {
|
345
|
+
isa = XCBuildConfiguration;
|
346
|
+
buildSettings = {
|
347
|
+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
348
|
+
FRAMEWORK_SEARCH_PATHS = (
|
349
|
+
"$(SDKROOT)/Developer/Library/Frameworks",
|
350
|
+
"$(inherited)",
|
351
|
+
);
|
352
|
+
INFOPLIST_FILE = RNPrintTests/Info.plist;
|
353
|
+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
354
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
355
|
+
};
|
356
|
+
name = Release;
|
357
|
+
};
|
358
|
+
/* End XCBuildConfiguration section */
|
359
|
+
|
360
|
+
/* Begin XCConfigurationList section */
|
361
|
+
113258571B99F348005E19FE /* Build configuration list for PBXProject "RNPrint" */ = {
|
362
|
+
isa = XCConfigurationList;
|
363
|
+
buildConfigurations = (
|
364
|
+
1132586E1B99F348005E19FE /* Debug */,
|
365
|
+
1132586F1B99F348005E19FE /* Release */,
|
366
|
+
);
|
367
|
+
defaultConfigurationIsVisible = 0;
|
368
|
+
defaultConfigurationName = Release;
|
369
|
+
};
|
370
|
+
113258701B99F348005E19FE /* Build configuration list for PBXNativeTarget "RNPrint" */ = {
|
371
|
+
isa = XCConfigurationList;
|
372
|
+
buildConfigurations = (
|
373
|
+
113258711B99F348005E19FE /* Debug */,
|
374
|
+
113258721B99F348005E19FE /* Release */,
|
375
|
+
);
|
376
|
+
defaultConfigurationIsVisible = 0;
|
377
|
+
};
|
378
|
+
113258731B99F348005E19FE /* Build configuration list for PBXNativeTarget "RNPrintTests" */ = {
|
379
|
+
isa = XCConfigurationList;
|
380
|
+
buildConfigurations = (
|
381
|
+
113258741B99F348005E19FE /* Debug */,
|
382
|
+
113258751B99F348005E19FE /* Release */,
|
383
|
+
);
|
384
|
+
defaultConfigurationIsVisible = 0;
|
385
|
+
};
|
386
|
+
/* End XCConfigurationList section */
|
387
|
+
};
|
388
|
+
rootObject = 113258541B99F348005E19FE /* Project object */;
|
389
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
6
|
+
<string>en</string>
|
7
|
+
<key>CFBundleExecutable</key>
|
8
|
+
<string>$(EXECUTABLE_NAME)</string>
|
9
|
+
<key>CFBundleIdentifier</key>
|
10
|
+
<string>com.blick-labs.$(PRODUCT_NAME:rfc1034identifier)</string>
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
12
|
+
<string>6.0</string>
|
13
|
+
<key>CFBundleName</key>
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
15
|
+
<key>CFBundlePackageType</key>
|
16
|
+
<string>BNDL</string>
|
17
|
+
<key>CFBundleShortVersionString</key>
|
18
|
+
<string>1.0</string>
|
19
|
+
<key>CFBundleSignature</key>
|
20
|
+
<string>????</string>
|
21
|
+
<key>CFBundleVersion</key>
|
22
|
+
<string>1</string>
|
23
|
+
</dict>
|
24
|
+
</plist>
|
package/package.json
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"name": "@iftek/react-native-print",
|
3
|
+
"version": "0.12.0",
|
4
|
+
"description": "Print documents with React Native",
|
5
|
+
"main": "index.js",
|
6
|
+
"types": "types/index.d.ts",
|
7
|
+
"keywords": [
|
8
|
+
"react-native",
|
9
|
+
"print",
|
10
|
+
"ndef",
|
11
|
+
"react",
|
12
|
+
"native"
|
13
|
+
],
|
14
|
+
"repository": {
|
15
|
+
"type": "git",
|
16
|
+
"url": "github:yuan9090/react-native-print"
|
17
|
+
},
|
18
|
+
"peerDependencies": {
|
19
|
+
"react-native": "*"
|
20
|
+
},
|
21
|
+
"author": "yuan9090 <yuan9090@gmail.com>",
|
22
|
+
"license": "MIT"
|
23
|
+
}
|