diff --git a/app/config/platforms.php b/app/config/platforms.php index 866e56b8a..7ecd04868 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -77,19 +77,35 @@ return [ 'gitUserName' => 'appwrite', ], [ - 'key' => 'swift', - 'name' => 'Swift', - 'url' => '', - 'package' => '', - 'enabled' => false, + 'key' => 'ios', + 'name' => 'iOS', + 'url' => 'https://github.com/appwrite/sdk-for-apple', + 'package' => 'https://github.com/appwrite/sdk-for-apple', + 'enabled' => true, 'beta' => false, - 'dev' => false, + 'dev' => true, 'hidden' => false, 'family' => APP_PLATFORM_CLIENT, 'prism' => 'swift', - 'source' => false, - 'gitUrl' => 'git@github.com:appwrite/sdk-for-swift.git', - 'gitRepoName' => 'sdk-for-swift', + 'source' => \realpath(__DIR__ . '/../sdks/client-apple'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-apple.git', + 'gitRepoName' => 'sdk-for-apple', + 'gitUserName' => 'appwrite', + ], + [ + 'key' => 'macos', + 'name' => 'macOS', + 'url' => 'https://github.com/appwrite/sdk-for-apple', + 'package' => 'https://github.com/appwrite/sdk-for-apple', + 'enabled' => true, + 'beta' => false, + 'dev' => true, + 'hidden' => false, + 'family' => APP_PLATFORM_CLIENT, + 'prism' => 'swift', + 'source' => \realpath(__DIR__ . '/../sdks/client-apple'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-apple.git', + 'gitRepoName' => 'sdk-for-apple', 'gitUserName' => 'appwrite', ], [ @@ -371,6 +387,22 @@ return [ 'Java' => 'java', ], ], + [ + 'key' => 'swift', + 'name' => 'Swift', + 'url' => 'https://github.com/appwrite/sdk-for-swift', + 'package' => 'https://github.com/appwrite/sdk-for-swift', + 'enabled' => true, + 'beta' => false, + 'dev' => true, + 'hidden' => false, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'swift', + 'source' => \realpath(__DIR__ . '/../sdks/server-swift'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-swift.git', + 'gitRepoName' => 'sdk-for-swift', + 'gitUserName' => 'appwrite', + ], ], ], ]; diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 2677ae3cf..ff71999ce 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -1314,9 +1314,9 @@ App::post('/v1/projects/:projectId/platforms') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_PLATFORM) ->param('projectId', null, new UID(), 'Project unique ID.') - ->param('type', null, new WhiteList(['web', 'flutter-ios', 'flutter-android', 'flutter-linux', 'flutter-macos', 'flutter-windows', 'ios', 'android', 'unity'], true), 'Platform type.') + ->param('type', null, new WhiteList(['web', 'flutter-ios', 'flutter-android', 'flutter-linux', 'flutter-macos', 'flutter-windows', 'ios', 'macos', 'android', 'unity'], true), 'Platform type.') ->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.') - ->param('key', '', new Text(256), 'Package name for android or bundle ID for iOS. Max length: 256 chars.', true) + ->param('key', '', new Text(256), 'Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.', true) ->param('store', '', new Text(256), 'App store or Google Play store ID. Max length: 256 chars.', true) ->param('hostname', '', new Text(256), 'Platform client hostname. Max length: 256 chars.', true) ->inject('response') diff --git a/app/views/console/home/index.phtml b/app/views/console/home/index.phtml index 4b2b56f24..bbb36e2bc 100644 --- a/app/views/console/home/index.phtml +++ b/app/views/console/home/index.phtml @@ -242,8 +242,11 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
  • -
  • - +
  • + +
  • +
  • +
  • @@ -364,6 +367,78 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true); + + + +