flutter_contacts
flutter_contacts copied to clipboard
Not able to run the app in iOS
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Users/limi/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/contacts_service-0.4.6/ios/Classes/SwiftContactsServicePlugin.swift, line 16 2020-07-24 14:32:45.861449+0800 iosaar[13535:8826645] Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Users/limi/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/contacts_service-0.4.6/ios/Classes/SwiftContactsServicePlugin.swift, line 16
This issues is happening if the iOS project is created using new Xcode 13 and above. Basically it is trying to access the window from app delegate but that is not available because new version Xcode uses scene delegate.
Please update the code to support scene delegate
@SuryaSharpsell Did you find a workaround ?
@jeremy-carbonne - Yes. You need to delete the scene delegate and use the app delegate.
FYI - If you are adding this framework as SDK then this is not a long term fix.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If you're encountering the "Fatal error: Unexpectedly found nil while unwrapping an Optional value" error in your iOS project created with Xcode 13 or above, it's likely due to accessing the window from the app delegate, which is no longer available in newer Xcode versions that use the scene delegate. To resolve the issue, you'll need to Download your code to support the scene delegate instead. This adjustment should address the problem and allow your app to function correctly.
If you're encountering the "Fatal error: Unexpectedly found nil while unwrapping an Optional value" error in your iOS project created with Xcode 13 or above, it's likely due to accessing the window from the app delegate, which is no longer available in newer Xcode versions that use the scene delegate. To resolve the issue, you'll need to Download your code to support the scene delegate instead. This adjustment should address the problem and allow your app to function correctly.
Coukd u explain more?