Skip to content

Fix the import from SwiftPM && CocoaPods #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ let package = Package(
path: ".",
sources: ["SDWebImageSVGNativeCoder/Classes"],
publicHeadersPath: "SDWebImageSVGNativeCoder/Classes",
cSettings: [.define("BOOST_VARIANT_DETAIL_NO_SUBSTITUTE", to: "1")]
cSettings: [.define("BOOST_VARIANT_DETAIL_NO_SUBSTITUTE", to: "1")],
linkerSettings: [.linkedLibrary("xml2")]
)
],
cLanguageStandard: .gnu11,
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ it, simply add the following line to your Podfile:
pod 'SDWebImageSVGNativeCoder'
```

Note:

It's strongly recommended to use CocoaPods v1.7+ with multiple Xcode Projects, which can avoid issues when different header file contains the same file name. This applys to all SDWebImage organization maintained repo.

```ruby
install! 'cocoapods', generate_multiple_pod_projects: true
```

#### Carthage

SDWebImageSVGNativeCoder is available through [Carthage](https://github.com/Carthage/Carthage).
Expand Down
3 changes: 2 additions & 1 deletion SDWebImageSVGNativeCoder.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ This SDWebImage coder plugin, use adobe svg-native-viewer library to provide SVG
s.source_files = 'SDWebImageSVGNativeCoder/Classes/**/*'
s.pod_target_xcconfig = {
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) BOOST_VARIANT_DETAIL_NO_SUBSTITUTE=1',
'HEADER_SEARCH_PATHS' => '$(inherited) ${PODS_ROOT}/svgnative/svg-native-viewer/third_party/boost_variant_property_tree'
'HEADER_SEARCH_PATHS' => '$(inherited) ${PODS_ROOT}/svgnative/svg-native-viewer/svgnative/include ${PODS_ROOT}/svgnative/svg-native-viewer/third_party/boost_variant_property_tree'
}

s.dependency 'SDWebImage', '~> 5.10'
s.dependency 'svgnative', '>= 0.1.0-beta'
s.libraries 'c++', 'xml2'
end
2 changes: 1 addition & 1 deletion SDWebImageSVGNativeCoder/Classes/SDImageSVGNativeCoder.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// SDImageSVGNativeCoder.h
// SDWebImageSVGCoder
// SDWebImageSVGNativeCoder
//
// Created by dreampiggy on 08/01/2022.
// Copyright (c) 2022 dreampiggy. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion SDWebImageSVGNativeCoder/Classes/SDImageSVGNativeCoder.mm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// SDImageSVGNativeCoder.mm
// SDWebImageSVGCoder
// SDWebImageSVGNativeCoder
//
// Created by dreampiggy on 08/01/2022.
// Copyright (c) 2022 dreampiggy. All rights reserved.
Expand Down
5 changes: 3 additions & 2 deletions SDWebImageSVGNativeCoder/Classes/SDWebImageSVGNativeCoder.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// SDImageSVGNativeCoder.h
// SDWebImageSVGCoder
// SDWebImageSVGNativeCoder.h
// SDWebImageSVGNativeCoder
//
// Created by dreampiggy on 08/01/2022.
// Copyright (c) 2022 dreampiggy. All rights reserved.
Expand All @@ -17,3 +17,4 @@ FOUNDATION_EXPORT const unsigned char SDWebImageSVGNativeCoderVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <SDWebImageSVGNativeCoder/PublicHeader.h>


#import "SDImageSVGNativeCoder.h"