I have successfully implemented razorpay plugin for android. But I couldn’t find a way to run on iOS simulator throwing the error.
Failed to build iOS app
Error output from Xcode build:
↳
objc[46285]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x212eb7130) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10679c2c8). One of the two will be used. Which one is undefined.
objc[46285]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x212eb7180) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10679c318). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/q1/bn7h2y0j58ngn7rb80fr1yhh0000gn/T/flutter_tools.u4wUAC/flutter_ios_build_temp_dirOLb14O/temporary_xcresult_bundle
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
ld: warning: all bitcode will be dropped because '/Users/devytpl/Downloads/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter' was built without bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.
Command CompileSwiftSources failed with a nonzero exit code
ld: warning: all bitcode will be dropped because '/Users/devytpl/Downloads/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter' was built without bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.
/Users/devytpl/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.3.2/ios/Classes/RazorpayDelegate.swift:2:8: error: module 'Razorpay' was created for incompatible target arm64-apple-ios10.0: /Users/devytpl/Dev/Applications/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
import Razorpay
^
/Users/devytpl/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.3.2/ios/Classes/RazorpayDelegate.swift:2:8: error: module 'Razorpay' was created for incompatible target arm64-apple-ios10.0: /Users/devytpl/Dev/Applications/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
import Razorpay
^
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/devytpl/Dev/Applications/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.2.99. (in target 'Toast' from project 'Pods')
/Users/devytpl/Dev/Applications/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.2.99. (in target 'ReachabilitySwift' from project 'Pods')
Result bundle written to path:
/var/folders/q1/bn7h2y0j58ngn7rb80fr1yhh0000gn/T/flutter_tools.u4wUAC/flutter_ios_build_temp_dirOLb14O/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code
Swift Compiler Error (Xcode): Module 'Razorpay' was created for incompatible target arm64-apple-ios10.0: /Users/devytpl/Dev/Applications/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
/Users/devytpl/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.3.2/ios/Classes/RazorpayDelegate.swift:1:7
Could not build the application for the simulator.
Error launching application on iPhone 13.
Flutter Version: 3.0.5
Target Platform: 10.0
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.
I am getting the below error when I build my iOS project in Xcode 11.0 for Simulator 11.
CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
How can I resolve it?
I have a lib that has targets for tvOS and iOS on the same workspace.
When I build for tvOS, it gives me an error saying:
The following build commands failed:
CompileSwift normal arm64
CompileXIB /Users/.../<project_folder>/Pods/Clappr/Sources/Clappr_iOS/Classes/Plugin/Core/MediaControl/Seekbar/Views/SeekbarView.xib
CompileSwift normal arm64
The command Fastlane is using to run the build is:
set -o pipefail && xcodebuild -workspace "<project_name>.xcworkspace" -scheme "<scheme_name>_tvOS" -configuration "Release" -sdk "appletvos" -derivedDataPath "build/tvOS-appletvos" clean build GCC_PREPROCESSOR_DEFINITIONS='${inherited}' BITCODE_GENERATION_MODE=bitcode ENABLE_BITCODE=YES
And when I run it in verbose mode, the part that seems to be showing the error is:
CompileXIB /Users/<project_folder>/Pods/Clappr/Sources/Clappr_iOS/Classes/Plugin/Core/MediaControl/Seekbar/Views/SeekbarView.xib (in target: Clappr-iOS)
cd /Users/<project_folder>/Pods
export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module Clappr --output-partial-info-plist /Users/<project_folder>/build/tvOS-appletvos/Build/Intermediates.noindex/Pods.build/Release-appletvos/Clappr-iOS.build/SeekbarView-PartialInfo.plist --auto-activate-custom-fonts --target-device tv --minimum-deployment-target 10.0 --output-format human-readable-text --compile /Users/<project_folder>/build/tvOS-appletvos/Build/Products/Release-appletvos/Clappr-iOS/Clappr.framework/SeekbarView.nib /Users/<project_folder>/Pods/Clappr/Sources/Clappr_iOS/Classes/Plugin/Core/MediaControl/Seekbar/Views/SeekbarView.xib
/* com.apple.ibtool.errors */
/Users/<project_folder>/Pods/Clappr/Sources/Clappr_iOS/Classes/Plugin/Core/MediaControl/Seekbar/Views/SeekbarView.xib: error: iOS xibs do not support target device type "tv".
It is selecting a xib that, at the dependency (Clappr), doesn't belong to tvOS target.
Also, when I try to build using the iOS target, it answers me the following:
The following build commands failed:
CompileSwift normal armv7
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64
CompileSwift normal armv7
CompileSwift normal arm64
The fastlane lane used to run the build for tvOS is the following:
private_lane :xc_build do |params|
xcodebuild(
workspace: "ProjectName.xcworkspace",
scheme: params[:scheme],
configuration: 'Release',
sdk: params[:sdk],
derivedDataPath: params[:derivedDataPath],
clean: true,
build: true,
xcargs: params[:xcargs]
)
end
lane :build_tvos do
remove_previous_builds_of(platform: "tvOS")
#It breaks on the following command
xc_build(
scheme: 'ProjectScheme_tvOS',
sdk: 'appletvos',
derivedDataPath: 'build/tvOS-appletvos',
xcargs: "GCC_PREPROCESSOR_DEFINITIONS='${inherited}' BITCODE_GENERATION_MODE=bitcode ENABLE_BITCODE=YES"
)
xc_build(
scheme: 'ProjectScheme_tvOS',
sdk: 'appletvsimulator',
derivedDataPath: 'build/tvOS-appletvsimulator',
xcargs: "GCC_PREPROCESSOR_DEFINITIONS='${inherited}' BITCODE_GENERATION_MODE=bitcode ENABLE_BITCODE=YES"
)
#This uses lipo to build universal frameworks
make_universal_framework(
universal_framework_folder: "Framework/tvOS",
device_framework_folder: "build/tvOS-appletvos/Build/Products/Release-appletvos",
simulator_framework_folder: "build/tvOS-appletvsimulator/Build/Products/Release-appletvsimulator"
)
end
Environment info:
* iOS target has build seating valid architectures with the value arm64 arm64e armv7 armv7s and tvOS has value: arm64
* Fastlane version 2.123.0
* Cocoapods version 1.6.1
* make_universal_framework uses lipo to build
To be completely honest, I don't know why it is failing, although I found a solution.
This answer led me to the right direction: https://github.com/Webtrekk/webtrekk-ios-sdk/issues/55#issuecomment-481720922
I know, my problem has nothing to do with the one written on the GitHub issue, but it gave me an idea to solve it. I went to menu
File -> Project(Workspace) Settings -> Workspace settings -> Build System => 'Legacy Build System'
And it solved the problem!
It seems to be a difference on the build system, but I haven't found documentation confirming it.
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)