如何更改另一个Xcode项目的静态库代码.a文件Xcode项目? [英] How to change code of static library .a file Xcode Project for another Xcode project?

查看:184
本文介绍了如何更改另一个Xcode项目的静态库代码.a文件Xcode项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

情景喜欢,

我有两个xcode项目,它们有git repo。



第二个Xcode项目没有在Device中运行应用程序的目标,但它有libProject.a目标和大量代码行。



第一个Xcode项目的目标是在Device中运行应用程序,它通过CocoaPod机制使用上面的.a库。



现在我想更新一些东西在第二个Xcode项目中,并希望检入设备,而不是将更新提交到First xcode项目。
这两个项目都用于git回购。



我曾尝试推出第二个项目并更新第一个项目的窗格,但是我无法得到它。



编辑*
第一个Xcode项目也有工作区..

************新编辑************
现在正在发生一些事情。我已经更新了静态库中的代码行,这些代码只能用于单元测试。我已经做到了。
现在我已经将这些代码行提交给新分支,并将其设置为默认值。
但是当我要从终端更新静态库的窗口时,我看不到First Code工作区项目中的更改。





请告知如何做到这一点。

解决方案

最后,我明白了。



更新静态库中的代码并执行单元测试。 B'coz它不像其他具有Device目标的项目。

第二步



提交代码并推送到git。并确保您提交的代码分支应该是默认的分支。如果不合并为默认分支或将其设为默认分支。



第3步。



编辑使用Cocoapod机制的First xcode项目的Pod文件。





  pod'Name',:git => 'git@github.com:name.git',:branch => '默认分支名称'

仅在此处添加分支。



第4步



只更新此窗格。通过终端命令。

  pod更新podname 

从静态库中获得更新。


Scenario like,

I have two xcode projects which has git repo.

Second Xcode project does not have target to run app in Device, But it has libProject.a target and lots of lines of code.

First Xcode project has target to run app in Device and it uses above .a library by CocoaPod mechanism.

Now i want to update few things in Second Xcode project and wants to check in device, than pull update to First xcode project. both projects belonds to git repo.

I had tried with to commit push of Second project and update pod of First project, But i could not get it.

Edit* First Xcode project has workspace too..

************ New Edit ************ something happening now. I have update code lines in static library which should be available to unit test only. I have did it. Now i have commit this code lines to new branch and make it default. But when i going to update pod of static library from terminal i could not see changes in First Code workspace project.

please advise how to do this.

解决方案

Finally I got it.

Step 1.

Update code in static library and do unit test. B'coz it is not like other project which has Device target.

Step 2.

Commit code and push to git. And make sure your commited code branch should be default one. If not merge to default or make it default branch.

Step 3.

Edit Pod file of First xcode project which is using Cocoapod mechnism.

Like

pod 'Name', :git => 'git@github.com:name.git’, :branch => ‘Default branch name'

Add branch here only.

Step 4.

Update this pod only. By terminal command.

pod update podname

And got the update from static library.

这篇关于如何更改另一个Xcode项目的静态库代码.a文件Xcode项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆