Skip to content

Commit 2e79c85

Browse files
committed
Add the support for Catalyst
1 parent 86d3a4c commit 2e79c85

File tree

6 files changed

+23
-32
lines changed

6 files changed

+23
-32
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ Carthage/Build
3333
# Note: if you ignore the Pods directory, make sure to uncomment
3434
# `pod install` in .travis.yml
3535
#
36-
Example/Pods
36+
Pods
37+
Podfile.lock

Example/Podfile.lock

-23
This file was deleted.

Example/SDWebImageSVGCoder.xcodeproj/project.pbxproj

+10-2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
322BBD8D218AC06200D62A04 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5757
322BBD8E218AC06200D62A04 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
5858
322BBD90218AC06200D62A04 /* SDWebImageSVGCoder_Example_macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SDWebImageSVGCoder_Example_macOS.entitlements; sourceTree = "<group>"; };
59+
32350C412393C6B800151591 /* SDWebImageSVGCoder_Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SDWebImageSVGCoder_Example.entitlements; sourceTree = "<group>"; };
5960
3735393AE6DB842F16DE620D /* Pods-SDWebImageSVGCoder_Example macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImageSVGCoder_Example macOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImageSVGCoder_Example macOS/Pods-SDWebImageSVGCoder_Example macOS.release.xcconfig"; sourceTree = "<group>"; };
6061
3DF753CF34D55095918357E5 /* Pods-SDWebImageSVGCoder_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImageSVGCoder_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImageSVGCoder_Example/Pods-SDWebImageSVGCoder_Example.debug.xcconfig"; sourceTree = "<group>"; };
6162
599C654BCC4E3AD7DDA65F1A /* SDWebImageSVGCoder.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SDWebImageSVGCoder.podspec; path = ../SDWebImageSVGCoder.podspec; sourceTree = "<group>"; };
@@ -141,6 +142,7 @@
141142
6003F581195388D10070C39A = {
142143
isa = PBXGroup;
143144
children = (
145+
32350C412393C6B800151591 /* SDWebImageSVGCoder_Example.entitlements */,
144146
60FF7A9C1954A5C5007DD14C /* Podspec Metadata */,
145147
6003F593195388D20070C39A /* Example for SDWebImageSVGCoder */,
146148
6003F5B5195388D20070C39A /* Tests */,
@@ -651,7 +653,7 @@
651653
CLANG_WARN_INT_CONVERSION = YES;
652654
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
653655
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
654-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
656+
CODE_SIGN_IDENTITY = "";
655657
COPY_PHASE_STRIP = NO;
656658
ENABLE_TESTABILITY = YES;
657659
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -690,7 +692,7 @@
690692
CLANG_WARN_INT_CONVERSION = YES;
691693
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
692694
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
693-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
695+
CODE_SIGN_IDENTITY = "";
694696
COPY_PHASE_STRIP = YES;
695697
ENABLE_NS_ASSERTIONS = NO;
696698
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -712,12 +714,15 @@
712714
baseConfigurationReference = 3DF753CF34D55095918357E5 /* Pods-SDWebImageSVGCoder_Example.debug.xcconfig */;
713715
buildSettings = {
714716
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
717+
CODE_SIGN_ENTITLEMENTS = SDWebImageSVGCoder_Example.entitlements;
718+
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
715719
GCC_PRECOMPILE_PREFIX_HEADER = YES;
716720
GCC_PREFIX_HEADER = "SDWebImageSVGCoder/SDWebImageSVGCoder-Prefix.pch";
717721
INFOPLIST_FILE = "SDWebImageSVGCoder/SDWebImageSVGCoder-Info.plist";
718722
MODULE_NAME = ExampleApp;
719723
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
720724
PRODUCT_NAME = "$(TARGET_NAME)";
725+
SUPPORTS_MACCATALYST = YES;
721726
WRAPPER_EXTENSION = app;
722727
};
723728
name = Debug;
@@ -727,12 +732,15 @@
727732
baseConfigurationReference = 8BBC5C427EF452F5C6FAEB4D /* Pods-SDWebImageSVGCoder_Example.release.xcconfig */;
728733
buildSettings = {
729734
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
735+
CODE_SIGN_ENTITLEMENTS = SDWebImageSVGCoder_Example.entitlements;
736+
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
730737
GCC_PRECOMPILE_PREFIX_HEADER = YES;
731738
GCC_PREFIX_HEADER = "SDWebImageSVGCoder/SDWebImageSVGCoder-Prefix.pch";
732739
INFOPLIST_FILE = "SDWebImageSVGCoder/SDWebImageSVGCoder-Info.plist";
733740
MODULE_NAME = ExampleApp;
734741
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
735742
PRODUCT_NAME = "$(TARGET_NAME)";
743+
SUPPORTS_MACCATALYST = YES;
736744
WRAPPER_EXTENSION = app;
737745
};
738746
name = Release;

Example/SDWebImageSVGCoder/SDViewController.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ - (void)viewDidLoad
2626
NSURL *svgURL2 = [NSURL URLWithString:@"https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/wikimedia.svg"];
2727
NSURL *svgURL3 = [NSURL URLWithString:@"https://simpleicons.org/icons/github.svg"];
2828

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

3131
UIImageView *imageView1 = [[UIImageView alloc] init];
3232
imageView1.frame = CGRectMake(0, 0, screenSize.width, screenSize.height / 2);
3333
imageView1.contentMode = UIViewContentModeScaleAspectFit;
3434

3535
UIImageView *imageView2 = [[UIImageView alloc] init];
3636
imageView2.frame = CGRectMake(0, screenSize.height / 2, screenSize.width, screenSize.height / 2);
37-
imageView2.contentMode = UIViewContentModeScaleAspectFill;
37+
imageView2.contentMode = UIViewContentModeScaleAspectFit;
3838

3939
UIImageView *imageView3 = [[UIImageView alloc] init];
4040
imageView3.frame = CGRectMake(screenSize.width - 100, screenSize.height - 100, 100, 100);

Example/SDWebImageSVGCoder.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings Example/SDWebImageSVGCoder_Example.entitlements

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>BuildSystemType</key>
6-
<string>Original</string>
7-
<key>PreviewsEnabled</key>
8-
<false/>
5+
<key>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.network.client</key>
8+
<true/>
99
</dict>
1010
</plist>

SDWebImageSVGCoder.podspec

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ TODO: Add long description of the pod here.
3333

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

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

0 commit comments

Comments
 (0)