颤振unique_identified库问题?

时间:2018-11-29 15:21:34

标签: ios flutter cross-platform

我有一个问题,当我使用Flutter应用程序库获取unique_id时,出现了一个问题,我无法进行构建,因为即使pod安装成功后,x代码也无法导入所需的库,

以下是该错误的屏幕截图:

enter image description here

这是进行dart构建时的异常堆栈跟踪:

Launching lib/main.dart on iPhone XR in debug mode...
Running pod install...
Starting Xcode build...
Xcode build done.                                           41.0s
Failed to build iOS app
Error output from Xcode build:
↳
   ** BUILD FAILED **


Xcode's output:
↳
    /Users/mac/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/unique_identifier-0.0.3/ios/Classes/UniqueIdentifierPlugin.m:2:9: fatal error: 'unique_identifier/unique_identifier-Swift.h' file not found
    #import <unique_identifier/unique_identifier-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    /Users/mac/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-0.2.1/ios/Classes/FirebaseMessagingPlugin.m:146:75: warning: 'token' is deprecated: Use instanceIDWithHandler: instead. [-Wdeprecated-declarations]
      [_channel invokeMethod:@"onToken" arguments:[[FIRInstanceID instanceID] token]];
                                                                              ^
    In module 'FirebaseInstanceID' imported from /Users/mac/Desktop/test/ios/Pods/Headers/Private/Firebase/Firebase.h:46:
    /Users/mac/Desktop/test/ios/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h:201:30: note: 'token' has been explicitly marked deprecated here
    - (nullable NSString *)token __deprecated_msg("Use instanceIDWithHandler: instead.");
                                 ^
    In module 'Foundation' imported from Headers/Private/FirebaseCore/FIRAnalyticsConfiguration.h:17:
    In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
    In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/sys/cdefs.h:180:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((deprecated(_msg)))
                                                          ^
    1 warning generated.

***对上述内容进行更新[通过删除文件并再次手动添加它们,已纠正了以上错误,但是当获得唯一标识符的代码称为异常时,出现了另一个问题]

enter image description here

感谢您的帮助

此致

0 个答案:

没有答案