Building Flutter sqflite ios app using codemagic.io - flutter

My flutter app works fine on android emulator and I am using codemagic.io to build the ios version since I am on windows.
However, when trying to build the ios app, the site is showing the following error and I think it has to do with sqflite.
As far as I understand, I guess, I have to change the minimum targeted ios version but actually I don't know how to do it. Any help would be much appreciated.
Xcode's output:
↳
/Users/builder/clone/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:101:9: warning: 'dispatch_queue_set_specific' **is only available on iOS 5.0 or newer** [-Wunguarded-availability]
dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'Foundation' imported from /Users/builder/clone/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode-11.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Dispatch' imported from /Applications/Xcode-11.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:
/Applications/Xcode-11.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/usr/include/dispatch/queue.h:1498:1: **note: 'dispatch_queue_set_specific' has been marked as being introduced in iOS 5.0 here, but the deployment target is iOS 4.3.0**
dispatch_queue_set_specific(dispatch_queue_t queue, const void *key,
^
/Users/builder/clone/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:101:9: note: enclose 'dispatch_queue_set_specific' in an #available check to silence this warning
dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/builder/clone/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:184:54: warning: 'dispatch_get_specific' **is only available on iOS 5.0 or newer** [-Wunguarded-availability]
FMDatabaseQueue *currentSyncQueue = (__bridge id)dispatch_get_specific(kDispatchQueueSpecificKey);

I reinstalled flutter and that solved the problem

Related

Cant build ios project, no such module or this SDK is not supported by compiler

So I got an demo ios project from different company but I can't launch it
Basically i get two errors:
Sometimes I also go an unsupported swift architecure error
I work on M2 processor and use XCode 14.2
Project does not have pods, all packages are managed via spm (that's what I was told)
For now i tried:
opening xcode via rosetta (nothing changed)
changing version of xcode to 14.0 (nothing changed)
using other swift version via toolchain (Swift 5.7), screen below ( get different erorrs but i dont think its a good way)
UPDATE
I downloaded version 14.0 of xcode and toolchain 5.7.2
When i use that version of xcode i get an error about missing classes from that sdk in scope and also some weird error from SentrySamplingProvider ( screens below)

Distribute Universal framework written in Swift

I'm facing the issue with distributing compiled swift framework. My framework heavily relies on the libxml2 dynamic library. In order to avoid issues with Swift module compatibility, I've set build flag BUILD_LIBRARY_FOR_DISTRIBUTION = YES.
So I've used Xcode 11.3 Swift v5.1.3 to build my framework. I've integrated it into the Demo.app project. As being expected Demo.app works fine in Xcode 11.3.
However, I have another error trying to build Demo.app in Xcode 11.0 Swift 5.1.
I've got the error:
#import "libxml/HTMLparser.h"
^
/Applications/Xcode_11.0.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.0.sdk/usr/include/libxml2/libxml/HTMLparser.h:15:10: error: 'libxml/xmlversion.h' file not found
#include <libxml/xmlversion.h>
^
/.../DemoApp/ThirdParty/testXML.framework/Modules/testXML.swiftmodule/x86_64-apple-tvos-simulator.swiftinterface:6:8: error: could not build Objective-C module 'libxml2'
import libxml2
^
/.../DemoApp/AppDelegate.swift:11:8: error: failed to load module 'testXML'
import testXML
Here is the repo with both framework and app projects.
I'm using both Xcode version on the same Mac.
Your project runs fine on my Xcode 11.3 tvOS simulator. However there's something I've noticed.
The framework you built only contains x86_64 architectures (simulator only), it won't work on physical devices.
For Xcode before 11.3 it seems like you need to add $(SDKROOT)/usr/include/libxml2 and ${SRCROOT}/libxml2 to Build Settings. That fixed the issue for me on Xcode 11.2.1

Could not find module 'SJSegmentedScrollView' for architecture 'armv7'; found: arm64

The problem shows when I try to build to real device as simulator. But, there's no problem when I build in simulator.
XCode : 10.2.1
Swift : 4.0
iOS : 10.3.3
Can you check if you are using Debug or Release to build? I've had a similar issue before with other modules, for example you can run the Onfido SDK on simulators on Debug but not on Release. By the looks of this error you are using the Release SDK.

Build error when building iPad app for UIKitForMac

When attempting to build an iPad app for Mac using Catalyst, I get the following error:
FirebaseAnalytics.framework/FirebaseAnalytics(...o),
building for UIKitForMac, but linking in object file built for iOS Simulator,
file '/../FirebaseAnalytics.framework/FirebaseAnalytics' for architecture x86_64
Is this something Google has to fix? The version is FirebaseAnalytics 6.0.1
The Firebase libraries are not yet ported to UIKitForMac / Catalina, so it's best to conditionally compile out the usages like so:
#if !targetEnvironment(UIKitForMac)
...firebase code...
#endif

Facebook Unity SDK and Unity 4.3 have a conflicting instance method 'openURL' on iOS

I had Facebook Unity SDK working in my game prototype until I updated to Unity 4.3. After the update build fails on dSYM generation in xCode. Error message:
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil failed with exit code 11
Most notably before the final error message above I get this warning:
ld: warning: instance method 'application:openURL:sourceApplication:annotation:' in category from /Users//Library/Developer/Xcode/DerivedData/Unity-iPhone-duxgtdhujpdgtjbanfxzqinkvybw/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FbUnityInterface.o overrides method from class in /Users//Library/Developer/Xcode/DerivedData/Unity-iPhone-duxgtdhujpdgtjbanfxzqinkvybw/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAppController.o
I investigated this a bit and yes, it seems that both UnityAppController.mm and FbUnityInterface.mm define "openURL" method and that's what xCode doesn't like. I also checked the iOS build that I had worked with on earlier (4.2.x) Unity version and in that build Unity did not define openURL-method in any of its .mm files.
Version Info:
Facebook Unity SDK Version 4.3.4
Unity Editor Version 4.3 (Pro)
Xcode 5.0.2
Changes vs Unity xCode project default configuration:
Added the frameworks that AdMob requires
Added linker flag "-ObjC" that AdMob requires (Build Settings -> Other Linker Flags)
I tested linking without the "-ObjC" flag also. Result is the same. Any ideas on how to fix this?
-tomi
I ran into the same problem but only building with debugging enabled in Build Options. Turn off debugging and you get past it. Or, BuildOptions.None in your build pipeline.
Of course, no debugging ...
We just released version 4.3.6 of the sdk that fixes login with unity version 4.3. It's available at https://developers.facebook.com/