Skip to content

Commit

Permalink
Merge branch 'main' into feat/create_change_requests_for_segments
Browse files Browse the repository at this point in the history
  • Loading branch information
zachaysan committed Nov 21, 2024
2 parents 8bcebe4 + 42ef04b commit aab8f61
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/actions/api-deploy-ecs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ runs:
shell: bash

- name: Deploy Amazon ECS web task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
cluster: ${{ inputs.aws_ecs_cluster_name }}
service: ${{ inputs.aws_ecs_service_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/task-processor-deploy-ecs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ runs:
image: ${{ inputs.api_ecr_image_url }}

- name: Deploy Amazon ECS Task Processor task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
cluster: ${{ inputs.aws_ecs_cluster_name }}
service: ${{ inputs.aws_ecs_service_name }}
Expand Down
29 changes: 20 additions & 9 deletions docs/docs/clients/client-side/ios.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,48 @@ slug: /clients/ios
---

import CodeBlock from '@theme/CodeBlock';
import { IOSVersion } from '@site/src/components/SdkVersions.js';
import { CocoapodsVersion, SwiftPMVersion } from '@site/src/components/SdkVersions.js';

This library can be used with iOS and Mac applications. The source code for the client is available on
[GitHub](https://github.com/flagsmith/flagsmith-ios-client).

## Installation

### CocoaPods
<details>
<summary>CocoaPods</summary>

[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions,
visit their website. To integrate Flagsmith into your Xcode project using CocoaPods, specify it in your `Podfile`:
Add the Flagsmith SDK as a dependency to your Podfile:

<CodeBlock>
{`pod 'FlagsmithClient', '~> `}
<IOSVersion />
<CocoapodsVersion />
{`'`}
</CodeBlock>

### Swift Package Manager
</details>

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler. You can use it to install Flagsmith by adding the description to your `Package.swift` file:
<details>

<summary>Swift Package Manager</summary>

Add the Flagsmith SDK as a dependency to your Package.swift file:

<CodeBlock>
{`dependencies: [
.package(url: "https://github.com/Flagsmith/flagsmith-ios-client.git", from: "`}
<IOSVersion />
<SwiftPMVersion />
{`"),
]`}
</CodeBlock>

Alternatively, you can add the Flagsmith SDK as a dependency from its repository URL using Xcode:

```
https://github.com/Flagsmith/flagsmith-ios-client.git
```

</details>

## Basic Usage

The SDK is initialised against a single environment within a project on [https://flagsmith.com](https://flagsmith.com),
Expand Down
18 changes: 12 additions & 6 deletions docs/plugins/flagsmith-versions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ const fetchJavaVersions = async () =>
artifactId: 'flagsmith-java-client',
});

const fetchAndroidVersions = async () => {
const data = await fetchJSON('https://api.github.com/repos/flagsmith/flagsmith-kotlin-android-client/releases');
const fetchGitHubReleases = async (repo) => {
const data = await fetchJSON(`https://api.github.com/repos/${repo}/releases`);
return data.map((release) => (release.tag_name.startsWith('v') ? release.tag_name.slice(1) : release.tag_name));
};

const fetchIOSVersions = async () => {
const fetchAndroidVersions = async () => fetchGitHubReleases('flagsmith/flagsmith-kotlin-android-client');

const fetchSwiftPMVersions = async () => fetchGitHubReleases('Flagsmith/flagsmith-ios-client');

const fetchCocoapodsVersions = async () => {
// retrieved from https://cocoapods.org/pods/FlagsmithClient
const data = await fetchJSON('https://api.github.com/repos/CocoaPods/Specs/contents/Specs/2/8/0/FlagsmithClient');
return data.map((entry) => entry.name);
Expand Down Expand Up @@ -65,12 +69,13 @@ export default async function fetchFlagsmithVersions(context, options) {
return {
name: 'flagsmith-versions',
async loadContent() {
const [js, java, android, ios, dotnet, rust, elixir] = await Promise.all(
const [js, java, android, swiftpm, cocoapods, dotnet, rust, elixir] = await Promise.all(
[
fetchNpmVersions('flagsmith'),
fetchJavaVersions(),
fetchAndroidVersions(),
fetchIOSVersions(),
fetchSwiftPMVersions(),
fetchCocoapodsVersions(),
fetchDotnetVersions(),
fetchRustVersions(),
fetchElixirVersions(),
Expand All @@ -80,7 +85,8 @@ export default async function fetchFlagsmithVersions(context, options) {
js,
java,
android,
ios,
swiftpm,
cocoapods,
dotnet,
rust,
elixir,
Expand Down
3 changes: 2 additions & 1 deletion docs/src/components/SdkVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const Version = ({ sdk, spec = '*', options = {} }) => {

export const JavaVersion = ({ spec = '~7' }) => Version({ sdk: 'java', spec });
export const AndroidVersion = ({ spec = '~1' }) => Version({ sdk: 'android', spec });
export const IOSVersion = ({ spec = '~3' }) => Version({ sdk: 'ios', spec });
export const CocoapodsVersion = ({ spec = '~3' }) => Version({ sdk: 'cocoapods', spec });
export const SwiftPMVersion = ({ spec = '~3' }) => Version({ sdk: 'swiftpm', spec });
export const DotnetVersion = ({ spec = '~5' }) => Version({ sdk: 'dotnet', spec });
export const ElixirVersion = ({ spec = '~2' }) => Version({ sdk: 'elixir', spec });
export const RustVersion = ({ spec = '~2' }) => Version({ sdk: 'rust', spec });
Expand Down

0 comments on commit aab8f61

Please sign in to comment.