Skip to content

Commit 2f7baab

Browse files
authored
Merge pull request #4 from SDWebImage/project_catalyst
Add support for Catalyst
2 parents 9d3249d + ca7b954 commit 2f7baab

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

Example/SDWebImagePDFCoder.xcodeproj/project.pbxproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
1745C32CD7A3DC952B084514 /* Pods-SDWebImagePDFCoder_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImagePDFCoder_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImagePDFCoder_Tests/Pods-SDWebImagePDFCoder_Tests.release.xcconfig"; sourceTree = "<group>"; };
4848
23D236E5C8333D1EF1AF6ED1 /* Pods-SDWebImagePDFCoder_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImagePDFCoder_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImagePDFCoder_Example/Pods-SDWebImagePDFCoder_Example.release.xcconfig"; sourceTree = "<group>"; };
4949
243AAAFCC482EEC1752548DA /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
50+
32350C422393CE8900151591 /* SDWebImagePDFCoder_Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SDWebImagePDFCoder_Example.entitlements; sourceTree = "<group>"; };
5051
32D8F2F62185F1C300FFC14A /* SDWebImagePDFCoder_Example macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SDWebImagePDFCoder_Example macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
5152
32D8F2F82185F1C300FFC14A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
5253
32D8F2F92185F1C300FFC14A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -141,6 +142,7 @@
141142
6003F581195388D10070C39A = {
142143
isa = PBXGroup;
143144
children = (
145+
32350C422393CE8900151591 /* SDWebImagePDFCoder_Example.entitlements */,
144146
60FF7A9C1954A5C5007DD14C /* Podspec Metadata */,
145147
6003F593195388D20070C39A /* Example for SDWebImagePDFCoder */,
146148
6003F5B5195388D20070C39A /* Tests */,
@@ -661,7 +663,7 @@
661663
CLANG_WARN_INT_CONVERSION = YES;
662664
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
663665
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
664-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
666+
CODE_SIGN_IDENTITY = "";
665667
COPY_PHASE_STRIP = NO;
666668
ENABLE_TESTABILITY = YES;
667669
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -701,7 +703,7 @@
701703
CLANG_WARN_INT_CONVERSION = YES;
702704
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
703705
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
704-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
706+
CODE_SIGN_IDENTITY = "";
705707
COPY_PHASE_STRIP = YES;
706708
ENABLE_NS_ASSERTIONS = NO;
707709
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -723,12 +725,15 @@
723725
baseConfigurationReference = B804462885514B9A9BD2089E /* Pods-SDWebImagePDFCoder_Example.debug.xcconfig */;
724726
buildSettings = {
725727
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
728+
CODE_SIGN_ENTITLEMENTS = SDWebImagePDFCoder_Example.entitlements;
729+
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
726730
GCC_PRECOMPILE_PREFIX_HEADER = YES;
727731
GCC_PREFIX_HEADER = "SDWebImagePDFCoder/SDWebImagePDFCoder-Prefix.pch";
728732
INFOPLIST_FILE = "SDWebImagePDFCoder/SDWebImagePDFCoder-Info.plist";
729733
MODULE_NAME = ExampleApp;
730734
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
731735
PRODUCT_NAME = "$(TARGET_NAME)";
736+
SUPPORTS_MACCATALYST = YES;
732737
WRAPPER_EXTENSION = app;
733738
};
734739
name = Debug;
@@ -738,12 +743,15 @@
738743
baseConfigurationReference = 23D236E5C8333D1EF1AF6ED1 /* Pods-SDWebImagePDFCoder_Example.release.xcconfig */;
739744
buildSettings = {
740745
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
746+
CODE_SIGN_ENTITLEMENTS = SDWebImagePDFCoder_Example.entitlements;
747+
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
741748
GCC_PRECOMPILE_PREFIX_HEADER = YES;
742749
GCC_PREFIX_HEADER = "SDWebImagePDFCoder/SDWebImagePDFCoder-Prefix.pch";
743750
INFOPLIST_FILE = "SDWebImagePDFCoder/SDWebImagePDFCoder-Info.plist";
744751
MODULE_NAME = ExampleApp;
745752
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
746753
PRODUCT_NAME = "$(TARGET_NAME)";
754+
SUPPORTS_MACCATALYST = YES;
747755
WRAPPER_EXTENSION = app;
748756
};
749757
name = Release;

Example/SDWebImagePDFCoder/SDViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ - (void)viewDidLoad
2626
NSURL *pdfURL = [NSURL URLWithString:@"https://raw.githubusercontent.com/icons8/flat-color-icons/master/pdf/about.pdf"];
2727
NSURL *pdfURL2 = [NSURL URLWithString:@"https://raw.githubusercontent.com/icons8/flat-color-icons/master/pdf/webcam.pdf"];
2828

29-
CGSize screenSize = [UIScreen mainScreen].bounds.size;
29+
CGSize screenSize = self.view.bounds.size;
3030

3131
UIImageView *imageView1 = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, screenSize.width, screenSize.height / 2)];
32-
imageView1.contentMode = UIViewContentModeScaleAspectFill;
32+
imageView1.contentMode = UIViewContentModeScaleAspectFit;
3333
imageView1.clipsToBounds = YES;
3434

3535
UIImageView *imageView2 = [[UIImageView alloc] initWithFrame:CGRectMake(0, screenSize.height / 2, screenSize.width, screenSize.height / 2)];
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.network.client</key>
8+
<true/>
9+
</dict>
10+
</plist>

SDWebImagePDFCoder.podspec

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ SDWebImageSVGCoder is a SVG coder plugin for SDWebImage framework, which provide
3333

3434
s.source_files = 'SDWebImagePDFCoder/Classes/**/*', 'SDWebImagePDFCoder/Module/SDWebImagePDFCoder.h'
3535
s.module_map = 'SDWebImagePDFCoder/Module/SDWebImagePDFCoder.modulemap'
36+
37+
s.pod_target_xcconfig = {
38+
'SUPPORTS_MACCATALYST' => 'YES',
39+
'DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER' => 'NO'
40+
}
3641

3742
s.dependency 'SDWebImage', '~> 5.0'
3843
end

0 commit comments

Comments
 (0)