简体   繁体   中英

How to change code of static library .a file Xcode Project for another Xcode project?

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.

You can create workspace and add there First and Second project. And then in second project add linkage with library of 1st project. Any updates of library in First project will be automatically picked up by second project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM