From 0acaa76db71b8c3a8e40f7cce653e264b09885af Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 6 Jul 2021 13:26:03 +0545 Subject: [PATCH 1/5] desktop platforms support on readme --- docs/sdks/flutter/GETTING_STARTED.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/sdks/flutter/GETTING_STARTED.md b/docs/sdks/flutter/GETTING_STARTED.md index 987c86d2e..9c6561bab 100644 --- a/docs/sdks/flutter/GETTING_STARTED.md +++ b/docs/sdks/flutter/GETTING_STARTED.md @@ -3,7 +3,7 @@ ### Add your Flutter Platform 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. -From the options, choose to add a new **Flutter** platform and add your app credentials. Appwrite Flutter SDK currently supports building apps for both iOS and Android. +From the options, choose to add a new **Flutter** platform and add your app credentials. Appwrite Flutter SDK currently supports building apps for Android, iOS, Linux, Mac OS, Web and Windows. If you are building your Flutter application for multiple devices, you have to follow this process for each different device. @@ -13,6 +13,15 @@ For **iOS** add your app name and Bundle ID, You can find your Bundle Identifier #### Android For **Android** add your app name and package name, 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. +#### Linux +For **Linux** add your app name and package name, Your package name is generally the `name` in your pubspec.yaml 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. + +#### Windows +For **Windows** add your app name and package name, Your package name is generally the `name` in your pubspec.yaml 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. + +#### Mac OS +For **Mac OS** 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. + ### iOS 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. From 1629d8d19a8d5dc089aabbece76faa410c5ae4f1 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 6 Jul 2021 13:35:47 +0545 Subject: [PATCH 2/5] links to playground --- docs/sdks/flutter/GETTING_STARTED.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sdks/flutter/GETTING_STARTED.md b/docs/sdks/flutter/GETTING_STARTED.md index 9c6561bab..6d3906ce4 100644 --- a/docs/sdks/flutter/GETTING_STARTED.md +++ b/docs/sdks/flutter/GETTING_STARTED.md @@ -11,13 +11,13 @@ If you are building your Flutter application for multiple devices, you have to f For **iOS** 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. #### Android -For **Android** add your app name and package name, 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. +For **Android** add your app name and package name, 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. #### Linux -For **Linux** add your app name and package name, Your package name is generally the `name` in your pubspec.yaml 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. +For **Linux** add your app name and package name, Your package name is generally the **name** in your pubspec.yaml 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. #### Windows -For **Windows** add your app name and package name, Your package name is generally the `name` in your pubspec.yaml 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. +For **Windows** add your app name and package name, Your package name is generally the **name** in your pubspec.yaml 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. #### Mac OS For **Mac OS** 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. From 2f28bc112f3c9dd5dcc5ac7a1d0ee2472ce1c3f2 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 6 Jul 2021 13:38:20 +0545 Subject: [PATCH 3/5] link to build.gradle instead of app id --- docs/sdks/flutter/GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdks/flutter/GETTING_STARTED.md b/docs/sdks/flutter/GETTING_STARTED.md index 6d3906ce4..3a555b0e0 100644 --- a/docs/sdks/flutter/GETTING_STARTED.md +++ b/docs/sdks/flutter/GETTING_STARTED.md @@ -11,7 +11,7 @@ If you are building your Flutter application for multiple devices, you have to f For **iOS** 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. #### Android -For **Android** add your app name and package name, 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. +For **Android** add your app name and package name, 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. #### Linux For **Linux** add your app name and package name, Your package name is generally the **name** in your pubspec.yaml 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. From 9f003542bd23f9194e841fbe238d2b21f50e083b Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 6 Jul 2021 14:59:05 +0545 Subject: [PATCH 4/5] update and re-arrange --- docs/sdks/flutter/GETTING_STARTED.md | 45 +++++++++++++--------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/docs/sdks/flutter/GETTING_STARTED.md b/docs/sdks/flutter/GETTING_STARTED.md index 3a555b0e0..fd31ebd1d 100644 --- a/docs/sdks/flutter/GETTING_STARTED.md +++ b/docs/sdks/flutter/GETTING_STARTED.md @@ -7,31 +7,9 @@ From the options, choose to add a new **Flutter** platform and add your app cred If you are building your Flutter application for multiple devices, you have to follow this process for each different device. -#### iOS -For **iOS** 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. - -#### Android -For **Android** add your app name and package name, 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. - -#### Linux -For **Linux** add your app name and package name, Your package name is generally the **name** in your pubspec.yaml 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. - -#### Windows -For **Windows** add your app name and package name, Your package name is generally the **name** in your pubspec.yaml 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. - -#### Mac OS -For **Mac OS** 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. - -### iOS - -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. - -1. In Xcode, open Runner.xcworkspace in your app's ios folder. -2. 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. -3. Select the General tab. -4. In Deployment Info, 'Target' select iOS 11.0 - ### Android +For **Android** first add your app name and package name, 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. + In order to capture the Appwrite OAuth callback url, the following activity needs to be added to your [AndroidManifest.xml](https://github.com/appwrite/playground-for-flutter/blob/master/android/app/src/main/AndroidManifest.xml). Be sure to replace the **[PROJECT_ID]** string with your actual Appwrite project ID. You can find your Appwrite project ID in your project settings screen in the console. ```xml @@ -49,12 +27,31 @@ In order to capture the Appwrite OAuth callback url, the following activity need ``` +### iOS +For **iOS** first 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. + +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. + +1. In Xcode, open Runner.xcworkspace in your app's ios folder. +2. 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. +3. Select the General tab. +4. In Deployment Info, 'Target' select iOS 11.0 + +### Linux +For **Linux** add your app name and package name, Your package name is generally the **name** in your pubspec.yaml 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. + +### Mac OS +For **Mac OS** 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. + ### Web 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. #### Flutter Web Cross-Domain Communication & Cookies 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 [custom-domains](https://appwrite.io/docs/custom-domains) for each project. +### Windows +For **Windows** add your app name and package name, Your package name is generally the **name** in your pubspec.yaml 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. + ### Init your SDK

Initialize your SDK with your Appwrite server API endpoint and project ID, which can be found in your project settings page. From da12d426cbc3cb9d4ce63e16b333d365867887a4 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 6 Jul 2021 16:08:18 +0545 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Eldad A. Fux --- docs/sdks/flutter/GETTING_STARTED.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sdks/flutter/GETTING_STARTED.md b/docs/sdks/flutter/GETTING_STARTED.md index fd31ebd1d..6369bbae2 100644 --- a/docs/sdks/flutter/GETTING_STARTED.md +++ b/docs/sdks/flutter/GETTING_STARTED.md @@ -38,7 +38,7 @@ The Appwrite SDK uses ASWebAuthenticationSession on iOS 12+ and SFAuthentication 4. In Deployment Info, 'Target' select iOS 11.0 ### Linux -For **Linux** add your app name and package name, Your package name is generally the **name** in your pubspec.yaml 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. +For **Linux** add your app name and package name, Your package name is generally the **name** in your pubspec.yaml 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. ### Mac OS For **Mac OS** 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. @@ -132,4 +132,4 @@ You can use following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-flutter) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) -- 🚂 [Appwrite Flutter Playground](https://github.com/appwrite/playground-for-flutter) \ No newline at end of file +- 🚂 [Appwrite Flutter Playground](https://github.com/appwrite/playground-for-flutter)