-
Notifications
You must be signed in to change notification settings - Fork 0
2020-02-13 #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
valeIT
wants to merge
9
commits into
master
Choose a base branch
from
2020-02-13
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
2020-02-13 #139
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c566c04
2020-02-13
valeIT ffeeec5
Update 2020-02-14-updating-a-cocoapod.md
valeIT 0c4d85c
Merge branch 'master' into 2020-02-13
repo-ranger[bot] 99396d0
Merge branch 'master' into 2020-02-13
repo-ranger[bot] fb341a0
Merge branch 'master' into 2020-02-13
repo-ranger[bot] 0353d0f
Merge branch 'master' into 2020-02-13
repo-ranger[bot] c46877f
Merge branch 'master' into 2020-02-13
valeIT ec300f3
Merge branch 'master' into 2020-02-13
repo-ranger[bot] 8432fb4
Update 2020-02-14-updating-a-cocoapod.md
valeIT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- | ||
| layout: post | ||
| title: Updating Your Cocoapod Framework - iOS Dependencies | ||
| date: 2020-01-14 16:28:05.000000000 +01:00 | ||
| type: post | ||
| published: true | ||
| status: publish | ||
| categories: [Programming] | ||
| image: | ||
| image2: | ||
| author: Valentino Urbano | ||
| --- | ||
|
|
||
| There are lots of guides on [how to publish a brand new iOS framework using Cocoapods][1], but I couldn't find a good one about updating it. The process is pretty straightforward, but not having a clear documentation for the use case makes it harder than it should be. | ||
|
|
||
| This article will assume that you already have a framework set up and published using Cocoapods and that you either have a valid Cocoapods session or can get granted access by a maintaner. | ||
|
|
||
| #### Adding A New Maintainer | ||
|
|
||
| Before publishing an update your machine needs to be authorized to make changes to that framework's Cocoapods Spec. | ||
|
|
||
| If that's not the case you need to get access from an authorized user otherwise you won't be able to publish the new version. | ||
|
|
||
| The key is stored in the user's local machine that has published the framework the first time. From that machine it is possible to add a new user by running `pod trunk add-owner FRAMEWORK_NAME USER_EMAIL`. The email needs to be of a valid user account from the Cocoapods website. You will receive a link to that email to activate the account. Be wary that this account does not have a password, the token will be saved in the mac's keychain. | ||
|
|
||
| #### Publishing An Update | ||
|
|
||
| Now that all the necessary pieces are set up we can actually start working on publishing the update. | ||
|
|
||
| 1. Make your changes to the code making sure to understand that updating a framework is not like updating an app. Other people are making use of the API you provide. If there are changes in the API you need to have deprecation warnings/errors for the removed/changed functionality. Consider having both working at once for some time to give your users the time to update their code to take advantage of the new APIs. | ||
|
|
||
| 1. Push them to a remote | ||
|
|
||
| 1. Add a git tag. Remember to use [semantic versioning][2] for it and to keep it consistent. Users of your frameworks are used to semantic versioning so if you are using something else you may confuse them. If you change your API significantly you should release it as a new major release so users are aware that the changes are significant. Minor releases should NOT change the API in a backward incompatible way. All code that used to build without errors or warnings should still build correctly. | ||
|
|
||
| 1. Update the podspec with the new cocoapod version (using semantic versioning) and the corresponding tag. Add the tag to the commit containing the change in the podspec or a later commit. If you add it to a commit before the change in the podspec it won't work and users will still be served the old version of the framework. | ||
|
|
||
| 1. Push the update to Cocoapods trunk by running `pod trunk push PODNAME.podspec`. You can also check that your PodSpec follows the official spec by running `pod lint PODNAME.podspec | ||
|
|
||
|
|
||
|
|
||
| [1]: {% post_url 2015-11-27-parseswtableviewcell %} | ||
| [2]: https://semver.org/ | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.