Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
dz_TZImagePickerController
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shuijing
dz_TZImagePickerController
Commits
3e95d873
Unverified
Commit
3e95d873
authored
Oct 17, 2020
by
谭真
Committed by
GitHub
Oct 17, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1399 from iAllenC/master
支持SPM,修改NSBundle+TZImagePicker.m以适配SPM安装
parents
ea5d8c81
4b772bbe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
+7
-0
Package.swift
Package.swift
+32
-0
TZImagePickerController/TZImagePickerController/NSBundle+TZImagePicker.m
...ntroller/TZImagePickerController/NSBundle+TZImagePicker.m
+4
-0
No files found.
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
0 → 100644
View file @
3e95d873
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version =
"1.0"
>
<FileRef
location =
"self:"
>
</FileRef>
</Workspace>
Package.swift
0 → 100644
View file @
3e95d873
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import
PackageDescription
let
package
=
Package
(
name
:
"TZImagePickerController"
,
platforms
:
[
.
iOS
(
.
v8
)],
products
:
[
// Products define the executables and libraries a package produces, and make them visible to other packages.
.
library
(
name
:
"TZImagePickerController"
,
targets
:
[
"TZImagePickerController"
]),
],
dependencies
:
[
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets
:
[
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.
target
(
name
:
"TZImagePickerController"
,
path
:
"TZImagePickerController/TZImagePickerController"
,
resources
:
[
.
process
(
"TZImagePickerController.bundle"
)],
publicHeadersPath
:
"."
,
cSettings
:
[
.
define
(
"TZ_SPM"
)
]
)
]
)
TZImagePickerController/TZImagePickerController/NSBundle+TZImagePicker.m
View file @
3e95d873
...
@@ -12,7 +12,11 @@
...
@@ -12,7 +12,11 @@
@implementation
NSBundle
(
TZImagePicker
)
@implementation
NSBundle
(
TZImagePicker
)
+
(
NSBundle
*
)
tz_imagePickerBundle
{
+
(
NSBundle
*
)
tz_imagePickerBundle
{
#ifdef TZ_SPM
NSBundle
*
bundle
=
SWIFTPM_MODULE_BUNDLE
;
#else
NSBundle
*
bundle
=
[
NSBundle
bundleForClass
:[
TZImagePickerController
class
]];
NSBundle
*
bundle
=
[
NSBundle
bundleForClass
:[
TZImagePickerController
class
]];
#endif
NSURL
*
url
=
[
bundle
URLForResource
:
@"TZImagePickerController"
withExtension
:
@"bundle"
];
NSURL
*
url
=
[
bundle
URLForResource
:
@"TZImagePickerController"
withExtension
:
@"bundle"
];
bundle
=
[
NSBundle
bundleWithURL
:
url
];
bundle
=
[
NSBundle
bundleWithURL
:
url
];
return
bundle
;
return
bundle
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment