How to handle MISSING_PLUGIN_EXEPTION in Flutter with Firebase Core Plugin on IOS - xcode

for several days I have tried to link my Flutter app with Firebase Database. But unfortunately, whenever I want to start debugging the compiler gives back a missing plugin exemption concerning the firebase_core package. I have already seen some entries referring to this issue here on stack overflow but none of them worked for me.
I have already followed the instruction steps by the installation guide on Firebase and included the Google Service File in my Xcode project.
I already did flutter clean, deleted the pods folder and the pod file.lock file in IOS, tried to include the Firebase SDK package by using the add package option in Xcode.
In the past, the connection between my Flutter project and the Firebase Database already worked but somehow it won't work now.
I think that my issue deals with the new step in the installation process for Firebase Connection when I am asked to make use of the Firebase SDK in Xcode.
In the following I'll add some more pictures for illustration. If someone had the same/a similar issue, it would be a huge help for me.
error Message
podfile
main_dart
Xcode runner workspace including google Service
AppDelegate in Xcode
pubspec yaml

Related

Non-public API usage Flutter.framework/Flutter: _kCTFontOpticalSizeAttribute error on upload of flutter app

I've spent the last two days trying to submit my app to the App Store. I get the message below:
ITMS-90338: Non-public API usage - The app references non-public symbols in Frameworks/Flutter.framework/Flutter: _kCTFontOpticalSizeAttribute. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/
Here's what Ive done so far:
a) I've scoured my code for any reference to Font Sizes - I had some that were constants - I changed the constant name to:
k_fontSizeMyName
b) I tried to download the latest flutter sdk version
c) I rebuilt my entire keychain.
Im so desperate right now. im tired.
What do I do?
the internet has no mention of this bug.
I've got the same message several times from the App Store Team a few minutes ago.
I think the problem was the Flutter SDK version...!
I used to use the latest version(Flutter SDK version 1.12.3-pre.26) at first but changed the Flutter SDK version to 'v1.9.1+hotfix.3' and the problem is resolved!!!
I solved the problem with the following instruction below:
Switching Flutter SDK version to 'v1.9.1+hotfix.3' with the command:
flutter version v1.9.1+hotfix.3
Archive and upload again ...
Problem Solved!!!!!! 🤩
This may be a recently-introduced Skia regression.
The code was included in Flutter v1.12.3, so v1.12.2 on the dev channel should work.
Flutter's Bad Build wiki page will be updated when there is a fix for this issue.
Update: This has been resolved in Flutter v1.12.5.
Since there have been a lot of problems with flutter recently(when I tried the fix mentioned in another answer I different error) I though I should include this https://github.com/flutter/flutter/releases
Just type flutter version [version code]

Missing entitlement - 'UIBackgroundModes' value 'workout-processing' without the required entitlement 'com.apple.developer.healthkit'

I have released my app a couple of times and had the process under control until most recently when I updated from XCode 9 to XCode 10 due to a 3rd party lib requirement.
Everything seems fine when I compile and run on the emulator; but, when I come to the "Validate" (Archive) the app prior to uploading to the app store I am getting an error.
My Setup:
MacOS 10.14.2 (Mojave)
Using XCode 10.1 (10B61)
Error message:
Missing entitlement. watchOS extension
'XXX.app/Watch/aw-xxx.app/PlugIns/aw-xxx Extension.appex' uses
'UIBackgroundModes' value 'workout-processing' without the required
entitlement 'com.apple.developer.healthkit' signed into the bundle.
Watch Extension Capabilities:
The app is built using cordova-8.1.1 and cordova-ios-4.5.5
cordova build ios --buildFlag='-UseModernBuildSystem=0'
In addition to that, the project on XCode 10 has been set to 'Legacy Build System' on File -> Project Settings.
Lastly, the 'aw-xxx Extension.entitlements' has the 'HealthKit' key value set to 'YES' under the 'aw-xxx Extension' folder as one could expect.
Any help or pointers would be much appreciated.
I'm happy to provide more info, logs, etc as well, thanks!
After following the comment below I managed to get my app to validate once again on XCode 10:
Hi #guikeller Just wondering if it is related. I had similar issue while doing a ionic cordova app release. I figured the
com.apple.developer.healthkit
is missing in my platforms/ios/myApp/Entitlements-Release.plist. It does exist in Entitlements-Debug.plist. All I did is copied the key from the debug file to release and app store accepted it.
Source: https://github.com/apache/cordova-ios/issues/475#issuecomment-450174628
In addition to that, I was also able to submit my app into the app store.

Developing Flutter iOS plugin packages - Pods folder in Xcode project is empty

I am developing a plugin package for Flutter. I follow the instructions exactly as written in a tutorial here: Step-2c-add-ios-platform-code-hmswift.
It says to open hello/example/ios/Runner.xcworkspace with xcode, and then:
iOS platform code of your plugin is located in Pods/DevelopmentPods/hello/Classes/ in the Project Navigator
But, when I open xcode project as specified, there is nothing under Pods folder, it is empty:
How can I fix this { I am still kinda Xcode noob } ...
EDIT: iOS specific plugin files are there on the disk, so I guess this is just some project file "wiring" bug or something like this.
The problem was that with Xcode, I have opened Runner.xcodeproj instead of Runner.xcworkspace. Hope this helps other people who did not pay full attention to Flutter Guide, like I did.

SpeechToTextV1 - Missing required modules SSCZLib, SSCommonCrypto

I am working on XCode 9.1 project that uses IBM Watson swift-sdk SpeechToTextV1 package. After upgrading swift-sdk to the version 0.19.0 and building XCode project the compiler error has occured: Missing required modules: 'SSCZLib', 'SSCommonCrypto' pointing to the import SpeechToTextV1 statement. swift-sdk updated via Carthage.
Cartfile content: github "watson-developer-cloud/swift-sdk".
command line update: carthage update --platform ios --no-use-binaries.
How can I include SSCZLib and SSCommonCrypto modules into XCode project?
Please help. Thanks a lot.
Use carthage update --platform iOS --no-use-binaries. It takes a while, but it works.
I'm afraid that I haven't been able to replicate the problem on my machine. I started with a new, empty Xcode project and was able to transcribe audio with the Speech to Text service.
I uploaded my app here. Can you try downloading it, adding your Speech to Text credentials, and running the app?
Please make sure that the newly compiled frameworks are the ones being used. Carthage does not place the frameworks in a custom location that is referenced in the project or workspace.
For me - in addition to building the library using --no-use-binaries flag - I also had to ensure that under my target's
Build Phases->Embed Frameworks
Build Phases->Link Binary with Libraries
SpeechToTextV1.framework is included
In addition - I found that these two files made all the difference inside the Carthage folder:
Carthage/Checkouts/ios-sdk/Source/SupportingFiles/Dependencies/Starscream/zlib/include.h
Carthage/Checkouts/ios-sdk/Source/SupportingFiles/Dependencies/Starscream/zlib/module.modulemap
I could only get this to work after my project was directly referencing the Carthage folder. Deleting either of these two files caused the error to return.
The v0.21.0 release of the Watson Swift SDK fixes this issue. You should no longer have to add a link to the zlib folder in your project settings. However, you will need to copy Starscream.framework into your application in the same way that other frameworks are copied.
The solution was to externalize the Starscream dependency. Adding Starscream as a recursive dependency for the Swift SDK allows it to build independently with its own environment. When the Starscream library is copied into your application, it should automatically include the SSCZLib and SSCommonCrypto dependencies.
We test each SDK before it's release, but this problem slipped past us. Our test machine happens to have other software that adds SSCZLib and SSCommonCrypto to the path, making it available to the Xcode build. It wasn't until we refreshed the machine with a new macOS install that we were able to replicate the problem. And with v0.21.0, that problem has been solved.
Sorry for your trouble and thank you for your patience while we tracked down the solution!

Pods : Xcode Library not found for -lGoogleToolboxForMac

Recently I installed cocoapods and wanted to add Firebase analytics to my app. The first time a published the app worked, but now it started showing me that: Library not found for -lGoogleToolboxForMac.
I install again pods but still the same.
What should I do in this case? I mention that I use VirtualBox.
Please ensure successful installation of pods.
Also, after installation close current project .xcodeproj and open up .xcworkspace.

Resources