aloisdeniel / flutter_plugin_appcenter

Flutter plugins for accessing Visual Studio App Center services.
55 stars 51 forks source link

The 'Pods-Runner' target has transitive dependencies that include statically linked binaries #20

Closed dwhiteddsoft closed 4 years ago

dwhiteddsoft commented 4 years ago

I am not sure this is on the 2nd library I am using or yours. If this is on the other library simply let me know and we can close this. I have tried to skinny the problem down as much as possible. If you go here and run the example app it should work fine. If you then go into the pubspec.yaml of the same example project and add a line to your library: appcenter: 0.2.1

the pod install fails with: The 'Pods-Runner' target has transitive dependencies that include statically linked binaries

Any help would be appreciated.

dwhiteddsoft commented 4 years ago

A little more on this. Some people have argued the way to solve this in other places is to put this in the podsfile: pre_install do |installer|

workaround for https://github.com/CocoaPods/CocoaPods/issues/3289

Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {} end

When I do that, I does get past the pod install but then fails on compile: Xcode build done. 10.7s Failed to build iOS app Error output from Xcode build: ↳ BUILD FAILED

Xcode's output: ↳ 1 warning generated. /Users/davidwhite/development/flutter/.pub-cache/hosted/pub.dartlang.org/appcenter_analytics-0.2.1/ios/Classe s/AppcenterAnalyticsPlugin.m:1:9: warning: non-portable path to file '"AppcenterAnalyticsPlugin.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]

import "AppCenterAnalyticsPlugin.h"

        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "AppcenterAnalyticsPlugin.h"
1 warning generated.
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_MSAnalytics", referenced from:
      objc-class-ref in AppcenterAnalyticsPlugin.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_MSAnalytics", referenced from:
      objc-class-ref in AppcenterAnalyticsPlugin.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Planning build
note: Constructing build description

Encountered error while building for device.

willyliu commented 4 years ago

I encountered the same problem. After researching for several days, I finally found the solution. The point is to make sure that the pods for appcenter, appcenter_analytics or appcenter_crashes are all built as static library.

boylenssen commented 4 years ago

@willyliu do you have info on how to do this when you are not familiair with iOS dev?

HugoHeneault commented 4 years ago

@dwhiteddsoft Did you find a solution for that issue?

HugoHeneault commented 4 years ago

Removing the ios/Podfile.lock folder, flutter clean, then flutter run again did the trick.