Donate and Smile is a Safari extension that automatically redirects to AmazonSmile.
It is a Safari app extension and is not built on the legacy framework.
Xcode on a Mac is required for development.
Safari doesn't seem to reliably pick up on changes to the extension in development. As a workaround, clean the build folder every time you make a change that affects the Safari part of the extension.
There doesn't seem to be a way to write a test suite for a Safari extension, so tests must be done manually. Here are cases to try:
- Amazon homepage
- logged in: user should land on the Smile version of the homepage
- not logged in: user should land on the Smile version of the log in page
- Amazon Germany homepage
- same expected results as the U.S. page
- Amazon U.K. homepage
- same expected results as the U.S. page
- Amazon Canada homepage
- no redirect at all should occur
- Amazon Music
- logged in: user should land on the non-Smile page
- not logged in: user should land on the non-Smile page
- details page for a product
- logged in: user should be land on the Smile version of the page
- not logged in: user should land on the non-Smile page but with a Smile banner near the top
- Go to a non-Amazon page, then an Amazon page, and make sure back and forward as expected
- Update the version and build number as appropriate
- "Targets > General > Identity"
- Make sure to do it for both the app and the extension
- The version shoudl roughly follow semver
- The build number should be incremented
- In the Xcode menu bar, do "Product > Archive"
- Use "Distribute App" to upload the archive to Apple
- To view archives, go to "Window > Organizer"
- Log in to App Store Connect
- Go to "My Apps", and find Donate and Smile
- Go to "App Store > MacOS App > Build", and select the new archive
MIT