iOS crash: #0 (null) in Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value ()
Radzievskyi opened this issue · 0 comments
Radzievskyi commented
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:
- Crowdin SDK connected as Swift Package:
-
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):
- Device: iPhone 13 Pro
- OS: iOS 15.5 (19F77)
Additional context
Add any other context about the problem here.