3

I've created an app which pulls data from a JSON file and displays it. Now that app is specific for one sports team. I want to create the same app for 10 other teams. Plus there will be an accompanying pro version of the app.

I'll be doing the same thing for the iOS version.

The only difference between the apps will be colors, logos and url of the data source.

I wanted to know if there was a better way to create apps. Instead of individually creating 40 different projects.

It will help me in updating the app as opposed to copy pasting the same code 40X. Are there any special features available in eclipse and xcode to do that?

Thanks

Bilbo Baggins
  • 3,644
  • 8
  • 40
  • 64
  • 1
    Make your core logic into a library (either a jar file, or android library if needbe) and then reference the library from other apps that contain basically just a "skin" – FoamyGuy May 22 '13 at 15:14
  • 1
    HTML5 will save you the development for multiple platforms – Mohamed_AbdAllah May 22 '13 at 15:16
  • @Mohamed_AbdAllah HTML5 isn't a viable option for developing apps - it is a sad truth. Besides my app also does several other things like alarm. I'm also enjoying native app development. I'm new to it. – Bilbo Baggins May 22 '13 at 15:22
  • @FoamyGuy Yes, I know that is a possibility on android. But can it be done for iOS? Is there any good tutorial to create a library from your code? Thanks – Bilbo Baggins May 22 '13 at 15:24
  • No idea about iOS sorry. – FoamyGuy May 22 '13 at 15:30
  • Here is a question which talks about doing this in xcode via targets - http://stackoverflow.com/questions/549462/how-do-i-manage-building-a-lite-vs-paid-version-of-an-iphone-app?lq=1 , http://stackoverflow.com/questions/549462/how-do-i-manage-building-a-lite-vs-paid-version-of-an-iphone-app , http://blog.just2us.com/2009/07/tutorial-creating-multiple-targets-for-xcode-iphone-projects/ – Bilbo Baggins May 22 '13 at 15:54

6 Answers6

0

Have you looked into using PhoneGap and just create a "mobile site" that detects the app that is connecting and adjusts the data/styles accordingly.

wpenton
  • 91
  • 10
  • HTML5 isn't a viable option for developing apps - it is a sad truth. Besides my app also does several other things like alarm. I'm also enjoying native app development. I'm new to it. – Bilbo Baggins May 22 '13 at 15:22
0

I would simply swap out the resources for each team and rebuild the app.

For example, with Android, maintain an AndroidManifest.xml and a res/ subdirectory tree for each team. When it is time to build, simply copy over the resources into the project, overwriting the previous team.

I don't know of any existing tool to do this automatically, however.

levis501
  • 4,117
  • 23
  • 25
  • Yes, if there were only 5 apps, this would have been the right approach. But you also have to change the app package name each time you build a new app and doing this 40 times isn't an option. There must a better way. – Bilbo Baggins May 22 '13 at 15:35
  • Write a script to perform these changes. Doing it manually would be quite tedious. – levis501 May 22 '13 at 16:47
0

There's always the possibility of creating ONE app allowing the user to set the team preference upon first load, and swapping out resources programmatically.

rmooney
  • 6,123
  • 3
  • 29
  • 29
0

With Titanium Studio you can write code using Javascript and it convert your code in native objective-c code, native android code, native html 5 code and soon also in windows phone code. It`s the best free cross platform IDE

  • Here the question isn't of creating the app natively on 2 platforms. I've already coded the app on both iOS and android. But creating 40 similar versions manually is a chore. I'm looking to automate it. – Bilbo Baggins May 22 '13 at 18:30
0

Upon reviewing your responses, you seem to want a strategy to manage your resources. Since different OS has different resource requirements (screen-size, iOS 2x png for example). The most common strategy is to keep a separate resource structure and setup build target to copy/xcopy replace these image resources before build. Source control + an OSX build server would be most beneficial.

Noogen
  • 1,652
  • 12
  • 13
0

After creating these apps I've found the following way to be the most easiest way to create a similar app.

Android: 1. Select the project from the project explorer sidebar copy it and then paste it. Give it a new name.

  1. Select the new project and then right click > Android Tools > Change Package Name. Give it a new package name. Eclipse will give you an option to refactor the code, say yes.

  2. Go to res/values and change all strings.

  3. Change the icons and other images.

  4. Go to src click the package and then refactor it. Give it the new package name.

  5. Go to manifest file and rename any old names which might still be lingering.

Bilbo Baggins
  • 3,644
  • 8
  • 40
  • 64