Is it possible to code in Swift and deploy to real life devices on Windows? [closed] - swift

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I have been researching and could not find a full definite answer whether Swift could be possible to study, compile and deploy somewhere.
Will Apple ever allow another platform to use it?
I mean, if it is possible to deploy on certain real life devices, simulators etc.

Straight answer: Yes, you can code, compile and run Swift applications in Windows. In reality, this appears to be more of a curiosity/proof of concept thing than something that is really ready for enterprise use, so I would be wary of choosing Swift under Windows as the platform for a major project.
Supplemental links:
Here is a Swift compiler for Windows: https://swiftforwindows.github.io/
There is an article on Swift under Windows here: http://www.infoworld.com/article/3067364/open-source-tools/swift-for-windows-arrives-at-last-but-as-an-unofficial-port.html

Right now Swift is only for MacOS, iOS and linux devices available. While there are unofficial ports for windows like this one: Swift for Windows and Robert mentioned. The best solution right now to have the latest version of swift and run it is to buy either a Mac or an iOS device or an ubuntu device.

Code, debug, run? Yes. Deploy for Windows? No.
There is an unofficial Windows port which is not ready for production, or maybe not even aimed for production, but more like an academic project.
However, let's look at slightly relaxed demands a bit -- that will get much more interesting!
If you only want to:
Practice Swift development on Windows,
contribute to a Swift project with no need to distribute,
or deploy to Linux (like to a server), but develop on Windows,
... then, yes, you can, even using the official tools and with no virtualization trickery.
Windows 10 Anniversary Update comes with the built-in Linux subsystem called "Bash on Ubuntu on Windows", which in turn supports the Linux version of the Swift compiler. With this feature enabled, feel free to develop in your favorite Windows IDE or text editor, and compile to your heart's content on the Bash command line. The Linux subsystem will have full, transparent access through the full Windows file system via mount points at e.g. /mnt/c/, etc.

With a bit of work you'd be able to but not natively which may be what you're looking for.
You can run a virtual instance of Mac OSx using VMWare or something similar but as of now Apple is currently keeping XCode and all development natively on their operating system. Otherwise you're left with third-party solutions like Swift for Mac that don't truly emulate a natural environment.
See this answer for more although it's iPhone focused the foundation behind it all is there: How can I develop for iPhone using a Windows development machine?
EDIT: It looks like Robert Columbia may have a recent solution that may be what you're looking for.

Related

Starter kit for iphone beginners? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to start developing for iPhone.
I don't have mac.
After reading this question which talks about android , I was wondering :
Is there any site which gives :
What you need to download ( for PC users)
How to configure it
sample code for beginners
There is a lot of info but I didn't find any centralized place for beginners.
Thank you.
For iPhone, you will always need a Mac if you're thinking about doing Native Apps. (Apple make it clear in all Keynotes: Apple Software + Apple Hardware)
Every Android developer here knows it's a pain to test their app in all Android Devices out there cause no one has the same Operating System, they always have a changed version for each mobile company, Apple makes it clear that you need to use their, and only their equipment
Even if you're doing an HTML App and wrap it up with a wrapper framework like PhoneGap, you will need a Mac to compile the code and give you the packages to upload into AppStore.
There is other Frameworks like Titanium witch they will support Windows machines, but I don't recall how they compile the code to the AppStore, probably the same way as PhoneGap, and for that you will need a mac.
PhoneGap and Titanium, as well Sencha Touch, are Frameworks that you can use a language that you know best (HTML and Javascript) - Only Javascript in Titanium and Sencha, and outputs the code in a way that is very similiar to a Native App, and can be easily port to any other OS like Android, Windows Phone 7, Meebo, etc. Just read a little about each one.
Sencha and Titanium are paid frameworks, while PhoneGap is free.
Best approach if going Native on this is buying a used MacMini from eBay or similiar, or even run a Hackintosh (OSX for Windows Machines) in a VM... end to end, you will always need a Mac.
And there is MonoTouch as well, now from Xamarin and the amazing team of Miguel de Icaza.
Even though, you do need the Mac to convert .NET code into "Objective-C" (for the ones that know the compiling process, it's machine code, but for the OP, it's simpler to assume this).
You can use Visual Studio in a Windows machine to program, but you will never compile or even run or debug... you will always need MonoDevelop (The Visual Studio of Mono) and a free MonoTouch license to run and debug in the Mac iPhone Simulator, but you will need a paid license for going to the AppStore.
just for clarification, you can develop everything for Android using Mono for Android, as the Framework where Android runs exists for both Operating Systems (Java), and for this, you will have the ability to use Visual Studio to code, compile and run in the Android Simulator.
As said in the beginning ... you will be best with a used Mac :)
You can indeed develop for iOS on a PC for non-AppStore (jailbroken) purposes - you'll need Linux or Windows+MinGW and the opensource toolchain - I've written some build instructions at http://github.com/H2CO3/ios-toolchain
Also, if you have never done any C programming, I suggest you to grab a copy of K&R C and you begin Objective-C only after mastering C or else you'll be confused regarding the basics.
Centralised information for begginer you can get there: "CS 193P iPhone Application Development" from Stanford Univercity. This is great cource with video lectures and homeworks.
And you should have mac (or hackintosh).
EDIT: Course also available in "iTunes U"
I'm kind of a beginner too. I've started one year ago and have good information for you, where to start.
xCode on Windows: Forget it! You have to work with a Mac.
I don't understand what you need to know under this point..
*3.*There is lot of good stuff free available, if you know where:
A good site is Ray Wenderlich
Another option are Potcasts on iTunes U from the Stanford University.
Follow this along for a while and you will be ready to make your one projects!
And if you need help, this site is a gold mine :-)
The right place to start would be
https://developer.apple.com/
You really need a Mac to develop for Mac. You can do Mac development using Hackintosh but it may be illegal to do so.
For developing iOS and Mac Apps, you will need the Xcode IDE which you can download from the Mac App Store.
The Dev Center has all the documentation you need.
iOS Dev Center:
https://developer.apple.com/devcenter/ios/index.action
Mac Dev Center:
https://developer.apple.com/devcenter/mac/index.action
If you like learning by examples, a good place would be http://appsamuck.com/
You can also build HTML 5 apps for iPhone.

Write once deploy on Windows Mobile 6, Windows Phone 7, Android and iPhone? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Was just wondering if there were any cross platform development platforms which would run great for corporate type apps on various mobile devices.
Would be ideal if the language was C# but feel free to suggest others.
If you're happy to re-use business logic and write device specific user interfaces (more work, but better user experience on each device) you could consider the various Mono frameworks.
Writing the core business logic as a class library, then writing specific user interfaces using MonoTouch, MonoDroid and Windows using .NET Framework you'll have a cross platform application (albeit with individual UIs) in C#.
have you checked out Titanium at http://www.appcelerator.com
And then there is the PhoneGap at http://www.phonegap.com/
Worth noting that you'd be writing once for the PLATFORM, but being certain that your app works on the DEVICES is a different kettle of fish due to the variety of handset providers, their customized platform implementations and the hardware specific to the device.
Check out these related questions... otherwise know as duplicates....
Developing cross platform mobile application
Are there any huge differences between objective-c and Java, or iPhone and Android?
What work has been done on cross-platform mobile development?
Titanium Mobile is a popular choice these days.
I strongly doubt that you'll find a C# option* that's cross-platform since C# is tied to the Microsoft stack.
You could also just write a mobile-centric webapp with jQuery Mobile or similar.
*For mobile. For desktop, there's Mono (whose site appears to be down right now).
well if you've got a mac, your best bet would be to go for phonegap which supports a wide range of platforms,
if not, you could go for titanium
Although there are many platforms that provide you the facility to write once and run on multiple platform but from my point of view its not a great idea for simple reason of performance just think of below example
A C code is far faster than a java code because java provides you the virtual machine to run that code and java is far more easier to write than that of C. The idea is the more you stick close to native API the more you will get performance.
So considering the above example just think what will be the performance of such application that is supported on so many platforms
Note: I have not worked on any of such platforms so I might be wrong but this just a simple conception that fits to all
If you are used to working with Visual Studio, you can try Teleric's http://www.icenium.com/ . Icenium does not support Windows Mobile 6 though

Starting to learn to create iPhone apps [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Well I'd like to create apps for the iPhone, starting out with really really basic stuff and working up, but I don't have a Mac at the moment (well I do but it's a powerPC ibook G4, which you can't develop on) and before I invest I'd like to learn how to create apps.
I also read an article in a newspaper about how a guy starting creating apps (before Apple launched the app store) on his PC for the jailbroken iphones, then when Apple launched the app store he switched to created "legal" apps. (the article said he carried on using his PC but I'm not sure that thats true).
I'd like to do a similar thing, but I don't care about releasing any app to the jail broken iphones, I just want to learn on a PC and then I can decide to sell my ibook and save up for a Mac.
But I don't want to go out buy a Mac (expensive) and then find it's to hard for me to understand and have wasted £500 or whatever.
Free Stanford iPhone Dev Course
The 10-week course, iPhone Application Programming, is a hot ticket. It begins today and videos of the classes will be posted at Stanford on iTunes U two days after each class meeting (http://itunes.stanford.edu). Copies of the slides shown in class will be available there as well.
http://news.stanford.edu/news/2009/april1/free-iphone-software-development-course-apple-040109.html
(channeling for qux who pointed this out in a comment)
My sincere recommendation is to spend some time with XCode on your current iBook, and get comfortable with some Mac development in general.
iPhone and Mac development use many similar libraries (although obviously UI is completely different), and if you're well-versed in one, getting up to speed on the other isn't tremendously difficult.
This will let you know whether to invest in an Intel-based Mac and continue onto iPhone development.
XCode should have come with your Mac on the installation discs. You'll need to use that copy, because the one at http://developer.apple.com is Intel-only.
For getting started books, I recommend Aaron Hillegass's excellent Cocoa Programming for Mac OS X 3rd Edition.
If you go with sberry2A's recommendation of a hackintosh, then you can jump right into iPhone development, and can get the dev tools from Apple. Going this route, I still recommend the Hillegass book, and then supplement that with iPhone SDK Application Development by Jonathan Zdziarski.
If you're going to be focused primarily on Games, and already are fairly comfortable with C, instead of either of the above books, go directly to iPhone Game Development by Paul Zirkle and Joe Hogue. (I'm currently working through this one.)
As far as I know, prior to iPhone SDK 3.0, the SDK's were (inofficially) compatible with PowerPC. See iPhone SDK on PowerPC?.
As you already have an iBook G4, you could as well put Xcode on it (you can get the Mac SDKs - even for PowerPC - for free from Apple). Then try to write some Mac apps, as the Mac and iPhone APIs are very similar. If you like one of them, you'll most probably be happy with the other, too.
Already asked before:
https://stackoverflow.com/questions/718401/develop-iphone-apps-on-a-non-mac-system
iPhone development on Windows
Basically, you can develop on Windows, but it's a slow pain in the ass.
See e.g. here: http://www.chemlab.org/2009/02/20/scrap-the-mac-leave-the-os and detailed guide on how to do it here: How can I develop for iPhone using a Windows development machine?

Does Visual Studio 2010 support iPhone Development? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How can I develop for iPhone using a Windows development machine?
Does Visual Studio 2010 support iPhone Development?
I believe you can use Mono to develop for the iPhone. You can read more about this here www.mono-project.com/Mono:Iphone
This requires Static compilation, and I've heard the process is pretty difficult at this point. Here is an article that provides some details http://arstechnica.com/open-source/news/2009/01/open-source-mono-framework-brings-c-to-iphone-and-wii.ars
If you are beginning iPhone development similar to myself I'd suggest sticking with XCode and the Apple tools. Although they offer a different developer experience then we are used to from Microsoft tools, they seem to have a good helpful community around them.
Update: Mono Touch now allows you to do development using MonoDevelop and statically compile for the iPhone. Here is the link with more info http://monotouch.net/
Xcode must be used to develop for the iPhone. It is the only platform for which the iPhone SDK is available.
According to my knowlage, the iPhone SDK must be run on Mac OS system, so I dont think that
you will be able to develop using VS.
Okay, I know this post is old, but I feel as though I need to correct some things. First of all, it is entirely possible to develop for iPhone using Visual Studio 2010. The steps required to do so are long and complicated, but basically involve the following
(note: these are rough steps as I don't recall the exact commands I used to invoke these things, but I have managed to get a working ARM CortexA8 and A9 GCC compiler successfully running with the latest iOS Dev SDK on Win 7 x64 and using Visual Studio 2010)
Get Cygwin and make sure you grab the GCC compiler collection.
Get LLVM and the GCC front-end(not sure if Clang works as I haven't tried it)
Get ODCCTools.
Download the latest Xcode(from a torrent if you're on a PC). Note: Due to the fact that Xcode and the iOS SDK use various open source copyleft packages, Apple has to release the SDK to the general public for free. However, as of iOS 5, they've decided to make it so that only people using the App Store on a Mac can download it. I have attempted to contact Apple to see if they plan on releasing the various packages openly, but I haven't heard a response.
Compile LLVM
Compile ODCCTools. Note: ODCCTools requires some modifications in order for it to work with the latest LLVM GCC Front-end. I've contacted the current owner and he basically told me he is no longer supporting it.
Using the assembler and linker you just compiled from ODCCTools, recompile the GCC front-end.
At this point, you'll have a working compiler for the iOS platform using all the latest and greatest from the LLVM guys and the fixes and improvements that have been made to GCC(C++0x anyone?). Or, if you're really lazy and you don't want to go through all this hassle, you can use the compiler that is already generated from iphone-devtools. However, doing this will only give you a compiler that doesn't support the CortexA8 or A9 instruction set which means that your application will run a little slower, plus the are using an older version of GCC which means all the fixes and improvements that have been made in the last 4 years will be ignored.
All you need to do now is configure visual studio.
There are a few ways to configure visual studio to accept the new compiler you just made(or downloaded). I opted to use a python script which then generates makefiles and the various project/solution files, but you may want to choose something a little less heavyweight.
At this point, you should be able to compile for iphone, but in order to run on the iphone you need to jailbreak your phone. Jailbreaking is legal, but it does void your warranty. Once jailbroken, then you can use SSH to upload your executable to the phone and then you're done.
If you want to publish your app on the App Store, you'll still need to get a developer certificate and go through the publishing process outlined by Apple. At this point, you will need a Mac. If all you want to do is develop for the iPhone, then this will allow you to do so, but if you want to publish to the App Store, you will need a Mac.
The reason I went through the pain of doing all of this is because I have a very complicated setup for my continuous integration. I compile for 8 different target machines, 5 different configurations, and deploy and run massive amounts of unit tests. I didn't want to have to setup a different Mac box just to handle the iOS platform when I knew that I could just set it all up to run on one machine. Ultimately, trying to do iOS programming on a Win7 machine if iOS is your target platform is definitely not worth the hassle for ordinary developers.
Yes it is possible go to this link: http://www.pmbaty.com/iosbuildenv/
I don't think visual studio 2010 is supporting native iOS app development. But it is possible to write applications for ios using visual studio 2010.
As far as I am concerned, microsoft is trying to make it possible. According to my experiences of developing applications for iOS, I used mac air book, Xcode & iOS sdk for building iOS apps. The main language for building native iOS apps is objective c and the framework is cocoa touch. There is no support for these technolOgies in visual studio and .NET framework, although mono develop is trying a lot
iOS is the most advanced OS for mobile devices which is to us from Apple. According to their requirements for developing iOS apps you have to use:
Intel based mac OSX.
Ios sdk
Xcode or Dashcode.
All these are available on only apple mac. So no luck for .NET players. But you can pure c to develop ios apps on widows. Just google it.
I think it made you clear of the ios app developing processes, and it's requirement.
Thank you.
Due to the libraries used - I'm fairly sure you need to run this on a Mac OS System. You can do some basic gcc compiling using cygwin if you wanted to - but other than that I would think you'll need Mac OS
It's why most of us are stuck buying a Mac Mini - getting a putty knife and adding more RAM and then struggling to get our old LCD monitors to work
Apple supported development from within Visual Studio would be really great!
However, as far as i know Apple has absolutely no intention to release such a thing. Even the usage agreement that all iOS developers have to agree to disallows usage of the SDK on 'non-Apple branded computers'.
In my humble opinion, this is really a bad thing because it forces multi-platform applications to be developed on multiple operating systems.
Because of this, i have started implementing a Visual Studio 2010 package that allows for iOS development from within the IDE. To workaround the SDK agreement compilation is executed on a iOS powered device.
Development progress (including screenshots) can be folowed on:
http://www.petervrenken.nl/visual%20studio
Greetings,
Peter Vrenken
I think it's possible to identify a device/browser on the server side. Therefore, it should be possible to develop server-sided applications that behave like an iPhone app but run in the iPhone's Safari browser.
I could very well imagine that with VS2010 the device support is significant for the iPhone in the way that it comes with a special JavaScript Library that your Safari implicitly downloads the first time.
The Commerce Server appears to have a support like this already - good news for everybody who is not in love with Objective-C or maybe wants to minimize effort ind iPhone development
http://www.microsoft.com/downloads/details.aspx?FamilyID=2df25ab7-f38d-439e-9391-ef8f025e8064&displaylang=en

Can I write native iPhone apps using Python? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Using PyObjC, you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
You can use PyObjC on the iPhone as well, due to the excellent work by Jay Freeman (saurik). See iPhone Applications in Python.
Note that this requires a jailbroken iPhone at the moment.
Not currently, currently the only languages available to access the iPhone SDK are C/C++, Objective C and Swift.
There is no technical reason why this could not change in the future but I wouldn't hold your breath for this happening in the short term.
That said, Objective-C and Swift really are not too scary...
2016 edit
Javascript with NativeScript framework is available to use now.
It seems this is now something developers are allowed to do: the iOS Developer Agreement was changed yesterday and appears to have been ammended in a such a way as to make embedding a Python interpretter in your application legal:
SECTION 3.3.2 — INTERPRETERS
Old:
3.3.2 An Application may not itself install or launch other executable
code by any means, including without
limitation through the use of a
plug-in architecture, calling other
frameworks, other APIs or otherwise.
Unless otherwise approved by Apple in
writing, no interpreted code may be
downloaded or used in an Application
except for code that is interpreted
and run by Apple’s Documented APIs and
built-in interpreter(s).
Notwithstanding the foregoing, with
Apple’s prior written consent, an
Application may use embedded
interpreted code in a limited way if
such use is solely for providing minor
features or functionality that are
consistent with the intended and
advertised purpose of the Application.
New:
3.3.2 An Application may not download or install executable code.
Interpreted code may only be used in
an Application if all scripts, code
and interpreters are packaged in the
Application and not downloaded. The
only exception to the foregoing is
scripts and code downloaded and run by
Apple’s built-in WebKit framework.
Yes you can. You write your code in tinypy (which is restricted Python), then use tinypy to convert it to C++, and finally compile this with XCode into a native iPhone app. Phil Hassey has published a game called Elephants! using this approach. Here are more details,
http://www.philhassey.com/blog/2009/12/23/elephants-is-free-on-the-app-store/
Yes, nowadays you can develop apps for iOS in Python.
There are two frameworks that you may want to checkout: Kivy and PyMob.
Please consider the answers to this question too, as they are more up-to-date than this one.
An update to the iOS Developer Agreement means that you can use whatever you like, as long as you meet the developer guidelines. Section 3.3.1, which restricted what developers could use for iOS development, has been entirely removed.
Source: http://daringfireball.net/2010/09/app_store_guidelines
Pythonista has an Export to Xcode feature that allows you to export your Python scripts as Xcode projects that build standalone iOS apps.
https://github.com/ColdGrub1384/Pyto is also worth looking into.
The iPhone SDK agreement is also rather vague about whether you're even allowed to run scripting languages (outside of a WebView's Javascript). My reading is that it is OK - as long as none of the scripts you execute are downloaded from the network (so pre-installed and user-edited scripts seem to be OK).
IANAL etc etc.
BeeWare is an open source framework for authoring native iOS & Android apps.
2019 Update:
While Python-iOS development is relatively immature and likely will prevent (afaik) your app from having native UI and functionality that could be achieved in an Apple-supported development language, Apple now seems to allow embedding Python interpreters in Native Swift/Obj-C apps.
This supports importing Python libraries and running Python scripts (even with supplied command-line arguments) directly from your Native Swift/Obj-C code.
My company is actually wrapping our infrastructure (originally written in Python) in a native iOS application! It works very well and communication between the parts can be easily achieved via a client-server model.
Here is a nice library by Beeware with a cookiecutter template if you want to try and run Python scripts in your iOS app: https://github.com/beeware/Python-Apple-support/tree/3.6.
Technically, as long as the interpreted code ISN'T downloaded (excluding JavaScript), the app may be approved. Rhomobiles "Rhodes" framework does just that, bundling mobile Ruby, a lightweight version of Rails, and your app for distribution via the app-store. Because both the interpreter and the interpreted code are packaged into the final application - Apple doesn't find it objectionable.
http://rhomobile.com/products/rhodes/
Even after the latest apple press release - rhodes apps (mobile ruby) are still viable on the app-store. I'd find it hard to believe that tinyPy or pyObjC wouldn't find a place if there is a willing developer community.
You can do this with PyObjC, with a jailbroken phone of course. But if you want to get it into the App Store, they will not allow it because it "interprets code." However, you may be able to use Shed Skin, although I'm not aware of anyone doing this. I can't think of any good reason to do this though, as you lose dynamic typing, and might as well use ObjC.
The only significant "external" language for iPhone development that I'm aware of with semi-significant support in terms of frameworks and compatibility is MonoTouch, a C#/.NET environment for developing on the iPhone.
I think it was not possible earlier but I recently heard about PyMob, which seems interesting because the apps are written in Python and the final outputs are native source codes in various platforms (Obj-C for iOS, Java for Android etc). This is certainly quite unique. This webpage explains it in more detail.
I haven't given it a shot yet, but will take a look soon.