Skip to content

module_test_ios fails, Undefined symbols for architecture armv7: "_OBJC_CLASS_$_UIPointerShape", referenced from: objc-class-ref in GoogleMaps #63447

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

Closed
jmagman opened this issue Aug 11, 2020 · 13 comments
Assignees
Labels
p: maps Google Maps plugin package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically

Comments

@jmagman
Copy link
Member

jmagman commented Aug 11, 2020

[module_test_ios] [STDOUT] ══════════════╡ ••• Build ephemeral host app with CocoaPods ••• ╞═══════════════
[module_test_ios] [STDOUT] 
[module_test_ios] [STDOUT] 
[module_test_ios] [STDOUT] Executing: /private/tmp/flutter sdk/bin/flutter build ios --no-codesign in /var/folders/3y/l0z1x3693dl_8n0qybp4dqwh0000gn/T/flutter_module_test.lFLCqR/hello
[module_test_ios] [STDOUT] stdout: The plugin `flutter_plugin_android_lifecycle` is built using an older version of the Android plugin API which assumes that it's running in a full-Flutter environment. It may have undefined behaviors when Flutter is integrated into an existing app as a module.
[module_test_ios] [STDOUT] stdout: The plugin can be updated to the v2 Android Plugin APIs by following https://flutter.dev/go/android-plugin-migration.
[module_test_ios] [STDOUT] stdout: Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
[module_test_ios] [STDOUT] stdout: Building io.flutter.devicelab.hello for device (ios-release)...
[module_test_ios] [STDOUT] stdout: Running pod install...                                              5.6s
[module_test_ios] [STDOUT] stdout: Running Xcode build...                                          
[module_test_ios] [STDOUT] stdout: Xcode build done.                                           35.5s
[module_test_ios] [STDOUT] stdout: Failed to build iOS app
[module_test_ios] [STDOUT] stdout: Error output from Xcode build:
[module_test_ios] [STDOUT] stdout: ↳
[module_test_ios] [STDOUT] stdout:     ** BUILD FAILED **
[module_test_ios] [STDOUT] stdout: 
[module_test_ios] [STDOUT] stdout: 
[module_test_ios] [STDOUT] stdout: Xcode's output:
[module_test_ios] [STDOUT] stdout: ↳
[module_test_ios] [STDOUT] stdout:     Undefined symbols for architecture armv7:
[module_test_ios] [STDOUT] stdout:       "_OBJC_CLASS_$_UIPointerShape", referenced from:
[module_test_ios] [STDOUT] stdout:           objc-class-ref in GoogleMaps
[module_test_ios] [STDOUT] stdout:       "_OBJC_CLASS_$_UIPointerStyle", referenced from:
[module_test_ios] [STDOUT] stdout:           objc-class-ref in GoogleMaps
[module_test_ios] [STDOUT] stdout:     ld: symbol(s) not found for architecture armv7
[module_test_ios] [STDOUT] stdout:     clang: error: linker command failed with exit code 1 (use -v to see invocation)
[module_test_ios] [STDOUT] stdout:     note: Using new build system
[module_test_ios] [STDOUT] stdout:     note: Planning build
[module_test_ios] [STDOUT] stdout:     note: Constructing build description
@jmagman jmagman added c: contributor-productivity Team-specific productivity, code health, technical debt. a: existing-apps Integration with existing apps via the add-to-app flow labels Aug 11, 2020
@jmagman
Copy link
Member Author

jmagman commented Aug 11, 2020

@jmagman jmagman added p: maps Google Maps plugin platform-ios iOS applications specifically plugin and removed a: existing-apps Integration with existing apps via the add-to-app flow c: contributor-productivity Team-specific productivity, code health, technical debt. labels Aug 11, 2020
@jmagman
Copy link
Member Author

jmagman commented Aug 11, 2020

I'm actually not sure how this happens. google_maps_flutter pub version is at 0.5.29 and GoogleMaps CocoaPods is at 3.10.0:
https://cirrus-ci.com/task/5509800735801344?command=main#L2220

[module_test_ios] [STDOUT]   google_maps_flutter:
[module_test_ios] [STDOUT]     dependency: "direct main"
[module_test_ios] [STDOUT]     description:
[module_test_ios] [STDOUT]       name: google_maps_flutter
[module_test_ios] [STDOUT]       url: "https://pub.dartlang.org"
[module_test_ios] [STDOUT]     source: hosted
[module_test_ios] [STDOUT]     version: "0.5.29"
[module_test_ios] [STDOUT]   - GoogleMaps (3.10.0):
[module_test_ios] [STDOUT]     - GoogleMaps/Maps (= 3.10.0)

However locally when I try to force this combination locally I get this error, which the test doesn't show:

[!] CocoaPods could not find compatible versions for pod "GoogleMaps":
  In Podfile:
    google_maps_flutter (from `.symlinks/plugins/google_maps_flutter/ios`) was resolved to 0.0.1, which depends on
      GoogleMaps (= 3.10.0)

Specs satisfying the `GoogleMaps (= 3.10.0)` dependency were found, but they required a higher minimum deployment target.

And that makes sense, because google_maps_flutter minimum version is iOS 8.0 and GoogleMaps 3.10 is iOS 9.0.
GoogleMaps 2.7.0 is the last version to have a minimum of 8.0:.

I think the right thing to do it change the podspec to s.dependency 'GoogleMaps', '~> 2.7' until that minimum version is increased to 9.0.

Not sure why this started happening as soon as GoogleMaps 3.10.0 was published.

\cc @ditman @cyanglaz

@ditman
Copy link
Member

ditman commented Aug 11, 2020

I have never seen this error before, I'm not touching podspecs (only the fake ones for web components). Odd.

I think the right thing to do it change the podspec to s.dependency 'GoogleMaps', '~> 2.7' until that minimum version is increased to 9.0.

Sounds right, I'm trying to find other similar builds to see which version of GoogleMaps they're grabbing. (There's been 3.0.x versions for as long as 2.7.x, according to the CocoaPods link)

@ditman

This comment has been minimized.

@jmagman
Copy link
Member Author

jmagman commented Aug 11, 2020

@ditman That's warning is an old issue #20708 (comment).
Why is camera trying to call GoogleMaps code?

    CompileC /Users/anka/Library/Developer/Xcode/DerivedData/Runner-bxdmgdiknppixagjxwwbajlmfdkc/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/camera.build/Objects-normal/arm64/CameraPlugin.o /var/folders/3y/l0z1x3693dl_8n0qybp4dqwh0000gn/T/cirrus-ci-build/packages/camera/ios/Classes/CameraPlugin.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    Undefined symbols for architecture armv7:
      "_OBJC_CLASS_$_UIPointerShape", referenced from:
          objc-class-ref in GoogleMaps
      "_OBJC_CLASS_$_UIPointerStyle", referenced from:
          objc-class-ref in GoogleMaps

@ditman
Copy link
Member

ditman commented Aug 11, 2020

@jmagman there's a couple of internal issues where this is reported:

  • b/163359804
  • b/163474612

Seems to be a problem with v3.10, requiring a higher XCode than the one we're running our tests on (11.3.1 IIRC)

@jmagman
Copy link
Member Author

jmagman commented Aug 11, 2020

That framework need to fix some availability, probably.

But the plugin can't use 3.10 anyway because it requires a minimum of iOS 9.0, and the plugin declares it supports 8.0. Hopefully your fix at flutter/plugins#2920 keeps this from happening, though I'm still puzzled how it happened in CI since I couldn't make it use 3.10 on my machine.

@jmagman
Copy link
Member Author

jmagman commented Aug 11, 2020

Oh wait, flutter/plugins#2920 was closed. Hmmm...

@ditman
Copy link
Member

ditman commented Aug 11, 2020

I'm trying to pin to 3.9, which is probably the last good version we were using anyways. Opening a new PR right now and seeing what happens.

@ditman
Copy link
Member

ditman commented Aug 11, 2020

Summarizing the "investigation" we've done so far:

  • The minimum version of ios was bumped from 8.0 to 9.0 recently.

  • Turns out the build_all_plugins_ipa uses flutter create to auto-generate an app with all the plugins. Other tests may do the same.

  • The google_maps_flutter plugin specifies a minimum version of ios to run (8.0). Resolving that in an app for 8.0, will yield GoogleMaps (pod) 2.7 (as seen here), however new apps that use 9.0 can resolve 3.x versions of the pod.

  • 3.9 was good, as seen in the full-green pass linked in the comment above.

  • 3.10 is bad, as linked in the buganizer issues in the PR; Probably because it exposes new APIs that require a newer version of XCode. The change is undocumented as of now, (and this whole line is pure speculation):

Version 3.10.0 - August 10, 2020

  • Version bump, no changes. This version is functionally identical to v.3.9.0.
  • There is a new Maps Swift Demo App in Google Maps cocoapods.

For now, google_maps_flutter will pin GoogleMaps (pod) to < 3.10, that should be removed once the issue is fixed in the pod.

@ditman
Copy link
Member

ditman commented Aug 11, 2020

Cleanup ticket created: #63530

@ditman ditman self-assigned this Aug 11, 2020
@ditman
Copy link
Member

ditman commented Aug 12, 2020

Fix to google_maps_flutter plugin tagged and published: v0.5.29+1

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p: maps Google Maps plugin package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically
Projects
None yet
Development

No branches or pull requests

2 participants