Get Started
Setup the atSDK for your preferred language
Starter Flutter App
Create a Flutter application initialized for use with the atSDK
If you don't have a Flutter setup for development yet, please see the Flutter docs.
1. Create a new Flutter app
First, generate a new Flutter app (replace at_app with the name of your application).
flutter create at_app
cd at_app2. Add dependencies
Then add the following dependencies to your project:
flutter pub add at_client_mobile at_onboarding_flutter flutter_dotenv path_provider3. Replace main.dart
Now copy the contents of main.dart from below into lib/main.dart into your project.
4. Add home_screen.dart
Create a second file in lib/ called home_screen.dart. Copy the contents of home_screen.dart from below into your project.
5a. gitignore the .env file
Add the following line to the top of .gitignore:
This will prevent accidentally uploading the secret values stored in .env to any git repositories associated with your app.
5b. Add and populate the .env file
Create a new file in the root of the project (next to pubspec.yaml) called .env. Add the following lines to it:
These values should be populated with your unique app namespace, and registrar API key.
5.c. Register the .env file in pubspec.yaml
In pubspec.yaml there should be a flutter: key, under this key, we want to create and add .env the assets: list:
6. Start developing!
Start your application with the following command:
Now you are ready to begin developing!
Get Started C Application
Setup a CMake project which includes the atSDK package suite.
The full example can be found here.
1. Ensure you have a C Compiler, CMake, and a build automation tool
The method at which you decide to use to install these prerequisites are up to you. These three tools can be installed using either apt or pip.
Firstly, ensure you have a C compiler such as clang or gcc. We recommend gcc because that is currently what Atsign is focused on supporting.
Secondly, ensure you have CMake installed using cmake --version. Ensure that your CMake version is >= 3.24. If you have issues obtaining a newer version of CMake, we have found lots of success using pip when installing CMake via pip install [email protected]
Lastly, ensure you have a automation tool installed, such as GNU Make. We recommend GNU Make because that is currently what Atsign is focused on supporting. These examples are using GNU Make version 4.3, but any version should work.
2. Create an empty directory
This command will create a directory and then go into it.
3. Create CMakeLists.txt
Inside your project folder, create a new file called CMakeLists.txt.
Copy and paste the CMake code into the file. Feel free to change the project name by changing this line:project(my_first_c_app) .
The above CMakeLists.txt will use FetchContent to download the C atSDK for you. Then, we will create a target named main for you and link our atclient library statically.
4. Create main.c
Inside your project folder, create a new file called main.c
Change the line #define ATSIGN "@jeremy_0" to the atSign that you have keys to. For example, if you own an atSign @alice and have its keys in the correct directory ~/.atsign/keys/@alice_key.atKeys, then I would change this line in my code to #define ATSIGN "@alice"
5. CMake Configure
In the terminal, run the following command.
This is known as the "configure" step where CMake will build instructions on how to build the app specific to your machine.
Output should be similar to the following:
6. Build
Use CMake to build your configure and build your programs:
This command is the same as running cd build && make all (if you are using Makefiles).
Your output will look similar to:
7. Run the binary
The previous command, if ran successfully, would have created a binary executable for you: ./build/main.
Simply run the program:
Your output will look similar to:
Congratulations! You have successfully ran a barebones Atsign C application.
Last updated

