Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Native splash generation does not work in iOS if Info.plist is split into debug and release builds, as instructed in Flutter docs #120

Closed
laurisvan opened this issue Jan 17, 2021 · 2 comments

Comments

@laurisvan
Copy link

laurisvan commented Jan 17, 2021

Our app needs special network permissions for Flutter build and therefore we have had to split Info.plist into multiple files (debug & release), as in https://flutter.dev/docs/development/add-to-app/ios/project-setup#local-network-privacy-permissions

As a result, Info.plist no longer exists and we have Info-Debug.plist and Info-Release.plist. Therefore the build fails as follows:

flutter pub pub run flutter_native_splash:create
[Android] Creating splash images
[Android] Updating android/app/src/main/res/drawable/launch_background.xml with splash image path
[Android] Updating android/app/src/main/res/values/colors.xml with color for splash screen background
[Android] Updating styles.xml with full screen mode setting
[Android] Only 1 style in styles.xml. Flutter V2 embedding has 2 styles by default.  Full screen mode not supported in Flutter V1 embedding.  Skipping update of styles.xml with fullscreen mode
[iOS] Creating splash images
[iOS] Updating LaunchScreen.storyboard with width, and height
Unhandled exception:
FileSystemException: Cannot open file, path = 'ios/Runner/Info.plist' (OS Error: No such file or directory, errno = 2)
#0      _File.open.<anonymous closure> (dart:io/file_impl.dart:356:9)
#1      _RootZone.runUnary (dart:async/zone.dart:1446:54)
#2      _FutureListener.handleValue (dart:async/future_impl.dart:150:18)
#3      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:703:45)
#4      Future._propagateToListeners (dart:async/future_impl.dart:732:32)
#5      Future._completeWithValue (dart:async/future_impl.dart:536:5)
#6      Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:574:7)
#7      _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#8      _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#9      _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120:13)
#10     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)
pub finished with exit code 255

While we could change the release build to use a file called Info.plist we would prefer to use the naming convention set as in the official docs. Would it be possible to provide a configuration switch to determine the actual file name for Info.plist, or something similar?

@laurisvan
Copy link
Author

Thanks, @jonbhanson!

@jonbhanson
Copy link
Owner

You're welcome, @laurisvan. 🖖🏻

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

No branches or pull requests

2 participants