Codemagic or Fastlane failing while exporting archive for iOS in Flutter projects - flutter

Problem
For flutter projects when trying to do CI via Fastlane or Code magic getting an error.
Error(s)
Unable to export archive: 2019-07-19 06:35:19.256
xcodebuild[3381:21183] [MT] IDEDistribution: -[IDEDistributionLogging
_createLoggingBundleAtPath:]: Created bundle at path '/var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/Runner_2019-07-19_06-35-19.252.xcdistributionlogs'.
error: exportArchive: Symbols tool failed Error
Domain=IDEFoundationErrorDomain Code=1 "Symbols tool failed"
UserInfo={NSLocalizedDescription=Symbols tool failed} ** EXPORT FAILED
**
Some Extra Detail(s)
This issue is coming with recent master commits in Flutter git.
When using Flutter stable git branch we don't have this issue.

Had the same issue. Running pod install solved on my side. I'm using local Fastlane on flutter beta channel.

Related

Error: 'Flutter/Flutter.h' file not found

I added firebase_crashlytics to my Flutter project and followed the Firebase guideline in order to install it.
On flutter run the app works well without any error.
ONLY DURING flutter build ipa I get this:
Error (Xcode): 'Flutter/Flutter.h' file not found
/project/ios/Runner/GeneratedPluginRegistrant.h:9:8
Error (Xcode): failed to emit precompiled header
'/Users/macnew/Library/Developer/Xcode/DerivedData/Runner-biyumwxiyqxyjkacscuqcbwbjroj/Build/Intermediates.no
index/ArchiveIntermediates/Runner/PrecompiledHeaders/Runner-Bridging-Header-swift_26UGEQJVHLD5H-clang_19ZWN9O
PIOOJI.pch' for bridging header '/project/ios/Runner/Runner-Bridging-Header.h'
Encountered error while archiving for device.
Any advice about this?
I'm using firebase_crashlytics 2.8.6 (latest version) and flutter 2.10.5 (without null-safety).
Since I tried every solution given on StackOverflow and Github (Flutter repo), here you have the solution:
Delete the "ios" folder
Run the app and create the iOS project
Inside the "ios" folder ("cd ios"), run the command "pod install"
Follow the official guide by the iOS side
This is the only solution that works.

Error Module 'flutter_secure_storage' not found when try Product ->Build for -> Profiling

well this error occurs to me when I try to make my app in production.
The app is created with flutter and I was able to create the apk for android, but when I try to do it for ios it won't let me.
The file that I am opening is Runner.xcworkspace and the problem is the import of a flutter library, it seems to me that I have to make some kind of connection with the pods.
here is the error, I want to tell you that I do not want to run the app, but to make an installer
The error that occurs when building a release (ie. flutter build ipa) and not when running a debug build is:
/[REDACTED]/ios/Runner/GeneratedPluginRegistrant.m:48:9: fatal error: module
'flutter_secure_storage' not found
#import flutter_secure_storage;
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
For me regenerating Podfile in the following way solved the issue:
rm ios/Podfile && flutter build ios
See Closed [ios][release] GeneratedPluginRegistrant.m Module not found
#43986

Flutter build error. Issue with flutter webview plugin

I have added the flutter webview plugin but its causing problems. Its giving some error when building the project. I tried to delete the cache and rebuild the project but it didn't work.
I just started learning flutter and can't find a solution to this problem.
Below is the error I am getting.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':flutter_webview_plugin:compileDebugJavaWithJavac'.
Unable to find source java class: 'C:\Users\personal\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_webview_plugin-0.0.9+1\android\src\main\java\com\flutter_webview_plugin\WebviewActivity.java' because it does not belong to any of the source dirs: '[C:\Users\personal\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_webview_plugin-0.1.5\android\src\main\java, C:\Users\personal\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_webview_plugin-0.1.5\android\src\debug\java, C:\Users\personal\Documents\AndroidStudioProjects\flutter_newz\build\flutter_webview_plugin\generated\source\r\debug, C:\Users\personal\Documents\AndroidStudioProjects\flutter_newz\build\flutter_webview_plugin\generated\source\buildConfig\debug, C:\Users\personal\Documents\AndroidStudioProjects\flutter_newz\build\flutter_webview_plugin\generated\source\aidl\debug, C:\Users\personal\Documents\AndroidStudioProjects\flutter_newz\build\flutter_webview_plugin\generated\source\rs\debug]'
BUILD FAILED in 54s
Finished with error: Gradle build failed: 1
I was using other plugins for firebase auth, firebase analytics, google sign in , webview, ect. Updating all the plugins to the latest version solved the problem.

Why do i get this error message when trying to add a new framework using carthage?

I want to add a FrameWork to this app I'm working on. It converts latitude and longitude coordinates to UTM coordinates.
I added this to the cartfile:
github "peterringset/UTMConversion" ~> 1.1
But when i run this code in the terminal to clone the framework:
carthage update --platform iOS
I get this error message:
A shell task (/usr/bin/env git clone --bare --quiet https://github.com/peterringset/UTMConversion.git /Users/Fallet/Library/Caches/org.carthage.CarthageKit/dependencies/UTMConversion) failed with exit code 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
I've used other external frameworks like this, and it used to work just fine.. Any idea how I can fix this?
The problem occurs due to a change in username by the publisher of his GitHub account. If you notice the link to the repository is https://github.com/wtw-software/UTMConversion while the Carthage reference is "peterringset/UTMConversion". I was able to solve it by changing the Carthage reference to "wtw-software/UTMConversion". But then you will get this error if you are on Swift 3 or below and Xcode 8 or below.
Task failed with exit code 65.....This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details
So I digged into the logs and found this:
Check dependencies
“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
** BUILD FAILED **
I googled around this error and it looks like the project is developed with Swift 4 and with Xcode 9.

Installing Spritebuilder from source

I am trying to install spritebuilder but since it is no longer on the app store I have to do it through github. I ran the following code from the readme file on github.
git clone https://github.com/apportable/SpriteBuilder
cd SpriteBuilder
git submodule update --init --recursive
cd scripts
./build_distribution.py --version 1.x
but it keeps returning the error:
Testing failed:
Error: There is no SDK with the name or path '/Users/username/SpriteBuilder/scripts/SpriteBuilder/SpriteBuilder/macosx10.9'
** TEST FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Am I doing something wrong? I went into the build folder despite the error and the .app is not able to be opened, saying it may be incomplete or corrupt.
I found a workaround by downloading Spritebuilder from a mirror hosting site.