Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I have created a new ionic react project based on the templates on the ionic website and also added capacitor ios.
When I open my project and try to run it in Xcode I get the following errors as attached in the image.
Wondering if anyone can help with this.
Thanks
This is because your Podfile hasn't been updated.
You need to run:
npx cap update ios
then:
npx cap build ios
This will force refresh the Podfile for you.
If this doesn't work, you should try deleting your iOS folder within your IDE and reinstalling with:
npx cap add ios or ionic cap add ios
then:
npx cap build ios or ionic cap build ios.
Mac with Apple Silicon (M1)
The above is still correct, but there is a bug within CocoaPods which will prevent you from installing it correctly and therefore run these steps first:
sudo arch -x86_64 gem install ffi
then:
arch -x86_64 pod install
This will simulate Intel architecture and allow you to install the pods.
Related
I'm new to Flutter and have been learning it recently. Been trying to get this flutter app running for my internship, but can't seem to figure out why it's not running. I have no problem getting the default flutter app running on both iOS and Android simulators and on my personal iPhone. Flutter doctor checks out fine. I’ve tried flutter clean, removing the Podfile (as it recommended because it said it was out of date), downgrading flutter to the same version my team was using because I was thinking maybe it was a problem with that working with Xcode 12, and running things like pub get and pod install. Same error all around when trying on Xcode, terminal, android studio, and VScode. I've been pretty much going in circles with the same errors trying different things.
I'm running the app with the following command: flutter run -t lib/main_dev.dart --flavor dev
The third image is the error I got after I tried the first solution on Stackoverflow.
The fourth image is when I try running the app on my android sim.
I've tried the following answers here in Stack overflow
First solution
When I was getting deployment warnings
I could go on with the bunch of different errors I've encountered trying to run on Vscode, android studio, and so on, but basically, I've been going in circles with the same errors and the images below are just the ones I'm encountering now. All I'm trying to do is run the project I cloned from Github. I'm hoping anyone here will find an error that looks familiar to them or a similar situation where they couldn't get a flutter project to run after cloning.
A word of advice, Always run the latest flutter engine unless it is absolutely necessary.
run flutter clean
run rm ios/Podfile ios/Podfile.lock pubspec.lock
Looks like your flutter svg package has to be updated
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I am trying to build an ionic project using
ionic cordova build ios --release
, but I am getting BUILD FAILED error.
The following build commands failed: Ld /Users/anilram25/Library/Developer/Xcode/DerivedData/Projectname-dhymtjexvkoysbcnqkakvypnvisi/Build/Intermediates.noindex/Projectname.build/Release-iphonesimulator/Projectname.build/Objects-normal/x86_64/Projectname
normal x86_64 (1 failure) Error: Error code 65 for command: xcodebuild
with args:
-xcconfig,/Users/anilram25/Project/0.2.9/platforms/ios/cordova/build-release.xcconfig,-workspace,Projectname.xcworkspace,-scheme,Projectname,-configuration,Release,-sdk,iphonesimulator,-destination,platform=iOS
Simulator,name=iPhone
X,build,CONFIGURATION_BUILD_DIR=/Users/anilram25/Project/0.2.9/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/anilram25/Project/0.2.9/platforms/ios/build/sharedpch
[ERROR] An error occurred while running cordova build ios --release
(exit code 1).
Please suggest me some solutions.
Make sure you have a development provisioning profile configured in Xcode.
Try to remove and add ios again:
ionic cordova platform remove ios
ionic cordova platform add ios
And make sure you have the latest platform update:
ionic cordova platform update ios
It has been a year since I first build the app, and of course my iPhone software has updated since then. With that I was informed that I needed to update Xcode in order to get the right platform to get a release version for my cordova app updates. Updating xcode required me to update the OS to Sierra on the mac. After that, I have been unable to remotebuild even my debug version, which I had been able to do before.
My constant issue right now is that when I build the app in remote build it keeps adding "ios": "4.0.1" to the platforms.json file, but the error I receive is that with xcode 8.3 I need 4.3.0 or greater.
I cannot figure out how to update this value. I have upgraded npm, node, everything that I can think of. Nothing changes the value, and I can't seem to find anyone else with my problem.
Any help or suggestions would be welcome.
First, open up project platforms folder and delete ios folder. Then update cordova on your development machine and Mac.
For Mac : $ sudo npm install -g cordova
For Windows: npm install -g cordova
Just check whether your files getting deployed to the Mac build folder path. If so, open up the project using XCode.
Then build your project using XCODE. Most probably there will be an error to choose the development team. Once you select the account or the team fom dropdown list you can deploy the app without any issues.
That worked for me. Hope this will help you too.
Another way: Navigate to platforms folder -> platforms.json. Check the IOS version. Change it to 4.3.0 and delete the ios folder and add IOS 4.3.0 via command prompt.
packages.json
{
"android": "5.1.1",
"ios": "4.3.0"
}
in cmd Run
cordova platform add ios#4.3.0
Well, be ready for many actions to be done but in the end it works. )
Update your XCode to 8.3.3 without worry.
Then be sure to update your remotebuild to the latest version that is currently 2.1.3 by running sudo npm i remotebuild -g on your Mac.
Get back to your development machine with Visual Studio and run some command line utility in administrator mode. Open you cordova folder from there.
Execute cordova platform rm ios to remove the current ios version under cordova. It's also advised to remove the android one by cordova platform rm android.
Update the version of CLI you use for builidng on Visual Studio. Currently it's 7.0.1. There were people that claimed that 6.5.0 also works but in my setup 7.0.1 works as well.
Get back to your command line and run cordova platform add ios#4.4.0, This is the minimal cordova ios that supports the cordova 7.0.1.
In case you removed android as well then run cordova platform add android#6.0.0. There are more progressive versions of cordova android but I found them not working.
Now get back to your Mac and remove the following folder ~/.taco-remote/node_modules.
In case you don't see this .taco-remote folder it's the hidden one so run in command line of your Mac com.apple.Finder AppleShowAllFiles true and then killall Finder to close all instances of Finder. Afterwards .taco-remote folder should be visible under your user folder ~/.
Now go back to Visual Studio and open Tools > Options > Tools for Apache Cordova and run Clear Cordova cache.
Now run your ios and it should succeed.
In case you run afterwards your android build and it fails on something like Android platform already added run the Clear cordova cache again and then your android build also should succeed.
From this point both ios and android builds should work.
Whooof. )
Good luck!
BTW, most of this solution came from this thread.
Updated Xcode this morning and now ionic project wont deploy to a device.
ionic run ios --device
Returns:
** BUILD SUCCEEDED **
xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH
Error: Error code 72 for command: xcrun with args: -sdk,iphoneos,PackageApplication,-v
No idea what to do to fix, Googling returns lots of options but none correct.
Cordova is trying to use "PackageApplication" tool. But it was removed since Xcode 8.3. Either downgrade Xcode or wait for Cordova to have a fix for that.
Linked in the Jenkins issue that matson kepson mentioned here there was a guy who attempted a PR to fix the issue. There was some unfinished change requests in his PR and I also found a few null ptrs in his changes. I forked his pr and fixed these things here and there is now a snapshot linked here that you can download and become unblocked until such a change is merged into the full build.
Hi its official Bug from jenkins
here you have a fresh status
https://issues.jenkins-ci.org/browse/JENKINS-43163
Little bit clearer to look at this:
http://subathrathanabalan.com/2016/01/07/building-ipa-export-archive/
I've just come across this and my solution was to remove the iOS platform from the project:
ionic platform rm ios
Then add it back in again
ionic platform add ios
I needed to run an initial build for it to fail with no signing set, so opening up the project in Xcode to just fix that. After that, building via the ionic cli worked as expected. I am guessing that re-adding the platform pulled in a new version of cordova-ios.
Update: I had only started on this project and created the base project from the blank template. I have Xcode 8.3.1 installed and using Ionic 3 (still with the --v2 switch with ionic cli).
I used shenzhen this automatic procedure encountered a similar problem, and finally in accordance with the github Pull Request to solve my problem, hope for your reference!
https://github.com/nomad/shenzhen/pull/347
I found a workaround to solve this using command line, with device connected on your mac:
ionic build ios --device
ios-deploy --noninteractive --debug --bundle build/device/YOURAPP.app
After this, stop debug using Ctrl C, and your app will be working on your device.
Hope work for you guys.
The is caused by the deprecated PackageApplication. If you're using the remotebuild tool to run from Windows, it will be solved when the remotebuild bug has been fixed: https://github.com/Microsoft/remotebuild/issues/26
Another solution is to downgrade XCode.
Here if the explanation on how to uninstall current XCode.
And here you can download XCode 8.2.
An option is open a .xcodeproj file located at platforms/ios and run the project directly from Xcode.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I am using ionic to develop an app and everything had been working fine for some time.
However, I have recently updated to xcode 7.x so that I can compile for iOS 9. Now, when I run ionic prepare ios to generate the ios platform files and click on the *.xcodeproj file, I get the following error:
The file couldn't be opened.
The file can open just fine in xcode 6.x
I need it to work in xcode 7.x for the app to build with later SDK versions
Side note: I have searched for answers to this issue but in other cases the error message is more descriptive. The error message I get does not give a reason why it cannot be opened, be it permissions or parsing issues or otherwise, so I am stumped as to how to fix this. I have tried deleting (null) lines in files and deleting my <user>.xcuserdatad files as suggested in these answers anyway to no avail.
Cordova CLI: 5.4.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.7.12
Ionic App Lib Version: 0.6.5
ios-deploy-version: Not installed
ios-sim version: 5.0.4
OS: Mac OS X El Capitan
Node Version: v4.2.4
Xcode Version: Xcode 7.2 Build version 7C68
Question: why am I getting this error message and how I can fix it?
I have reinstalled El Capitan, xcode 7.2 and the necessary libraries (ionic, gulp, ..) and everything works fine now.
Curious...
I had the same problem, and it was caused by a different format of Xcode project file. If the project is compiled with the old Xcode, the new one cannot not open it.
I suggest you to remove any build file to make sure that next time project is really compiled, and if problem persist, remove also the old version of Xcode, because it looks like it is the one used to compile the project.
Alternatively, maybe ionic CLI has some option to select which Xcode it should use.
2 possible solutions:
1. Ionic configuration value
It seems that somewhere in your project, a config value makes ionic still think you use XCode 6 because you were using it before, and so continues to generate the project file accordingly.
What happens if you start over, in another directory, from a starter project file:
ionic start myApp tabs
ionic prepare ios
Can you open the generated XCode project file?
If yes, I suggest you to copy over this starter project all the files from your original project.
2. Update nodeJs to the latest version
I see you use node 4.x.x, try updating to 5.x.x.
I had something similar after updating Xcode, the git command line tool won't work after updating, turns out I had to open the Xcode and accept the license for new Xcode after that everything worked fine.