【问题标题】:M1 App Build iOS Failed Flutter - AMSupportURLConnectionDelegate Location & Geolocator PackagesM1 App 构建 iOS 失败 Flutter - AMSupportURLConnectionDelegate Location & Geolocator Packages
【发布时间】:2021-07-23 05:54:17
【问题描述】:

请帮忙,我刚刚支付了一些开发工作的费用并取回了应用程序。开发人员声称他们运行该应用程序没有问题。我无法让它在我的机器上运行。该应用程序在开发者通过块添加状态管理之前运行。

看起来应该可以使用最新版本解决的 package/cocoapods/Xcode 错误,但我无能为力清除这些错误。每次我接近时,我都会再次运行,所有错误都会立即出现。我处于无休止的故障排除循环中,没有解决方案。我是一个初学者,付不起开发人员 50 小时的费用来解决应用程序无法在我的计算机上运行的问题,所以我的工具停止工作并停滞不前,直到我解决了这个问题。

我已经重新安装了 Cocoapods。 我试过删除 PODS 文件。 我尝试过使用旧的 PODS 文件。 我已确保它是安装 ffi 架构的 M1 的正确版本。 我已经更新了我的开发者证书。 将 Arch 86 粘贴到 Xcode 设置中。 将版本设置为最新以进行部署。 我什至彻底清除了我的 Mac,并从头开始重新安装了所有环境,但错误仍然存​​在。 我已经完成了 Flutter clean 和 Flutter pub get 以及 Flutter build iOS 和 Flutter 在上周运行了 1000 次。 我无法让这个应用程序为 iOS 构建,我正在失去理智。我一直试图让它运行近 2 周! 开发人员和我一起度过了一个小时,他们要求我做的只是我通过在线搜索已知问题所做的所有事情。 我没主意了。我需要帮助来解决这个问题。 请帮忙

Error output from Xcode build:
↳
    objc[19329]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x20c172c10) and
    /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1141502b8). One of the two will be used. Which one is undefined.
    objc[19329]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x20c172c60) and
    /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x114150308). One of the two will be used. Which one is undefined.
    2021-07-22 22:34:26.062 xcodebuild[19329:246509] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/tlcf/Development/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.3.0/ios/Classes/LocationPlugin.m:176:13: warning: 'UIAlertView' is deprecated:
    first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead
    [-Wdeprecated-declarations]
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Location is Disabled"
                ^
    In module 'UIKit' imported from /Users/tlcf/Development/simposi-main/ios/Pods/Target Support Files/location/location-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAler
    tView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here
    @interface UIAlertView : UIView
               ^
    /Users/tlcf/Development/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.3.0/ios/Classes/LocationPlugin.m:176:48: warning: 'UIAlertView' is deprecated:
    first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead
    [-Wdeprecated-declarations]
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Location is Disabled"
                                                   ^
    In module 'UIKit' imported from /Users/tlcf/Development/simposi-main/ios/Pods/Target Support Files/location/location-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAler
    tView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here
    @interface UIAlertView : UIView
               ^
    2 warnings generated.
    /Users/tlcf/Development/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.3.0/ios/Classes/LocationPlugin.m:176:13: warning: 'UIAlertView' is deprecated:
    first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead
    [-Wdeprecated-declarations]
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Location is Disabled"
                ^
    In module 'UIKit' imported from /Users/tlcf/Development/simposi-main/ios/Pods/Target Support Files/location/location-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAler
    tView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here
    @interface UIAlertView : UIView
               ^
    /Users/tlcf/Development/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.3.0/ios/Classes/LocationPlugin.m:176:48: warning: 'UIAlertView' is deprecated:
    first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead
    [-Wdeprecated-declarations]
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Location is Disabled"
                                                   ^
    In module 'UIKit' imported from /Users/tlcf/Development/simposi-main/ios/Pods/Target Support Files/location/location-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAler
    tView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here
    @interface UIAlertView : UIView
               ^
    2 warnings generated.
    /Users/tlcf/Development/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-7.3.0/ios/Classes/GeolocatorPlugin.m:156:55: error: expected expression
                        openURL:options:completionHandler::[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
                                                          ^
    /Users/tlcf/Development/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-7.3.0/ios/Classes/GeolocatorPlugin.m:156:29: error: use of undeclared identifier
    'options'
                        openURL:options:completionHandler::[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
                                ^
    /Users/tlcf/Development/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-7.3.0/ios/Classes/GeolocatorPlugin.m:156:37: error: use of undeclared identifier
    'completionHandler'
                        openURL:options:completionHandler::[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
                                        ^
    3 errors generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
    /Users/tlcf/Development/simposi-main/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of
    supported deployment target versions is 9.0 to 14.5.99. (in target 'Flutter' from project 'Pods')


It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
  open ios/Runner.xcworkspace
Encountered error while building for device.

【问题讨论】:

  • 您可能还需要手动将每个 pod 目标设置为 9.0
  • 还有什么?之前有没有没有被采纳的评论?我确实设置了所有的 pod 目标。它并没有解决问题,每次 j 执行一次flutter clean 和 pod update 时,这些设置都会消失,j 必须重新设置它们。

标签: ios flutter location


【解决方案1】:

请在 xCode 中运行该应用程序,您将在那里得到一个正确的错误。

在我的情况下,它是在 answer. 的帮助下修复的

【讨论】:

    【解决方案2】:

    解决了。在雇用开发人员之前,我回到了我的上一个工作版本,它运行得很好。所以我将他们的库粘贴到....中并且出错了。他们查看了错误,这是因为我需要粘贴 intl 文件,然后在 Xcode 中修复几个设置。我们都不知道为什么它只在我的计算机上出错,或者为什么将它们的库粘贴到我的最后一个工作副本中有效,但它已经解决了。我怀疑这是 Git 冲突,因为 Xcode 的最新更新,但我们真的不知道为什么。但是已经解决了。

    感谢那些试图提供帮助的人。

    【讨论】:

      猜你喜欢
      • 2022-08-22
      • 2020-12-28
      • 2020-08-18
      • 2021-09-13
      • 2020-09-15
      • 2020-12-07
      • 2020-06-04
      • 1970-01-01
      • 2021-12-11
      相关资源
      最近更新 更多