phrase / ios-sdk

Phrase Over the Air iOS SDK
https://phrase.com
Other
14 stars 3 forks source link

More information in PhraseAppTranslationResult.error #5

Closed vCrespoWunder closed 5 years ago

vCrespoWunder commented 5 years ago

Hi! I'm using the latest version 1.0.0 with Swift 5.0.1

It would be really nice to have some more information in the enum. Similar thing as success contains an "updated" value, it would be really helpful to provide an associated value in case of error (without throw)

I guess maybe PhraseAppError type so you have more control?

public enum PhraseAppTranslationResult {
    case success(Bool)
    case failure(PhraseAppError)
}

The 'why' is because I'm getting a PhraseApp.NetworkError.statusError if I enable verbose mode, but I can't figure out what's really failing, because I have data connection for sure.

Thanks a lot for your software and time :)

theSoenke commented 5 years ago

Hi, thanks for reporting this. This is really not a very good error message yet. Could you maybe contact us at https://phraseapp.com/contact or via the embedded chat on PhraseApp and include your distribution, environment token and a link to this issue for reference? Then we can have a closer look at what the exact cause for this is.

Currently the most likely reason is that the app version does not use semantic versioning. We are currently working on improvements in this area to make this a lot more obvious

theSoenke commented 5 years ago

Hi, did you already manage to get the SDK working? We've also just released another SDK version which should provide better error messages in case this was a semantic versioning issue: https://github.com/phrase/ios-sdk/releases/tag/1.1.0

arrabidas92 commented 5 years ago

Hi, I face the same issue as @vCrespoWunder When trying to integrate IOS SDK Over the air, I have a PhraseApp.NetworkError.statusError. I have semantic versioning so this is not the issue. Do you have any insights causing this issue ?

theSoenke commented 5 years ago

Hi @arrabidas92, could you contact us at https://phrase.com/contact or write us a message via the chat? Then we can figure out what might be the issue here. You are also using at least version 1.1.0 right?

arrabidas92 commented 5 years ago

I am using the lastest version downloaded via Cocoapods since I installed it yesterday. Already send a message via the chat. I am waiting for a response.