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
{{ message }}
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
<p>Appwrite is a development platform providing you an easy yet powerful API and management console to get your next project up and running quickly.</p>
17
+
18
+
<p>This tutorial will help you start using Appwrite products and build your next project. Before starting, make sure you have followed the Appwrite <a href="/docs/installation">installation guide</a>, and you have an Appwrite server instance up and running on your host machine or server.</p>
19
+
20
+
<h2>Create Your First Appwrite Project</h2>
21
+
22
+
<p>Go to your new Appwrite console, and once inside, click the <i class="icon-plus"></i> icon in the top navigation header or on the <b>'Create Project'</b> button on your console homepage. Choose a name for your project and click create to get started.</p>
23
+
24
+
<h2>Add your Android Platform</h2>
25
+
26
+
<p>To init your SDK and start interacting with Appwrite services, you need to add a new Android platform to your project. To add a new platform, go to your Appwrite console, choose the project you created in the step before, and click the 'Add Platform' button.</p>
27
+
28
+
<p>From the options, choose to add a new <b>Android</b> platform and add add your app <u>name</u> and <u>package name</u>, Your package name is generally the applicationId in your app-level build.gradle file. By registering your new app platform, you are allowing your app to communicate with the Appwrite API.</p>
29
+
30
+
<h2>Get Appwrite Android SDK</h2>
31
+
32
+
<p>First, add this to your root level build.gradle file: </p>
<p>In order to capture the Appwrite OAuth callback url, the following activity needs to be added to your <a href="https://github.com/appwrite/playground-for-android/blob/app/src/main/AndroidManifest.xml" target="_blank" rel="noopener">AndroidManifest.xml</a>. Be sure to replace the <b>[PROJECT_ID]</b> string with your actual Appwrite project ID. You can find your Appwrite project ID in you project settings screen in your Appwrite console.</p>
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
70
+
.setProject("5df5acd0d48c2") // Your project ID
71
+
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
72
+
.setSelfSigned(true) // For self signed certificates only use for development</code></pre>
73
+
</div>
74
+
75
+
<p>Before starting to send any API calls to your new Appwrite instance, make sure your Android emulators has network access to the Appwrite server hostname or IP address.</p>
76
+
77
+
<p>When trying to connect to Appwrite from an emulator or a mobile device, localhost is the hostname for the device or emulator and not your local Appwrite instance. You should replace localhost with your private IP as the Appwrite endpoint's hostname. You can also use a service like <a href="https://ngrok.com/" target="_blank" rel="noopener">ngrok</a> to proxy the Appwrite API.</p>
78
+
79
+
<h2>Make Your First Request</h2>
80
+
81
+
<p>Once your SDK object is set, access any of the Appwrite services and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the API References section.</p>
<p>Appwrite has many services and tools to help improve your app and speed up your development. The best way to learn how you can take advantage of them is to explore the different API references docs.</p>
<p>To init your SDK and start interacting with Appwrite services, you need to add a new Flutter platform to your project. To add a new platform, go to your Appwrite console, choose the project you created in the step before, and click the 'Add Platform' button.</p>
27
27
28
-
<p>From the options, choose to add a new <b>Flutter</b> platform and add your app credentials. Appwrite Flutter SDK currently supports building apps for both iOSand Android.</p>
28
+
<p>From the options, choose to add a new <b>Flutter</b> platform and add your app credentials. Appwrite Flutter SDK currently supports building apps for Android, iOS, Linux, Mac OS, Web and Windows.</p>
29
29
30
30
<p>If you are building your Flutter application for multiple devices, you have to follow this process for each different device.</p>
31
31
32
-
<h3>iOS</h3>
33
-
<p>For <b>iOS</b> add your app <u>name</u> and <u>Bundle ID</u>, You can find your Bundle Identifier in the General tab for your app's primary target in Xcode.</p>
34
-
35
32
<h3>Android</h3>
36
-
<p>For <b>Android</b> add your app <u>name</u> and <u>package name</u>, Your package name is generally the applicationId in your app-level build.gradle file. By registering your new app platform, you are allowing your app to communicate with the Appwrite API.</p>
<pre class="line-numbers"><code class="prism language-bash" data-prism>pub get appwrite</code></pre>
52
-
</div>
53
-
54
-
<h3>iOS</h3>
55
-
56
-
<p>The Appwrite SDK uses ASWebAuthenticationSession on iOS 12+ and SFAuthenticationSession on iOS 11 to allow OAuth authentication. You have to change your iOS Deployment Target in Xcode to be iOS >= 11 to be able to build your app on an emulator or a real device.</p>
57
-
58
-
<ol class="margin-top margin-bottom-large">
59
-
<li class="margin-bottom-small">In Xcode, open Runner.xcworkspace in your app's ios folder.
60
-
<li class="margin-bottom-small">To view your app's settings, select the Runner project in the Xcode project navigator. Then, in the main view sidebar, select the Runner target.</li>
61
-
<li class="margin-bottom-small">Select the General tab.</li>
<p>For <b>Android</b> first add your app <u>name</u> and <u>package name</u>, Your package name is generally the <b>applicationId</b> in your app-level <a href="https://github.com/appwrite/playground-for-flutter/blob/0fdbdff98384fff940ed0b1e08cf14cfe3a2be3e/android/app/build.gradle#L41" target="_blank" rel="noopener">build.gradle</a> file. By registering your new app platform, you are allowing your app to communicate with the Appwrite API.</p>
66
35
67
36
<p>In order to capture the Appwrite OAuth callback url, the following activity needs to be added to your <a href="https://github.com/appwrite/playground-for-flutter/blob/master/android/app/src/main/AndroidManifest.xml" target="_blank" rel="noopener">AndroidManifest.xml</a>. Be sure to relpace the <b>[PROJECT_ID]</b> string with your actual Appwrite project ID. You can find your Appwrite project ID in you project settings screen in your Appwrite console.</p>
<p>For <b>iOS</b> first add your app <u>name</u> and <u>Bundle ID</u>, You can find your Bundle Identifier in the General tab for your app's primary target in Xcode.</p>
58
+
59
+
<p>The Appwrite SDK uses ASWebAuthenticationSession on iOS 12+ and SFAuthenticationSession on iOS 11 to allow OAuth authentication. You have to change your iOS Deployment Target in Xcode to be iOS >= 11 to be able to build your app on an emulator or a real device.</p>
60
+
61
+
<ol class="margin-top margin-bottom-large">
62
+
<li class="margin-bottom-small">In Xcode, open Runner.xcworkspace in your app's ios folder.
63
+
<li class="margin-bottom-small">To view your app's settings, select the Runner project in the Xcode project navigator. Then, in the main view sidebar, select the Runner target.</li>
64
+
<li class="margin-bottom-small">Select the General tab.</li>
<p>For <b?>Linux</b> add your app <u>name</u> and <u>package name</u>, Your package name is generally the <b>name</b> in your href="https://github.com/appwrite/playground-for-flutter/blob/0fdbdff98384fff940ed0b1e08cf14cfe3a2be3e/pubspec.yaml#L1" target="_blank" rel="noopener">pubspec.yaml</a> file. If you cannot find the correct package name, run the application in linux, and make any request with proper exception handling, you should get the application id needed to add in the received error message.</p>
71
+
72
+
<h3>Mac OS</h3>
73
+
74
+
<p>For <b>Mac OS</b> add your app name and Bundle ID, You can find your Bundle Identifier in the General tab for your app's primary target in Xcode.</p>
75
+
86
76
<h3>Web</h3>
87
77
88
78
<p>Appwrite 0.7, and the Appwrite Flutter SDK 0.3.0 have added support for Flutter Web. To build web apps that integrate with Appwrite successfully, all you have to do is add a web platform on your Appwrite project's dashboard and list the domain your website will use to allow communication to the Appwrite API.</p>
<p>While running Flutter Web, make sure your Appwrite server and your Flutter client are using the same top-level domain and the same protocol (HTTP or HTTPS) to communicate. When trying to communicate between different domains or protocols, you may receive HTTP status error 401 because some modern browsers block cross-site or insecure cookies for enhanced privacy. In production, Appwrite allows you set multiple <a href="/docs/custom-domains">custom-domains</a> for each project.</p>
93
83
</div>
94
84
85
+
86
+
<h3>Windows</h3>
87
+
88
+
<p>For <b>Windows</b> add your app <u>name</u> and <u>package name</u>, Your package name is generally the <b>name</b> in your href="https://github.com/appwrite/playground-for-flutter/blob/0fdbdff98384fff940ed0b1e08cf14cfe3a2be3e/pubspec.yaml#L1" target="_blank" rel="noopener">pubspec.yaml</a> file. If you cannot find the correct package name, run the application in windows, and make any request with proper exception handling, you should get the application id needed to add in the received error message.</p>
0 commit comments