Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Business Sample App Discussion
Started by DavidRangel Oct 08 2013 01:10 PM

- - - - -
108 replies to this topic
[TOPIC CONTROLS]
Page 1 of 5 1 2 3 »
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

DavidRangel

[GLOBAL: userInfoPane.html]
DavidRangel
  • Corona Staff
  • 797 posts
  • Jedi

Thread to discuss the Corona Business Sample App



[TOPIC: post.html]
#2

Inna Treyger

[GLOBAL: userInfoPane.html]
Inna Treyger
  • Corona Staff
  • 23 posts
  • Member

We've uploaded our newest Corona-built business sample app on GitHub here: https://github.com/coronalabs/business-app-sample

 

The app demonstrates several principles related to business apps including tabBar controllers, tableViews, buttons, networking, RSS feeds, webViews and mapViews. For more information, please reference this Corona blog piece: http://coronalabs.com/blog/2013/10/09/a-look-inside-a-sample-corona-powered-business-app/.



[TOPIC: post.html]
#3

LairdGames

[GLOBAL: userInfoPane.html]
LairdGames
  • Pro
  • PipPipPipPipPipPip
  • 960 posts
  • Jedi

Hello Inna,

 

Great stuff! Just a quick note to let you know that the first link above is broken (404)

 

Thanks for the example app.

 

Mo



[TOPIC: post.html]
#4

piotrz55

[GLOBAL: userInfoPane.html]
piotrz55
  • Starter
  • PipPipPipPipPipPip
  • 751 posts
  • Jedi

Is it ios7 only?  For which build?

Because on simulator (windows) I get:


Windows simulator build date: Aug 28 2013 @ 17:45:55


Copyright © 2009-2013  C o r o n a   L a b s   I n c .
        Version: 2.0.0
        Build: 2013.1202
Runtime error
module 'widget_theme_ios7' not found:resource (widget_theme_ios7.lu) does not ex
ist in archive
        no field package.preload['widget_theme_ios7']
        no file 'X:\Users\xxx\AppData\Roaming\Corona Labs\Corona Simulator\Plu
gins\widget_theme_ios7.lua


[TOPIC: post.html]
#5

DavidRangel

[GLOBAL: userInfoPane.html]
DavidRangel
  • Corona Staff
  • 797 posts
  • Jedi

Link has been corrected.



[TOPIC: post.html]
#6

piotrz55

[GLOBAL: userInfoPane.html]
piotrz55
  • Starter
  • PipPipPipPipPipPip
  • 751 posts
  • Jedi

As for my error I suggest:

 

in main.lua there should be (change in line 95)

if system.getInfo("platformName") == "Android" or system.getInfo("environment") == "simulator" then
    myApp.theme = "widget_theme_android"
    myApp.font = "Droid Sans"
    myApp.fontBold = "Droid Sans Bold"
    myApp.fontItalic = "Droid Sans"
    myApp.fontBoldItalic = "Droid Sans Bold"
    myApp.topBarBg = "images/topBarBg7.png"

else
    myApp.theme = "widget_theme_ios7"
    myApp.font = "HelveticaNeue-Light"
    myApp.fontBold = "HelveticaNeue"
    myApp.fontItalic = "HelveticaNeue-LightItalic"
    myApp.fontBoldItalic = "Helvetica-BoldItalic"
end
widget.setTheme(myApp.theme)

 

and in menu.lua line line 46 should be commented out

--if not myApp.legacy then
--    widget.setTheme(myApp.theme)
--end
--widget.setTheme("widget_theme_ios7")


[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Corona Staff
  • 9,940 posts
  • Jedi

We will look into this.  Actually we can probably drop the theme code out completely now since the widgets now auto-select.  I'll see what we can do. 

 

I should point out, there are also some features like custom map markers that require daily build 1227 to work in which case the ios7 theme will be included.



[TOPIC: post.html]
#8

ocq

[GLOBAL: userInfoPane.html]
ocq
  • Starter
  • Pip
  • 5 posts
  • Newbie

AirPrint support is highly desirable. I would used Corona back in 2010 for business apps if it had that feature, and is the main reason why I still can't use Corona today.

 

Easily sync-able databases would be a great too. Something like the Dropbox DatastoreAPI. Although this is less important as workarounds are possible.



[TOPIC: post.html]
#9

DavidRangel

[GLOBAL: userInfoPane.html]
DavidRangel
  • Corona Staff
  • 797 posts
  • Jedi

ocq - can you add/vote on these features here?

feedback.coronalabs.com

 

Thanks for the feedback.


For what it's worth - you can do these things today with Corona Enterprise. But I do agree it would be a bit easier if they were in Corona SDK.



[TOPIC: post.html]
#10

ocq

[GLOBAL: userInfoPane.html]
ocq
  • Starter
  • Pip
  • 5 posts
  • Newbie

ocq - can you add/vote on these features here?

feedback.coronalabs.com

 

Thanks for the feedback.


For what it's worth - you can do these things today with Corona Enterprise. But I do agree it would be a bit easier if they were in Corona SDK.

 

Voted.

 

I think AirPrint should be in regular version, purely on the grounds the Objective C is only about 50 lines! Admittedly the code would be longer with added fanciness and options, but still, it's such a quick win. That's why I'm a bit bemused after all these years when I see features get completely re-written to get to '2.0', whilst poor old Mr Printy doesn't get any attention.



[TOPIC: post.html]
#11

DavidRangel

[GLOBAL: userInfoPane.html]
DavidRangel
  • Corona Staff
  • 797 posts
  • Jedi

Thanks for voting it up. I agree, there are things that seem like easy wins, but it gets a bit hard when there are a bunch of things in the pipeline :) 



[TOPIC: post.html]
#12

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Corona Staff
  • 9,940 posts
  • Jedi

Actually in main.lua at line 104, the following code should take care of the issues:

 

    myApp.theme = "widget_theme_ios7"
    local coronaBuild = system.getInfo("build")
    if tonumber(coronaBuild:sub(6,12)) < 1206 then
        myApp.theme = "widget_theme_ios"
    end

 

The widget iOS 7 theme went into play at build 1206.  The Theme files don't take care of everything needed to make an app look iOS 7 vs. iOS 6.  For instance, the top bar in iOS 6 is a gradient, in iOS 7, it's flat.   In Corona those are typically done using images or other display objects and they are not part of the theme.   The same goes with the tabBar controller.  The iOS7 tab bar doesn't change the color of the tab, only the color of the tab icon.  For our widget, there is a 3 graphic (left, center and right) image needed to provide the overall pressed look for iOS 6.  With iOS7 you have to provide three transparent/empty images as well as provide thinner styled icons.

 

The buttons in the top bar for iOS 6 typically required a graphic for Corona apps to emulate the native buttons, but that style changes with iOS7 and you would in code have to program handling both styles.  Because this is a sample app and not a production app, it was more practical to make it iOS 7 look and feel.   But since the public build doesn't support the iOS7 field, this code work around will take care of this.  The only real visual impact seems to be chrome around the buttons on the menu tab.

 

Speaking of the menu tab, I recommend changing this:

 

--if not myApp.legacy then
--    widget.setTheme(myApp.theme)
--end
widget.setTheme("widget_theme_ios7")

 

at line 43 to simply:

 

widget.setTheme(myApp.theme)

 

so it matches the other modules in the sample app.  Hopefully these changes will be reflected in the github repository soon.



[TOPIC: post.html]
#13

dweezil

[GLOBAL: userInfoPane.html]
dweezil
  • Starter
  • PipPipPipPipPipPip
  • 568 posts
  • Jedi

DOesn't seem to work with the latest free version.    Will the free version ever support IO7 widgets?   I am a sole independent dev and cannot afford the pro version.



[TOPIC: post.html]
#14

piotrz55

[GLOBAL: userInfoPane.html]
piotrz55
  • Starter
  • PipPipPipPipPipPip
  • 751 posts
  • Jedi

@dweezil

Use corrections I mentioned above and it will work for sure :)



[TOPIC: post.html]
#15

russm305

[GLOBAL: userInfoPane.html]
russm305
  • Basic
  • PipPipPipPipPipPip
  • 358 posts
  • Jedi

Awesome stuff!  This 'feed' is new to me.  So if you press the Corona Blog button it takes you to "http://www.coronalabs.com/feed/" why is feed on the end?   and it downloads the feedURL  to a feedFile ( feedName = "corona.rss")where it is stored?

 

Also how can you tell if its an Atom feed?



[TOPIC: post.html]
#16

Marco De Vincenzi

[GLOBAL: userInfoPane.html]
Marco De Vincenzi
  • Starter
  • PipPipPipPipPipPip
  • 106 posts
  • Jedi

Does this app works only for Pro Developers?



[TOPIC: post.html]
#17

warrenwsav

[GLOBAL: userInfoPane.html]
warrenwsav
  • Starter
  • PipPipPipPipPipPip
  • 550 posts
  • Jedi

DOesn't seem to work with the latest free version.    Will the free version ever support IO7 widgets?   I am a sole independent dev and cannot afford the pro version.

 

I believe they said this update was only available in the Pro and Enterprise version. I am about to download it now! I do a lot of business apps and can see some advantages of these updates. And yes, printing would be great!!

 

Warren



[TOPIC: post.html]
#18

gslender

[GLOBAL: userInfoPane.html]
gslender
  • Pro
  • PipPipPipPipPipPip
  • 53 posts
  • Jedi

Would be nice if you supported text field with correct z order etc. as it stands I can't use corona for business apps because of that.

G

[TOPIC: post.html]
#19

piotrz55

[GLOBAL: userInfoPane.html]
piotrz55
  • Starter
  • PipPipPipPipPipPip
  • 751 posts
  • Jedi

@gslender
As CoronLabs stated it's not possible becausr of android and ios restriction as for opengl apps on which corona bases

[TOPIC: post.html]
#20

ne.hannah

[GLOBAL: userInfoPane.html]
ne.hannah
  • Pro
  • PipPipPip
  • 43 posts
  • Advanced Member

Quick note to someone at Corona. In the public build currently (perhaps current build as well) there is a bug that can hurts business apps. Native text boxes appear blank until scrolled if they have too many lines of text when brought on screen in a new scene. The text is there, just not showing, you can highlight and copy it but it just looks like a white area until you scroll it if its over ~15 lines, try 30 and see yourself. This is on an iPhone 4s (works perfect on emulator).



[TOPIC: post.html]
#21

gslender

[GLOBAL: userInfoPane.html]
gslender
  • Pro
  • PipPipPipPipPipPip
  • 53 posts
  • Jedi

@gslender
As CoronLabs stated it's not possible becausr of android and ios restriction as for opengl apps on which corona bases

 

I appreciate the issue, but Corona needs to be careful promoting the SDK as suitable for Business Apps as people should also be aware that many of the typical components (like a text field) don't behave and render anywhere near as good as they should, and for that reason I think it is worth pointing out.

 

It is a shame the business sample apps conveniently avoid needing text entry - I'd love to see how Corona would recommend you attack that problem!

 

G



[TOPIC: post.html]
#22

Richard17

[GLOBAL: userInfoPane.html]
Richard17
  • Basic
  • PipPipPipPipPipPip
  • 62 posts
  • Jedi

I appreciate the issue, but Corona needs to be careful promoting the SDK as suitable for Business Apps as people should also be aware that many of the typical components (like a text field) don't behave and render anywhere near as good as they should, and for that reason I think it is worth pointing out.

 

It is a shame the business sample apps conveniently avoid needing text entry - I'd love to see how Corona would recommend you attack that problem!

 

G

 

Thanks for that G - I am evaluating building my next business app in corona. Not got as far as native text fields yet. Been bogged down for a week looking at tableviews !

 

I note that the examples also seem to avoid the issue of rotating the screen to match the device. Try that with a tableview.

 

Has anybody out there actually produced what could really be considered a business app, the ones I have seen quoted are all a bit basic and very limited ?



[TOPIC: post.html]
#23

DavidRangel

[GLOBAL: userInfoPane.html]
DavidRangel
  • Corona Staff
  • 797 posts
  • Jedi

Hey guys - there are a few examples here:

http://coronalabs.com/resources/case-studies/ (under Business apps)

 

 

While I know not everything you would like is there yet, I do know it's possible to do a very good business app with Corona.

 

I'll see if we can add some text entry fields to this sample app as well.



[TOPIC: post.html]
#24

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Corona Staff
  • 9,940 posts
  • Jedi

DOesn't seem to work with the latest free version.    Will the free version ever support IO7 widgets?   I am a sole independent dev and cannot afford the pro version.

Hi @dweezil.  The first version depends on the iOS 7 Widget theme.  It also has a dependency on custom map markers.  Neither by themselves are a "Pro" feature, but they are currently only available in daily builds.   We updated the sample app today to support the last public build with regards to the iOS 7 Widget theme.  I'll see if I can get the Map sample to make sure it doesn't have problems with the last public build.  The custom map markers won't be available for the last public build.

 

 

Awesome stuff!  This 'feed' is new to me.  So if you press the Corona Blog button it takes you to "http://www.coronalabs.com/feed/" why is feed on the end?   and it downloads the feedURL  to a feedFile ( feedName = "corona.rss")where it is stored?

 

Also how can you tell if its an Atom feed?

 

These are some good questions.   The URL "http://www.coronalabs.com/feed/" is the URL for the site's RSS feed.  Different content management system will have different URL's for their RSS feed.  There really isn't a standard format for them, so you kinda need to know your sites format.  In our case:

 

 

The feed is downloaded to system.CachesDirectory (network.download(feedURL, "GET", networkListener, feedName, system.CachesDirectory)).  If you're looking on the simulator, it's in the app's sandbox and open that folder you will see Caches folder.  That's where you will find the feed file.   On device, you probably won't have access to the sandbox.

 

The easiest way to tell if it's an RSS 2.0 feed or an ATOM 1.0 feed is to put the feed URL in the location bar of your browser and enter it and then do a "View Source" (or View Page Source) in the browser and look at the first line of the feed.  If you see:
 

<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"

 

Then it's an RSS 2.0 feed.  If you see it reference Atom, then it's an atom feed.  The atom.lua file will process atom feeds, like the rss.lua parses RSS 2.0 feeds.  They should produce identical output, so it's easy to change in the feed.lua file.



[TOPIC: post.html]
#25

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Corona Staff
  • 9,940 posts
  • Jedi

Quick note to someone at Corona. In the public build currently (perhaps current build as well) there is a bug that can hurts business apps. Native text boxes appear blank until scrolled if they have too many lines of text when brought on screen in a new scene. The text is there, just not showing, you can highlight and copy it but it just looks like a white area until you scroll it if its over ~15 lines, try 30 and see yourself. This is on an iPhone 4s (works perfect on emulator).

 

Have you filed a bug report on this? I'm not sure anyone has.  We will need one before Engineering can fix it.  Please use the "Report a bug" feature at the top of the page to report it.

 

Thanks

Rob




[topic_controls]
Page 1 of 5 1 2 3 »
 
[/topic_controls]