When i try to build : ionic cordova build ios apk, i got this below message . Could u plz help me . Thanks
cordova build ios
(node:18556) UnhandledPromiseRejectionWarning: xcodebuild was not found. Please install version 7.0.0 or greater from App Store
(node:18556) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:18556) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I have installed everything as follows
[11:41:11] lint finished in 13.88 s
PS C:\Users\user\myApp> cordova -v
8.0.0
PS C:\Users\user\myApp> java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
PS C:\Users\user\myApp> javac -version
javac 1.8.0_101
PS C:\Users\user\myApp>
iOS apps are packaged as .ipa, not .apk which is for Android.
You need Xcode and the iOS SDK to build an iOS .ipa.
Unfortunately, both are only available on a Mac.
As explained in the ionic docs, they mention that the only option is to use Ionic Package:
iOS
The iOS SDK does not run on Windows, so nothing to do here. Still
want to build for iOS, though? Check out Package, part of the Ionic
Cloud.
From the Ionic Package docs:
Packaging Native Binaries
Ionic Pro’s Package feature makes it easy to build native app binaries for iOS and Android in the cloud.
Perfect for automating binary builds and for developers using Windows
that want to build iOS apps.
That's your 1st option.
A 2nd option would be to use a Mac instead as your development environment.
If you're planning to be developing iOS apps long-term, then you really need a Mac.
(You can build Android .apk's on a Mac but not the other way around.)
A 3rd option is to run Mac OS on a virtual machine or setup your own "Hackintosh".
Though, doing some researching will tell you that that's going to be a complicated process in itself, and it's not recommended due to instability issues.
I suppose your are trying to create ipa file. There is nothing called "ios apk".
You need a macOS machine to create ipa.
ipa files can not be created on windows machine.
Related
I install "ionic cordova run ios" on my PC (Windows 10) but I got an error message
"[ERROR] An error occurred while running subprocess cordova."
Does anyone know how to fix this?
To build an app for iOS you need to have the xcode command line tools installed. Cordova looks for these tools before building. If you don't have that, you can't build your app for iOS.
If you want to build your app for iOS you'll need a Mac with xcode and Cordova installed. Or you could use a virtual machine to do it. For more information on the virtual machine option have look here
I'm using the open source Titanium CLI for updating an app that's currently in the Apple app store. It builds and runs in the simulator without any problems using the command
ti build -p ios
When I try to build for the app store I use the command
ti build -p ios -T dist-appstore -R <company> -P <distribution certificate>
and get an error message
[ERROR] titanium_prep failed to run (10)
[ERROR] This application cannot be built with the Titanium open source SDK because it is an Appcelerator Platform registered application. Please use the Appcelerator Platform CLI tools or Appcelerator Studio to build this application.
I've unregistered the application with the Appcelerator Platform, but it hasn't corrected the problem.
I'm using Titanium Command-Line Interface, CLI version 5.0.6, Titanium SDK version 6.0.0.v20160131225447 and Node version 0.12.7.
Any help resolving this would be greatly appreciated.
There is a migration guide at https://github.com/m1ga/from_zero_to_app/blob/master/appc_to_ti.md
It seems you need to use a GUID that is not registered with appcelerator in the tiapp.xml.
It's also worth removing any <appc-...> or <property name="appc-..."> references to appcelerator services that will be turned off, and set <analytics>false</analytics>
I'm on a Mac with node 0.12 and I was having the same issue with Titanium SDK 5.X.X, but I have changed it to 4.X.X and now I can compile without errors.
I hope you don't need Titanium SDK 5.X.X. or 6.X.X to make your code run...
I met the same problem.
Solution:
re-create your app using $ ti create
or, just build this app using $appc ti build ...
Long explanation:
Our experience is: don't create ti app using $ appc create, just use $ ti create ...
in China mainland, the appc command is not usable at all because of GFW.
I found the related file is the titanium_prep file, which is binary, I can't see any useful information there.
You can't simply edit tiapp.xml and remove the appc/acs attributes to solve this problem
this problem will not occur if you run your app on IOS simulator.
Also, don't downgrade to Titanium 4.X. That means your app won't run at the latest devices.
I'm unable to compile my app for iOS locally, Android works OK.
I have installed both cordova and phonegap using npm install -g [...]. I am running OSX (10.7.5).
Version outputs from both:
$ cordova -v
5.1.1
$ phonegap -v
0.9.4
I have XCode installed (v 4.6.2). I also have the command-line tools installed.
Both the cordova and phonegap tools fail to build, seemingly for the same reason. Running phonegap build ios outputs:
$ phonegap build ios
phonegap detecting iOS SDK environment...
phonegap using the local environment
phonegap compiling iOS...
error ENOENT, no such file or directory '/Users/mike/apps/***/platforms/ios/__CLI__/config.xml'
Here is the output from the same cordova command:
$ cordova build ios
cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/mike/apps/***/platforms/ios/__CLI__/config.xml
cp: no such file or directory: /Users/mike/apps/***/platforms/ios/platform_www/*
Parsing /Users/mike/apps/***/platforms/ios/__CLI__/config.xml failed
Error: ENOENT, no such file or directory '/Users/mike/apps/***/platforms/ios/__CLI__/config.xml'
at Error (native)
at Object.fs.openSync (fs.js:500:18)
at Object.fs.readFileSync (fs.js:352:15)
at Object.module.exports.parseElementtreeSync (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/util/xml-helpers.js:118:27)
at Object.ConfigParser (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/configparser/ConfigParser.js:33:24)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:115:32
at Array.map (native)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:70:40
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
It seems to me that there should be some replacement running on __CLI__ in the path that isn't happening, but it's difficult to tell. Below is a screenshot of the file structure this generates:
I am able to build using the remote build service, but it's quite laborious, as the app isn't properly loading so I need to do quite a bit of debugging to sort this out.
Node is installed at version 0.12.5. NPM is installed at version 2.11.2.
I have reinstalled the platform numerous times, and always get this error.
This question is a little old, but I'll throw a few things out there:
I've got a command line build of my ios platform running -- it does not have an __CLI__... subdirectory. Just a data point.
I'm wondering if there isn't something weird with the way Xcode is set up in relation to its build path. See this answer to make sure the output directory is set correctly: still getting <Cordova/CDVViewController.h> file not found error in xcode. I've got a desktop and mobile app set up in Xcode, and I have to remember to switch this setting back and forth.
PhoneGap / Cordova have been phasing out older versions of ios with their newer releases. It would not surprise me if cordova 5.1.1 did not support Xcode 4.6.2. You might want to try with an older release of the cordova library.
I typically use the Titanium CLI to build my project using a command like the following:
ti build --skip-js-minify -p ios -T simulator -Y iphone --retina --tall --sim64btin
Now that Titanium 3.4 SDK is out and supports iOS 8 and XCode 6, I expected that I would be able to easily launch my app in the new simulators. But currently it seems to be defaulting to the iPhone 4s sim.
What am I missing?
There are several ways to do this, including importing the .xcodeproj into XCode, but I find my way to be more convenient personally. It's not perfect, but this is what I'm currently doing, and how I got there.
Some inspection of the Titanium SDK source reveals that the CLI uses a binary called ios-sim to actually launch the simulator. Some googling will reveal that this is a node.js package. I happened to have this installed, but I'm not sure if it was installed by Titanium or not - the build script uses a binary that is packaged in the SDK.
Console output:
RalphsMBP:~ trey$ which ios-sim
/Users/trey/npm/bin//ios-sim
RalphsMBP:~ trey$ ios-sim --version
2.0
The documentation says this about Xcode6:
Supports Xcode 6 only since version 3.x.
So step 1:
sudo npm install -g ios-sim#3.0
ios-sim --version
You should now be at 3.0.0.
My first thought was to replace the binary in the Titanium SDK with the newly installed binary from npm. I thought that perhaps the arguments to ti build would be passed directly to ios-sim. This turned out to be a dead end (The builder.py script is a mess in my opinion - rewrite it already!)
Fortunately it's still pretty easy to write a build script to launch in your simulator of choice using the new devicetypeid option to ios-sim. Use ios-sim showdevicetypes to get a list of valid device type ids. This is my iPhone 6 build script:
ti build -b --skip-js-minify -p ios && ios-sim launch ${project_path}/build/iphone/build/Debug-iphonesimulator/${project_base_name}.app --devicetypeid com.apple.CoreSimulator.SimDeviceType.iPhone-6
The variables are part of the sublime text build system, but you can apply the concept any way you want. The -b flag is --build-only, and I think the rest is pretty self explanatory.
I have just downloaded the latest Mono for Android (v4.0) and am trying to load a test app into a level 14 API emulator. In both Visual Studio 10 and Monodevelop, I am getting the same problem when packaging the app. Here's what I get in VS.
monodroid : error 1: System.InvalidOperationException: Unsupported configuration: Could not load resource 'libmono-android.shared.armeabi-v7a-emu.so'
I have installed the "ARM EABI v7a System Image" using the Android SDK manager. I can see the system.img file in C:\Users\\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK\android-sdk-windows\system-images\android-14\armeabi-v7a.
I created an emulator using level 14 API, and this starts up and runs without problem. I modified the project properties to target Android 4.0 and the armeabi-v7a architecture. The app is simply the unmodified test app created automatically when you select the android application template. I am running Vista.
Can anyone shed some light on this?
Thanks, Stuart F.
The evaluation version does not allow you to build the armeabi-v7a version, because there was never a armeabi-v7a emulator until now, and the evaluation version only allows you to deploy to emulators.
Use the armeabi version, which should work fine on the armeabi-v7a emulator.