Skip to content

Commit 6ccef8f

Browse files
committed
Renderers now support arbitrary context types to allow for non-CGContext based types to be implemented with custom functionality.
Updated the project for Swift 4.1 Introduced carthage support Minor cleanup
1 parent 55d73a3 commit 6ccef8f

39 files changed

Lines changed: 752 additions & 558 deletions

Example/GraphicsRenderer.xcodeproj/project.pbxproj

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
isa = PBXProject;
224224
attributes = {
225225
LastSwiftUpdateCheck = 0810;
226-
LastUpgradeCheck = 0920;
226+
LastUpgradeCheck = 0930;
227227
ORGANIZATIONNAME = CocoaPods;
228228
TargetAttributes = {
229229
549A32781DA16E6C00B1BFC9 = {
@@ -287,9 +287,12 @@
287287
files = (
288288
);
289289
inputPaths = (
290+
"${SRCROOT}/Pods/Target Support Files/Pods-iOSRenderer/Pods-iOSRenderer-frameworks.sh",
291+
"${BUILT_PRODUCTS_DIR}/GraphicsRenderer-iOS/GraphicsRenderer.framework",
290292
);
291293
name = "[CP] Embed Pods Frameworks";
292294
outputPaths = (
295+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GraphicsRenderer.framework",
293296
);
294297
runOnlyForDeploymentPostprocessing = 0;
295298
shellPath = /bin/sh;
@@ -302,9 +305,12 @@
302305
files = (
303306
);
304307
inputPaths = (
308+
"${SRCROOT}/Pods/Target Support Files/Pods-MacOSRenderer/Pods-MacOSRenderer-frameworks.sh",
309+
"${BUILT_PRODUCTS_DIR}/GraphicsRenderer-macOS/GraphicsRenderer.framework",
305310
);
306311
name = "[CP] Embed Pods Frameworks";
307312
outputPaths = (
313+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GraphicsRenderer.framework",
308314
);
309315
runOnlyForDeploymentPostprocessing = 0;
310316
shellPath = /bin/sh;
@@ -317,13 +323,16 @@
317323
files = (
318324
);
319325
inputPaths = (
326+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
327+
"${PODS_ROOT}/Manifest.lock",
320328
);
321329
name = "[CP] Check Pods Manifest.lock";
322330
outputPaths = (
331+
"$(DERIVED_FILE_DIR)/Pods-iOSRenderer-checkManifestLockResult.txt",
323332
);
324333
runOnlyForDeploymentPostprocessing = 0;
325334
shellPath = /bin/sh;
326-
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
335+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
327336
showEnvVarsInLog = 0;
328337
};
329338
84DF19B4553035256FA185DE /* [CP] Copy Pods Resources */ = {
@@ -347,13 +356,16 @@
347356
files = (
348357
);
349358
inputPaths = (
359+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
360+
"${PODS_ROOT}/Manifest.lock",
350361
);
351362
name = "[CP] Check Pods Manifest.lock";
352363
outputPaths = (
364+
"$(DERIVED_FILE_DIR)/Pods-MacOSRenderer-checkManifestLockResult.txt",
353365
);
354366
runOnlyForDeploymentPostprocessing = 0;
355367
shellPath = /bin/sh;
356-
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
368+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
357369
showEnvVarsInLog = 0;
358370
};
359371
BD9358B8B5C1475B25E4529C /* [CP] Copy Pods Resources */ = {
@@ -426,7 +438,6 @@
426438
isa = XCBuildConfiguration;
427439
baseConfigurationReference = F67402623BB64D57DAC806FD /* Pods-MacOSRenderer.debug.xcconfig */;
428440
buildSettings = {
429-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
430441
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
431442
CLANG_ANALYZER_NONNULL = YES;
432443
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@@ -449,7 +460,6 @@
449460
isa = XCBuildConfiguration;
450461
baseConfigurationReference = 9B018AF547F86940E43E829E /* Pods-MacOSRenderer.release.xcconfig */;
451462
buildSettings = {
452-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
453463
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
454464
CLANG_ANALYZER_NONNULL = YES;
455465
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@@ -478,12 +488,14 @@
478488
CLANG_WARN_BOOL_CONVERSION = YES;
479489
CLANG_WARN_COMMA = YES;
480490
CLANG_WARN_CONSTANT_CONVERSION = YES;
491+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
481492
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
482493
CLANG_WARN_EMPTY_BODY = YES;
483494
CLANG_WARN_ENUM_CONVERSION = YES;
484495
CLANG_WARN_INFINITE_RECURSION = YES;
485496
CLANG_WARN_INT_CONVERSION = YES;
486497
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
498+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
487499
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
488500
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
489501
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -533,12 +545,14 @@
533545
CLANG_WARN_BOOL_CONVERSION = YES;
534546
CLANG_WARN_COMMA = YES;
535547
CLANG_WARN_CONSTANT_CONVERSION = YES;
548+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
536549
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
537550
CLANG_WARN_EMPTY_BODY = YES;
538551
CLANG_WARN_ENUM_CONVERSION = YES;
539552
CLANG_WARN_INFINITE_RECURSION = YES;
540553
CLANG_WARN_INT_CONVERSION = YES;
541554
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
555+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
542556
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
543557
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
544558
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -573,7 +587,6 @@
573587
isa = XCBuildConfiguration;
574588
baseConfigurationReference = 4D65F194DF0ECCF20153595A /* Pods-iOSRenderer.debug.xcconfig */;
575589
buildSettings = {
576-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
577590
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
578591
DEVELOPMENT_TEAM = V2CWYL9AN8;
579592
INFOPLIST_FILE = GraphicsRenderer/Info.plist;
@@ -590,7 +603,6 @@
590603
isa = XCBuildConfiguration;
591604
baseConfigurationReference = 0864FE965C1824386C4A481A /* Pods-iOSRenderer.release.xcconfig */;
592605
buildSettings = {
593-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
594606
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
595607
DEVELOPMENT_TEAM = V2CWYL9AN8;
596608
INFOPLIST_FILE = GraphicsRenderer/Info.plist;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Example/GraphicsRenderer/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class ViewController: UIViewController {
5050
imageView.image = image
5151
}
5252

53-
private func performDrawing<Context: RendererContext>(context: Context) {
53+
private func performDrawing<Context>(context: Context) where Context: RendererContext, Context.ContextType: CGContext {
5454
let rect = context.format.bounds
5555

5656
UIColor.white.setFill()

Example/Podfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
use_frameworks!
22

33
target 'iOSRenderer' do
4+
platform :ios, '8.0'
45
pod 'GraphicsRenderer', :path => '../'
56
end
67

78
target 'MacOSRenderer' do
9+
platform :osx, '10.10'
810
pod 'GraphicsRenderer', :path => '../'
911
end

Example/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
PODS:
2-
- GraphicsRenderer (1.0.0)
2+
- GraphicsRenderer (1.3.0)
33

44
DEPENDENCIES:
55
- GraphicsRenderer (from `../`)
66

77
EXTERNAL SOURCES:
88
GraphicsRenderer:
9-
:path: "../"
9+
:path: ../
1010

1111
SPEC CHECKSUMS:
12-
GraphicsRenderer: 24c313f90d5ccb41e54785f57fff5c9aff19ba20
12+
GraphicsRenderer: 6ca727fb42d5ceba3b471b5b69ed33397accf441
1313

14-
PODFILE CHECKSUM: b9ef8a32566ebbc5a9c2922d215faee1d43d03a3
14+
PODFILE CHECKSUM: 7d8e03bf548b94d9d0b3c08167e5e43c6f205d27
1515

16-
COCOAPODS: 1.0.1
16+
COCOAPODS: 1.4.0

Example/Pods/Local Podspecs/GraphicsRenderer.podspec.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Manifest.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)