No folder platforms on Ionic project - macos

I've done the following steps :
create ionic project with command : run ionic start myApp tabs
add platform on ionic project with command : ionic platform add ios, ionic platform add android
I can't find the platforms folder on my project structure
This is my project sructure :
bower.json
config.xml
gulpfile.js
hooks
ionic.project
package.json
README.md
resources
scss
www
This is my ionic info :
Cordova CLI: 5.4.1
Ionic CLI Version: 1.7.13
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.8.4
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.4.1
Xcode version: Xcode 7.2 Build version 7C68
My question :
Where is the platforms folder ?

The platforms folder can't created when i create project in this directory :
~/Documents/TESTING Projects/IONIC
I tried to change my directory to : ~/Documents/IONIC, and everything working as expected

Related

Xcode XCBuild support error for ionic build

I have a ionic project that I am trying to build on iOS.
When running ionic build ios, it gives this error:
FIXME: Implement XCBuild support for macros in overriding parameters
with condition sets:
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
Error: Error code 1 for command: xcodebuild with args:
-xcconfig,/Users/Person/ProjectA/platforms/ios/cordova/build-debug.xcconfig,-project,ProjectA.xcodeproj,ARCHS=i386,-target,ProjectA,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/Person/ProjectA/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/Person/ProjectA/platforms/ios/build/sharedpch
I have tried:
Remove platform and add platform
Change CODE_SIGN_IDENTITY[sdk=iphoneos*] from iPhone Distributor to iPhone Developer in build-release.xcconfig
Re-did signing from xcode to try both automatic and manual signing
but all were not successful.
I am running:
Cordova CLI: 6.1.1
Ionic Framework Version: 2.0.0-beta.4
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.9.4
ios-sim version: 5.0.8
Node Version: v4.4.7
Xcode version: Xcode 11.1 Build version 11A1027
It is an old ionic version but able to run on my old macbook air (OS: High Sierra). I am now using a new macbook air (OS: Mojave) and trying to setup the environment.
Any suggestions?
I was getting this error after re-adding the iOS platform to my project with cordova#8.1.2/cordova-ios#4.5.4, even with a build.json file included in my project. I manually upgraded to cordova-ios#5.1.1 (by specifying the version in the cordova platforms add ios#5 command) and the error went away.

I cant get my ionic app to open in iOS emulator

My new ionic app won't run in the iOS emulator.
Its a fresh install of ionic and Xcode, these are my steps:
npm install -g ionic
ionic start myApp tabs
ionic cordova platform add ios
ionic cordova build ios
ionic cordova emulate ios
Then I get the following error:
No target specified for emulator. Deploying to undefined simulator
/localhost/myApp/platforms/ios/build/emulator/MyApp.app/Info.plist
file not found.
According to this thread (Fresh Ionic Fails to Emulate iOS 12 - Info.plist file not found) it should work with the following command:
ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"
But then I get the following error:
No target specified for emulator. Deploying to undefined simulator
Device type "com.apple.CoreSimulator.SimDeviceType.undefined" could not be found.
And then according to this thread (Issues starting iOS simulator from CLI) it should work by updating ios-sim like this:
cd platforms/ios/cordova && npm install ios-sim#latest
But I still get the following error:
No target specified for emulator. Deploying to undefined simulator
Device type "com.apple.CoreSimulator.SimDeviceType.undefined" could not be found.
Ionic:
ionic (Ionic CLI) : 4.10.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 4.0.1
#angular-devkit/build-angular : 0.12.4
#angular-devkit/schematics : 7.2.4
#angular/cli : 7.2.4
#ionic/angular-toolkit : 1.4.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : ios 4.5.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 4 other plugins)
System:
ios-deploy : 1.9.4
ios-sim : 7.0.0
NodeJS : v10.15.1 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61
The problem lie with ios-sim package which couldn't detect running simulators.
Updating to 8.0.1 with the following steps resolved the issue for me.
force update ios-sim to a working version
IMPORTANT needs to be done from inside the platforms/ios/cordova directory.
cd platforms/ios/cordova && npm install ios-sim#8.0.1
check if devices are now listed, takes a few seconds
ionic cordova emulate --list
installs appscript if not installed already
ionic cordova build ios
try to deploy to simulator
ionic cordova emulate --release --prod --livereload ios -- --buildFlag="-UseModernBuildSystem=0"
This will find any running simulator and deploy the app
Try just building the project and then running it from Xcode instead first.
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
Then open the platforms/ios folder in Xcode and you'll be able to run it from there plus see any errors there may be with the project. When you eventually decide to push the app to the store you'll need to do this anyway.
EDIT
Then try targeting a specific emulator:
ionic cordova emulate ios --list get list of available targets to copy into the next command.
ionic cordova emulate --livereload ios -- --buildFlag="-UseModernBuildSystem=0" --target="iPhone-X, 12.1" example targeting iPhone XR.
The issue is related to a breaking changes on Xcode 10 not already reflected on ios-sim. You can check on ion-sim repo issue "List empty of devices simulator with Xcode 10".
The issue have already been fixed but is waiting for a new release submission.
You can continue running your App on emulator directly from Xcode.

Ionic Unexpected key "NSMainNibFile~ipad" while parsing <dict/>

I am having an issue while using add platform ios command to build ios app in ionic project. The project builds successfully in android but not is IOS.
Command used:
ionic cordova platform add ios
Error:
Using cordova-fetch for cordova-ios#~4.5.4
Adding ios project...
Creating Cordova project for the iOS platform:
Path: ../../documents/a-copy/platforms/ios
Package: com.qodelogix.assurant
Name: Assurant Drive
iOS project created with cordova-ios#4.5.5
Installing "cordova-android-support-gradle-release" for ios
Installing "cordova-plugin-braintree" for ios
Embedded Frameworks in cordova-plugin-braintree
Added Arch stripping run script build phase
Installing "cordova-plugin-camera" for ios
Failed to install 'cordova-plugin-camera': Error: Unexpected key "NSMainNibFile~ipad" while parsing <dict/>.
Ionic Info:
Ionic:
ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : browser 5.0.3
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.0, (and 12 other plugins)
System:
ios-deploy : 1.9.4
ios-sim : 5.1.0
NodeJS : v8.11.4 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000
Please help me fix this error. Any help is appreciated.

cordovaProject.projectConfig.getFileResources is not a function in ionic project

I get this error, when trying to run an ionic app on android with livereload.
cordovaProject.projectConfig.getFileResources is not a function
When I try to re-install cordova, I get the same error. (npm install -g ionic cordova).
I removed the platform.
cordova platform rm android
and added it again:
cordova platform add android --save
All that changed nothing.
This is my ionic info output:
Ionic:
ionic (Ionic CLI) : 4.0.0
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 6.3.0
Cordova Platforms : android 7.0.0
System:
Android SDK Tools : 26.1.1
NodeJS : v8.11.4 (C:\Program Files\nodejs\node.exe)
npm : 2.15.12
OS : Windows 10
Environment:
ANDROID_HOME : C:\Users\lars\AppData\Local\Android\Sdk
Android Studion is up 2 date...
How can I get rid of that error?
Many Thanks

Building app from the cordova cli fails

Here's what I have installed on my machine:
cordova CLI: 6.5.0
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.11.0
Xcode version: Not installed
I'm writing an app with ionic 1.3.3 angular 1.5.3 and cordova 6.5
When I run this command:
cordova build windows --appx=uap
I get this error:
Processing settings for platform: windows
Building project:
C:\Users\aubrey\Source\Repos\SelfServiceApp\SelfServiceApp\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : debug
Platform : anycpu
C:\Users\aubrey\Source\Repos\SelfServiceApp\SelfServiceApp\platforms\windows\CordovaApp.Windows10.jsproj(61,5): error M
SB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Microsoft.VisualStudio..Defau
lt.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk
.
Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
I'm not sure why it doesn't work. The android build works.
It could be because the dependent plugin's source files are not set as "Content" type. Using cordova-windows version 5.0.0 might solve your error.

Resources