Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Success run in IOS App, but got failed/broken when archiving for upload in App Store #1080

Open
mohbasirudin opened this issue Feb 1, 2024 · 11 comments

Comments

@mohbasirudin
Copy link

I can run normally my app on simulator, but when i try to archive for upload to App Store via xcode i got some error library, like:

.../ios/Pods/Target Support Files/sqflite/sqflite-umbrella.h:13:9 double-quoted include "SqfliteCursor.h" in framework header, expected angle-bracketed instead

=========

#ifdef OBJC
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif

#import "SqfliteCursor.h"
#import "SqfliteDarwinDatabase.h"
#import "SqfliteDarwinDatabaseAdditions.h"
#import "SqfliteDarwinDatabaseQueue.h"
#import "SqfliteDarwinDB.h"
#import "SqfliteDarwinImport.h"
#import "SqfliteDarwinResultSet.h"
#import "SqfliteDatabase.h"
#import "SqfliteImport.h"
#import "SqfliteOperation.h"
#import "SqflitePlugin.h"

FOUNDATION_EXPORT double sqfliteVersionNumber;
FOUNDATION_EXPORT const unsigned char sqfliteVersionString[];

image

I was try some method, but nothing has changed, like:

  1. Change value of CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER to NO
  2. Delete and recreate ios folder
  3. Upgrading cocoapods from 1.14.x to 1.15.x

My tech:

  1. Sonoma 14.x
  2. XCode 15.x
  3. Flutter 3.16.x
  4. sqflite: ^2.3.2
@alextekartik
Copy link
Contributor

That's bad, indeed. I'm not able to reproduce unfortunately using a blank project. Have you tried a flutter clean (although deleting the ios folder is already a good step, might try to delete the build folder too). I have tried building using flutter build ipa with success. Which command are you using for building?

@mohbasirudin
Copy link
Author

That's bad, indeed. I'm not able to reproduce unfortunately using a blank project. Have you tried a flutter clean (although deleting the ios folder is already a good step, might try to delete the build folder too). I have tried building using flutter build ipa with success. Which command are you using for building?

I was try to delete ios folder and run flutter clean. Also delete build folder via xcode. I use menu "product > archive" via xcode and use "flutter build ipa" via command. But still get same error.

@alextekartik
Copy link
Contributor

What's weird is that it works in debug.

So sorry if I ask you try things you have already tried:

Can you confirm that you set:
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;

for all your configuration (check in project.pbxproj) and that no podfile override this setting (a good text search can help)?

Does it happen if you create a blank project (you can try the example project in sqflite)?

Have you try the suggestions here:
https://forums.developer.apple.com/forums/thread/651941

rm -rf ~/Library/Developer/Xcode/DerivedData/
rm -rf ~/Library/Caches/CocoaPods/
pod deintegrate
pod update

Many have reported similar issues in stackoverflow with firebase (with sometimes weird resolutions)

@mohbasirudin
Copy link
Author

CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER

yap, i was try it to set value to "NO" and following bellow, but nothing has change.

rm -rf ~/Library/Developer/Xcode/DerivedData/
rm -rf ~/Library/Caches/CocoaPods/
pod deintegrate
pod update

image

i tried to create a blank app, and just add sqflite repo's and i don't wriite any code, "just a black app & sqflite repo's". i got same error when build app via xcode, product > archive

image

image

@alextekartik
Copy link
Contributor

alextekartik commented Feb 3, 2024

I don't know what to say neither what you can try (maybe dart pub cache repair) as I tried the exact following steps - I have a use macbook pro M1, flutter 3.16.9, XCode 15.2, Sonoma 14.2.1, is that your versions too?

Can you try the steps below in a console show me the output?

mkdir testiosapp
cd testiosapp
flutter create -t app --platforms ios .
flutter pub add sqflite
flutter build ios

and then I can open XCode and build for archive.

If it fails, can you try dart pub cache repair and try the same steps?

@mohbasirudin
Copy link
Author

I don't know what to say neither what you can try (maybe dart pub cache repair) as I tried the exact following steps - I have a use macbook pro M1, flutter 3.16.9, XCode 15.2, Sonoma 14.2.1, is that your versions too?

Can you try the steps below in a console show me the output?

mkdir testiosapp
cd testiosapp
flutter create -t app --platforms ios .
flutter pub add sqflite
flutter build ios

and then I can open XCode and build for archive.

If it fails, can you try dart pub cache repair and try the same steps?

yap, that's my setup, and i did that's step. if i build ipa via command like "flutter build ios" or "flutter build ipa", it's worked. but, when i try upload it via transporter i got error message about "verified", that i have to do it via xcode > product > archive > verified > export

@alextekartik
Copy link
Contributor

I'm not sure I understand, the initial issue happen during the build process. First try to build from the command line and then (once the flutter build is successful on the command line) use XCode to export.

@mohbasirudin
Copy link
Author

I'm not sure I understand, the initial issue happen during the build process. First try to build from the command line and then (once the flutter build is successful on the command line) use XCode to export.

i got this error when try build via command flutter build ipa --release

rxzero@**** % flutter build ipa --release

Archiving com.....
Automatically signing iOS for device deployment using specified development team in Xcode project: D2****RNH
Running Xcode build...
Xcode archive done. 47.9s
Failed to build iOS app
Error (Xcode): double-quoted include "SqfliteDarwinDatabase.h" in framework header, expected angle-bracketed instead
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteDarwinDB.h:5:8

Error (Xcode): double-quoted include "SqfliteDarwinResultSet.h" in framework header, expected angle-bracketed instead
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteDarwinDB.h:6:8

Error (Xcode): double-quoted include "SqfliteDarwinDatabaseAdditions.h" in framework header, expected angle-bracketed instead
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteDarwinDB.h:7:8

Error (Xcode): double-quoted include "SqfliteDarwinDatabaseQueue.h" in framework header, expected angle-bracketed instead
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteDarwinDB.h:8:8

Error (Xcode): double-quoted include "SqfliteDarwinResultSet.h" in framework header, expected angle-bracketed instead
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteDarwinDatabase.h:1:8

Error (Xcode): double-quoted include "SqfliteDarwinDatabase.h" in framework header, expected angle-bracketed instead
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteDarwinDatabaseAdditions.h:9:8

Error (Xcode): double-quoted include "SqfliteDarwinDatabase.h" in framework header, expected angle-bracketed instead
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteDarwinDatabaseQueue.h:9:8

Error (Xcode): double-quoted include "SqfliteDarwinDB.h" in framework header, expected angle-bracketed instead
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteDarwinImport.h:11:8

Error (Xcode): double-quoted include "SqfliteCursor.h" in framework header, expected angle-bracketed instead
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteDatabase.h:9:8

Error (Xcode): double-quoted include "SqfliteOperation.h" in framework header, expected angle-bracketed instead
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteDatabase.h:10:8

Error (Xcode): double-quoted include "SqfliteImport.h" in framework header, expected angle-bracketed instead
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteOperation.h:9:8

Error (Xcode): double-quoted include "SqfliteCursor.h" in framework header, expected angle-bracketed instead
/Users/rxzero/Documents/TEST/***/ios/Pods/Target%20Support%20Files/sqflite/sqflite-umbrella.h:12:8

Error (Xcode): double-quoted include "SqfliteDarwinDatabase.h" in framework header, expected angle-bracketed instead
/Users/rxzero/Documents/TEST/***/ios/Pods/Target%20Support%20Files/sqflite/sqflite-umbrella.h:13:8

Error (Xcode): double-quoted include "SqfliteDarwinDatabaseAdditions.h" in framework header, expected angle-bracketed instead
/Users/rxzero/Documents/TEST/***/ios/Pods/Target%20Support%20Files/sqflite/sqflite-umbrella.h:14:8

Error (Xcode): double-quoted include "SqfliteDarwinDatabaseQueue.h" in framework header, expected angle-bracketed instead
/Users/rxzero/Documents/TEST/***/ios/Pods/Target%20Support%20Files/sqflite/sqflite-umbrella.h:15:8

Error (Xcode): double-quoted include "SqfliteDarwinDB.h" in framework header, expected angle-bracketed instead
/Users/rxzero/Documents/TEST/***/ios/Pods/Target%20Support%20Files/sqflite/sqflite-umbrella.h:16:8

Error (Xcode): double-quoted include "SqfliteDarwinImport.h" in framework header, expected angle-bracketed instead
/Users/rxzero/Documents/TEST/***/ios/Pods/Target%20Support%20Files/sqflite/sqflite-umbrella.h:17:8

Error (Xcode): double-quoted include "SqfliteDarwinResultSet.h" in framework header, expected angle-bracketed instead
/Users/rxzero/Documents/TEST/***/ios/Pods/Target%20Support%20Files/sqflite/sqflite-umbrella.h:18:8

Error (Xcode): double-quoted include "SqfliteDatabase.h" in framework header, expected angle-bracketed instead
/Users/rxzero/Documents/TEST/***/ios/Pods/Target%20Support%20Files/sqflite/sqflite-umbrella.h:19:8

Error (Xcode): 'Flutter/Flutter.h' file not found
/Users/rxzero/.pub-cache/hosted/pub.dev/sqflite-2.3.2/darwin/Classes/SqfliteImport.h:10:8

Error (Xcode): (fatal) could not build module 'sqflite'
/Users/rxzero/Library/Developer/Xcode/DerivedData/Runner-azaejcykopsgkkbynaivwgxlswhh/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFil
esPath/Pods.build/Release-iphoneos/sqflite.build/VerifyModule/sqflite_objective-c++_arm64-apple-ios12.0_gnu++14/Test/Test.framework/Headers/Test.h:0:8

Error (Xcode): (fatal) could not build module 'Test'
/Users/rxzero/Library/Developer/Xcode/DerivedData/Runner-azaejcykopsgkkbynaivwgxlswhh/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFil
esPath/Pods.build/Release-iphoneos/sqflite.build/VerifyModule/sqflite_objective-c++_arm64-apple-ios12.0_gnu++14/Test/Test.mm:0:8

Error (Xcode): (fatal) could not build module 'sqflite'
/Users/rxzero/Library/Developer/Xcode/DerivedData/Runner-azaejcykopsgkkbynaivwgxlswhh/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFil
esPath/Pods.build/Release-iphoneos/sqflite.build/VerifyModule/sqflite_objective-c_arm64-apple-ios12.0_gnu11/Test/Test.framework/Headers/Test.h:0:8

Error (Xcode): (fatal) could not build module 'Test'
/Users/rxzero/Library/Developer/Xcode/DerivedData/Runner-azaejcykopsgkkbynaivwgxlswhh/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFil
esPath/Pods.build/Release-iphoneos/sqflite.build/VerifyModule/sqflite_objective-c_arm64-apple-ios12.0_gnu11/Test/Test.m:0:8

@alextekartik
Copy link
Contributor

Once you said

if i build ipa via command like "flutter build ios" or "flutter build ipa", it's worked.

then you said

i got this error when try build via command flutter build ipa --release

So I'm confused. The error only happen on your existing project ? Sorry I don't know what to try besides cleaning (pub cache, build, pods). I cannot reproduce. Now that FMDB is going back again to be available on cocoapod this might change again in the near future.

@mohbasirudin
Copy link
Author

i'm confused too. even though, i just add the last of sqflite repo and without add any code in my project, like a just blank project with sqflite repo. but, i got error :(

@alextekartik
Copy link
Contributor

@mohbasirudin Can you try the steps I highlighted in my comment here: #1080 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants