Ionic run fail to deploy to device - ios

I am using Mac OS X 10.11. I am trying to deploy build to device (iPhone 4) by running sudo ionic run ios --device and I get this error message:
Check dependencies
Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) were found.
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/john/Desktop/Myproject/platforms/ios/cordova/build-debug.xcconfig,-project,Myproject.xcodeproj,ARCHS=armv7 armv7s arm64,-target,Myproject,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 armv7s arm64,CONFIGURATION_BUILD_DIR=/Users/john/Desktop/Myproject/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/john/Desktop/Myproject/platforms/ios/build/sharedpch
ERROR running one or more of the platforms: Error: /Users/john/Desktop/Myproject/platforms/ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project
I have no problem when running just only ionic run ios, which will deploy the app into emulator. How can I overcome the problem?

Another method will be
Go to your platform directory of your project /platforms/ios
Write in the console open . which will open your folder with Finder.
After that open YourProject.xcodeproj with XCode and select your device and click on run.
Good luck

Related

react-native build failing due to PhaseScriptExecution error

Environment
Mac OS X Version 12.1 (Apple M1 chip)
Xcode Version 13.2.1
Simulator Version 13.2 (972.2)
react-native-cli 7.0.3
node v18.4.0
The Issue
This is my first time working on developing an app using React Native. I am trying to run my React Native project on Xcode's simulator, using npx react-native run-ios. However, I am encountering this error message.
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 MCompass.xcworkspace.
Command line invocation:
/Users/brx/Downloads/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace MCompass.xcworkspace -configuration Debug -scheme MCompass -destination id=DC3C75E6-19FD-4B80-87B1-62BF6404ED20
...
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/brx/src/projects/test/MCompass/ios/build/MCompass.build/Debug-iphonesimulator/MCompass.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'MCompass' from project 'MCompass')
(1 failure)
Between the first error message and ** BUILD FAILED **, there were many lines of output listing exports.
I've installed dependencies using both yarn and npm. I've also looked at several other threads with this same issue, but none of the solutions (such as having only one version of nvm or running react-native upgrade) have been successful. Does anyone have any tips?
I had my root folder name "REACT NATIVE", changing it to "REACT_NATIVE" fixed the error as the folder that contains your react native project cannot contain white spaces.
The second solution would be running Xcode with rosetta. This is only applicable for M1 chip macbooks as there are few times Xcode projects fail because of this reason. Please refer to below link for reference:
https://penny-huang.medium.com/xcode-how-to-run-ios-simulator-on-m1-mac-66101b9fccd8

Xcode couldn’t find any iOS App Development provisioning profiles

keep getting an error running:
sudo ionic cordova build ios
or
sudo ionic cordova build ios -allowProvisioningUpdates
or
sudo ionic cordova build ios -allowProvisioningUpdates --buildFlag="-UseModernBuildSystem=0"
It was previously working and stopped all of a sudden.
note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: No profiles for ‘com.angularfire.appname’ were found: Xcode couldn’t find any iOS App Development provisioning profiles matching ‘com.angularfire.appname’. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target ‘Project Name’)
** ARCHIVE FAILED **
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.
Yes, I have a profile provisioned with a dev team email address.

How to build and deploy an ios api file in real device using MAC

i am new to mac, so for i have installed xcode and successfully added the platform for ios.
When i give adb devices i am not able to detect my device name for iphone but when i connect android and give adb devices i am getting my device .
when i give ionic build ios i'm getting the following errors. i don't know how to enable the developer option in iphone
=== BUILD TARGET myFirst OF PROJECT myFirst WITH CONFIGURATION Debug ===
Check dependencies
Signing for "myFirst" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/subbarao/Desktop/myFirst/platforms/ios/cordova/build-debug.xcconfig,-workspace,myFirst.xcworkspace,-scheme,myFirst,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,myFirst.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/subbarao/Desktop/myFirst/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/subbarao/Desktop/myFirst/platforms/ios/build/sharedpch
You need a development provisioning profile on your build machine. Apps can run on the simulator without a profile, but they are required to run on an actual device.
If you open the project in Xcode, it may automatically set up provisioning for you. Otherwise you will have to create go to the iOS Dev Center and create a profile.
cordova run with ios error .. Error code 65 for command: xcodebuild with args:
Same question here by this guy
Try to sign in as ios dev account in Xcode
or try
ionic platform remove ios
ionic platform add ios
i was getting the same error but i tried the above command and its working now
thanks

Cordova iOS - Build App Error 65

I developed an App on a Windows Machine (For Android).
I also want the App for iOS. So I installed Xcode, node.js and cordova.
There are no errors, when I run my App on a Emulator.
When I run the App on Device with the command cordova run ios --device, I get the following Errors:
Check dependencies
Signing for "HelloCordova" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.2'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -
xcconfig,/Users/milkogrieger/Woow2/platforms/ios/cordova/build-
debug.xcconfig,- workspace,HelloCordova.xcworkspace,-scheme,HelloCordova,-
configuration,Debug,-
destination,generic/platform=iOS,-
archivePath,HelloCordova.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/milkogri
eger/Woow2/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/milkogrieger/Woow2/platforms/ios/build/sharedpch
I found the following Solutions and tried them:
remove all plugins
add plugins
remove platforms
add platforms
But the error is still there.
I hope someone can help me
Thanks
You need to specify your development team as the message indicates. You can do this easily by configuring build.json, as described in the docs and further clarified here.

phonegap run ios --device --verbose Error

I used phonegap to install an app to an iPad yesterday simply using:
phonegap run ios
From within the project directory. I tried installing it to a second iPad today but that command did nothing. I then typed:
phonegap run ios --device --verbose
And got:
Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “***” were found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.4'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Command finished with error code 65: /Users/.../.../.../MyApp/MyApp/platforms/ios/cordova/run --device
ERROR running one or more of the platforms: Error: /Users/.../.../.../MyApp/MyApp/platforms/ios/cordova/run: Command failed with exit code 65
You may not have the required environment or OS to run this project
I do not get what is different from yesterday except the device plugged in?

Resources