Baseflow / Baseflow/flutter-geolocator

[Bug]: Example code fails to execute on target (iOS) unless building/executing macOS /first/

Open
#1,764 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
1.3k
Forks
803
Avg merge
8h 16m
Merged PRs (30d)
1

Description

### Please check the following before submitting a new issue.

- [x] I have searched the [existing issues](https://github.com/baseflow/flutter-geolocator/issues).
- [x] I have carefully [read the documentation](https://github.com/Baseflow/flutter-geolocator/blob/main/geolocator/README.md) and verified I have added the required platform specific configuration.

### Please select affected platform(s)

- [ ] Android
- [x] iOS
- [ ] Linux
- [ ] macOS
- [ ] Web
- [ ] Windows

### Steps to reproduce

git clone https://github.com/Baseflow/flutter-geolocator.git
cd flutter-geolocator/geolocator_apple/example

flutter run
select iOS device - this was an iPhone 17 Pro running iOS 26.2
app loads and quickly fails with:
```
MacBook-Air:example user$ flutter run
Launching lib/main.dart on iPhone in debug mode...
Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.
Automatically signing iOS for device deployment using specified development team in Xcode project:
Running Xcode build...
Xcode build done. 6.0s
Installing and launching... 11.1s
Error connecting to the service protocol: failed to connect to http://127.0.0.1:50090/EIYnBnlOBo4=/ HttpException: Connection closed before full header was received, uri =
http://127.0.0.1:50090/EIYnBnlOBo4=/ws

```

app immediately fails with the above connection closed.

After attempting repeatedly in both flutter-geolocator/geolocator_apple/example and flutter-geolocator/geolocator/example with failure. Updating minimum platform supported (git clean clone set to iOS 13) to iOS 15.2, updating flutter lint minimum version - all of this failed with no success.

Attempted to validate issue on macOS, and app worked. Re-attempted on iOS then after, and now works.

### Expected results

After a clean clone of the git repo, the example code should work.

App should load for iOS without first building for macOS

### Actual results

Fails on iOS until first building for macOS.

### Code sample

Code sample

```dart
git clone https://github.com/Baseflow/flutter-geolocator.git
cd flutter-geolocator/geolocator_apple/example

flutter run
```

### Screenshots or video

Screenshots or video demonstration

Did not capture screen

### Version

commit 756b8d8015f06ecfcc64b438f71cb3b362b5e350 (HEAD -> main, tag: geolocator_v14.0.2, origin/main, origin/HEAD)

### Flutter Doctor output

Doctor output

```console
MacBook-Air:example user$ flutter doctor -v
[✓] Flutter (Channel stable, 3.38.5, on macOS 26.1 25B78 darwin-arm64, locale en-US) [489ms]
• Flutter version 3.38.5 on channel stable at /opt/homebrew/share/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f6ff1529fd (3 weeks ago), 2025-12-11 11:50:07 -0500
• Engine revision 1527ae0ec5
• Dart version 3.10.4
• DevTools version 2.51.1
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file,
enable-lldb-debugging

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [1,474ms]
• Android SDK at /Users/jhanley/Library/Android/sdk
• Emulator version 36.2.12.0 (build_id 14214601) (CL:N/A)
• Platform android-36, build-tools 36.1.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.8+-14196175-b1038.72)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.2) [1,717ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 17C52
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web [5ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (3 available) [6.0s]
• JPH iPhone (mobile) • 00008150-0016515E3CB8401C • ios • iOS 26.2 23C55
• macOS (desktop) • macos • darwin-arm64 • macOS 26.1 25B78 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 143.0.7499.170

[✓] Network resources [241ms]
• All expected network resources are available.

• No issues found!
```

Contributor guide

Open the contributing guide

Research direction

Start with the example projects in geolocator_apple/example and geolocator/example, then reproduce the reported `flutter run` flow on an iOS device after setting the Xcode signing team. Compare the clean-clone behavior with a run after building for macOS, using the Flutter and Xcode versions in the report. Done means the example launches on iOS directly from a clean clone without requiring a macOS build.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, ios
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.