Skip to content

Commit 7e393bc

Browse files
committed
PrintPhoto: Version 3.0, 2015-10-22
Updated for iOS 9.0. PrintPhoto demonstrates how to print photos in iOS 9.0 or later.
1 parent d27c6f3 commit 7e393bc

20 files changed

+1154
-0
lines changed

PrintPhoto/LICENSE.txt

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Sample code project: PrintPhoto
2+
Version: 3.0
3+
4+
IMPORTANT: This Apple software is supplied to you by Apple
5+
Inc. ("Apple") in consideration of your agreement to the following
6+
terms, and your use, installation, modification or redistribution of
7+
this Apple software constitutes acceptance of these terms. If you do
8+
not agree with these terms, please do not use, install, modify or
9+
redistribute this Apple software.
10+
11+
In consideration of your agreement to abide by the following terms, and
12+
subject to these terms, Apple grants you a personal, non-exclusive
13+
license, under Apple's copyrights in this original Apple software (the
14+
"Apple Software"), to use, reproduce, modify and redistribute the Apple
15+
Software, with or without modifications, in source and/or binary forms;
16+
provided that if you redistribute the Apple Software in its entirety and
17+
without modifications, you must retain this notice and the following
18+
text and disclaimers in all such redistributions of the Apple Software.
19+
Neither the name, trademarks, service marks or logos of Apple Inc. may
20+
be used to endorse or promote products derived from the Apple Software
21+
without specific prior written permission from Apple. Except as
22+
expressly stated in this notice, no other rights or licenses, express or
23+
implied, are granted by Apple herein, including but not limited to any
24+
patent rights that may be infringed by your derivative works or by other
25+
works in which the Apple Software may be incorporated.
26+
27+
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
28+
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
29+
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
30+
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
31+
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
32+
33+
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
34+
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36+
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
37+
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
38+
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
39+
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
40+
POSSIBILITY OF SUCH DAMAGE.
41+
42+
Copyright (C) 2015 Apple Inc. All Rights Reserved.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,319 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
3E14C3D21B867219003F3591 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E14C3D11B867219003F3591 /* AppDelegate.swift */; };
11+
3E14C3D41B867219003F3591 /* CustomAssetPrintViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E14C3D31B867219003F3591 /* CustomAssetPrintViewController.swift */; };
12+
3E14C3D71B867219003F3591 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3E14C3D51B867219003F3591 /* Main.storyboard */; };
13+
3E14C3D91B867219003F3591 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3E14C3D81B867219003F3591 /* Assets.xcassets */; };
14+
3E14C3DC1B867219003F3591 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3E14C3DA1B867219003F3591 /* LaunchScreen.storyboard */; };
15+
3E14C3E51B868126003F3591 /* CustomAssetPrintPageRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E14C3E41B868126003F3591 /* CustomAssetPrintPageRenderer.swift */; settings = {ASSET_TAGS = (); }; };
16+
3E1AC9721B8B75A2006FC729 /* StandardAssetPrintViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E1AC9711B8B75A2006FC729 /* StandardAssetPrintViewController.swift */; settings = {ASSET_TAGS = (); }; };
17+
/* End PBXBuildFile section */
18+
19+
/* Begin PBXFileReference section */
20+
3E14C3CE1B867219003F3591 /* PrintPhoto.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PrintPhoto.app; sourceTree = BUILT_PRODUCTS_DIR; };
21+
3E14C3D11B867219003F3591 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
22+
3E14C3D31B867219003F3591 /* CustomAssetPrintViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomAssetPrintViewController.swift; sourceTree = "<group>"; };
23+
3E14C3D61B867219003F3591 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
24+
3E14C3D81B867219003F3591 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
25+
3E14C3DB1B867219003F3591 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
26+
3E14C3DD1B867219003F3591 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
27+
3E14C3E31B86723E003F3591 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
28+
3E14C3E41B868126003F3591 /* CustomAssetPrintPageRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CustomAssetPrintPageRenderer.swift; path = Assets.xcassets/CustomAssetPrintPageRenderer.swift; sourceTree = "<group>"; };
29+
3E1AC9711B8B75A2006FC729 /* StandardAssetPrintViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StandardAssetPrintViewController.swift; sourceTree = "<group>"; };
30+
/* End PBXFileReference section */
31+
32+
/* Begin PBXFrameworksBuildPhase section */
33+
3E14C3CB1B867219003F3591 /* Frameworks */ = {
34+
isa = PBXFrameworksBuildPhase;
35+
buildActionMask = 2147483647;
36+
files = (
37+
);
38+
runOnlyForDeploymentPostprocessing = 0;
39+
};
40+
/* End PBXFrameworksBuildPhase section */
41+
42+
/* Begin PBXGroup section */
43+
3E14C3C51B867219003F3591 = {
44+
isa = PBXGroup;
45+
children = (
46+
3E14C3E31B86723E003F3591 /* README.md */,
47+
3E14C3D01B867219003F3591 /* PrintPhoto */,
48+
3E14C3CF1B867219003F3591 /* Products */,
49+
);
50+
sourceTree = "<group>";
51+
};
52+
3E14C3CF1B867219003F3591 /* Products */ = {
53+
isa = PBXGroup;
54+
children = (
55+
3E14C3CE1B867219003F3591 /* PrintPhoto.app */,
56+
);
57+
name = Products;
58+
sourceTree = "<group>";
59+
};
60+
3E14C3D01B867219003F3591 /* PrintPhoto */ = {
61+
isa = PBXGroup;
62+
children = (
63+
3E14C3D11B867219003F3591 /* AppDelegate.swift */,
64+
3E1AC9701B8B745E006FC729 /* Standard Printing */,
65+
3E1AC96F1B8B7458006FC729 /* Custom Asset Print Rendering */,
66+
3E14C3D51B867219003F3591 /* Main.storyboard */,
67+
3E14C3D81B867219003F3591 /* Assets.xcassets */,
68+
3E14C3DA1B867219003F3591 /* LaunchScreen.storyboard */,
69+
3E14C3DD1B867219003F3591 /* Info.plist */,
70+
);
71+
path = PrintPhoto;
72+
sourceTree = "<group>";
73+
};
74+
3E1AC96F1B8B7458006FC729 /* Custom Asset Print Rendering */ = {
75+
isa = PBXGroup;
76+
children = (
77+
3E14C3D31B867219003F3591 /* CustomAssetPrintViewController.swift */,
78+
3E14C3E41B868126003F3591 /* CustomAssetPrintPageRenderer.swift */,
79+
);
80+
name = "Custom Asset Print Rendering";
81+
sourceTree = "<group>";
82+
};
83+
3E1AC9701B8B745E006FC729 /* Standard Printing */ = {
84+
isa = PBXGroup;
85+
children = (
86+
3E1AC9711B8B75A2006FC729 /* StandardAssetPrintViewController.swift */,
87+
);
88+
name = "Standard Printing";
89+
sourceTree = "<group>";
90+
};
91+
/* End PBXGroup section */
92+
93+
/* Begin PBXNativeTarget section */
94+
3E14C3CD1B867219003F3591 /* PrintPhoto */ = {
95+
isa = PBXNativeTarget;
96+
buildConfigurationList = 3E14C3E01B867219003F3591 /* Build configuration list for PBXNativeTarget "PrintPhoto" */;
97+
buildPhases = (
98+
3E14C3CA1B867219003F3591 /* Sources */,
99+
3E14C3CB1B867219003F3591 /* Frameworks */,
100+
3E14C3CC1B867219003F3591 /* Resources */,
101+
);
102+
buildRules = (
103+
);
104+
dependencies = (
105+
);
106+
name = PrintPhoto;
107+
productName = PrintPhoto;
108+
productReference = 3E14C3CE1B867219003F3591 /* PrintPhoto.app */;
109+
productType = "com.apple.product-type.application";
110+
};
111+
/* End PBXNativeTarget section */
112+
113+
/* Begin PBXProject section */
114+
3E14C3C61B867219003F3591 /* Project object */ = {
115+
isa = PBXProject;
116+
attributes = {
117+
LastUpgradeCheck = 0700;
118+
ORGANIZATIONNAME = "Apple Inc";
119+
TargetAttributes = {
120+
3E14C3CD1B867219003F3591 = {
121+
CreatedOnToolsVersion = 7.0;
122+
};
123+
};
124+
};
125+
buildConfigurationList = 3E14C3C91B867219003F3591 /* Build configuration list for PBXProject "PrintPhoto" */;
126+
compatibilityVersion = "Xcode 3.2";
127+
developmentRegion = English;
128+
hasScannedForEncodings = 0;
129+
knownRegions = (
130+
en,
131+
Base,
132+
);
133+
mainGroup = 3E14C3C51B867219003F3591;
134+
productRefGroup = 3E14C3CF1B867219003F3591 /* Products */;
135+
projectDirPath = "";
136+
projectRoot = "";
137+
targets = (
138+
3E14C3CD1B867219003F3591 /* PrintPhoto */,
139+
);
140+
};
141+
/* End PBXProject section */
142+
143+
/* Begin PBXResourcesBuildPhase section */
144+
3E14C3CC1B867219003F3591 /* Resources */ = {
145+
isa = PBXResourcesBuildPhase;
146+
buildActionMask = 2147483647;
147+
files = (
148+
3E14C3DC1B867219003F3591 /* LaunchScreen.storyboard in Resources */,
149+
3E14C3D91B867219003F3591 /* Assets.xcassets in Resources */,
150+
3E14C3D71B867219003F3591 /* Main.storyboard in Resources */,
151+
);
152+
runOnlyForDeploymentPostprocessing = 0;
153+
};
154+
/* End PBXResourcesBuildPhase section */
155+
156+
/* Begin PBXSourcesBuildPhase section */
157+
3E14C3CA1B867219003F3591 /* Sources */ = {
158+
isa = PBXSourcesBuildPhase;
159+
buildActionMask = 2147483647;
160+
files = (
161+
3E14C3D41B867219003F3591 /* CustomAssetPrintViewController.swift in Sources */,
162+
3E14C3D21B867219003F3591 /* AppDelegate.swift in Sources */,
163+
3E1AC9721B8B75A2006FC729 /* StandardAssetPrintViewController.swift in Sources */,
164+
3E14C3E51B868126003F3591 /* CustomAssetPrintPageRenderer.swift in Sources */,
165+
);
166+
runOnlyForDeploymentPostprocessing = 0;
167+
};
168+
/* End PBXSourcesBuildPhase section */
169+
170+
/* Begin PBXVariantGroup section */
171+
3E14C3D51B867219003F3591 /* Main.storyboard */ = {
172+
isa = PBXVariantGroup;
173+
children = (
174+
3E14C3D61B867219003F3591 /* Base */,
175+
);
176+
name = Main.storyboard;
177+
sourceTree = "<group>";
178+
};
179+
3E14C3DA1B867219003F3591 /* LaunchScreen.storyboard */ = {
180+
isa = PBXVariantGroup;
181+
children = (
182+
3E14C3DB1B867219003F3591 /* Base */,
183+
);
184+
name = LaunchScreen.storyboard;
185+
sourceTree = "<group>";
186+
};
187+
/* End PBXVariantGroup section */
188+
189+
/* Begin XCBuildConfiguration section */
190+
3E14C3DE1B867219003F3591 /* Debug */ = {
191+
isa = XCBuildConfiguration;
192+
buildSettings = {
193+
ALWAYS_SEARCH_USER_PATHS = NO;
194+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
195+
CLANG_CXX_LIBRARY = "libc++";
196+
CLANG_ENABLE_MODULES = YES;
197+
CLANG_ENABLE_OBJC_ARC = YES;
198+
CLANG_WARN_BOOL_CONVERSION = YES;
199+
CLANG_WARN_CONSTANT_CONVERSION = YES;
200+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
201+
CLANG_WARN_EMPTY_BODY = YES;
202+
CLANG_WARN_ENUM_CONVERSION = YES;
203+
CLANG_WARN_INT_CONVERSION = YES;
204+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
205+
CLANG_WARN_UNREACHABLE_CODE = YES;
206+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
207+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
208+
COPY_PHASE_STRIP = NO;
209+
DEBUG_INFORMATION_FORMAT = dwarf;
210+
ENABLE_STRICT_OBJC_MSGSEND = YES;
211+
ENABLE_TESTABILITY = YES;
212+
GCC_C_LANGUAGE_STANDARD = gnu99;
213+
GCC_DYNAMIC_NO_PIC = NO;
214+
GCC_NO_COMMON_BLOCKS = YES;
215+
GCC_OPTIMIZATION_LEVEL = 0;
216+
GCC_PREPROCESSOR_DEFINITIONS = (
217+
"DEBUG=1",
218+
"$(inherited)",
219+
);
220+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
221+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
222+
GCC_WARN_UNDECLARED_SELECTOR = YES;
223+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
224+
GCC_WARN_UNUSED_FUNCTION = YES;
225+
GCC_WARN_UNUSED_VARIABLE = YES;
226+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
227+
MTL_ENABLE_DEBUG_INFO = YES;
228+
ONLY_ACTIVE_ARCH = YES;
229+
SDKROOT = iphoneos;
230+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
231+
TARGETED_DEVICE_FAMILY = "1,2";
232+
};
233+
name = Debug;
234+
};
235+
3E14C3DF1B867219003F3591 /* Release */ = {
236+
isa = XCBuildConfiguration;
237+
buildSettings = {
238+
ALWAYS_SEARCH_USER_PATHS = NO;
239+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
240+
CLANG_CXX_LIBRARY = "libc++";
241+
CLANG_ENABLE_MODULES = YES;
242+
CLANG_ENABLE_OBJC_ARC = YES;
243+
CLANG_WARN_BOOL_CONVERSION = YES;
244+
CLANG_WARN_CONSTANT_CONVERSION = YES;
245+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
246+
CLANG_WARN_EMPTY_BODY = YES;
247+
CLANG_WARN_ENUM_CONVERSION = YES;
248+
CLANG_WARN_INT_CONVERSION = YES;
249+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
250+
CLANG_WARN_UNREACHABLE_CODE = YES;
251+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
252+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
253+
COPY_PHASE_STRIP = NO;
254+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
255+
ENABLE_NS_ASSERTIONS = NO;
256+
ENABLE_STRICT_OBJC_MSGSEND = YES;
257+
GCC_C_LANGUAGE_STANDARD = gnu99;
258+
GCC_NO_COMMON_BLOCKS = YES;
259+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
260+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
261+
GCC_WARN_UNDECLARED_SELECTOR = YES;
262+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
263+
GCC_WARN_UNUSED_FUNCTION = YES;
264+
GCC_WARN_UNUSED_VARIABLE = YES;
265+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
266+
MTL_ENABLE_DEBUG_INFO = NO;
267+
SDKROOT = iphoneos;
268+
TARGETED_DEVICE_FAMILY = "1,2";
269+
VALIDATE_PRODUCT = YES;
270+
};
271+
name = Release;
272+
};
273+
3E14C3E11B867219003F3591 /* Debug */ = {
274+
isa = XCBuildConfiguration;
275+
buildSettings = {
276+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
277+
INFOPLIST_FILE = PrintPhoto/Info.plist;
278+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
279+
PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.PrintPhoto";
280+
PRODUCT_NAME = "$(TARGET_NAME)";
281+
};
282+
name = Debug;
283+
};
284+
3E14C3E21B867219003F3591 /* Release */ = {
285+
isa = XCBuildConfiguration;
286+
buildSettings = {
287+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
288+
INFOPLIST_FILE = PrintPhoto/Info.plist;
289+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
290+
PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.PrintPhoto";
291+
PRODUCT_NAME = "$(TARGET_NAME)";
292+
};
293+
name = Release;
294+
};
295+
/* End XCBuildConfiguration section */
296+
297+
/* Begin XCConfigurationList section */
298+
3E14C3C91B867219003F3591 /* Build configuration list for PBXProject "PrintPhoto" */ = {
299+
isa = XCConfigurationList;
300+
buildConfigurations = (
301+
3E14C3DE1B867219003F3591 /* Debug */,
302+
3E14C3DF1B867219003F3591 /* Release */,
303+
);
304+
defaultConfigurationIsVisible = 0;
305+
defaultConfigurationName = Release;
306+
};
307+
3E14C3E01B867219003F3591 /* Build configuration list for PBXNativeTarget "PrintPhoto" */ = {
308+
isa = XCConfigurationList;
309+
buildConfigurations = (
310+
3E14C3E11B867219003F3591 /* Debug */,
311+
3E14C3E21B867219003F3591 /* Release */,
312+
);
313+
defaultConfigurationIsVisible = 0;
314+
defaultConfigurationName = Release;
315+
};
316+
/* End XCConfigurationList section */
317+
};
318+
rootObject = 3E14C3C61B867219003F3591 /* Project object */;
319+
}

PrintPhoto/PrintPhoto.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
type = "1"
4+
version = "2.0">
5+
</Bucket>

0 commit comments

Comments
 (0)