Grey screen and spinner of doom - internet connectivity issues?

I’ve finally got round to building a simple game I started back in 2012? 

All working in simulator, and happily on android, and in the play store.

https://play.google.com/store/apps/details?id=uk.co.tentaclegames.ndvspr 

But whilst the original used to run fine and dandy on iOS testing devices a couple of years back it seems something has changed in iOS - perhaps this https://docs.coronalabs.com/guide/hardware/appleATS/index.html

Something which breaks the tweet score function.

I use Silver Thorax Twitter Facade.

It runs fine in the corona simulator,

It runs fine on a real android device.

BUT It gives a grey screen and a spinner on iOS Xcode sim and iOS device

The twitterfacade code doesn’t seem to use http, but https,

just in case I tried adding something to the Build settings:

–                        NSAppTransportSecurity =

–                        {

–                            NSExceptionDomains =

–                            {

–                                [“api.twitter.com”] =

–                                {

–                                    NSIncludesSubdomains = true,

–                                    NSThirdPartyExceptionAllowsInsecureHTTPLoads = true,

–                                },

–                            },

–                        },

Still grey spinner.

I’ve emailed the fine folk at Silverthorax, but as I got the library so long ago I’m not sure they still support it.

Wondered if any of you fine folk are using it, have a fix, or an alternative?

cheers 

Rob

Instead of:   [“api.twitter.com”], try  [“twitter.com”] instead. You’re already saying to include sub-domains. But if the URL is https, then you don’t need ATS at all.

Without seeing some code I doubt the community can help very much.

Rob

Thanks Rob, I’ll try the switch you suggest, I got in contact with the chap who wrote the library, and he’s going to have a look. In the mean time if the fix doesn’t work I’ll scour the forums to see if I can find an alternative.

@rob.englebright: it would require some tweaking of your code (it uses different syntax than SilverThorax’s twitter solution), but you might want to try my Twitter plugin if you need an alternate solution: http://twitter.plugin.jasonschroeder.com

Of course, if you’re simply tweeting hi-scores, using the social plugin to leverage iOS’ built-in Twitter support might be your best option: https://coronalabs.com/blog/2015/03/17/tutorial-utilizing-the-activity-popup-plugin-ios/

I am simply tweeting high scores,

Your solution looks pretty comprehensive and might be useful for a whole heap of other things.

Thanks.

I registered for the plugin, and it fired up ok …buuuuuut because my app is so old it was using graphic v1compatability mode, and the twitter authorise screen appeared with the top left in the centre or the screen…

Which kinda forced my hand to getting round to updating to graphics 2…

and the plugin now works fine… though I’ve still got some maths to do with the sprites … which I think may be another deprecated library :slight_smile:

…aaaaand i’m not so sure director (the precursor to storyboard, which is the precursor to composer) is too happy…

:slight_smile:

I started looking at the composer stuff, but it may be a step to far in retrofitting 

Maybe I need to start afresh.

Thanks for all the help

You can get the sprite library from our github repo: https://github.com/coronalabs/framework-sprite-legacy

Just download sprite.lua and drop it in the folder with main.lua and your old sprite code will be fine.

Director class will have issues with Graphics 2.0. Converting to Composer will be a little bit of work, but it’s less than re-writing the core app, unless it’s worth it to restructure things.

Rob

Instead of:   [“api.twitter.com”], try  [“twitter.com”] instead. You’re already saying to include sub-domains. But if the URL is https, then you don’t need ATS at all.

Without seeing some code I doubt the community can help very much.

Rob

Thanks Rob, I’ll try the switch you suggest, I got in contact with the chap who wrote the library, and he’s going to have a look. In the mean time if the fix doesn’t work I’ll scour the forums to see if I can find an alternative.

@rob.englebright: it would require some tweaking of your code (it uses different syntax than SilverThorax’s twitter solution), but you might want to try my Twitter plugin if you need an alternate solution: http://twitter.plugin.jasonschroeder.com

Of course, if you’re simply tweeting hi-scores, using the social plugin to leverage iOS’ built-in Twitter support might be your best option: https://coronalabs.com/blog/2015/03/17/tutorial-utilizing-the-activity-popup-plugin-ios/

I am simply tweeting high scores,

Your solution looks pretty comprehensive and might be useful for a whole heap of other things.

Thanks.

I registered for the plugin, and it fired up ok …buuuuuut because my app is so old it was using graphic v1compatability mode, and the twitter authorise screen appeared with the top left in the centre or the screen…

Which kinda forced my hand to getting round to updating to graphics 2…

and the plugin now works fine… though I’ve still got some maths to do with the sprites … which I think may be another deprecated library :slight_smile:

…aaaaand i’m not so sure director (the precursor to storyboard, which is the precursor to composer) is too happy…

:slight_smile:

I started looking at the composer stuff, but it may be a step to far in retrofitting 

Maybe I need to start afresh.

Thanks for all the help

You can get the sprite library from our github repo: https://github.com/coronalabs/framework-sprite-legacy

Just download sprite.lua and drop it in the folder with main.lua and your old sprite code will be fine.

Director class will have issues with Graphics 2.0. Converting to Composer will be a little bit of work, but it’s less than re-writing the core app, unless it’s worth it to restructure things.

Rob