crowdin / mobile-sdk-ios Goto Github PK
View Code? Open in Web Editor NEWCrowdin iOS SDK delivers all new translations from Crowdin project to the application immediately
Home Page: https://crowdin.github.io/mobile-sdk-ios
License: MIT License
Crowdin iOS SDK delivers all new translations from Crowdin project to the application immediately
Home Page: https://crowdin.github.io/mobile-sdk-ios
License: MIT License
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Hello!
I am trying to get the real-time preview working on iOS.
So far I was able to successfully log in and turn the "Real-time" setting to on, however when I type something in the Crowdin editor, the translation is not shown on the device. It also does not work when I click on "Reload translations". The only way this is reflected in the device is when I save the translation and I release the distribution. Do you know if I am missing some step?
Thank you beforehand!
After upgrading Crowdin to 1.1.7, I found the screenshot function is broken.
And after some debugging, I found several issues.
My project has multiple localized string files.
[CrowdinMappingDownloader download(with hash:...]
succeed.[ScreenshotUploader uploadScreenshot(screenshot:...]
gets early return. Because it hits line 75 in ScreenshotUploader
(Newly added in 1.1.7) since the string files do not exist.[CrowdinMappingDownloader download(with hash:...]
returns an error.Is it possible to use only screenshots feature without defining a crowdinProviderConfig (CDN project hash)?
Is your feature request related to a problem? Please describe.
I am trying to add your SDK in an iOS app which depends on the latest Starscream
version 3.1.1
. However your SDK depends on the 3.0.6
version.
Describe the solution you'd like
Is it planned to update Starscream
to 3.1.X
?
Dear Crowdin developers,
I'm working on an App that has the following languages
I want those strings to be downloaded via the CrowdinSDK, however, some strings are not being downloaded and I don't know why.
I've have eagerly followed the CrowdinSDK installation and integration instructions:
let crowdinProviderConfig = CrowdinProviderConfig(hashString: myHash, sourceLanguage: mySourceLanguageVariable /*e.g: nl-NL*/)
let crowdinSDKConfig = CrowdinSDKConfig()
.with(crowdinProviderConfig: crowdinProviderConfig)
.with(debugEnabled: true)
.with(settingsEnabled: true)
CrowdinSDK.currentLocalization = mySourceLanguageVariable //e.g: nl-NL
CrowdinSDK.startWithConfig(crowdinSDKConfig) {
print("Crowdin is ready")
// Launch App
}
The only languages that are downloading correctly are as follows:
I know that those languages are being downloaded correctly, because the App shows the correct strings on the App's UI, and the CrowdinSDK shows the following LOG:
CrowdinSDK: GET, https://distributions.crowdin.net/myHash/content/MyProject/MyLanguage.lproj/Localizable.strings?timestamp=TimeStamp
The other ones are simply not downloading and when the App tries to find them, it displays a warning indicating that it cannot find those strings, showing the Keys from this strings on the App, instead of the Values.
I did the release 3 hours ago, so I understand that all the strings should be correctly published by now.
Steps to reproduce the behavior:
Expected behavior
To have all the languages being downloaded correctly from Crowdin.
Smartphone (please complete the following information):
Could you please help me with this issue?
Thank you very much.
Best regards.
Describe the bug
[!] 'CrowdinSDK' uses the unencrypted 'http' protocol to transfer the Pod. Please be sure you're in a safe network with only trusted hosts. Otherwise, please reach out to the library author to notify them of this security issue.
To Reproduce
Steps to reproduce the behavior:
pod update --repo-update
Expected behavior
Shouldn't happen
Smartphone (please complete the following information):
Hello,
I want to use the screenshot functionality in my app but I encounter an internal server error when I try to login to my Crowdin account on both simulator & physical device.
Edit: I also get this the first time I try to login:
{"redirect_to":"\/oauth\/authorize?client_id=xxx&response_type=code&scope=project.screenshot&redirect_uri=crowdintest%3A%2F%2F&domain=xxx&intended=%2Foauth%2Fauthorize%3Fclient_id%3Dxxx%26response_type%3Dcode%26scope%3Dproject.screenshot%26redirect_uri%3Dcrowdintest%253A%252F%252F","method":"GET"}
(xxx hides personal data)
Describe the bug
The uploaded screenshots without tagging.
To Reproduce
1, Only 1 localized string file, and related screen.
2, Integrate SDK, and capture screenshots.
Expected behavior
The uploaded screenshots have auto-tagging.
Smartphone (please complete the following information):
Additional context
After debugging the code, the error returns at line 101 in ScreenshotUploader.swift
, from screenshotsAPI.createScreenshotTags(projectId:...
The error is:
▿ DecodingError
▿ keyNotFound : 2 elements
- .0 : CodingKeys(stringValue: "data", intValue: nil)
▿ .1 : Context
- codingPath : 0 elements
- debugDescription : "No value associated with key CodingKeys(stringValue: \"data\", intValue: nil) (\"data\")."
- underlyingError : nil
Describe the bug
Try change localization after startWithConfig from Objective-C
To Reproduce
Call [CrowdinSDK enableSDKLocalization:false localization:@"fr"]; or [CrowdinSDK setCurrentLocalization:@"fr"];
Describe the bug
We got crash log in Xcode from our user. As I see log issue happened in Crowdin SDK:
#0 (null) in Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value ()
This happened in file:
CustomBundle.swift
In the Class:
FolderBundle: FolderBundleProtocol
Initializer:
init(path: String)
Line:
self.bundle = Bundle(path: folder.path)!
To Reproduce
Steps to reproduce the behavior:
Current version SDK is v1.4.2
Our initialization of Crowdin SDK what calling from AppDelegate:
import Foundation
import CrowdinSDK
class CrowdinManager: NSObject
{
private static let distributionHash = "our_hash
class func initCrowding() {
let crowdinProviderConfig = CrowdinProviderConfig(hashString: CrowdinManager.distributionHash,
sourceLanguage: Localization.detectLanguage())
let crowdinSDKConfig = CrowdinSDKConfig.config().with(crowdinProviderConfig: crowdinProviderConfig)
CrowdinSDK.startWithConfig(crowdinSDKConfig, completion: {})
CrowdinSDK.currentLocalization = Localization.detectLanguage();
}
}
Expected behavior
Crash should not happened
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
redirectURI
config option is used for Screenshots and Real-Time Preview features. It's needed to redirect to the application after login in Crowdin.
It would be great If it's possible to access this URL from SDK code and use it in the config if features above are enabled and if redirectURI
was not provided.
with configuration:
CrowdinSDK.currentLocalization = "es"
let config = CrowdinSDKConfig.config().with(crowdinProviderConfig: providerConfig).with(intervalUpdatesEnabled: true, interval: 15*60)
_ = CrowdinSDK.addDownloadHandler { print("\(Date()) Crowdin: strings downloaded") }
I'm never getting any callback from that handler. I tried waiting 15 mins, reinstalling app. Simply not happening.
When I changed it to different language in Crowdin eg. "es-EM" (modern spanish) or "sl" (slovenian), it works just fine.
My Android college reports the same problem. Is there something I'm missing ?
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the feature request here.
We have a project that use Crowdin SDK translations, today we found out that .xib files not updating if you did release with updated translations on the crowding website. We got old translations in .xliff file on fresh app install and if update something on the website and release it will not be sent to the app. With .strings files, everything works perfectly fine.
Steps to reproduce the behavior:
A project that will use .xliff file translations
Start the app and then update translations on crowdin website
Check if new translations are populated on .xib files
Expected behavior
.xliff translations work like the .strings ones
If you need any additional data I will answer your questions in comments
Describe the bug
Cannot find 'ScreenshotFeature' in scope
SDK 1.5.0 version, using swift package manager in Xcode 14.0
Tried regular troubleshooting steps:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
if imported CrowdinSDK it should be in scope.
Can access all other CrowdinSDK classes in the same swift file.
Log in is required for features Real-time Preview and Screenshots for making API requests. When a user changing the distribution hash in SDK config, we need to ask him to log in again.
Is your feature request related to a problem? Please describe.
In our app two of the metrics we monitor is app startup time and memory usage. In evaluating the performance impact of this SDK on our app, in our usage the SDK takes an average of 1.0MB of additional memory and increases our app startup time by an average of 0.6 seconds. Since we are only using over-the-air functionality for now, when we experimentally removed the Starscream dependency the memory burden of integrating the SDK dropped to 0.5MB.
Describe the solution you'd like
Can we only include dependencies that are required by the SDK compilation? This may require moving some files around or re-configuring how Cocoapods (and SPM?) subspecs are configured.
Hello
I noticed that via the Tools -> Over-the-air(OTA) content delivery -> Distributions, we can select and release files that are not only Localizable.strings, but also .mdown files. Reading through the documentation, I saw that the the OTA content delivery does not change existing files or add new files, which means that they don't exist in the file system of the project when running the app. I am wondering how we can access the content of these .mdown files in the iOS project that have been released via OTA?
Many thanks!
Is your feature request related to a problem? Please describe.
For our code, we have a central logging service that sends logs to our server. We would like to keep that consolidated with our server.
Describe the solution you'd like
Add a callback whenever CrowdIn logs something (This would probably be via the CrowdinLogsCollector
.) The iOS client can then set this callback and we can get those logs into our logging service.
Describe alternatives you've considered
We are considering making a fork of the SDK to support this.
I want to add a settings button in our app to enable/disable the SDK.
Calling CrowdinSDK.stop() does not remove the hover button.
Is this a bug? or is there another way to stop the startedSDK ?
Describe the bug
After we turned the Crowdin OTA feature on our apps, we have seen quite a number of crashes on Firebase, all pointing to LocalLocalizationExtractor.localizedString(for:), which is a file in CrowdinSDK
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should not crash on the SDK side.
Screenshots
Code for setting up the Crowdin, it will be called in didFinishLaunchingWithOptions in AppDelegate
Additional context
We would like to know why this crash will happen, and how to fix it, so we can use this SDK in our production app.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
I love your OTA and Real-time updates feature for Android/iOS. Would be great to have Crowdin SDK for Flutter.
Thanks for great work!
Describe the bug
When I start the SDK to download translations for a non-source language and the .strings
files fail, it falls back to the cached values. But if I start the SDK and the manifest.json
network request fails it falls back to the bundled translations. This is inconsistent and suggests caching is not working. If the Crowdin CDN is down in any way, it shouldn't matter which request fails, and the result for the end-user should be the same.
To Reproduce
en
is the source language, set to fr-CA
.manifest.json
from succeedingRepeat this process, but block against the .strings
files instead.
Note: I observed this on regions that are not the source language. I did not look into why this worked as expected for en
.
Expected behavior
Starting SDK should get back any previously cached translations rather than falling back to the bundled translations.
As soon as the SDK begins retrieving of translations, I expect to still get back previously cached translations until new translations are downloaded. Ideally, client apps should have control over whether they want to wait until all translations are downloaded. Only when the cache is expired and is in progress or fails would I expected to receive the translations bundled into the app.
Screenshots
Please contact me for screenshots or videos. The support team should have my contact info.
Smartphone (please complete the following information):
My team is exploring integrating this SDK for Over-the-Air support to help reduce the releases we need to make just for translations. Our code base is shared between iOS and tvOS which may defeat the purpose if Over-the-Air isn't supported on one platform. Is there a timeline for providing tvOS support?
Hi! I am wondering if it is currently possible to have content delivery and real-time preview from two Crowdin projects at the same time? I saw the example project, but that one only describes how to fetch data from only one project.
Thank you beforehand!
Describe the bug
Normally, when bundle.localizedString()
fails to find the value for the key, it returns the key. However, when localization debugging is turned on and the app is run in debug, it returns the capitalized version of the key.
This is an issue, because this means when the app is run with the debugger, the check in this line (
nil
we return the uppercased key.
To Reproduce
With a CrowdIn project in English, run an app on a real device with the XCode debugger (and localization debugging turned on) and the device language set to English. You will see strings in CAPS.
Expected behavior
Display the actual value of that key, rather than displaying the key in uppercase.
Additional context
It is interesting that the localizationProvider
will always fail to find a string when in the source language here in this line: the downloaded en.plist
is always just empty (I presume this is because it is the CrowdIn project's source language!) Our preferred fix is just to have the en.plist
not be empty (i.e. always download the en.plist).
We do want to keep localization debugging enabled for our app in XCode.
Describe the bug
I am not sure if this is a bug or you just don't support SwiftUI.
I was under assumption if you make screenshot all the strings should be taged in them automatically,
but only got can see string from UIKit context.
Additional context
Is this a bug? If not are you planning to add SwiftUI support any time soon?
Thanks!
Describe the bug
It appears that calling startWithConfig
is synchronous which prevents client apps from continuing to load while the SDK loads. This is potentially important to us because it impacts app start time which is a key metric for us.
Our team is a little confused because it has an @escaping
completion handler. And because while downloading the manifest.json
blocks, downloading the subsequent Crowdin files happens asynchronously.
I don't know the code base well enough to make a contribution. Any guidance or advice would be helpful!
To Reproduce
Steps to reproduce the behavior:
startWithConfig
to print "completed"startWithConfig
print "starting"Expected behavior
Console prints "starting" then "completed".
Two possible expectations:
startWithConfig
asynchronously.startWithConfig
could block until downloading critical files. Perhaps remove the completion closure and document it as a synchronous method? Then clients could decide whether they want to call startWithConfig
asynchronously.Actual behavior
Console prints "completed" then "started". Using a proxy tool to prevent a response for "manifest.json" prevents "started" from being printed until a response is returned.
Smartphone:
Additional context
Over roughly 15 trials we observed initializing the SDK added about 0.6 seconds to our app startup time.
Hi there!
I successfully integrated the CrowdinSDK in my app using Swift Package Manager and I am using OTA content delivery. On the first app launch with internet enabled, when I enter the completion block of CrowdinSDK.startWithConfig
, and fetch the copy for a specific key using NSLocalizedString(key, comment: "")
, I am only getting the key and not the copy. If I kill and relaunch the app, the copy for the same key is fetched successfully.
Do you know what might be causing this and do you have any suggestion on its mitigation?
Many thanks!
Hey guys
I'm trying to implement the SDK in our iOS app, but I'm having difficulty with getting it to work.
The issue I'm having is that the translation files dont get downloaded at all. After some playing around I found out that the problem seems to be with us using ".xml" instead of ".string" file.
I couldnt find any documentation on this, so I'm not sure if it's me doing something wrong or the SDK just doesnt support .xml files.
Is .xml files not support?
Thanks in advance!
Describe the bug
We received crash report from Crowdin SDK file
To Reproduce
Steps to reproduce the behavior:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
we call:
class func initCrowdin() {
let crowdinProviderConfig = CrowdinProviderConfig(hashString: WXCrowdinManager.distributionHash,
sourceLanguage: WXLocalization.detectLanguage())
let crowdinSDKConfig = CrowdinSDKConfig.config().with(crowdinProviderConfig: crowdinProviderConfig)
CrowdinSDK.startWithConfig(crowdinSDKConfig, completion: {})
CrowdinSDK.currentLocalization = WXLocalization.detectLanguage();
}
1*. Also initCrowdin()
we call on AppleWatch in class:
class ExtensionDelegate: NSObject, WKExtensionDelegate
on
func applicationDidBecomeActive() {
Expected behavior
No crash happened
Smartphone (please complete the following information):
Cannot find 'CrowdinLoginConfig' in scope
The last update does not work with SPM. try to run with SPM before releasing a new version.
Trying to use the crowdinSDK SPM, I noticed that
https://github.com/crowdin/mobile-sdk-ios/blob/master/Package.swift has dependency on Starscrem.
Starscream should be used with the latest version which is 4.0.4:
https://github.com/daltoniam/Starscream/releases/tag/4.0.4
I already use Starscream with version 4.0.4 and can't import crowdinSDK because Starscream dependency uses an older version.
Is your feature request related to a problem?
My teammates have communicated concern about the use of Objective-C method swizzling of NSLocalizedString. The SDK unexpected changes functionality of something it doesn't own (an Apple API), and we may unknowingly be integrating with another SDK that also use swizzling.
Because our app is only interested in Over-the-Air for the time being, we'd like the option to disable swizzling. As I understand, swizzling is only a requirement of the optional Real-Time Preview feature, and for improved functionality of the also optional IntervalUpdates feature. Perhaps we will be interested in enabling Real-Time Preview for non-production builds with swizzling at a later date.
Describe the solution you'd like
If the SDK replicates Apple's, can we make Localization.localizedString(for:)
public so that developers can call it directly? And then include a config option that conditionally disables CrowdinSDK.swizzle()
and CrowdinSDK.swizzleControlMethods()
.
Describe the bug
For test i created empty projects (objective-c and swift) with one pod CrowdinSDK and when run Build on Any iOS device or Simulator get this error. For Swift project: ld: framework not found BaseAPI
. For Objective-c project: fatal error: module map file '~/Library/Developer/Xcode/DerivedData/Empty-dnjsexrkxdmbmeaeuqkddudleoda/Build/Products/Debug-iphonesimulator/BaseAPI/BaseAPI.modulemap' not found
When Run or Build on iPhone i no have error.
Environment
macOS: 10.15.6
Xcode: 12.0.1
CocoaPod: 1.9.3
CrowdinSDK: 1.1.5
Describe the bug
Currently, our server tells the clients which locale code to use. (We recognize this is backwards.) This means we call CrowdinSDK.currentLocalization
to override the target language. The concern is that the Crowdin supported language codes doesn't list "Italian Italy" (it-IT
) just Italy (it
). Same story with fr-FR
. Meanwhile, Apple's Locale.current.identifer
will return it_IT
and fr_FR
. So there's some mismatching between locale codes between the Apple, our server, and Crowdin.
Over-the-air also doesn't appear to support falling back from it-IT
to just it
. Instead it fails to retrieve any language over-the-air at all. I spoke with our Android representative who said their SDK integration doesn't have this issue.
Furthermore, additionally, I can't add "it-IT" as a custom language (see screenshot).
To Reproduce
After the SDK initializes, set the CrowdinSDK.currentLocalization
to a locale code that isn't officially supported by Crowdin. e.g. "it-IT". Ensure there is a localization for the language code e.g. just "it".
Actual behavior
No calls to retrieve over-the-air translations are made.
Expected behavior
I see two possible outcomes:
Smartphone (please complete the following information):
Doesn't seem to matter? I am using an iPhone SE sim 15.2
Additional context
Describe the bug
We are integrating the SDK for Over-the-Air functionality and we are noticing some additional network requests go out which leads to larger request sizes going out. Our app experiences a high volume of customers.
manifest.json
. This always returns HTTP 200 and is not cached. ~35KB response size eachlanguages
API. ~41KB in size eachThis means each app start requires between ~200KB (expired cache) and ~65KB (fresh cache). Multiplied by all of our users 😅😰
To Reproduce
See above.
Expected behavior
I don't expect to see parallel or back-to-back requests in the same app session (1 & 3). I also am expecting the manifest.json
to be cached (1). Additionally, it would be nice if we can reduce either the size of our 304 responses or rate limit them on the client (2).
In this demo project we have two localization files listed in our manifest, one significantly <1KB uncompressed and the other 77KB uncompressed. Fresh install at 18:12, quit and re-opened app at 18:14.
Smartphone (please complete the following information):
Additional context
Describe the bug
In applicationDidFinishLaunching
:
CrowdinSDK.startWithConfig(crowdinSDKConfig) {
let localization = CountrySelectionUserDefaults.selectedCountry.languageCode
CrowdinSDK.enableSDKLocalization(true, localization: localization)
}
calling enableSDKLocalization will crash on a device (when running the app in Release Mode). When running with DEBUG configuration it works fine. I think it only crashes in Release mode because the build setting SWIFT_ENFORCE_EXCLUSIVE_ACCESS only crashes the app in release mode and it seems like this is the root cause of the crash.
Attached the stack trace:
Simultaneous accesses to 0x280a62770, but modification requires exclusive access.
Previous access (a modification) started at meindm`Localization.provider.modify + 60 (0x102e0c7a8).
Current access (a read) started at:
0 libswiftCore.dylib 0x00000001aa9cd248 swift_beginAccess + 560
1 meindm 0x0000000102e0c5ec Localization.provider.getter + 68
2 meindm 0x0000000102e0e984 Localization.localizedString(for:) + 100
3 meindm 0x0000000102d86940 NSBundle.swizzled_LocalizedString(forKey:value:table:) + 476
4 meindm 0x0000000102d86ef0 @objc NSBundle.swizzled_LocalizedString(forKey:value:table:) + 368
5 Foundation 0x000000019d5810a4 <redacted> + 1056
6 Foundation 0x000000019d653794 <redacted> + 184
7 Foundation 0x000000019d653e10 <redacted> + 196
8 Foundation 0x000000019d5a0770 <redacted> + 164
9 meindm 0x0000000102e3f7f0 Dictionary.write(to:) + 364
10 meindm 0x0000000102e3fba4 protocol witness for ReadWriteProtocol.write(to:) in conformance [A : B] + 32
11 meindm 0x0000000102df4f54 ReadWriteFile.save() + 392
12 meindm 0x0000000102e23594 LocalLocalizationStorage.saveLocalization() + 1336
13 meindm 0x0000000102e22138 LocalLocalizationStorage.strings.setter + 308
14 meindm 0x0000000102e22a3c LocalLocalizationStorage.fetchData() + 1092
15 meindm 0x0000000102e216f0 LocalLocalizationStorage.localization.didset + 152
16 meindm 0x0000000102e21428 LocalLocalizationStorage.localization.setter + 324
17 meindm 0x0000000102e213b8 @objc LocalLocalizationStorage.localization.setter + 80
18 meindm 0x0000000102e12858 LocalizationProvider.localization.didset + 328
19 meindm 0x0000000102e12b48 LocalizationProvider.localization.setter + 368
20 meindm 0x0000000102e194c0 protocol witness for LocalizationProviderProtocol.localization.setter in conformance LocalizationProvider + 48
21 meindm 0x0000000102e0d1f4 Localization.currentLocalization.setter + 628
22 meindm 0x0000000102dc8d58 static CrowdinSDK.currentLocalization.setter + 388
23 meindm 0x0000000102dc9dd0 static CrowdinSDK.enableSDKLocalization(_:localization:) + 528
24 meindm 0x0000000102529594 closure #1 in CrowdinAppService.configure() + 180
25 meindm 0x0000000102464a14 thunk for @escaping @callee_guaranteed () -> () + 56
26 meindm 0x000000010278ec94 thunk for @escaping @callee_unowned @convention(block) () -> () + 16
27 meindm 0x0000000102dc9944 closure #1 in static CrowdinSDK.startWithRemoteStorage(_:completion:) + 244
28 meindm 0x0000000102464a14 thunk for @escaping @callee_guaranteed () -> () + 56
29 meindm 0x000000010278ec94 thunk for @escaping @callee_unowned @convention(block) () -> () + 16
30 meindm 0x0000000102dc4388 CrowdinRemoteLocalizationStorage.prepare(with:) + 432
31 meindm 0x0000000102dc46e4 @objc CrowdinRemoteLocalizationStorage.prepare(with:) + 120
32 meindm 0x0000000102dc97a4 static CrowdinSDK.startWithRemoteStorage(_:completion:) + 396
33 meindm 0x0000000102dc6068 static CrowdinSDK.startWithConfig(_:completion:) + 836
34 meindm 0x0000000102dc63fc @objc static CrowdinSDK.startWithConfig(_:completion:) + 152
35 meindm 0x00000001025293a4 CrowdinAppService.configure() + 448
36 meindm 0x0000000102475d6c AppDelegate.application(_:didFinishLaunchingWithOptions:) + 536
37 meindm 0x00000001024762d4 @objc AppDelegate.application(_:didFinishLaunchingWithOptions:) + 232
38 UIKitCore 0x00000001a1322b10 <redacted> + 356
39 UIKitCore 0x00000001a1323648 <redacted> + 5048
40 UIKitCore 0x00000001a1329dc0 <redacted> + 1244
41 UIKitCore 0x00000001a0aceadc <redacted> + 148
42 UIKitCore 0x00000001a0f7f278 _UIScenePerformActionsWithLifecycleActionMask + 100
43 UIKitCore 0x00000001a0acf590 <redacted> + 196
44 UIKitCore 0x00000001a0acef88 <redacted> + 288
45 UIKitCore 0x00000001a0acf19c <redacted> + 740
46 UIKitCore 0x00000001a0acebf0 <redacted> + 336
47 UIKitCore 0x00000001a0ad3120 <redacted> + 188
48 UIKitCore 0x00000001a0ea3074 <redacted> + 812
49 UIKitCore 0x00000001a0f9862c _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 244
50 UIKitCore 0x00000001a0ad2eac <redacted> + 140
51 UIKitCore 0x00000001a0f985b8 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 100
52 UIKitCore 0x00000001a0ad2c28 <redacted> + 376
53 UIKitCore 0x00000001a0942cf8 <redacted> + 636
54 UIKitCore 0x00000001a0941a1c <redacted> + 248
55 UIKitCore 0x00000001a0942bd0 <redacted> + 220
56 UIKitCore 0x00000001a13282cc <redacted> + 540
57 UIKitCore 0x00000001a0ec8524 <redacted> + 360
58 FrontBoardServices 0x00000001a23fc474 <redacted> + 424
59 FrontBoardServices 0x00000001a2421130 <redacted> + 100
60 FrontBoardServices 0x00000001a2406b14 <redacted> + 232
61 FrontBoardServices 0x00000001a2420d18 <redacted> + 312
62 libdispatch.dylib 0x0000000108b67720 _dispatch_client_callout + 16
63 libdispatch.dylib 0x0000000108b6aac8 _dispatch_block_invoke_direct + 232
64 FrontBoardServices 0x00000001a2445828 <redacted> + 40
65 FrontBoardServices 0x00000001a2445388 <redacted> + 404
66 FrontBoardServices 0x00000001a2445a28 <redacted> + 28
67 CoreFoundation 0x000000019d203c00 <redacted> + 24
68 CoreFoundation 0x000000019d203b20 <redacted> + 80
69 CoreFoundation 0x000000019d203240 <redacted> + 184
70 CoreFoundation 0x000000019d1fe014 <redacted> + 788
71 CoreFoundation 0x000000019d1fdb40 CFRunLoopRunSpecific + 424
72 GraphicsServices 0x00000001a73482ec GSEventRunModal + 160
73 UIKitCore 0x00000001a132bcb8 UIApplicationMain + 1932
74 meindm 0x0000000102851dac main + 676
75 libdyld.dylib 0x000000019d0858ec <redacted> + 4
(lldb)
I also added a screenshot of the crash in the Xcode Debugger.
To Reproduce
Steps to reproduce the behavior:
applicationDidFinishLaunching
:CrowdinSDK.startWithConfig(crowdinSDKConfig) {
let localization = CountrySelectionUserDefaults.selectedCountry.languageCode
CrowdinSDK.enableSDKLocalization(true, localization: localization)
}
Expected behavior
The app does not crash
Smartphone (please complete the following information):
Additional context
None
Calls to the Crowdin API should be invoked to the https://api.crowdin.com
(crowdin.com) and https://{organization_domain}.api.crowdin.com
(Crowdin Enterprise) base URLs.
There are a few files where the API base URL should be updated:
API Reference:
Describe the bug
StarScream released a new version (4.0.6) where the added a new enum and now the project won't be able to compile.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The project compiles without errors
Smartphone (please complete the following information):
Additional context
There is already a Bug ticket on StarScream: daltoniam/Starscream#975
The changed code should be here:
Related PR that fix this: #225
I saw that only Cocoapods is supported at the moment and it would be nice to have a support for Carthage and Swift Package Manager. Currently we use Carthage, but planning to move to Swift Package Manager (having it in xCode) in the future.
Is your feature request related to a problem? Please describe.
My team is exploring integrating with the Crowdin SDK which we are excited about. I have been tasked with finding out what happens if we depend on Over-the-Air translations and there's a network failure.
I started writing some additional tests. It became clear that although some aspects of this project are easily testable, the changes required to make LocalizationProvider
and all of its dependencies testable is a big lift and I am unfamiliar with this code base.
Describe the solution you'd like
It would be great to see some expansion of test cases to cover business critical functions to give us more confidence about the SDK. For instance, in at least one place a callback is missing -- does this have any real world consequence? Are there any other cases like this?
Some of the SDK is already using protocols which is a great! But some parts are using global state which makes it hard to test.
LocalizationProvider
can already be passed in a CrowdinRemoteLocalizationStorage
but we are currently unable to pass in a CrowdinLocalizationDownloader
in order to use the existing URLSessionMock
to simulate successful and failed network respones. This may also require creating a mock for CrowdinContentDeliveryAPI
to pass in a manifest. Additionally, although CrowdinContentDeliveryAPI
has some test coverage, it does not cover the downloading of the manifest.
Describe alternatives you've considered
I successfully added a mock for RemoteLocalizationStorageProtocol
and passed that into CrowdinSDK.startWithRemoteStorage()
. However, this doesn't give deep enough test coverage into what happens during a network failure.
Additional context
I may have some time next week to work with you towards a solution.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
import CrowdinSDK
import SafariServices
#if !os(watchOS)
to conditionally import this framework.Smartphone (please complete the following information):
Describe the bug
I am getting an app crash when using the SDK on a physical Apple TV device. I get the following error when the SDK is attempting to create the CrowdinFolder for the translation files:
Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=513 "You don't have permission to save the file "Crowdin" in the folder ".Crowdin"."
Note that this does not happen on the Apple TV simulator in Xcode, only a physical device.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
My understanding is that storing data on an Apple TV is not available outside of the cache directory, and when the SDK attempts to create a folder in the documents directory, the FileManager throws an exception.
Smartphone (please complete the following information):
Additional context
I was able to avoid the crash by changing DocumentsFolder.documentsPath from:
static let documentsPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]
to:
static let documentsPath = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0]
but I am not aware if this will have any performance implications.
I create a project in crowdin, and replace distributionHash, sourceLanguage, clientId, clientSecret in SceneDelegate.swift file. After I run the Example, and click "Log in" but authorize failed. the status code is 401, and the error message is "Client authentication failed".
I use the same configuration in android sample, but success.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.