Issues and Solutions for publishing on the Galaxy Store

When uploading an app to the Galaxy Store (Samsung store) for Samsung devices, I have come across two different errors by the reviewers of Samsung, when they tried installing the app. I could not reproduce any of the erros locally, which made solving them even harder.

Error code -103

Installation failed. Try later. (com.felixlarsen.somappid: -103)

This error indicates that there is something wrong with the .apk Signatures. Make sure to use both v1 (jar) and v2 (Full apk) signatures for the apk.

Error code -22

Installation failed. Try later. (com.felixlarsen.somappid: -22)

This issue occurs when you are trying to install and app, which is already uploaded to the Google Play Store with the same application id, but a different signature. Because I am using the latest recommandations of Google to upload the app as an .aab file (Android App Bundle) and this format isn't allowed by Samsung, I had to upload an .apk which naturally has a different signature than the .aab. The solution is to upload the app to the Galaxy Store with a different application id.

iOS App with CocoaPods Test Automation with GitHub Actions CI

If you write tests for your app at some point you will want to run them in an automated way to increase the effectiveness and ease of use of your tests. When already hosting your project on GitHub, then GitHub Actions is the easiest way to add CI (continuous integration) to your app project.

GitHub Actions workflow file (iOS CI)

Triggers

The workflow is triggered for each commit to the main branch and also for each PR (Pull request) to main. It can be changed to your liking. Triggers for github

Caching

To speed of the workflow is added especially when using Cocoapods this help a lot. The key specifies which cache to look for. When using the hashed Podfile.lock file the cache is used from another build with exactly the same Podfile.lock file. The restore-key is used as an alternative if an exact key match couldn't be found

CocoaPod Install

This step is only needed when using CocoaPods when using SPM (Swift Package Manager) this step can be omitted.

Build

The build step is no requirement for the test step to work but I always like to see if the Release configuration of the app even builds in the neutral environment of the build server. This way can be ensured that there a no dependencies of the project that weren't pushed to the repository.

Test

The actual test step running the tests. It is important to specify -workspace attribute with your YourAppName.xcworkspace (this is only needed when using CocoaPods). Also specify the scheme to be run with the -scheme attribute. GitHub Actions unfortunately only supports simulators so that is why only the simulators are targeted.

Special Mention

This script was developed for the XPO App. Go check out the app.

Firebase Cloud Functions Cheatsheet

When having an app with a firebase you will soon or later want to back up the configuration of the backend and/or add Cloud Functions. Here is cheatsheet for all commands to keep in mind.

The repository which is created can be backed up using the git versioning tool on github or any other provider

To set them up follow the instructions of: https://firebase.google.com/docs/functions/get-started

To update the local repository when auto-indexes have been added online:

firebase init firestore

Upload rules:

firebase deploy --only firestore:rules

Upload all functions:

firebase deploy --only functions

Upload one function:

firebase deploy --only functions:func1

Upload multiple functions:

firebase deploy --only functions:func1,functions:func2

Run linter:

cd functions
npm run lint