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
4b772bbe
Commit
4b772bbe
authored
Oct 17, 2020
by
Chen Yuanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支持SPM,修改NSBundle+TZImagePicker.m以适配SPM安装
parent
661011ad
Changes
3
Show 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 @
4b772bbe
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version =
"1.0"
>
<FileRef
location =
"self:"
>
</FileRef>
</Workspace>
Package.swift
0 → 100644
View file @
4b772bbe
// 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 @
4b772bbe
...
...
@@ -12,7 +12,11 @@
@implementation
NSBundle
(
TZImagePicker
)
+
(
NSBundle
*
)
tz_imagePickerBundle
{
#ifdef TZ_SPM
NSBundle
*
bundle
=
SWIFTPM_MODULE_BUNDLE
;
#else
NSBundle
*
bundle
=
[
NSBundle
bundleForClass
:[
TZImagePickerController
class
]];
#endif
NSURL
*
url
=
[
bundle
URLForResource
:
@"TZImagePickerController"
withExtension
:
@"bundle"
];
bundle
=
[
NSBundle
bundleWithURL
:
url
];
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