When we modify the code in a Pod Library, how to update the projects that depend on the library to the latest code? The steps are as follows:
Suppose you have modified the code of SamplePod (Pod name) and want to update the latest version to 1.0.1. The current version is 1.0.0
- Modify the SamplePod.podspec file and change the version from 1.0.0 to 1.0.1
- Submit source code modifications and podspec file modifications to the git repository, and push them to the remote repository.
- Add tag. The tag name needs to be consistent with the version name in the podspec file. Push the tag to the remote warehouse.
- Release the latest version
* pod trunk push SamplePod.podspec –allow-warnings
Problems you may encounter:
- The m1 m2 version of mac encounters the following problems in the arm version of Terminal:
LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
Solution: Use rosetta mode to run Terminal.
[!] You need to run
pod trunk registerto register a session first.
It means that this machine is not registered in the Pod warehouse source. Just execute pod trunk register
to register as required.
[!] The spec did not pass validation, due to 3 warnings (but you can use
–allow-warningsto ignore them).
It means that the lint check of the podspec file has failed. Just follow the instructions and add --allow-warnings
.