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.
Yes, you can use static libraries in Swift. Go to your Build Phases and under "Link Binary With Libraries" and add them there. Alternatively, you can go under Build Settings and in "Search Paths" append the "Library Search Paths" value to include the path to the folder that your . a file is in.
An XCFramework can be either static or dynamic and can include headers.
The libraries will be located under lib .
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 => '[email protected]: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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With