Add a key named FacebookClientToken to your Info.plist, and add your client token as its value while running Flutter app in IOS - ios

I am getting errors while running my app in Xcode / iOS via Android Studio. The app is working on Android devices but on iOS, it's freezing in Splash Screen.
So, I have to try many things to solve this error. Finally, I solve this & the answer is below.

A major change in Xcode & iOS Development in Flutter is that info.plist you have to add some more information for Facebook Authentication. According to Facebook's documentation, I need to add the following to info.plist:
<key>FacebookAppID</key>
<string>3088*******</string>
<key>FacebookClientToken</key>. //You have to add this key
<string>3088986********</string> // And client token value from facebook developer page
This will solve my issue. while running the app in iOS Xcode & Mac. Hope This will solve your issue too.

Related

Flutter iOS 14.0 build error: Failed to register observatory port with mDNS

I am implementing a mobile app using Flutter. When I try to run the app on iOS real device from Xcode, I get this error:
[VERBOSE-2:FlutterObservatoryPublisher.mm(115)] Failed to register observatory port with mDNS.
The app runs fine as long as the device is connected to the Mac and running from Xcode. But when I try to open it from the device Home Screen directly, it crashes.
This issue happens on iOS 14.0 and higher. It works fine on iOS 13.x.
add this property info.plist
<key>NSBonjourServices</key>
<array>
<string>_dartobservatory._tcp</string>
</array>
I was able to fix it. This is how I did it.
For you to fix this error. open the iPhone simulator then run your flutter project. then go to System Preferences > Security & Privacy > General Tab. You need to give permission to iproxy(I can't remember the file name but you need to give that file permission to run). After it has successfully run on your simulator. Plug your iPhone follow the steps again.
I debug an (object-c based) flutter project, I like to launch it in Xcode, I find it more fast launching app in Xcode than 'flutter run' command in terminal. then I like to 'flutter attach' to it for hot reload.
I encountered this error very often.
It seems to touch the AppDelegate.m file forcing it to be re-compiled can fix this problem....
Flutter Official Documentation
According the Flutter official documentation:
On iOS 14 and higher, enable the Dart multicast DNS service in the Debug version of your app...
One way to do this is to maintain a separate copy of your app’s Info.plist per build configuration.
Rename your app’s Info.plist to Info-Debug.plist. Make a copy of it called Info-Release.plist and add it to your Xcode project.
In Info-Debug.plist only add the key NSBonjourServices and set the value to an array with the string _dartobservatory._tcp. Note Xcode will display this as “Bonjour services”.
In your target’s build settings, change the Info.plist File (INFOPLIST_FILE) setting path from path/to/Info.plist to path/to/Info-$(CONFIGURATION).plist.
It's a few days I'm dealing (without a solution) with this problem.
If you have any useful information, here you can share it (or, maybe, find it).
At the moment, I'm working on a workaround, that I will share in that thread ASAP.
Here is the original documentation
On iOS 14 and higher, enable the Dart multicast DNS service in the Debug version of your app to add debugging functionalities such as hot-reload and DevTools via flutter attach.
In Info.plist only add the key NSBonjourServices and set the value to an array with the string _dartobservatory._tcp. Note Xcode will display this as “Bonjour services”.
Optionally, add the key NSLocalNetworkUsageDescription set to your desired customized permission dialog text.
The original documentation mentions that this shouldn't be used in the Release version and also provides some instructions how to enable only for Debug releases.
Warning: This service must not be enabled in the Release version of your app, or you may experience App Store rejections.

Application Loader Error - Google Plus SDK & Beackons SDK while submitting app to app Store

I am trying to upload application(ipa File) on appStore from Application Loader, using Xcode 7.0.1. I have used - Google Plus SDK & Beackons SDK. Now while submitting app its giving me following error -
I have tried to find it on google but didn’t found effective stuff.
To resolve this problem, I came up with this solution -
1) Remove CFBundleExecutalbeKey from respective plist file.
2) Set Device type to iPhone rather than iPhone-Simulator in respective plist file.
In my case, it was Beacons SKD & Google SDK.

Trigger.io: iOS 9 iPad Multitasking error

UPDATE: This problem is now solved by using the latest version of Trigger.io
This question is about how to get around the ITMS-90475 error using Trigger.io (and not xcode).
After the release of iOS 9, i get the following error when submitting an app to the App Store that is built using Trigger.io/Forge:
ERROR ITMS-90475: "Invalid Bundle. iPad Multitasking support requires launch story board in bundle
I am developing on linux, and not using xcode to upload my app. From other stackoverflow answers (e.g. this: https://stackoverflow.com/a/32563605/1030104) I see one solution is to disable multitasking support using xcode.
Does anyone know whether this is possible to do using only Trigger.io and not xcode?
According to this answer, your bundle should be valid if you deactivate multitasking for your app. Add this to your Info.plist:
<key>UIRequiresFullScreen</key>
<string>YES</string>
As you're using Trigger.io, this means you have to edit the Info.plist file in between forge build and forge package either programatically (as part of your build process) or by editing the file manually.
For your target, check Requires Full Screen on the General Page:
try adding the bellow code to the info.plist
<key>UIRequiresFullScreen</key>
<true/>

xamarin ios Why cant i select a Simulator

I am very new to Xamarin, and i have been following the Hello.ios QuickStart Tutorial and the app builds, But i cannot select a simulator for debugging.
My only options in debug are Default or IOS Device.
I have made my app the starting application and i have the xcode simulator running. I also went into xcode and updated the simulation to 7.1 i think, but i still cannot select a simulation type.
I even tried to go into project-->Active Configuration and tried to select Debug|iphoneSimulator, but it defaults back to just Debug|iPhone
can anyone help me
Thanks
EDIT
i am also getting this error : no valid ios code signing keys found in keychain
I dont know if that is caused by my issue in my question.
For the code signing issue, remove the entry in the entitlements textbox under:
iOS project => Project Options => iOS Bundle Signing
See http://forums.xamarin.com/discussion/39674/iphonesimulator-build-results-in-no-valid-ios-code-signing-keys-found-in-keychain for more information.
An alternative is to configure a signing certificate using an Apple developer account.
Here is a good walkthrough for setting up a certificate.
http://developer.xamarin.com/guides/ios/getting_started/installation/device_provisioning/

Can't connect to Facebook via Facebook iOS SDK

I'm trying to connect to facebook from my iOS application, so I can make a wall-post.
I've tried using Sharekit, and also the Facebook mobile API.
Using the 'stable' Sharekit, I can connect, but I'm lacking features I need with that version.
So I've tried using the latest Sharekit from GIT, with no luck.
After providing my facebook login information, I always receive an error of the following flavour:
"This page contains the following errors: 'error on line 2 at column 75: EntityRef: expecting ';'"
Occasionally I'll get a different line # or slightly different error message, but there's always an EntityRef problem on a line/column.
Giving up on that, I tried using the facebook mobile SDK and have the exact same problem.
I then tried the facebook sample app, and have the same problem.
I've setup a facebook app account, and I've specified that AppID (247969245245487) in all the place I believe I need to:
static NSString* kAppId = #"247969245245487" in the sample app's appdelegate
#define SHKFacebookAppID #"247969245245487" in SHKConfig.h for Sharekit.
Likewise, I've got the following in the info.plist for both apps:
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb247969245245487</string>
</array>
I'm using XCode 4.0.2.
I'm at a bit of a loss here... any tips or thoughts on where I could start debugging?
I'm experiencing the same problem, and I'm not sure what's changed on Facebook's end that causes the problem, but I do believe it's on their end. That said I did find a "solution" that worked for my customers:
If your simulator or device has the Facebook Mobile app installed, an updated version was recently made available on the app store. When I updated to that latest version, the problem went away for me.
When the simulator or device doesn't have the official Facebook app installed, the iOS SDK (for me) doesn't generate the same error.
So again, I only experienced it on devices that had the Facebook app installed, and then the problem was "fixed" when I updated to the latest version of that app. Maybe this'll work for you too?

Resources