Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Godrick

macrumors newbie
Original poster
Apr 12, 2013
4
0
I am an aspiring iPhone app developer, as if you haven't heard this plenty of times. I am here to ask where I should continue my learning next.

To help you answer my questions, I should probably give you a little background first.

I came up with an idea for an app in January and have since bought 4 books on Objective-C and iOS programming. The books I purchased: "Programming in Objective-C 5th Edition - Stephen Kochan", "iOS Programming: The Big Nerd Ranch Guide 3rd Edition - Hillegass", "The Core iOS 6 Developer's Cookbook - Erica Sadun", and also " The Advanced iOS 6 Developer's Cookbook - Erica Sadun".

In January before I began my path to learning to make iPhone apps, I had no prior coding experience and planned to learn Objective-C as my first programming language. I have since read the Programming in Objective-C 5th Edition book and I now know and understand the basics and syntax of Objective-C programming. However, I still feel as though I am no where close to where I need to be as far as having the know-how knowledge to create the app I want.

The app I am looking to create would require user registry/log-in, as well as, being able to upload various data such as audio/video/image. I am stuck currently not knowing where to go from here. If someone could point me in the right direction, such as listing some frameworks to look into in order to implement the aforementioned features.

Although I feel I've passed the first big hurdle in programming by grasping the concepts and embracing the syntax and Objective-C language, I still feel as if I am lost. I guess I am just overwhelmed at all of the things it takes in order to create apps.

Thanks for taking the time to read this and any help is greatly appreciated!
 
The app I am looking to create would require user registry/log-in, as well as, being able to upload various data such as audio/video/image. I am stuck currently not knowing where to go from here. If someone could point me in the right direction, such as listing some frameworks to look into in order to implement the aforementioned features.

So, it sounds like your app would require communication with a server. You've already covered some of that topic; for example, the Nerdfeed app to show an RSS feed from The Big Nerd Ranch. Are you planning on building your own server component or might you try to take advantage of pre-existing web services to handle that for you?
 
Hey, thank you for your reply!

Yes, I am planning on using a web-service as far as the server, but that won't come until the very end when I am getting ready to launch my app to the App Store.

As far as right now, is there any way to implement some of the features I mentioned to make sure the app is working right? For example, I have already created a registration view for my app which includes a simple name, username, password, and also uses a segmented control to let the user signing up select their gender. What I'm asking is, how would I go about creating a method that would create a new user once they had filled out that information and clicked the sign-up button on the view?

And then, if I were to go and make a log-in page, would I just use an if statement such as if (userName && passWord == _____) to determine whether an account has been made with the corresponding username and credentials match, allowing a user to log in?

And also what about creating a news feed. Where once the user is logged in they would be able to submit a post. If you could point me to a framework for these things that would be helpful or are the things I have just mentioned requiring a server? In that case that is quite inconvenient.
 
And also what about creating a news feed. Where once the user is logged in they would be able to submit a post. If you could point me to a framework for these things that would be helpful or are the things I have just mentioned requiring a server? In that case that is quite inconvenient.

I'll just address this last paragraph since the rest will be "fall-out" from how this is handled. If you want your users to submit posts to a common news feed so that all your other users see the same feed then, yes, you pretty much need to be using a centralized server to do your web servicing. It's not inconvenient; in fact, it's much more efficient to do it this way than to try to have each user communicating with every other user to keep things in sync (if that were even possible using iOS).

You state requiring a server is inconvenient. Care to elaborate?
 
I'll just address this last paragraph since the rest will be "fall-out" from how this is handled. If you want your users to submit posts to a common news feed so that all your other users see the same feed then, yes, you pretty much need to be using a centralized server to do your web servicing. It's not inconvenient; in fact, it's much more efficient to do it this way than to try to have each user communicating with every other user to keep things in sync (if that were even possible using iOS).

You state requiring a server is inconvenient. Care to elaborate?

By inconvenient I meant it is inconvenient as of right now as I am in the development phase. Right now I am just looking for a way to be able to create an account that I can test my app with. What I mean by that is I am looking to be able to run my app in the simulator, create an account, and make a post to make sure things are working properly. Once my app is near finished, I would begin looking for server hosting so that user data can be stored.

Also, what do you mean that it isn't possible for each user to communicate with other users? I am looking to instill a feature where certain users would be able to see certain things on their news feed. I know that is very vague, but what I am getting at is something like a certain user would sign up and lets say they have 100 "friends" but I want to make it so they would be able to post content that may not be able to be seen by all 100 friends, maybe 20 instead. Also, I want to have a centralized feed where all content is visible to all "friends" and also have a feature where there is another feed that a user could post content to, but not all of the users "friends" may be able to see this. Who could see the content would depend on certain factors. Are you saying this would not be possible?

Thanks for your input.
 
By inconvenient I meant it is inconvenient as of right now as I am in the development phase. Right now I am just looking for a way to be able to create an account that I can test my app with. What I mean by that is I am looking to be able to run my app in the simulator, create an account, and make a post to make sure things are working properly. Once my app is near finished, I would begin looking for server hosting so that user data can be stored.

Well, I suppose you could set up your web server on your Mac (dependent on what technologies the web server will use) for now and use that as a surrogate of sorts until you move the web services to a host.

Also, what do you mean that it isn't possible for each user to communicate with other users?

I mean that it is very complicated to have app users communicate with each other directly over the internet without a centralized server. First, you have the issue of peer-discovery. Without having a centralized list of everybody logged in, how would an iOS app find all the other users logged in? Attempt a connection on a certain port for every single IP address out there? Untenable. GameKit gives you Bluetooth and local WiFi peer-to-peer connectivity but nothing beyond that.

Also, I want to have a centralized feed where all content is visible to all "friends"...

You said it yourself right there: centralized. This indicates the need for a server.
 
By inconvenient I meant it is inconvenient as of right now as I am in the development phase. Right now I am just looking for a way to be able to create an account that I can test my app with. What I mean by that is I am looking to be able to run my app in the simulator, create an account, and make a post to make sure things are working properly. Once my app is near finished, I would begin looking for server hosting so that user data can be stored.

How will all the server-side software come into being? Is someone else writing it?

Software services don't appear by magic. Someone writes them, puts them on a server, and tests them. Then fixes them when they fail. That's all software, and is orthogonal to the question of choosing a server hosting company or platform.

For example, let's say you could use Squarespace or Amazon EC2. Those are different hosting companies, with different provisioning (how the software gets onto their servers), different pricing, etc. Even if the server-side software (i.e. your service) contains identical code (Java, Python, PHP, Apache, whatever), you will have to tailor your provisioning to the provider. That is, you'll have to learn how to build things so the service provider can deploy it.

However, neither Squarespace nor Amazon EC2 will actually write the server-side software for you. Well, Squarespace might, but you'd pay them to do it. And you could probably find a contractor familiar with EC2 to write it for you, but again you'd pay them.

So once the server-side software is written and deployed to the hosting service, only then can you begin to test it. If your app is finished, and it has bugs in it regarding communication with the server, then you can't find the bugs until after the server is written and deployed. Or if you've underspecified some aspect of the protocol, then the server may be missing a feature you need. Then you'd have to go back and change the server-side and the iOS side of the code.

Since you will need to test the server-side software on the deployment platform (i.e. the hosting service), it makes little sense to postpone that to the end. It's better to have that branch of the project going in parallel, so the iOS code is always running against the real deployable service, even if that service has only one small feature.

If you're hesitant to use a real hosting service because you're cash-poor, you should consider a hosting service you can pay for incrementally, only while it's running, such as EC2. Even if you don't use it for final deployment, at least you'll have been testing the real software on a real remote hosting service.

http://en.wikipedia.org/wiki/Web_hosting_service
 
There are some web host companies like parse.com, mongolab.com and others that provide a REST API that is easy to use from an iOS app. They also often have free developer accounts. However, they are essentially only a database, useful for uploading and downloading files but maybe not well suited to having user accounts.

A good design in the app would allow swapping out the server communications, if you try different hosts, without affecting the controller and UI layer much. But the choice of host will affect the app a lot.

Leaving the server implementation to the end doesn't make sense to me.
 
Are you planning on building your own server component or might you try to take advantage of pre-existing web services to handle that for you?

Ok I understand what you mean now. I had known from the beginning I would need a server, but I did not know I would need it if I wanted to test out my app. Do you suggest building your own or using web services? The latter sounds much easier, but if you think building your own features certain perks then it may be do-able.

How will all the server-side software come into being? Is someone else writing it?

Do you mean writing the app? I am handling that.

Software services don't appear by magic. Someone writes them, puts them on a server, and tests them. Then fixes them when they fail. That's all software, and is orthogonal to the question of choosing a server hosting company or platform.

For example, let's say you could use Squarespace or Amazon EC2. Those are different hosting companies, with different provisioning (how the software gets onto their servers), different pricing, etc. Even if the server-side software (i.e. your service) contains identical code (Java, Python, PHP, Apache, whatever), you will have to tailor your provisioning to the provider. That is, you'll have to learn how to build things so the service provider can deploy it.

However, neither Squarespace nor Amazon EC2 will actually write the server-side software for you. Well, Squarespace might, but you'd pay them to do it. And you could probably find a contractor familiar with EC2 to write it for you, but again you'd pay them.

Personally, I'd rather learn how to write it myself. Does learning to provision my app for a specific hosting company require me to learn another programming language? Or would I just need to learn a certain area of the language in order to implement my desired networking features. Would this require a large amount of time? The reason I ask is because if you think it would save me a lot of time then it may be an option. However, when I began this project I had intentions of doing this all on my own.

So once the server-side software is written and deployed to the hosting service, only then can you begin to test it. If your app is finished, and it has bugs in it regarding communication with the server, then you can't find the bugs until after the server is written and deployed. Or if you've underspecified some aspect of the protocol, then the server may be missing a feature you need. Then you'd have to go back and change the server-side and the iOS side of the code.

Since you will need to test the server-side software on the deployment platform (i.e. the hosting service), it makes little sense to postpone that to the end. It's better to have that branch of the project going in parallel, so the iOS code is always running against the real deployable service, even if that service has only one small feature.

If you're hesitant to use a real hosting service because you're cash-poor, you should consider a hosting service you can pay for incrementally, only while it's running, such as EC2. Even if you don't use it for final deployment, at least you'll have been testing the real software on a real remote hosting service.

Thank you, your whole post was very informative. When you say the server may be missing a feature I need, do you mean that the server hosting company doesn't offer the feature and I would have to go find a new hosting company that offers the feature which would mean I would have to re-write the provisioning? Or are you saying that I would just have to re-write the provisioning for that hosting to include the feature?

I am not cash-poor, however I wanted to do the majority, if not the entirety of it, on my own.

----------

There are some web host companies like parse.com, mongolab.com and others that provide a REST API that is easy to use from an iOS app. They also often have free developer accounts. However, they are essentially only a database, useful for uploading and downloading files but maybe not well suited to having user accounts.

A good design in the app would allow swapping out the server communications, if you try different hosts, without affecting the controller and UI layer much. But the choice of host will affect the app a lot.

Leaving the server implementation to the end doesn't make sense to me.

Is there any hosting companies that you would recommend that are specifically for iOS app databases that would hold user accounts, uploaded media, etc? If not I'm sure I could find some with a little Google.

I'm guessing that I would need to test the app on a real device rather than the simulator if I were using a server, correct?
 
You should always, always, ALWAYS test on real devices. You can test your server connection using the simulator too.

xStep speaks truth. The simulator is great for rapid turn-around, but it is not a realistic reproduction of an actual iOS device.

The simulator runs on your Mac, and is built against Mac OS frameworks instead of iOS frameworks. Differences include:

  • The CPU on a Mac is several times faster than an iOS simulator.
  • The OpenGL commands to iOS have to be translated from OpenGL ES to desktop OpenGL. This means that animations that run smoothly on iOS might be choppy on the simulator
  • Your Mac likely has several times more memory than your iOS device.
  • Mac OS is a true virtual machine that never actually runs out of memory. When it runs out of physical memory, it starts swapping stuff back and forth to disk. iOS apps get terminated.
  • Apps built for the simulator are compiled into x86 code. iOS devices use ARM processors. The code is equivalent, but not the same. Bugs manifest themselves differently.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.