Skip to content

iOS开发路上搜集到的好用的扩展 永远相信美好的事情即将发生 念念不忘 必有回响

Notifications You must be signed in to change notification settings

Swift-Package/AppleDarthVader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppleDarthVader

导入包后需要在Target - General - Frameworks, Libraries and Embedded Content添加AppleDarthVader与AppleDarthVaderOC

关于这个包如何最方便最方便最方便给项目使用

给Swift项目使用

为了做到全局导入这个Module就在一个文件里

@_exported import AppleDarthVader

给Objective-C项目使用

为了做到全局导入这个Module可以创建PCH文件并在Build Settings - Apple Clang - Language设置PCH文件路径$(SRCROOT)/Target名称/PrefixHeader.pch然后在PCH文件中进行模块导入

@import AppleDarthVader;
@import AppleDarthVaderOC;

无需开启Precompile Prefix Header开了反而有点慢

Xcode Swift Package Manager拉取慢可以使用Git Submodule将包作为子模块添加到项目中

第一步在Xcode项目文件夹内创建Packages文件夹(建议创建)

git submodule add https://github.com/GitHubyangjunyi/AppleDarthVader.git ./Packages/AppleDarthVader
git commit -am '添加子模块'

第二步提交添加子模块动作

git commit -am '添加子模块'

第三步如果需要更新子模块

git submodule update --remote

第四步如果克隆使用子模块的项目需要递归克隆或者不进行递归克隆后续手动拉取子模块

git clone <项目URL> --recurse-submodules

或者

git clone <项目URL>
git submodule update --init
git submodule update --remote

About

iOS开发路上搜集到的好用的扩展 永远相信美好的事情即将发生 念念不忘 必有回响

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published