将项目从 GitHub 分叉到 CocoaPods

Forking a project from GitHub to CocoaPods

我是 GitHub 的新手并且已经分叉 this project (One-Signal) on my own repository, here。我直接在 GitHub 上更新了我存储库中的一些文件,以便能够将这些更改用于我的 XCode 项目和 CocoaPods。所以我在我的 podfile 中添加了这一行:

pod 'OneSignal', :git => 'https://github.com/fraxool/OneSignal-iOS-SDK.git'

我已经使用命令 pod install 安装了它,但我仍然无法使用我添加到 GitHub 上的文件中的新方法。这是我在 "Pods" 目录中看到的内容,在 XCode :

好像是用了GitHub仓库的OneSignal.framework文件,不过我直接编辑了"OneSignal"目录下的源文件(here), 而不是 "Framework"。

那么我该如何解决这个问题,以便我可以将存储库中的更改应用到我的 XCode 项目中?

谢谢!

您还需要提交在 OneSignal.framework as cocoapods uses this instead of the source. It looks like you forgot the main compiled OneSignal binary

中编译的新代码

您可能还需要将 OneSignal.podspec 更新到新版本并使用相同的版本号标记您的最新提交。

我还查看了您的提交,它应该允许您禁用 SDK 自动重置徽章编号,但是 OneSignal 上的 'increase' 选项将不再准确。