I'm trying to build in build-flavors in my app. Android no problem but iOS gives an error when I try to export the ipa.
terminal:
➜ roger git:(ios-flavors) flutter build ios --flavor development
Building be.modero.rogerapp.development for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: **********
Running pod install... 7.8s
Running Xcode build...
└─Compiling, linking and signing... 24.1s
Xcode build done. 179.1s
Built /.../build/ios/iphoneos/Runner.app.
➜ roger git:(ios-flavors) xcodebuild -sdk iphoneos -configuration Alpha -workspace ios/Runner.xcworkspace -scheme development build -verbose | xcpretty
error:
▸ Compiling GeneratedPluginRegistrant.m
❌ /.../ios/Runner/GeneratedPluginRegistrant.m:12:9: module 'camera' not found
#import camera;
^
▸ Compiling Runner_vers.c
** BUILD FAILED **
The following build commands failed:
CompileC /Users/wim/Library/Developer/Xcode/DerivedData/Runner-dhynqmoqlyqjqtaxqfpznxnuxyab/Build/Intermediates.noindex/Runner.build/Debug-integration-iphoneos/Runner.build/Objects-normal/arm64/GeneratedPluginRegistrant.o /.../ios/Runner/GeneratedPluginRegistrant.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'Runner' from project 'Runner')
(1 failure)
Related
Currently, I'm trying to run the iOS simulator with React Native, but the following error continues to occur.
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ***.xcworkspace.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace ***.xcworkspace -configuration DebugDev -scheme ***Dev -destination id=***
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
...
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/***/Library/Developer/Xcode/DerivedData/***-anoalvrwljcacmebrbezdhvomyhd/Build/Intermediates.noindex/Pods.build/DebugDev-iphonesimulator/AirBridge.build/Script-46EB2E00015FD0.sh (in target 'AirBridge' from project 'Pods')
(1 failure)
I think (in target 'AirBridge' from project 'Pods') is the main cause of the error, so how can I solve this?
I am a flutter newbie and I get this error when trying to run/build for iOS. I tried to clean Xcode, clean flutter, remove flutter, remove iOS folder, remove and re-download Xcode, but still.
No difference when trying to build from Xcode or vscode terminal.
what gets logged :
Launching lib/main.dart on iPhone 11 in debug mode...
Running Xcode build...
Xcode build done. 7.3s
Failed to build iOS app
Error output from Xcode build:
↳
2022-07-28 17:04:40.105 xcodebuild[34247:421486] 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-28 17:04:40.105 xcodebuild[34247:421486] 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/sy/mftlbsd5489gl3102v5z7fwm0000gp/T/flutter_tools.RmfxI1/flutter_ios_build_temp_dirho9O3B/temporary_xcresult_bundle
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
ld: framework not found installDir
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Result bundle written to path:
/var/folders/sy/mftlbsd5489gl3102v5z7fwm0000gp/T/flutter_tools.RmfxI1/flutter_ios_build_temp_dirho9O3B/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code
Error (Xcode): Framework not found installDir
Could not build the application for the simulator.
Error launching application on iPhone 11.
Try to do this:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
I checked my notes and found similar case in my experience.
Try to run these commands twice:
xcrun -sdk iphoneos --show-sdk-path
xcrun -sdk iphoneos --show-sdk-version
xcrun -sdk iphoneos --show-sdk-build-version
xcrun -sdk iphoneos --show-sdk-platform-path
xcrun -sdk iphoneos --show-sdk-platform-version
First run I got error, next time it works.
I am trying to generate a iOS XCFramework from an Xcode framework Project(Project name XCFramework). Project consists of some of the cocoa-pods libraries like Socket IO, SwiftKeyChainWrapper etc. If I generate XCFramework without cocoa-pods, xcodebuild commands are generating the XCFramework successfully for both iOS and iOS Simulator destinations, but when I install pods in the framework project I am getting many errors. It will be really helpful if any one has come across this scenario and succeeded kindly help in generating XCFramework sample project using cocoa-pods.
Note: a) I used a small package called xcframework which generates xcfremwork in command (1)
b) If I archive the project directly from Xcode the archive gets successful.
1) Buid command:- xcframework build --project XCFramework.xcodeproj --name XCFramework --iOS EcallXCFramework
......
......
** ARCHIVE FAILED **
The following build commands failed:
Ld /Users/*******/Library/Developer/Xcode/DerivedData/XCFramework-gccrcnyzlsezmugkrqqlnpusjfci/Build/Intermediates.noindex/ArchiveIntermediates/XCFramework/InstallationBuildProductsLocation/Library/Frameworks/XCFramework.framework/XCFramework normal arm64
(1 failure)
2) Build Command:- xcodebuild archive -scheme XCFramework -destination="generic/platform=iOS" -destination="generic/platform=iOS Simulator" SKIP_INSTALL=NO
......
.......
User defaults from command line:
destination = generic/platform=iOS Simulator
Build settings from command line:
SKIP_INSTALL = NO
xcodebuild: error: Failed to build project EcallXCFramework with scheme XCFramework.
Reason: The run destination My Mac is not valid for Archiving the scheme 'XCFramework'.
3) Build Command:- xcodebuild archive
.....
.....
ld: framework not found SwiftKeychainWrapper
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** ARCHIVE FAILED **
The following build commands failed:
Ld /tmp/EcallXCFramework.dst/Library/Frameworks/EcallXCFramework.framework/EcallXCFramework normal arm64
(1 failure)
I am trying to add AEXML module (https://github.com/tadija/AEXML) for XML parsing in my iOS 10 application with Xcode 8. However, I am getting this error while building dependencies with the command carthage update --platform iOS.
Swift Version: 3.0
Xcode Version: 8
Carthage Version: 0.17.2
cartfile
github "tadija/AEXML"
Error after running carthage update --platform iOS command
gsirn-021308:ApplePaySwag-Final chandeln$ swift -version
Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38)
Target: x86_64-apple-macosx10.9
gsirn-021308:ApplePaySwag-Final chandeln$ carthage update --platform iOS
*** Fetching AEXML
*** Checking out AEXML at "4.0.0"
*** xcodebuild output can be found in /var/folders/q7/bltc5kls62n2mzlvwhctctzr0000gn/T/carthage-xcodebuild.3NnOoT.log
*** Building scheme "AEXML iOS" in AEXML.xcodeproj
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64 /Users/chandeln/Documents/ApplePaySwag-Final/Carthage/Checkouts/AEXML/Tests/AEXMLTests.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
A shell task (/usr/bin/xcrun xcodebuild -project /Users/chandeln/Documents/ApplePaySwag-Final/Carthage/Checkouts/AEXML/AEXML.xcodeproj -scheme AEXML iOS -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64 /Users/chandeln/Documents/ApplePaySwag-Final/Carthage/Checkouts/AEXML/Tests/AEXMLTests.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
XCode Version: Version 7.2 (7C68)
Building for PhoneGAP IOS
Commands used:
xcodebuild -project HelloCordova.xcodeproj -scheme HelloCordova -configuration Release -sdk iphonesimulator IDENTIFIER=com.kony.SyncApp build
It used to work well before upgrading Xcode after upgrading to 7.2 , i am facing this issue. And same wokring form XCODE UI
Problem with command line build
Error Info:
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
** BUILD FAILED **
The following build commands failed:
ProcessPCH /Users/konysync/Library/Developer/Xcode/DerivedData/HelloCordova-gyroiomjvclmgtfewwtckeoypgfd/Build/Intermediates/PrecompiledHeaders/CordovaLib_Prefix-almeazhzuslzcvewimbluxlrnwby/CordovaLib_Prefix.pch.pch CordovaLib_Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
ProcessPCH /Users/konysync/Library/Developer/Xcode/DerivedData/HelloCordova-gyroiomjvclmgtfewwtckeoypgfd/Build/Intermediates/PrecompiledHeaders/CordovaLib_Prefix-bvlrmrstkahcccfcihrhcdumeenk/CordovaLib_Prefix.pch.pch CordovaLib_Prefix.pch normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
found some links , but those links did not help.
Apple LLVM Compiler 3.1 error clang
Unsupported compiler 'com.apple.compilers.llvm.clang.1_0' selected for architecture 'x86_64' on Xcode 7 Beta 2
Clear the cache of pod with
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
Change flipper version in pod file:
use_flipper!({ 'Flipper-Folly' => '2.5' })
And delete the project's Pods directory. The location of it is project directory > ios > Pods.
Then in the project directory > ios location, install pod with pod install
And
react-native run-ios
in project directory.
This is a bug introduced in Xcode 7.2 (and still not fixed as of 7.2.1), see https://openradar.appspot.com/23857648 It seems that xcodebuild is not setting correctly the ARCH and PLATFORM_NAME variables when invoked with -sdk iphonesimulator.
There are two known workarounds at the moment, both involve passing extra flags to xcodebuild:
1) Pass the -destination flag, eg:
xcodebuild [...] -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6'
2) Override the PLATFORM variable, eg:
xcodebuild [...] -sdk iphonesimulator PLATFORM_NAME=iphonesimulator
I had this error after upgrading to React Native 0.68.x
AppDelegate.m changed to AppDelegate.mm
You have to do this: https://github.com/software-mansion/react-native-reanimated/issues/841#issuecomment-636297029 open the project in XCode, then navigate to Build Phases, in Compile Sources remove the AppDelegate.m file and add AppDelegate.mm instead.
If it is not already renamed: Open XCode, rename AppDelegate.m to AppDelegate.mm in the Project Navigator
i have tried to resolve this error many times and follows multiple steps of every one but not worked for me after that i deleted my build folder from project ios directory like react-native-project>ios>Build folder
it worked for me.