This guide shows how to set up your SDK development environment todeploy Cordova apps for iOS devices such as iPhone and iPad,and how to optionally use iOS-centered command-line tools in yourdevelopment workflow. You need to install the SDK tools regardless ofwhether you want to use these platform-centered shell toolsor cross-platform Cordova CLI for development. For a comparison of the twodevelopment paths, see the Overview.For details on the CLI, see Cordova CLI Reference.
Requirements and Support
Apple® tools required to build iOS applications only run on the OS Xoperating system on Intel-based Macs. Xcode® 8.0 (the minimum requiredversion) runs only on OS X version 10.11.5 (El Capitan) or greater, andincludes the iOS 10 SDK (Software Development Kit). To submit apps tothe Apple App Store℠ requires the latest versions of the Apple tools.
You can test many of the Cordova features using the iOS simulatorinstalled with the iOS SDK and Xcode, but you need an actual device tofully test all of the app's device features before submitting to theApp Store. The device must have at least iOS 9 installed, theminimum iOS version supported since the release of cordova-ios v4.4.0.
If you're versed in coding, you'll need to get familiar with Apple's development tools and their guidelines. Apple's known to restrict apps for all kinds of things, so it's good to know what you. When you create an app package (binary) to put on a device, you have to put your “digital signature” on it by code signing it. Otherwise, Apple won’t let that app be deployed on any device. Requirements: – You’ll need an actual iOS device. – You’re going to need to join the Apple Developer Program which costs $99/year.
Installing the RequirementsXcode
There are two ways to download Xcode:
Once Xcode is installed, several command-line tools need to be enabledfor Cordova to run. From the command line, run:
Deployment Tools
The ios-deploy tools allow youto launch iOS apps on an iOS Device from the command-line.
To install it, run the following from command-line terminal:
Project Configuration
Installing Xcode will mostly set everything needed to get started with the native side of things.You should now be able to create and build a cordova project.For more details on installing and using the CLI, refer to Create your first app guide.
Deploying to Simulator
To preview the app in the iOS simulator:
Only one simulator may run at a time, so if you want to test the app in a different simulator, you need to quit the simulator application and run a different target within Xcode.
Xcode comes bundled with simulators for the latest versions of iPhoneand iPad. Older versions may be available from the Xcode →Preferences.. → Components panel.
Deploying to Device
For details about various requirements to deploy to a device, referto the Launch Your App On Devices section ofApple'sAbout App Distribution Workflows.Briefly, you need to do the following before deploying:
To deploy to the device:
Signing an App
First, you should read through the Code Signing Support Pageand the App Distribution Workflows.
Using FlagsApple To Do App
To sign an app, you need the following parameters:
Using build.json
Alternatively, you could specify them in a build configuration file (
build.json )using the --buildConfig argument to the same commands. Here's a sample of abuild configuration file:
For automatic signing, where provisioning profiles are managed automatically by Xcode (recommended):
For manual signing, specifying the provisioning profiles by UUID:
Xcode Build Flags
If you have a custom situation where you need to pass additional build flags to Xcode you would use one or more
--buildFlag options to pass these flags to xcodebuild . If you use an xcodebuild built-in flag, it will show a warning.
Do You Need Mac To Develop Iphone Apps Rotate
You can also specify a
buildFlag option in build.json above (the value for the buildFlag key is a string or an array of strings).
Debugging
For details on the debugging tools that come with Xcode, see this articleand this video.
Open a Project within Xcode
Cordova for iOS projects can be opened in Xcode. This can be useful ifyou wish to use Xcode built in debugging/profiling tools or if you aredeveloping iOS plugins. Please note that when opening your project in Xcode,it is recommended that you do NOT edit your code in the IDE. This will edit the codein the
platforms folder of your project (not www ), and changes are liable to be overwritten.Instead, edit the www folder and copy over your changes by running cordova build .
Plugin developers wishing to edit their native code in the IDE should use the
--link flag when adding theirplugin to the project via cordova plugin add. This will link the files so that changes to the plugin files in theplatforms folder are reflected in your plugin's source folder (and vice versa).
Once the ios platform is added to your project and built using
cordova build , you can open it fromwithin Xcode. Double-click to open the ${PROJECT_NAME}/platforms/ios/${PROJECT_NAME}.xcworkspace file or open Xcode from your terminal:
The screen should look like this:
Platform Centered Workflow
cordova-ios includes a number of scripts that allow the platform to be usedwithout the full Cordova CLI. This development path may offer you a greaterrange of development options in certain situations than the cross-platform cordova CLI.For example, you need to use shell tools when deploying a customCordova WebView alongside native components. Before using thisdevelopment path, you must still configure the SDK environmentas described in Requirements and Supportabove.
For each of the scripts discussed below, refer to Cordova CLI Reference for more information on theirarguments and usage. Each script has a name that matches the corresponding CLIcommand. For example,
cordova-ios/bin/create is equivalent tocordova create .
To get started, either download the cordova-ios package fromnpm orGithub.
To create a project using this package, run the
create script in the bin folder:
To run the app, use the
run script in the bin folder:
The created project will have a folder named
cordova inside that containsscripts for the project-specific Cordova commands (e.g. run , build , etc.).
To install plugins in this project, use the Cordova Plugman Utility.
Upgrading
Refer to this article for instructions to upgrade your
cordova-ios version.
(Mac®, OS X®, Apple®, Xcode®, App Store℠, iPad®, iPhone®, iPod® and Finder® are Trademarks of Apple Inc.)
Whether this is your first Apple computer or you are just looking to upgrade, this guide will walk you through what things to look for when buying a Mac for app development. If you're wondering if you even need a Mac to make apps, check out this post.
Xcode
Xcode is the program we use to make apps for the Mac, iPhone, iPad and Apple Watch. It's created by the fine folks at Apple and is free to download. You need to make sure that the Mac you buy can run the latest version of Xcode. A good way to know if a Mac can run the latest version is to check if the operating system version is compatible with the latest version of Xcode. You can do this by searching for Xcode on the Mac App Store or by checking this page. At the time of writing, the latest version of Xcode is 6.3.1 and requires OS X Yosemite. You would want to then make sure that the Mac you buy can install or run OS X Yosemite.
RAM
In my experience, RAM is going to have the biggest impact on your coding experience. The more RAM your machine has, the more smoothly your coding will go. At a minimum, you need at least 4 GB. This isn't ideal but it will work. 8 GB is going to be the most bang for your buck. Most people don't need more than that. However, if you got the dough.. 16 GB or more is going to provide the smoothest experience. The difference from 4 GB to 8 is huge. 8 to 16 is slightly better, but might not be worth the money.
Please note that with most new Apple products the RAM cannot be upgraded. So if you are buying a new machine, maybe buy a little more than you actually need so that your machine will be more 'future proof'. If you are buying an older Mac, check online to see if you can upgrade the ram. Crucial has a good guide.
Buying New
I always recommend buying a retail Apple Store or from the official Apple website. They have the best customer service and are great with returns if you ever need one. If you are involved with education in any way (student, teacher, faculty, home school) you can get a pretty good discount through Apple Education Pricing.
Buying UsedIphone To Do List App
If you're buying used, you want to make sure you're buying a machine that works. Because of that, I highly recommend Craigslist. You can meet up with the seller and test the machine out for a while. Another option is eBay but there is some risk with whether what you're buying actually works. I have also heard that some universities have IT clearance sales where they sell old technology for cheap. This could also be a great option.
Desktops
Your three options here are a Mac Pro, an iMac, or a Mac Mini. For the Mac Pro and the Mac Mini please note that you'll have to provide your own monitor, mouse, and keyboard. All of these can be found at a second hand goods store for under $100. So now the question is which do you buy? If ya filthy rich and you know it, get the trash can. No better machine on the planet in my opinion.
![]()
So you're not filthy rich eh? Well the question is then between the iMac and the Mini. The Mini is definitely going to be cheaper. Even after getting your keyboard, monitor, and mouse the Mini is a much better deal. So if you have the budget for it, the iMac is very stylish and is a solid machine.
Do You Need Mac To Develop Iphone Apps OfflineLaptops
Maybe the biggest reason to get a laptop is the portability. I personally have a MacBook Pro and I love taking it to programming meetups, the library, on the plane, and tons of other places. Portablity rocks :)
The big value buy in laptops is the MacBook Pro that does not have a retina screen. The hard drive and RAM can both be upgraded. This is a great way to make a really fast machine. But, the retina MacBooks are VERY nice on the eyes. Also when working on a smaller laptop screen, the retinas are going to make you feel like you have more space. Then comes the question of 13' vs 15' screen. For me, the 15' is just too big. For other, they love the extra space on the 15' and claim they can't live without it. Personal preference on this one.
Also, the MacBook air and the new super slim MacBook are a fine option for making apps. I have heard the 11' Macbook air can be really frustrating with it's tiny screen but I know people that make it work. Why cannot use note app on mac. https://xaeohi.weebly.com/blog/origin-app-not-opening-mac.
The Final Word
So there are a lot of great Macs out there. The most important thing to be sure of is that your Mac will run Xcode. After that, the rest is really just personal preference. Let me know in the comments if you have any questions. And if you have a Mac, I'd love to hear which one and why you like or dislike it :)
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |