What are the pros and cons of using Swift for a Mac app? [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'm starting development of a new app, with no existing codebase to reuse. I'm very comfortable with Objective-C, but wanted to build the app in Swift, given that that's the future. But before that, I have a few questions:
Does the Mac App Store accept apps written in Swift?
Swift 3 isn't binary-compatible, so does that mean that the next version of macOS might break my app? Might I end up with a situation where I'll have to maintain two binaries for different versions of macOS?
Are all the Xcode debugging tools available for Objective-C also available for Swift?
Are there any other factors that relevant to this decision?

I don't see any restriction regarding Swift apps. They are accepted in the Mac App Store and whatever version of Swift you use, they'll be compatible with recent and future macOS versions. And the debugging tools work for Swift as well.
Having said that, there are advantages and disadvantages:
Advantages:
Modern language, superior to Objective-C
Full commitment by Apple
Can easily be mixed with Objective-C (e.g. with 3rd party libraries)
Disadvantages:
Bigger app as all apps need to be bundled with Swift Runtime libraries.
It's not possible yet to create binary libraries in Swift. They have to be distributed in source code.
Refactoring in XCode only works for Objective-C.
The language is still evolving. Even though XCode helps to upgrade if the language changes, there's still manual work and retesting involved.

Related

With Swift open sourced, what would it take to have it running on the JVM? [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 7 years ago.
Improve this question
I program in Objective-C and Swift primarily and understood Apple's announcing Open Source Swift by end of year as a move to make it available for backend programming as well. To quote Craig Federighi (SVP Engineering) in the keynote “We think Swift is the language we'll be doing application and systems programming”. The mention to systems programming and the mention that there will be libraries for Linux seems a clear indication on the path to using as a backend development language as well.
So my question relates to two possible paths that could take. On the one hand, Swift's page says that “Using the incredibly high-performance LLVM compiler, Swift code is transformed into optimized native code that gets the most out of modern hardware.” This would mean that it would have to be compiled for each target hardware I assume. Is this assumption correct?
On the other hand, if Swift was compiled to the JVM I assume it would make Swift's adoption much wider and faster because it could take advantage of the JVM's hardware independence.
I guess the point of my question is: are these two assumptions above correct? Would it even be possible to compile Swift to the JVM? If so, what advantages and disadvantages would it have over native code to each target hardware.
I am curious to understand if this is on the ballpark on how to think about this development for Swift.
LLVM IR can be used as a platform-agnostic binary distribution method. Google does exactly this with PNaCl. http://www.chromium.org/nativeclient/pnacl/introduction-to-portable-native-client
I don't know if JVM provides advantages over LLVM IR but it's not the same as locking into one exact binary format.

How to make the application for all version in iPhone [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 8 years ago.
Improve this question
I am beginner in iPhone.
I want to make the iPhone app that compatible for all iPhone versions like 3 and above.
Please help me What to set in the project to make it compatible to all version.
Thanks in advance.
You should set the deployment target in the target summary.
Edit: Xcode 4.5.x only supports iOS 4.3 and later so you can't support iOS versions below it.
Edit 2: If you are using and old version of Xcode this might be helpful for you. iOS 3.x support in Xcode 4
But you should think twice before writing an application that targets iOS4 and above.
Targeting to old versions of iOS means that you must not use any of the API's of the next iOS versions such as ARC and auto layout. As a result your code will be harder to maintain and some features would be impossible to implement.
Before going on with it, think about how many users will you satisfy by supporting iOS4. Read these thousand words from apple and then decide for yourself

iPhone development tools and languages [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 9 years ago.
Improve this question
I want to build an iPhone application with very rich user interface. I learnt Obj-C. I wanted to know what all technologies/languages I need to know further for developing such kind of apps.
What are the recent technologies used to develop iphone apps?
Please let me know.
Thanks,
AE
I have done Google for you, really very tough task to do it
Start with
video tuorials from youtube of standford university:-
http://www.youtube.com/watch?v=_Qn-JUtQrsM
Then you can start with
https://developer.apple.com/programs/ios/gettingstarted/
http://www.raywenderlich.com/tutorials
http://mobile.tutsplus.com/category/tutorials/iphone/
http://iphonelearning.wordpress.com/2011/08/05/beginning-iphone-development/
You can read apple docs,its very simple and good
How to develop iphone app
Tools
Xcode provides tools to manage your entire development workflow—from creating your app and designing your user interface, to testing, optimizing, and shipping your app to the App Store. You can customize Xcode to suit your style of working, keeping you focused on the task at hand.
Languages
Objective-C is an elegant object-oriented language that powers all iOS apps. You write Objective-C code to create your app, and you need to understand this language in order to use most application frameworks. Although you can use other languages for development, you can’t build an iOS app without Objective-C.(But we can use Apache cordova(phonegap) for developing non native app )

UPnP for 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 8 years ago.
Improve this question
What free upnp library would you recommend for iPhone development? It has to support control point features and allow to serve files off from iPhone.
There is an open source project on Sourcefourge that will do this called CyberLink for C
It is written in C which integrates with Objective-C easily, but they provide Objective-C wrappers also. With it you can create UPnP applications easily with Objective-C on Mac OS X.
This is not to be confused with the Cyberlink DVD player software. They are two completely different things.
Consider this one: http://code.google.com/p/upnpx/
There is also MiniUPNP, http://miniupnp.free.fr/ which is open source. It is in C and written for POSIX, no idea if that works on the iphone.
This is another vote against CyberLink. Lots of bugs, basic functionality is missing, and way too slow on mobile devices (I think the main performance problem is that it is designed around DOM based XML parsing rather than SAX based).
I have heard a lot of people mention using the Platinum UPnP library, but so far I haven't found any Obj-C wrappers for it. I may just bite the bullet and do that soon.
Does anyone else know of a Platinum Objective-C wrapper?
I'm currently playing with the CyberLink, and it's loaded with bugs :(
I think that the Portable UPnP should be better, as it's actively maintained (although the last release was several years ago, the subversion repository is constantly updated).
As you asked this question almost year ago, I wonder how things turned out.
You can use ohNet. It contains both control point and device stacks, is available under a BSD license and has C++ and C APIs which are usable on iPhone.
(Disclaimer: I have contributed to this project)

simulating iphone on windows? [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 8 years ago.
Improve this question
Is there any way to test my objective-c code on windows..
is there any ide like xcode for windows to develop iphone applications.
I love apple, and the iPhone, and I program on Mac OS X but I do not get why Windows developers shouldn't be allowed to develop for the iPhone. Okay I get it, Objective-C is an Apple thing, but still.. It's C based, how hard can it be?
No, there isn't. Indeed, you need the latest version of Xcode (that only runs on the latest Mac OS X) with Objective-C 2.0 even to do iPhone development.
If you wanna write something on Obj-C, you can use GCC.
Anyway you may only try to create something with third party toolkits, if you wanna native iphone dev. env. use hackintosh or buy mac :)
If you want to test some basic not iPhone relevant objective-c code, you also could use GNUStep. But in my opinion its not really stable.