RCT-Folly-Build-Detox-React-Native - ios

Error:
The following build commands failed:
CompileC /Path/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/i386/F14Table.o /Path/ios/Pods/RCT-Folly/folly/container/detail/F14Table.cpp normal i386 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
(1 failure)
Pre-Condition:
Follow the setup detox latest version
detox build --configuration iOS file.ts
-Environment (please complete the following information):
Detox: ^19.6.5
React Native: 0.67.4
Node:v16.16.0
Device: Iphone 13 simulator
Xcode: 13.4.1 (13F100)
iOS: 15.0
macOS: Monterey
jest: 28.1.2

Had to add "-UseModernBuildSystem=YES -arch x86_64" to the build settings step to resolve.

Related

Swift Package not propagating minimum OS version to dependencies

I am developing a package that supports minimum iOS 14. Package.swift
platforms: [.iOS(.v14), .macOS(.v10_15)]
But the dependencies Swinject and CocoaLumberjack have iOS 9 as the minimum version.
let package = Package(
name: "CocoaLumberjack",
platforms: [
.iOS(.v9),
.macOS(.v10_10),
.watchOS(.v3),
.tvOS(.v9),
],
When I am trying to build xcframework using swift create-xcframework I get an error
** ARCHIVE FAILED **
The following build commands failed:
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'Swinject' from project 'CompanyKit')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'Swinject' from project 'CompanyKit')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'SwiftMQTT' from project 'CompanyKit')
Ld /Users/lirisoft/Library/Developer/Xcode/DerivedData/CompanyKit-czrcefyhlqzdlifiutaqrsmtkhhw/Build/Intermediates.noindex/ArchiveIntermediates/CompanyKit/IntermediateBuildFilesPath/CompanyKit.build/Release-iphoneos/CocoaLumberjack.build/Objects-normal/armv7/Binary/CocoaLumberjack normal armv7 (in target 'CocoaLumberjack' from project 'CompanyKit')
(4 failures)
Using Xcode 13.2.1
I want to restrict archiving to iOS 14 and macOS 10.15

React Native application start throwing errors after using react-native-track-player both build and start

React Native application build was working recently, But now one critical package that I'm using as a part of the essential feature is started throwing errors on IOS build.
Following are the build error details, and after some search added a swift empty file to create a bridge but the results are still the same.
** BUILD FAILED **
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'react-native-track-player' from project 'Pods')
CompileSwift normal x86_64 /Users/c0d3/Projects/Zeefa/gem-mobile-app/node_modules/react-native-track-player/ios/RNTrackPlayer/Vendor/SwiftAudio/Classes/NowPlayingInfoController/NowPlayingInfoProperty.swift (in target 'react-native-track-player' from project 'Pods')
CompileSwift normal x86_64 /Users/c0d3/Projects/Zeefa/gem-mobile-app/node_modules/react-native-track-player/ios/RNTrackPlayer/Models/PitchAlgorithms.swift (in target 'react-native-track-player' from project 'Pods')
CompileSwift normal x86_64 /Users/c0d3/Projects/Zeefa/gem-mobile-app/node_modules/react-native-track-player/ios/RNTrackPlayer/Vendor/SwiftAudio/Classes/QueuedAudioPlayer.swift (in target 'react-native-track-player' from project 'Pods')
(4 failures)
Given is the react-native info response
System:
OS: macOS 12.2.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU # 2.60GHz
Memory: 162.65 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node
Yarn: Not Found
npm: 6.14.12 - ~/.nvm/versions/node/v14.16.1/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 17.0.1 - /usr/bin/javac
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
The issue is with XCODE 13, till now I didn't get any workaround but when downgrading XCODE back to 12 and doing the same build it is working as expected.
For anyone stuck with the same issue, Until getting a proper solution I would suggest getting a MAC machine in AWS so that you can switch to any version of the OS and do the build. Make sure to delete or STOP the machine once the build is done as it is too costly.
https://aws.amazon.com/pm/ec2-mac

Flutter export fails with multiple build flavors

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)

How to install AEXML module in my iOS 10 and Xcode 8 application using carthage?

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)

ngCordova demo application build failed

I am trying to build the demo app of ngCordova.
cordova platform add ios
cordova run ios
But build failed with the following error messages.
The following build commands failed:
CompileC build/ngCordova\
Demo.build/Debug-iphonesimulator/ngCordova\ Demo.build/Objects-normal/i386/applicationPreferences.o ngCordova\ Demo/Plugins/com.simonmacdonald.prefs/applicationPreferences.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure)
ERROR running one or more of the platforms: Error code 65 for
command: xcodebuild with args:
-xcconfig,/Users/westhigh/github/demo/platforms/ios/cordova/build-debug.xcconfig,-project,ngCordova Demo.xcodeproj,ARCHS=i386,-target,ngCordova Demo,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/westhigh/github/demo/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/westhigh/github/demo/platforms/ios/build/sharedpch

Resources