Cannot build for iOS Simulator (works in real device) on M1
gitHubAdminUser opened this issue · comments
Launching lib/main.dart on iPhone 13 mini in debug mode.
Running Xcode build...
Xcode build done. 26.2s
Failed to build iOS app
Error output from Xcode build:
↳
2022-07-26 18:41:50.105 xcodebuild[7016:57568] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-07-26 18:41:50.105 xcodebuild[7016:57568] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/fj/796jc9tx2t5_w_vc2pvc14680000gn/T/flutter_tools.6tYEqm/flutter_ios_build_temp_dirIHYfil/temporary_xcresult_bundle
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
While building module 'Braintree' imported from /Users/projectX/ios/Pods/BraintreeDropIn/Sources/BraintreeDropIn/Public/BraintreeDropIn/BTDropInRequest.h:4:
In file included from <module-includes>:1:
/Users/projectX/ios/Pods/Target Support Files/Braintree/Braintree-umbrella.h:89:1: error: umbrella header for module 'Braintree' does not include header 'Braintree.h' [-Werror,-Wincomplete-umbrella]
1 error generated.
In file included from /Users/projectX/ios/Pods/BraintreeDropIn/Sources/BraintreeDropIn/BTPaymentMethodNonce+DropIn.m:1:
In file included from /Users/projectX/ios/Pods/BraintreeDropIn/Sources/BraintreeDropIn/BTPaymentMethodNonce+DropIn.h:1:
/Users/projectX/ios/Pods/BraintreeDropIn/Sources/BraintreeDropIn/Public/BraintreeDropIn/BTDropInRequest.h:4:9: fatal error: could not build module 'Braintree'
#import <Braintree/BTPostalAddress.h>
~~~~~~~^
2 errors generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/projectX/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'TOCropViewController' from project 'Pods')
/Users/projectX/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'ReachabilitySwift' from project 'Pods')
/Users/projectX/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'FMDB' from project 'Pods')
/Users/projectX/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'AppAuth' from project 'Pods')
/Users/projectX/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'TOCropViewController-TOCropViewControllerBundle' from project 'Pods')
/Users/projectX/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'leveldb-library' from project 'Pods')
Result bundle written to path:
/var/folders/fj/796jc9tx2t5_w_vc2pvc14680000gn/T/flutter_tools.6tYEqm/flutter_ios_build_temp_dirIHYfil/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code
Lexical or Preprocessor Issue (Xcode): Umbrella header for module 'Braintree' does not include header 'Braintree.h'
/Users/projectX/ios/Pods/Target%20Support%20Files/Braintree/Braintree-umbrella.h:88:0
Parse Issue (Xcode): Could not build module 'Braintree'
/Users/projectX/ios/Pods/BraintreeDropIn/Sources/BraintreeDropIn/Public/BraintreeDropIn/BTDropInRequest.h:3:8
Could not build the application for the simulator.
Error launching application on iPhone 13 mini.
========================================================
AppDelegate.swift
import UIKit
import Flutter
import Braintree
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
if #available(iOS 11.0, *) {
UNUserNotificationCenter.current().delegate = self as?
UNUserNotificationCenterDelegate
}
BTAppContextSwitcher.setReturnURLScheme("com.xxxx.xxxx.payments")
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
====================================================================
Info.plist
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.xxx.xxxx.payments</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.xxx.xxxx.payments</string>
</array>
</dict>
=======================================================================
[✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-arm, locale en-AU)
• Flutter version 3.0.2 at /Users//Developer/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision cd41fdd495 (7 weeks ago), 2022-06-08 09:52:13 -0700
• Engine revision f15f824b57
• Dart version 2.17.3
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc5)
• Android SDK at /Users//Library/Android/sdk
• Platform android-31, build-tools 31.0.0-rc5
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
• Dart plugin can be installed from:
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
[✓] VS Code (version 1.69.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.44.0
[✓] Connected device (3 available)
• iPhone 13 mini (mobile) • 618F2FA8-8795-467D-9FE9-B018D8253F57 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.134
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!