2017-07-12 3 views
0

Ich entwickle eine App, die Punkte von Interesse rund um den Standort des Benutzers findet. Um den Standort des Benutzers zu erhalten, verwende ich das location Plugin, das ganz nett funktioniert.
Die nächste Sache, die ich implementieren möchte, ist eine Schaltfläche, um die Standard-Mapping-Anwendung zu öffnen, um den Benutzer zum POI zu navigieren. Ich ging mit dem Plugin url_launcher und dem geo: url-Schema für Android und die Karten: Schema für iOS.
Unabhängig voneinander funktionieren beide Plugins wie erwartet. Sobald ich beide Plugins in meinem Projekt hatte, begannen die Probleme. Unter Verwendung der Standardeinstellungen von flutter create ich die folgende Fehlermeldung erhalten:Konflikt zwischen Ort und url_launcher Plugin

Launching lib/main.dart on iPhone 6 in debug mode... 
Running pod install... 
CocoaPods' output: 
↳ 
    Preparing 

Analyzing dependencies 

Inspecting targets to integrate 
    Using `ARCHS` setting to build architectures of target `Pods-Runner`: (`arm64`) 

Finding Podfile changes 
    - Flutter 
    - location 
    - url_launcher 

Fetching external sources 
-> Fetching podspec for `Flutter` from `/Users/rainerwittmann/Flutter/flutter/bin/cache/artifacts/engine/ios` 
-> Fetching podspec for `location` from `/Users/rainerwittmann/.pub-cache/hosted/pub.dartlang.org/location-1.0.2/ios` 
-> Fetching podspec for `url_launcher` from `/Users/rainerwittmann/.pub-cache/hosted/pub.dartlang.org/url_launcher-0.4.2+1/ios` 

Resolving dependencies of `Podfile` 

Comparing resolved specification to the sandbox manifest 
    - Flutter 
    - location 
    - url_launcher 

Downloading dependencies 

-> Using Flutter (1.0.0) 

-> Using location (0.0.1) 

-> Using url_launcher (0.0.1) 
    - Running pre install hooks 
[!] Pods written in Swift can only be integrated as frameworks; add `use_frameworks!` to your Podfile or target to opt into using it. The Swift Pod being used is: location 

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:448:in `block (2 levels) in verify_framework_usage' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:443:in `each' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:443:in `block in verify_framework_usage' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:440:in `each' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:440:in `verify_framework_usage' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:114:in `install!' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/command/install.rb:37:in `run' 
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/command.rb:50:in `run' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/bin/pod:55:in `<top (required)>' 
/usr/local/bin/pod:23:in `load' 
/usr/local/bin/pod:23:in `<main>' 
Error running pod install 
Error launching application on iPhone 6. 

So weit so gut. Hinzufügen von use_frameworks! in einem anderen Fehler führte zu meinem podfile, wie sie in der Fehlermeldung vorgeschlagen:

Launching lib/main.dart on iPhone 6 in debug mode... 
Running pod install... 
Running Xcode build... 
Failed to build iOS app 
Error output from Xcode build: 
↳ 
** CLEAN FAILED ** 


The following build commands failed: 
    Check dependencies 
(1 failure) 
** BUILD FAILED ** 


The following build commands failed: 
    Check dependencies 
(1 failure) 
Xcode's output: 
↳ 
Build settings from command line: 
    ARCHS = x86_64 
    BUILD_DIR = /Users/rainerwittmann/Flutter/zapfsuche/build/ios 
    ONLY_ACTIVE_ARCH = YES 
    SDKROOT = iphonesimulator10.3 

=== CLEAN TARGET location OF PROJECT Pods WITH CONFIGURATION Release === 

Check dependencies 
“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly. 

=== CLEAN TARGET url_launcher OF PROJECT Pods WITH CONFIGURATION Release === 
Check dependencies 

=== BUILD TARGET url_launcher OF PROJECT Pods WITH CONFIGURATION Release === 

Check dependencies 

=== BUILD TARGET location OF PROJECT Pods WITH CONFIGURATION Release === 

Check dependencies 
“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly. 

Could not build the application for the simulator. 
Error launching application on iPhone 6. 

Leider habe ich keine Ahnung, wie von hier gehen. Kann mir jemand helfen, das zu klären?

Hinweis
Dieses Problem tritt nur unter iOS auf. Beide Plugins funktionieren wie ein Zauber auf Android.

Antwort

0

Schnelle Plugins erfordern use_frameworks! und das wird noch nicht vollständig unterstützt.

Ich bin currently working darauf. Danke für Ihre Geduld!

+0

Also kann ich nicht beide Plugins gleichzeitig verwenden? Gibt es eine Problemumgehung? –

+0

Es gibt einen Workaround, der im Fehler (der 'pre_install'-Hook) besprochen wird. Wenn Sie die Header manuell kopieren, funktioniert es. Ich arbeite daran, dies automatisch zu tun. –

Verwandte Themen