简体   繁体   English

M1 App Build iOS Failed Flutter - AMSupportURLConnectionDelegate Location & Geolocator Packages

[英]M1 App Build iOS Failed Flutter - AMSupportURLConnectionDelegate Location & Geolocator Packages

Please help, I have just paid for some development work and gotten the app back.请帮忙,我刚刚支付了一些开发工作的费用并取回了应用程序。 The Developer claims they have no problem running the app.开发人员声称他们运行该应用程序没有问题。 I can not get it to run on my machine.我无法让它在我的机器上运行。 The app was running before the developer added state management via block.该应用程序在开发人员通过块添加状态管理之前正在运行。

It looks like package/cocoapods/Xcode error which should be resolvable using latest versions, but nothing I can do clears these errors.看起来像 package/cocoapods/Xcode 错误,应该可以使用最新版本解决,但我无能为力清除这些错误。 Every time I get close I run again and all the errors come right back.每次我靠近时,我都会再次运行,所有错误都会回来。 I am in an endless troubleshooting loop without resolution.我处于无休止的故障排除循环中,没有解决办法。 I am a beginner and can not afford to pay the developer $50hr to troubleshoot why an app won't run on my computer so I am tools down and stalled until I get this issue resolved.我是一名初学者,无法向开发人员支付 50 小时的费用来解决应用程序无法在我的计算机上运行的原因,因此在解决此问题之前,我一直在使用工具并停滞不前。

I have reinstalled Cocoapods.我已经重新安装了 Cocoapods。 I have tried deleting PODS file.我曾尝试删除 PODS 文件。 I have tried using an old PODS file.我曾尝试使用旧的 PODS 文件。 I have ensured it is the right version for M1 with the ffi arch install.我已经确保它是带有 ffi arch 安装的 M1 的正确版本。 I have updated my developer certificate.我已经更新了我的开发者证书。 Pasted Arch 86 into Xcode settings.将 Arch 86 粘贴到 Xcode 设置中。 Set versions to the latest for deployment.将版本设置为最新版本以进行部署。 I have even wiped my Mac out completely and reinstalled ALL environments from scratch but the errors persist.我什至彻底清除了我的 Mac 并从头开始重新安装了所有环境,但错误仍然存​​在。 I have done flutter clean and Flutter pub get and flutter build iOS and flutter run 1000 times in the last week.我在上周完成了 flutter clean 和 Flutter pub get 和 flutter build iOS 和 flutter run 1000 次。 I can not get this app to build for iOS and I am losing my mind.我无法为 iOS 构建此应用程序,而且我正在失去理智。 I have been trying to get it to run for almost 2 weeks!我一直试图让它运行近 2 周! Developer spent an hour with me and all they asked me to do was all the stuff I have already done by searching online for known issues.开发人员花了一个小时和我在一起,他们要求我做的就是我通过在线搜索已知问题已经完成的所有事情。 I am out of ideas.我没有想法。 I need help to solve this.我需要帮助来解决这个问题。 PLEASE HELP请帮忙

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.

Well it's pretty clear what is going on - read the error : 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99.那么很清楚发生了什么 - 阅读错误:“IPHONEOS_DEPLOYMENT_TARGET”设置为 8.0,但支持的部署目标版本的范围是 9.0 到 14.5.99。

add / replace this in your pod file在您的 pod 文件中添加/替换它

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
    end
  end
end

also you didn't sign in with your account on this project您也没有在此项目中使用您的帐户登录

S.Shot Xcode 签名和功能

also you'll probably need to set each pod target manually to 9.0您还可能需要手动将每个 pod 目标设置为 9.0

Got it resolved.得到了解决。 I went back to my last working version before I hired the Developers and it runs just fine.在聘请开发人员之前,我回到了我的上一个工作版本,它运行得很好。 So I pasted their lib in.... and that errored.所以我把他们的 lib 粘贴进去了……然后就出错了。 They looked at error and it was because I needed to paste in the intl file and then fix a couple settings in Xcode.他们查看了错误,这是因为我需要粘贴 intl 文件,然后在 Xcode 中修复一些设置。 None of us knows why it was erroring on my computer only or why pasting their lib into my last working copy worked, but it is resolved.我们没有人知道为什么它只在我的计算机上出错,或者为什么将他们的 lib 粘贴到我的最后一个工作副本中起作用,但它已解决。 I suspect it was a Git conflict, because of the latest update to Xcode but we really don't know why.我怀疑这是 Git 冲突,因为 Xcode 的最新更新,但我们真的不知道为什么。 But it is resolved.但是已经解决了。

Thank-you to those who tried to help.感谢那些试图提供帮助的人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM