Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add instructions to readme #86

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add instructions to readme #86

wants to merge 3 commits into from

Conversation

theSoenke
Copy link
Contributor

Moving the integration instructions to the readme

README.md Outdated
Add the following line into your Cartfile:

```
binary "https://raw.githubusercontent.com/phrase/ios-sdk/master/PhraseSDK.json" ~> 3.0.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are already at Version 5.0.0, maybe we should update it here to that value

README.md Outdated
binary "https://raw.githubusercontent.com/phrase/ios-sdk/master/PhraseSDK.json" ~> 3.0.0
```

Run `carthage update` and add the `PhraseApp.framework` to your project as described in the [Carthage documentation](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I lack the knowledge about carthage to make a reliable statement here. But I believe that carthage already uses xcframework.

So the correct usage would be:
carthage update --use-xcframeworks

but i'm not sure how the framework is named, maybe "PhraseApp.xcframework"

README.md Outdated
### Manual installation

1. Download the latest [release](https://github.com/phrase/ios-sdk/releases).
2. Add PhraseSDK.framework in Xcode as the linked binary to the target.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add PhraseSDK.xcframework

README.md Outdated

1. Download the latest [release](https://github.com/phrase/ios-sdk/releases).
2. Add PhraseSDK.framework in Xcode as the linked binary to the target.
3. A script to strip the extra binaries needs to be run before you upload the app as the Apple store rejects apps including simulator binaries.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The run script is no longer be necessary, because of xcframework

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good to know!

README.md Outdated
Attach a callback handler to handle successful translation updates:

```
Phrase.shared.updateTranslation { result in
Copy link
Collaborator

@carstenapploft carstenapploft Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only the objc variant has a closure based callback handler.
In version 5.0.0 we use concurrency. So it would look like this:

do {
   let updated = try await Phrase.shared.updateTranslation()
} catch error {
   ...
}

@theSoenke
Copy link
Contributor Author

@carstenapploft thanks for the feedback! Tried to address all the comments

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants