[iOS Simulator] ERROR: network

hello ~ 

i’m taiwan corona sdk user , I have a question …

my ios app network is error ! 

but i’m see

 https://docs.coronalabs.com/guide/hardware/appleATS/index.html#prerequisites

and i try according to teaching … but Or has been an error … i don’t know why … so , somebody help me ? thanks …

sorry , i ready don’t speak good english … 

What happens if you bypass ATS completely using:

NSAppTransportSecurity = { NSAllowsArbitraryLoads = true, },

???

Rob

thanks you , i’m try

NSAppTransportSecurity =
{
NSAllowsArbitraryLoads = true,
},

has been an error … In the xcode emulator is still the same connection error . 

================================== xcode ios system log =============

Jan 10 09:28:40 AdlerdeiMac communityApp[43542]: 呼叫Fun:device/token

Jan 10 09:28:40 AdlerdeiMac communityApp[43542]: ERROR: network request failed: http://zhung.tw/community/public/service/device/token [-1022: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.]

Jan 10 09:28:40 AdlerdeiMac communityApp[43542]: Network error

Can you post your complete build.settings. Please make sure to use the blue <> code formatting button and paste your code into the popup window.

Thanks

Rob

of course , and thanks you help ~

-- -- For more information on build.settings see the Corona SDK Build Guide at: -- http://docs.coronalabs.com/guide/distribution/buildSettings/index.html -- settings = { splashScreen = { enable = false }, orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "portrait", supported = { "portrait", } }, excludeFiles = { -- Include only the necessary icon files on each platform iphone = { "Icon-\*dpi.png", }, android = { "Icon.png", "Icon-Small-\*.png", "Icon\*@2x.png", }, }, iphone = { plist = { CFBundleLocalizations = { "zh", -- 中文語系 "en", -- English }, CFBundleDisplayName = "社區好幫手", CFBundleName = "社區好幫手", NSAppTransportSecurity = { NSAllowsArbitraryLoads = true, }, UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-167.png", "Icon-60.png", "Icon-60@2x.png", "Icon-60@3x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", }, } }, android = { usesPermissions = { "android.permission.INTERNET", "android.permission.CALL\_PHONE", }, }, }

is my build.settings , Trouble you

By the way, another question, I can not use ipad in the simulator to browse my app … 

this is my cofig.lua , Do not know whether this setting is correct

-- -- For more information on config.lua see the Corona SDK Project Configuration Guide at: -- https://docs.coronalabs.com/guide/basics/configSettings -- application = { content = { width = 750, height = 1334, scale = "letterBox", fps = 30, imageSuffix = { ["@2x"] = 2, -- for iPhone, iPod touch, iPad1, and iPad2 ["@4x"] = 4, -- for iPad 3 }, }, }

Sorry, I am a novice, no program experience, just started learning corona sdk …

I don’t see anything obviously wrong with your build.settings. But the error is clearly pointing to ATS as the issue. Do you have the ability to use https: instead of http:?

Rob

hello ~ My question has been solved … in xcode Simulator An error occurs ! but i installation for ios and android is OK ! 

is Commercial business app in CoronaSDK --------------------------------------------------------------

Google Play Androidhttps://play.google.com/store/apps/details?id=com.zhung.communityApp

AppStore IOS : https://itunes.apple.com/tw/app/she-qu-hao-bang-shou/id1193101221?l=zh&mt=8


thank you Rob for your help , thank you 

What happens if you bypass ATS completely using:

NSAppTransportSecurity = { NSAllowsArbitraryLoads = true, },

???

Rob

thanks you , i’m try

NSAppTransportSecurity =
{
NSAllowsArbitraryLoads = true,
},

has been an error … In the xcode emulator is still the same connection error . 

================================== xcode ios system log =============

Jan 10 09:28:40 AdlerdeiMac communityApp[43542]: 呼叫Fun:device/token

Jan 10 09:28:40 AdlerdeiMac communityApp[43542]: ERROR: network request failed: http://zhung.tw/community/public/service/device/token [-1022: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.]

Jan 10 09:28:40 AdlerdeiMac communityApp[43542]: Network error

Can you post your complete build.settings. Please make sure to use the blue <> code formatting button and paste your code into the popup window.

Thanks

Rob

of course , and thanks you help ~

-- -- For more information on build.settings see the Corona SDK Build Guide at: -- http://docs.coronalabs.com/guide/distribution/buildSettings/index.html -- settings = { splashScreen = { enable = false }, orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "portrait", supported = { "portrait", } }, excludeFiles = { -- Include only the necessary icon files on each platform iphone = { "Icon-\*dpi.png", }, android = { "Icon.png", "Icon-Small-\*.png", "Icon\*@2x.png", }, }, iphone = { plist = { CFBundleLocalizations = { "zh", -- 中文語系 "en", -- English }, CFBundleDisplayName = "社區好幫手", CFBundleName = "社區好幫手", NSAppTransportSecurity = { NSAllowsArbitraryLoads = true, }, UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-167.png", "Icon-60.png", "Icon-60@2x.png", "Icon-60@3x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", }, } }, android = { usesPermissions = { "android.permission.INTERNET", "android.permission.CALL\_PHONE", }, }, }

is my build.settings , Trouble you

By the way, another question, I can not use ipad in the simulator to browse my app … 

this is my cofig.lua , Do not know whether this setting is correct

-- -- For more information on config.lua see the Corona SDK Project Configuration Guide at: -- https://docs.coronalabs.com/guide/basics/configSettings -- application = { content = { width = 750, height = 1334, scale = "letterBox", fps = 30, imageSuffix = { ["@2x"] = 2, -- for iPhone, iPod touch, iPad1, and iPad2 ["@4x"] = 4, -- for iPad 3 }, }, }

Sorry, I am a novice, no program experience, just started learning corona sdk …

I don’t see anything obviously wrong with your build.settings. But the error is clearly pointing to ATS as the issue. Do you have the ability to use https: instead of http:?

Rob

hello ~ My question has been solved … in xcode Simulator An error occurs ! but i installation for ios and android is OK ! 

is Commercial business app in CoronaSDK --------------------------------------------------------------

Google Play Androidhttps://play.google.com/store/apps/details?id=com.zhung.communityApp

AppStore IOS : https://itunes.apple.com/tw/app/she-qu-hao-bang-shou/id1193101221?l=zh&mt=8


thank you Rob for your help , thank you