I am trying to test the implementation of my Firebase Analytics. In their documentation they state that:
Enable debug mode by passing the -FIRDebugEnabled argument to the
application. You can add this argument in the application’s Xcode
scheme. When debug mode is enabled via -FIRDebugEnabled, further
executions of the application will also be in debug mode. In order to
return to default mode, you must explicitly disable the debug mode
with the application argument -FIRDebugDisabled.
Unfortunately I do not understand where it is that I set this scheme. In Android this was easy. Help would be appreciated.
I have found the answer on this alternative page of Google:
https://firebase.google.com/docs/analytics/ios/start
In Xcode, select Product > Scheme > Edit scheme...
Select Run from the left menu.
Select the Arguments tab.
In the Arguments Passed On Launch section, add -FIRAnalyticsDebugEnabled.
I wish Google would stop releasing half baked products and documentation. Could save hundreds of thousands of hours worldwide
I tried editing scheme and adding parameters, https://firebase.google.com/docs/analytics/ios/start but it did not work for me. In addition, I added following code after configuring FirebaseApp, at AppDelegate, didFinishLaunchingWithOptions
FirebaseApp.configure()
Analytics.setAnalyticsCollectionEnabled(true)
and it worked for me. I hope it helps you too.
I think you should check console log on XCode. Because I will show log
To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see https://help.apple.com/xcode/mac/8.0/#/dev3ec8a1cb4)
Check again, if you don't:
Add key FirebaseCrashlyticsCollectionEnabled has value true in Info.plist
set key IS_ANALYTICS_ENABLED is true in GoogleService-Info.plist
Make sure file GoogleService-Info.plist add will all targets and save in root project
Related
I'm using the following plugin
https://pub.dev/packages/receive_sharing_intent
It is working with android.
But the instruction for IOS are unclear - I follow the IOS instruction and I'm able to share files with my app, when I do so, my app opens but the flutter code is not executed, the only thing I see in the log is:
6.26.0 - [Firebase/Analytics][I-ACS023000] Deep Link Web URL query is empty
Which doesn't mean any thing to me.
I tried to look for this error and couldn't find anything that is related to sharing intent.
Can someone clarify this?
Is there a tutorial on how to set sharing intent for IOS?
In the instruction it says:
ios/Runner/Runner.entitlements
....
<!--TODO: Add this tag, if you want support opening urls into your app-->
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:example.com</string>
</array>
But I don't have such file in my directory structure, any idea how to set it correctly?
....
EDIT:
I created and added the file ios/Runner/Runner.entitlements manually
I noticed I missed the last step (after publishing the question), so I did it:
Add Runner and Share Extension in the same group
Go to the Capabilities tab and switch on the App Groups switch for both targets. Add a new group and name it group.YOUR_HOST_APP_BUNDLE_IDENTIFIER in my case group.com.kasem.sharing
This step is not very clear:
the name of the tab is Signing & Capabilities
in order to switch on the App Group you should click on `+ Capability' in the top left of the tab
I checked the checkbox next to App Group
Add a new group and name it group.YOUR_HOST_APP_BUNDLE_IDENTIFIER in my case group.com.kasem.sharing
After this I was able to receive the file intent in the App but couldn't open the file:
print("$path, exist ${await io.File(path).exists()}");
I was able to print the path but the exists method return false
NOTE:
works with no issues in android
works with no issues in IOS when sharing an image
only fails with files (PDF)
I'm trying to get my swift Mac app to launch at login using the method described in this page: https://theswiftdev.com/how-to-launch-a-macos-app-at-login/
However, I keep getting the following errors as soon as I call SMLoginItemSetEnabled:
Could not locate login item com.domain.LauncherApplication in the caller's bundle
Could not enable login item: com.domain.LauncherApplication: 3: No such process
I checked that the launcher app ID is correct multiple times, I tried changing it and changing its version number. I even tried cleaning the project and moving the base app to /Applications but I always get these error messages.
Any idea what the problem might be? (Notice the solution must not require me to disable App Sandboxing)
OK, I found the problem but it took a long time since it was so sneaky: In the Copy File Build Phase section I entered "Contents/Library/LoginItem" as the subpath instead of "Contents/Library/LoginItems" (notice the 's' in the end - can't believe I missed it). So thank you #vadian! You were absolutely right.
I need to create two different versions of the app.
- debug
-prod
for debug, version i need user to select the test environment before anything else begins. i need some way to know what environment user has selected and then load API endpoints config file accordingly.
what's the best way to handle this in flutter?
I have seen in some apps that for iOS, debug options are available in app settings under the standard iOS settings menu , select the app and then see those options in there.
You might want to use Flutter Flavours. As the name suggests, you can practically make flavours of the same app based on your need - debug, test, production etc. And not only API end-points, but you can also configure everything else such as app icon, different labels on the screen etc.
As suggested in this link, you can have different main.dart file for each flavour. You can read different configuration from JSON file (such as API end-point) and rest of your app will remain same. For example, see below :
This is another helpful link.
After installing Firebase (Cloud Firestore), I usually get tons of console logs, usually belonging to BoringSSL, such as this:
2018-08-27 13:49:03.747112+0100 VM[25611:371248] [BoringSSL] boringssl_session_errorlog(224) [C2.1:2][0x7f9570c142d0] [boringssl_session_read] SSL_ERROR_SSL(1): operation failed within the library
Is there a way to avoid logs from these (or any) external frameworks?
Thanks.
Though the link to the relevant thread is correct, the top vote was given does not solve this problem with the lower dependency libraries.
To silence BoringSSL use
OS_ACTIVITY_MODE = disable
Steps
Navigate to Product -> Scheme -> Edit Scheme.
Open the Arguments tab
Environment Variables section add OS_ACTIVITY_MODE = disable
I'm working on an extension and I'm checking to see if settings have values, if not, I want to show an error and provide a button that launches the settings editor so the user can add those settings.
I think my path forward is to use executeCommand and provide a built in command that does this for me, but I've been having trouble finding a list of built-in available commands.
Hidden in the key-bindings section of the documentation, I found the command I was looking for - workbench.action.openGlobalSettings
The full solution looks like
commands.executeCommand('workbench.action.openGlobalSettings');