IOS build using background-geolocation-firebase causing Shader error
Your Environment
- Plugin version: ^1.0.0
- Platform: iOS
- OS version: 12.6
- Device manufacturer / model: Macbook air, M1 - 2020
- Flutter info (
flutter info,flutter doctor):
[✓] Flutter (Channel beta, 3.4.0-34.1.pre, on macOS 12.6 21G115 darwin-arm64, locale en-SA) • Flutter version 3.4.0-34.1.pre on channel beta at /Users/wsabg/Public/Programs/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 71520442d4 (3 weeks ago), 2022-10-05 16:38:28 -0500 • Engine revision db0cbb2145 • Dart version 2.19.0 (build 2.19.0-255.2.beta) • DevTools version 2.18.0
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /Users/wsabg/Library/Android/sdk • Platform android-33, build-tools 32.1.0-rc1 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14A400 • CocoaPods version 1.11.2
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
[✓] VS Code (version 1.72.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.50.0
[✓] VS Code (version 1.64.2) • VS Code at /Users/wsabg/Downloads/Visual Studio Code.app/Contents • Flutter extension version 3.50.0
[✓] VS Code (version 1.65.0) • VS Code at /Volumes/sub_1/Visual Studio Code.app/Contents • Flutter extension version 3.50.0
[✓] Connected device (3 available) • SM N970F (mobile) • R58N83T3JMZ • android-arm64 • Android 12 (API 31) • macOS (desktop) • macos • darwin-arm64 • macOS 12.6 21G115 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 106.0.5249.119
[✓] HTTP Host Availability • All required HTTP hosts are available
• No issues found!
- Plugin config
To Reproduce Steps to reproduce the behavior:
- Add background_geolocation_firebase: ^1.0.0 in your pubspec.yaml
- Run pod install
- Archive build
Debug logs
-
ios XCode logs, Logs Archive Runner_2022-10-27T05-54-30.txt PhaseScriptExecution Run\ Script /Users/wsabg/Library/Developer/Xcode/DerivedData/Runner-cyxptiyweklwyefotusygvjzywqa/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh (in target 'Runner' from project 'Runner') cd /Volumes/sub_1/Flutter-Projects/Royal\ Marble/royal_marble/ios
/bin/sh -c /Users/wsabg/Library/Developer/Xcode/DerivedData/Runner-cyxptiyweklwyefotusygvjzywqa/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh
../../../flutter-new-version/flutter/packages/flutter/lib/src/material/ink_sparkle.dart:576:21: Error: The method 'shader' isn't defined for the class 'FragmentProgram'.
- 'FragmentProgram' is from 'dart:ui'. Try correcting the name to the name of an existing method, or defining a method named 'shader'. return _program.shader( ^^^^^^ Failed to package /Volumes/sub_1/Flutter-Projects/Royal Marble/royal_marble. Command PhaseScriptExecution failed with a nonzero exit code
You seem to have a problem with some other lib on its line 576. Have you tried consulting with them?
ink_sparkle.dart:576:21: Error: The method 'shader' isn't defined for the class 'FragmentProgram'.
ink_sparkle.dart is a built in library for flutter, this issue is only showing when adding background-geolocation-firebase library. I tried editing the ink_sparkle.dart in as I'm not using any of its features but it seems to be essential from the build file . Can you try to reproduce the issue?
I have updated the /example here in this repo to use the latest flutter_background_geolocation "^4.8.3".
I have no issues launching the /example app.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.6, on macOS 12.6 21G115 darwin-x64, locale en-CA)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] Connected device (4 available)
[✓] HTTP Host Availability
I see that you are on a flutter beta channel.
Flutter (Channel beta, 3.4.0-34.1.pre
Hey Chris, Well I've changed the channel and upgraded the package and all worked. Thank you so much that was very helpful.
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.3.4, on macOS 12.6 21G115 darwin-arm, locale en-SA) [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 14.0.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.1) [✓] VS Code (version 1.72.2) [✓] VS Code (version 1.64.2) [✓] VS Code (version 1.65.0) [✓] Connected device (2 available) [✓] HTTP Host Availability
flutter_background_geolocation: ^4.8.3 background_geolocation_firebase: ^1.0.0