Flutter IOS internet access - flutter

I have searched but couldn't find any information about IOS ,
On android to have access to the internet i have to add this key :
uses-permission android:name="android.permission.INTERNET"
to the AndroidManifest.xml.
On IOS , the any confuguration need to be add to Info.plist ?
Thank you
Roque

Add the following in info.plist file.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key><true/>
</dict>
Doing this, resolved the issue for me

Related

iOS-14 netServiceBrowser.searchForServices Not working

Recently i updated my phone to iOS 14 and since then netServiceBrowser.searchForServices(ofType:"xyz._tcp", inDomain: "local.") not working at all. iPhone is not able to discover any services and not calling any NetServiceBrowserDelegate methods.
Your app requires access to the local network, and iOS14 has a new privacy option that requires authorization for this.
You have to add NSLocalNetworkUsageDescription to your Info.plist, see apple docs
If you use Bonjour, you need to déclare it in info.plist too...
<key>NSBonjourServices</key>
<array>
<string>_http._tcp</string>
</array>
here is my solutions that work for me well
<key>NSLocalNetworkUsageDescription</key>
<string>Allow Flutter tools on your computer to connect and debug app</string>
<key>NSBonjourServices</key>
<array>
<string>_dartobservatory._tcp</string>
</array>

Flutter app deployment to App store rejected with following error -

Guideline 2.3 - Performance - Accurate Metadata
We were unable to install the app on iPad. The UIRequiredDeviceCapabilities key in the Info.plist is set in such a way that the app will not install on iOS 13.6.1 .
Next Steps
To resolve this issue, please check the UIRequiredDeviceCapabilities key to verify that it contains only the attributes required for your app features or the attributes that must not be present on the device. Attributes specified by a dictionary should be set to true if they are required and false if they must not be present on the device.
Resources
Please review the Technical Q&A 1397: Understanding the UIRequiredDeviceCapabilities key for information on the UIRequiredDeviceCapabilities key.
You may also wish to review the dictionary keys table in the "Declaring the Required Device Capabilities" section of the App Programming Guide for iOS.
For me the following solved this issue in the info.plist:
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
You will have to use this code in info.plist
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>camera-flash</string>
</array>

InvalidOperationException fbauth2 missing

I'm facing this issue consistently... before making it as duplicate question I gone through many sites but I didn't find any answer.
Here is the exception on that I got
"fbauth2 is missing from your Info.plist under LSApplicationQueriesSchemes and is required for iOS 9.0"
Here is my Info.plist
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
I added all key for ios 9 but its showing above exception while sharing some content at facebook with ShareDialog its really frustrating :|
Can someone please help to resolve this
Thanks

This app is not allowed to query for scheme XYZ://

You might think it's a duplicate question, but it's not, I'm totally aware of all the answers on SO about the canOpenURL and its caveats on iOS 9, but here is my problem:
I'm trying to check if an specific app is installed on my device (both developed by me).
I have declared the scheme on AppA as:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.my.company.id</string>
<key>CFBundleURLSchemes</key>
<array>
<string>XYZ</string>
</array>
</dict>
</array>
and on the other app, AppB I have added in info.plist:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>XYZ</string>
</array>
Now, in AppB I'm trying to find out if I have AppA installed like this:
internal static let appAScheme = "XYZ://"
static func AppAInstalled() -> Bool {
let appAURL = NSURL(string: appAScheme)
return UIApplication.sharedApplication().canOpenURL(appAURL!)
}
It always returns
-canOpenURL: failed for URL: "XYZ://" - error: "This app is not
allowed to query for scheme XYZ"
How ever, If I try to open AppA from AppB it'll work with no problem!
// Works alright
UIApplication.sharedApplication().openURL(appAURL!)
I can't figure it out why!
I have found the solution to my own question. I'm answering it here instead of just deleting my question because it might help somebody someday.
The problem here was that I'm trying to develop a framework for other developers, I have a test app that I'm using to check if everything is fine with my framework. I was setting LSApplicationQueriesSchemes values inside the framework target, not the actual test app. SO:
You need to set the whitelist values in your app target's info.plist

getting error in DropBox integration to the iphone app

I am trying to integrate the DropBox to my iPhone app. But I get error like
[ERROR] DropboxSDK: unable to link; app isn't registered for correct URL scheme (db-xpt9oxj57x9ftci)
Can anyone help me to solve this?
Most of the time that problem is caused by a misconfigured Info.plist file. Can you make sure you've followed the documentation/index.html about changing Info.plist file? In info plist set db-key in urltype (urlschema). That should do the trick.
I googled and the Dropbox sdk has the line specifically to add the the app key in your app plist file
Your app key is also needed in DBRoulette-Info.plist file so the app
can register for the correct url scheme. To do this, find the file
under the Resources group in the left pane, right-click it and select
Open As → Source Code. Replace the text APP_KEY with your app's key
https://www.dropbox.com/developers/start/setup#ios
I found this solution.
I am working with Xamarin in Windows Visual Studio 2015, and as presented in other queries online, there is no "URL scheme" option available. So the solution is to modify info.plist by hand. Your dropbox specific plist scheme should look like this:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>dbapi-2</string>
<string>dbapi-8-emm</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>db-APP_KEY</string>
</array>
</dict>
</array>
A great helper for me to get this information was the "info.plist" for this. This "info" modification should work for any xamarin project.
If you fix any typos or forget the "db" and are still having problems, clean & rebuild may help.
Your URL scheme should be db-<Your App key>. Example db-a7ghdtthegj6z1g
I had this issue just now and was done in by a space before the db- prefix. Hard to see in the plist editor, but very obvious when I looked at the XML.