Build for ios from ionic command failed - ios

I got this error when i ran
ionic cordova run ios --device
65%] PreflightingApplication
2019-06-24 14:28:21.032 ios-deploy[7890:179934] [ !! ] Error 0xe800007e: The device OS version is too low. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
ios-deploy: Command failed with exit code 253
[ERROR] An error occurred while running subprocess cordova.
cordova run ios --device exited with exit code 253.
My
output for xcodebuild -showsdks
i
OS SDKs:
iOS 11.2 -sdk iphoneos11.2
iOS Simulator SDKs:
Simulator - iOS 11.2 -sdk iphonesimulator11.2
macOS SDKs:
macOS 10.13 -sdk macosx10.13
tvOS SDKs:
tvOS 11.2 -sdk appletvos11.2
tvOS Simulator SDKs:
Simulator - tvOS 11.2 -sdk appletvsimulator11.2
watchOS SDKs:
watchOS 4.2 -sdk watchos4.2
watchOS Simulator SDKs:
Simulator - watchOS 4.2 -sdk watchsimulator4.2

Have you tried overriding the deployment target? Try adding to your config.xml:
<platform name="ios">
<preference name="deployment-target" value="11.2" />
</platform>

Related

Azure Pipelines: How to make the Agent use a MacOS variant that has iOS version 16.1+?

Essentially what the subject says. I'm using agent specification 'MacOS-12' and the output of 'xcodebuild -showsdks' is this one:
DriverKit 21.4 -sdk driverkit21.4
iOS SDKs:
iOS 16.0 -sdk iphoneos16.0 <----
iOS Simulator SDKs:
Simulator - iOS 16.0 -sdk iphonesimulator16.0
macOS SDKs:
macOS 12.3 -sdk macosx12.3
macOS 12.3 -sdk macosx12.3
tvOS SDKs:
tvOS 16.0 -sdk appletvos16.0
tvOS Simulator SDKs:
Simulator - tvOS 16.0 -sdk appletvsimulator16.0
watchOS SDKs:
watchOS 9.0 -sdk watchos9.0
watchOS Simulator SDKs:
Simulator - watchOS 9.0 -sdk watchsimulator9.0
On my own MacOS machine the same command gives me this:
DriverKit SDKs:
DriverKit 22.2 -sdk driverkit22.2
iOS SDKs:
iOS 16.2 -sdk iphoneos16.2 <--- this is what I want
iOS Simulator SDKs:
Simulator - iOS 16.2 -sdk iphonesimulator16.2
macOS SDKs:
macOS 13.1 -sdk macosx13.1
macOS 13.1 -sdk macosx13.1
tvOS SDKs:
tvOS 16.1 -sdk appletvos16.1
tvOS Simulator SDKs:
Simulator - tvOS 16.1 -sdk appletvsimulator16.1
watchOS SDKs:
watchOS 9.1 -sdk watchos9.1
watchOS Simulator SDKs:
Simulator - watchOS 9.1 -sdk watchsimulator9.1
The latest Xcode is installed on the macOS 12 runners, but it's not the default yet.
You can try running:
sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer
As a shell command
Or use the Setup Xcode Version action.

RCT-Folly-Build-Detox-React-Native

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.

Travis fails to launch simulator on xcode8

I am having issue with Travis building and testing a new ios app I am being developing.
language: objective-c
os: osx
osx_image: xcode8
before_install:
- pod repo update > /dev/null
- pod update
- gem install xcpretty
script:
- xcodebuild clean test -workspace project.xcworkspace -scheme project -destination "platform=iOS Simulator,name=iPhone 6" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO
This is my .travis.yml and everytime I run it Travis get me this error:
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:iOS Simulator, OS:latest, name:iPhone 6 }
Ineligible destinations for the "project" scheme:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
The command "xcodebuild clean test -workspace project.xcworkspace -scheme project -destination "platform=iOS Simulator,name=iPhone 6" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO" exited with 70.
I also tried putting the id of the simulator with the same result.
Please note that the same xcodebuild command is building without any issue in my workarea.
Make sure your iOS Deployment Target value in Build Settings is set to a value that your osx image on Travis supports.
If your app is brand new, the iOS Deployment Target may be set to 10.1. The newest image Travis is providing comes with Xcode 8.0, which does not have iOS 10.1 simulators in them yet.
Update
Travis-CI is supporting xcode8.1 and iOS 10.1

Xcode command line test execution issues

I'm in a strange situation where I can get xctool to run my test but I cant figure out the equivalent command line to get xcodebuild and/or fastlane scan to run my tests.
I have an iPad only application with a single scheme and two targets (otto and ottoTests)
Working XCTool Commandline
xctool -scheme otto \
-sdk iphonesimulator \
CODE_SIGN_IDENTITY=""\
CODE_SIGNING_REQUIRED=NO \
-reporter pretty\
-reporter junit:./test-reports/otto.xml\
build test
Xcodebuild - fail
xcodebuild -sdk iphonesimulator \
-scheme otto \
test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
I get this error that
A build only device cannot be used to run this target
So I'm kind of at a loss here exactly what is different between xcodebuild and whatever xctool is running.
AFAICS, you are missing the -destination argument in the xcodebuild command. Refer to this tutorial for sample code.
You're missing the -destination argument.
xcodebuild \
-workspace MyApp.xcworkspace \
-scheme MyWatchKitApp
-destination 'platform=iOS Simulator,name=iPhone 6,OS=9.1' \
build
To list all valid values for destination run instruments -s devices.
e.g.
$ instruments -s devices
Known Devices:
Apple TV 1080p (10.0) [A0DA01A6-CAC6-4562-93B9-749920DCEFAA] (Simulator)
Apple Watch - 38mm (2.0) [9D6C53FB-0D69-4A0A-83CB-CBB55EE63AA6] (Simulator)
Apple Watch - 38mm (2.0) [BF24D5AC-8DB5-4D18-A6FD-B92292084B8A] (Simulator)
Apple Watch - 42mm (2.0) [286C7921-3689-4832-B0C7-52B412C0C2F5] (Simulator)
Apple Watch - 42mm (2.0) [16144840-5E1B-4934-A82D-E2A49FF79392] (Simulator)
iPad 2 (8.1) [8D0AD02D-C78F-4D59-BBA5-1E7AB452A852] (Simulator)
iPad 2 (9.3) [16D6261C-8FBD-4865-8E6A-840800A96C4A] (Simulator)
iPad Air (10.0) [374DB3F8-65CB-4AD1-919F-808C0C2FCEE1] (Simulator)
iPad Air (8.1) [E83D1680-C5EE-4E86-B847-16FF8C0B7F98] (Simulator)
iPad Air (9.3) [82F4AEC6-A778-44D9-88DB-A95126904E1A] (Simulator)
iPad Air 2 (10.0) [E68ED558-4E83-46A3-892C-93786CF947FC] (Simulator)
iPad Air 2 (9.3) [F1521496-CA53-41CC-A1DA-F605B961B3E5] (Simulator)
iPad Pro (12.9 inch) (10.0) [D87A6656-DEB4-41BB-B45A-2A3D85BFED8A] (Simulator)
iPad Pro (9.3) [968E6D5E-6881-4DB2-B274-2BF0DC0FDE24] (Simulator)
iPad Pro (9.7 inch) (10.0) [55B31895-0A68-4060-8441-A845F63FA4FB] (Simulator)
iPad Retina (10.0) [7725C135-7211-43E2-8BB4-9455C3820DB4] (Simulator)
iPad Retina (8.1) [E4825B7A-5A53-49AF-AD27-62711CA97B66] (Simulator)
iPad Retina (9.3) [F0523C54-9F37-4209-844C-9CA4A174791A] (Simulator)
Unfortunately you can't just copy and paste these lines. You'll need to use your impressive human pattern matching skills to fill in the proper values for the platform=, name=, and OS= parameters to -destination.
Source http://www.mokacoding.com/blog/xcodebuild-destination-options/

Phonegap (Cordova) error at CompileXIB

I'm having some problems with CompileXIB at Cordova.
System Information:
OS X Yosemite Beta 10.10
XCode 6 Beta 5
Everytime I try to run cordova build ios the terminal just "freeze" at this part:
CompileXIB ToGo/Classes/MainViewController.xib
cd /Applications/mampstack-5.4.15-0/apache2/htdocs/toGo_app/platforms/ios
export PATH="/Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode6-Beta5.app/Contents/Developer/usr/bin:/Users/yeltsin/google-cloud-sdk/bin:/Users/yeltsin/.rvm/gems/ruby-2.1.2/bin:/Users/yeltsin/.rvm/gems/ruby-2.1.2#global/bin:/Users/yeltsin/.rvm/rubies/ruby-2.1.2/bin:/usr/local/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/Users/yeltsin/.rvm/bin:/Developer/android/sdk/platform-tools:/Developer/android/sdk/tools"
export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode6-Beta5.app/Contents/Developer/usr/bin/..
/Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool --target-device iphone --target-device ipad --errors --warnings --notices --module ToGo --minimum-deployment-target 6.0 --output-partial-info-plist /Applications/mampstack-5.4.15-0/apache2/htdocs/toGo_app/platforms/ios/build/ToGo.build/Debug-iphonesimulator/ToGo.build/MainViewController-PartialInfo.plist --auto-activate-custom-fonts --output-format human-readable-text --compile /Applications/mampstack-5.4.15-0/apache2/htdocs/toGo_app/platforms/ios/build/emulator/ToGo.app/MainViewController.nib /Applications/mampstack-5.4.15-0/apache2/htdocs/toGo_app/platforms/ios/ToGo/Classes/MainViewController.xib
Doesn't shows an error. Just don't proceed. I tried with this project and with another one and both are having the same problems.
How can I fix this? :(
Thanks,
Yeltsin
You want to make sure that you have the non-Beta Xcode installed, otherwise you will continue to get this error.

Resources