Update Iphone Application to Swift Coding - ios

I've an application that I've developed before on xcode, now I want to make a new update for the application, but this time I'm going to build it from scratch using swift.
Now my question on iTunes connect will it accept the new update of the application that I built using swift?

There is no reason why your update should not be accepted. If the only differences, is "it's written in Swift instead of ObjectiveC", this is obviously not the good reason the tell to Apple (and to the end user) for an update, but by rewriting from scratch, you probably will correct some bugs, and add a couple of new features that will be big enough to justify the update.

Related

Want to build iOS app

What is the best application or programming languages to build an iOS application platform for chat application for beginner like me. Please anyone can tell me about it.
Apple put a lot of effort in its new `Swift' language.
On any Mac computer, you will find XCode on the app store.
iBook has a nice and clear electronic copy of the guide.
I've gotta admit I was a bit circumspect ("yet a new language ?") but it appears has they sell it, solid and sound.(It's compiled and based on llvm. It is open as well, perhaps MIT license?)
I think they basically came up with C# for iPhone (it may even spawn from `mono'?)
But, again, the license model for the source make it sound more promising.
I found the iBook guide for very comprehensive when it came to the very basic of the language and the libraries.
XCode comes with quite a few templates showcasing each major application type. (You can also check the other languages for yourself: Objective-C and javascript)
So the two complement nicely.
If you are starting from scratch, I see no reason not to start on this train.
Since it's straight from Apple, and if coming up with Android isn't yet part of your plan, it will also be your path of least resistance when it comes to technical difficulties.

Will I be able to restart my iPhone app programatically to apply language changes in Swift [duplicate]

This question already has answers here:
Force iphone app to restart programmatically?
(7 answers)
Closed 8 years ago.
I am developing an iPhone app in swift and wanted localisation feature inside it.
When the user selects a language in the app, the UI components such as labels/buttons,etc.,. fails to change the language and takes more time in some cases also.
So i needed to manually restart my app when the users want to change the language.
Can anyone please suggest me how to do that.
Thanks in advance.
Swift is a language, not an API. You have the same functionality available to you in Swift as in Objective C, although the syntax and ease of use may differ between the languages.
The answer you linked to therefore already answers the question.
Also, as Hemang points out, don't do this.
It's symptomatic of bad design that you would need to restart the app to change the displayed language.
It would be much better to fix the underlying problem than to apply a hacky band-aid solution such as this.
DONT EVER DO THIS... else you'll surely reject by Apple, I don't know what problem you're facing after user change different language from your app, because I'd worked on this kind of app before (which supports multiple language and user may able to change it while current running of the app). I don't have idea with Swift but in ObjectiveC it works perfect.
From Documentation, https://developer.apple.com/library/ios/qa/qa1561/_index.html
Warning: Do not call the exit function. Applications calling exit will appear to the user to have crashed, rather than performing a graceful termination and animating back to the Home screen.
NOT RECOMMENDED but still, you can ask user to Restart their app whenever they changed the language with proper message like, " needs to restart to take effect of language change, [please save your any on going work] and close and again open the app to see the effect, thanks !"
Here, the words inside <...> should be your app name, and [...] need to show if you're making an app that needs to save user information before exit?.

Phonegap iOS app: change keyboard appearance to UIKeyboardAppearanceAlert (again)

A couple of months ago, I posted a question asking if and how phonegap users can alter the keyboard appearance to the dark alert ui keyboard (UIKeyboardAppearanceAlert) without targeting individual textfields. I did some extnsive reaearch myself and offered a bounty but yet the question remained unsolved.
Alter keyboard appearance in native, phonegap/Cordova built iOS App
As of today, I'm still struggling to get this resolved and simply over with. I do realize much probably hasen't happened since last time I bothered you with this question, however, two things have in fact changed which somewhat justifies this seemingly double post:
Phonegap has released version 2.1 which does some new stuff, perhaps this is possible now?
As my client expects me to solve this in any way possible, this time I would also like to ask you for an alternative approach. If it still can't be done, would it be possible to custom make a "keyboard" of my own? I know this of course is technically doable, but is it in any way a recommended approach that would be considered in at least some way smart and justified? As I said, my client pushes hard for this and is not in favor of rebuilding the app completely natively.
Conclusively, as of today is there any way to do this with phonegap / Cordova? If not, would you recommend me to custom make a keyboard using HTML CSS and JavaScript, bearing in mind this is a major comsern for my client? If so, are there any good plugins that I can use as a start? Please check out my old post (linked above) to see what has already been tested.
Thanks in advance,
Jonathan
I know this is quite old but I came accross it looking for the same thing. Anyway, I have found a possible solution which would be to create a plugin for Cordova http://cordova.apache.org/docs/en/2.6.0/guide_plugin-development_index.md.html#Plugin%20Development%20Guide
It does require some native coding but would atleast avoid starting an app from scratch which has already been built in Cordova.

Rewrite native iOS app with Titanium or Rhodes

I have an iOS app in the AppStore, built with Xcode a while ago, but I am thinking of rewriting it from scratch to iron out some bad decisions and this time use some cross-platform framework such as Appcelerator Titanium or Rhodes to add Android support also.
Is it possible for my current iOS users to seamlessly upgrade to the new version, retaining their userdata (of course a migrator is required in the new app). I think I have to retain some app identifier or other data in the new version.
Or should I create it as totally new app and let the users migrate their data (possibly using the Open in... scheme).
The downside of this is that current users must re-purchase the app, which might drive some of them away.
Is it possible for my current iOS users to seamlessly upgrade to the new version, retaining their userdata (of course a migrator is required in the new app). I think I have to retain some app identifier or other data in the new version.
In principle, it is possible. The fact that you are moving to a different development platform will not affect your ability to access data already stored by the user. In the end, it greatly depends on how you stored that data: if it is through NSUserDefaults, it will be pretty much transparent; if it is in XML/JSON files, you will need to add some XML/JSON parser to you new app (provided Appcelerator Titanium or Rhodes do not already provide one); if it is through sqlite, I know that, e.g., Titanium supports it; if it is through Core Data, maybe you will need to write some kind of converter for the existing data. But, in the end, it is definitely possible.
Or should I create it as totally new app and let the users migrate their data (possibly using the Open in... scheme). The downside of this is that current users must re-purchase the app, which might drive some of them away.
What you should take into account here is how much the new app will differ from the old one. If there is a risk of disappointing your customer base, maybe you can go for a separate version. It is clear that doing so will bother some users that will have paid for the old version. One scheme that has been applied in at least one case I know of is offering the app for free during an initial period. But whether this is sensible or not depends entirely on the prospects of your apps.
Maybe the best approach is striving for a largely improved new version, so that disappointed customers will be the least possible number, and keep the same bundle id for a seamless update.
I would suggest refactoring your current iOS codebase as opposed to rewriting it from scratch. Rewriting from scratch is almost always the wrong decision when you can refactor and clean up code as you go. It will always be harder than you expect, take longer than you expect, and often won't end up providing the benefit you expected it to. Refactoring is cheaper, faster, and safer.
In my opinion you would be doing your users a disservice by rewriting the app using cross-platform framework after they are used to a fully native app written in Objective-C. You would be doing yourself a disservice by throwing away code. Bad code can be fixed, no matter how ugly it is now.
I would suggest writing your Android app using Java and refactor your iOS app once the Android app is finished. You can provide the best experience for both platforms this way. The reason to add Android support first is because you already have a working iOS app in the store, so you're 1/2 way there already without touching a cross-platform framework. Writing the Android app should also allow you to flesh out ideas of how to refactor the iOS app.
As far as upgrading your current users, you need to keep the bundle ID the same in order for users to be able to seamlessly upgrade via the app store. Upgrading their data is also possible, but you need to provide more details on how that data is stored within your current app. If at all possible, the automatic upgrade is preferable to an Open In... scheme that requires the user to manually load their settings.

iOS sample projects to learn from

I am just starting iOS development. I read some tutorials, watched stuff on iTunes U and wrote some sample code myself. Now I want to take the next step. I want to learn about best practices for iOS development in XCode.
Are there any well written and well organized iOS projects that one could take a look at?
(As I see it, iOS is not exactly the place for open source enthusiasts, however.)
Thanks
Mike.
I agree with several of the other answers that state that looking at many, many projects for mini-examples of what you want to do in your own app is the way to go.
However, you asked for an example of an app demonstrating best practices.
You could do worse than to read Matt Gallagher's blog, Cocoa with Love from beginning to end. However, the app example you asked for is right here.
Not only will it show a variety of techniques, some novel design and best-practices, but also he points out where he feels that he might have done something better.
It's a great read.
I would suggest the following process: (it worked for me)
Think of an advanced app. that you eventually want to be proficient enough to create.
Make a top-down problem-solving tree containing the necessary skills required to build your final app.
Use this tree to divide your final app. into 'sub apps'. Start at the bottom of the tree, find a tutorial specifically for that skill, and make a "Hello World" app. that uses that skill.
Keep progressing upwards, creating 'sub apps' as you go.
When you are finally ready to make your final app. (it will take a while), you will have a good handle on how iOS development works. It will also be a great test of your knowledge via direct application!
Getting the hang of iOS development can be tricky; it really does require a top-down approach, and every online resource I've found takes a linear one. The only way that I think a linear approach to learning iOS development would be manageable, is to take it one small task at a time.
As for specific resources, I always google "[what I want to do] iPhone SDK" and browse the tutorials and forum posts that come up.
Here are some open source iOS apps. However, they aren't very well documented and are also very advanced.
TKAWebView - A subclass of UIWebView that handles authentication and downloading.
Welcome to your Mac - An iOS app. to VNC into a PC/Mac and do some cool stuff.
InAppSettingsKit - A settings screen creator for your apps.
Good luck!
The people behind the Parse platform have made two complete projects.
For each project there is the complete source code, a tutorial and the resulting app is also available from the AppStore.
Anywall: https://parse.com/anywall
Anypic: https://parse.com/anypic
They both rely heavily on the Parse platform as the data source, but you still get a feel for an iOS project.
Molecules is a great open-source app that uses 3D OpenGL to render complex models of molecules.
Just keep coding my friend. You'll learn over a period of time. The best way to get dirty in a mud fight is to jump into it... Weird analogy but you get the point.
Maybe someday, we all will learn from you then !
Like you said there many and many source codes are available internet, but most are incomplete.
I found some Open source codes of REAL application currently available through Apple app store are given here
Free iPhone App Source Codes of real apps
and also, you can find many answers here on stackoverflow question - Are there any Open-source iPhone applications around?
You can download free IOS sample projects from http://devcodemarket.com
I realize this is an old thread but I've also been looking for good objective-c code examples recently and I just realized that TextEdit's source code is available at the Mac Developer Library webpage.
Also, here are some popular objective-c libraries that have caught my attention:
CocoaPods
AFNetworking.
you can also go through UICatalog from Developers Library and download the sample code. just google it and you will find a project containing all basics of iphone.
I don't think there is any perfect project that can demonstrate all the qualities of great code. Developers have stylistic preferences and may make mistakes. That said, you should look at a lot of different projects and try to look at the conventions used.
I'd suggest starting on GitHub. Besides for seeing code, you'll see what libraries are out there, which may help further your projects later on. Here's the Objective-C page on GitHub.
(Also, I (GitHub link) think you're wrong about iOS devs not being in favor open source. Yes, there's money to be made, but you can't sell a CSV paring library on the App Store as is.)
Have a look at https://github.com/mozilla/firefox-ios
That is Firefox for iOS, written in Swift.
Cocoacontrols has a wide range of controls written using Objective-C & Swift.
I believe these days, this is one of the most famous website for iOS Developers.
But, before you jump onto this, you have to learn Objective-C & Swift very well, so that you will understand how to use the controls in your app which makes your app smooth.

Resources