You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updating a project that has been setup with apm is one of the most powerful things about the AIR Package Manager.
Previously you would have had to go to the site distributing the ANE, download the ANE, check for updates to any dependencies and download them. Then you would have to check the documentation and sift through your manifest additions and info additions to check if any updates are required. This is all before you can even start to check for any code changes required. Obviously it was a painful process and one we at distriqt were all too aware of.
From this we can see that there is a new version of the com.distriqt.facebook.Core package available. It is a patch release (last digit in the sem ver) so will only contain bug fixes and minor updates and shouldn't require any changes to the API (though there may be manifest changes or other such additions).
Using outdated isn't necessary, it is just information that you can use to decide whether you want to update or not.
Update Packages
Now that we know there is an update and we have decided to update our packages we move to the update command.
Open up a terminal in the project directory, and run the help update process to print out the details on the update command:
$ apm help update
apm update
update the installed packages in your project
apm update apm check for a new release of the apm client and update if available
apm update update all dependencies in your project
apm update <foo> update the <foo> dependency in your project
You will see there are several options here, the first is to update the apm client (more on this later). The other commands allow you to update packages. If you pass a parameter you can specify a package to update, eg:
apm update com.distriqt.IDFA
would check to see if there are any updates to the IDFA extension and install them if available.
Alternatively you can just run update without any parameters:
apm update
This process will firstly check with the repository for the latest versions of all your packages and then update them as required.
Lets run this now.
apm update
You will see apm going through and checking the versions of all the extensions, uninstalling old and unused extensions, then installing the newer versions.
Once complete you should be able to list your installed packages and see:
Here we can see the facebook package is now at the updated 9.3.2 release.
Finalising
When you update (or install) a package you should always regenerate your application descriptor. This makes sure any changes to the android manifest or the ios info additions and entitlements are correctly updated in your build.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In this tutorial we are going to run through how to update an application that has been setup to use the AIR Package Manager.
This assumes you have got your AIR project running with
apm
. If you haven't have a look at the following tutorials:Updating a project that has been setup with
apm
is one of the most powerful things about the AIR Package Manager.Previously you would have had to go to the site distributing the ANE, download the ANE, check for updates to any dependencies and download them. Then you would have to check the documentation and sift through your manifest additions and info additions to check if any updates are required. This is all before you can even start to check for any code changes required. Obviously it was a painful process and one we at distriqt were all too aware of.
So lets look at what we do with
apm
.In this example I have 2 packages installed:
com.distriqt.facebook.Core
: v9.3.1com.distriqt.IDFA
: v5.0.31Outdated Packages
Firstly we can quickly see if there is an update available by using the
outdated
command:This check the installed packages for updates in the repository:
From this we can see that there is a new version of the
com.distriqt.facebook.Core
package available. It is a patch release (last digit in the sem ver) so will only contain bug fixes and minor updates and shouldn't require any changes to the API (though there may be manifest changes or other such additions).Update Packages
Now that we know there is an update and we have decided to update our packages we move to the
update
command.Open up a terminal in the project directory, and run the
help update
process to print out the details on the update command:You will see there are several options here, the first is to update the
apm
client (more on this later). The other commands allow you to update packages. If you pass a parameter you can specify a package to update, eg:would check to see if there are any updates to the IDFA extension and install them if available.
Alternatively you can just run update without any parameters:
This process will firstly check with the repository for the latest versions of all your packages and then update them as required.
Lets run this now.
You will see
apm
going through and checking the versions of all the extensions, uninstalling old and unused extensions, then installing the newer versions.Once complete you should be able to list your installed packages and see:
Here we can see the facebook package is now at the updated 9.3.2 release.
Finalising
When you update (or install) a package you should always regenerate your application descriptor. This makes sure any changes to the android manifest or the ios info additions and entitlements are correctly updated in your build.
Now we can return to our application and check it builds and runs as expected.
Updating APM
It is worth ensuring you have the latest version of
apm
installed. This is done through a specific form of theapm update
command:This will list out the current version and then check for the latest. It will then download any updates to the
apm
application and install.If you have the latest you will see something like the following:
Thanks for reading and if you have any questions you can reach out at the apm discussion forum.
Beta Was this translation helpful? Give feedback.
All reactions