nodriver-ai/flutter_azure_b2c

'Flutter/Flutter.h' file not found

Closed this issue · 10 comments

After updating the package to 0.0.8, I got this error:
Swift Compiler Error (Xcode): 'Flutter/Flutter.h' file not found

This is my error:
` /Users/.../ios/Pods/Target Support Files/flutter_azure_b2c/flutter_azure_b2c-umbrella.h:13:9: note: in file included from /Users/.../ios/Pods/Target Support Files/flutter_azure_b2c/flutter_azure_b2c-umbrella.h:13:
#import "FlutterAzureB2cPlugin.h"
^
/Users/.../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_azure_b2c-0.0.8/ios/Classes/FlutterAzureB2cPlugin.h:1:9: error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^
:0: error: could not build Objective-C module 'flutter_azure_b2c'
:1:9: note: in file included from :1:
#import "Headers/flutter_azure_b2c-umbrella.h"
^
:0: error: could not build Objective-C module 'flutter_azure_b2c'
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order

Result bundle written to path:
	/var/folders/cl/yjdmznmd3yx989y2rmzbn16h0000gn/T/flutter_tools.UcGlza/flutter_ios_build_temp_dirPNpKDM/temporary_xcresult_bundle`

I'm getting the same error in iOS, works fine in Android.

@JudeAlquiza Yes, same for me. It works in Android and Web, but I got this error in iOS :((

Hi,
There was a missing dependency on the pod file for iOs, v0.0.9 should solve the problem!

Cheers!

Hi

Thanks I just tried it and I'm able to run now with v0.0.9 but I'm facing a different kind of problem though (only in iOS) this call back doesn't fire for some reason in iOS (works perfectly in android)

AzureB2C.registerCallback(B2COperationSource.INIT, (result) async {
    if (result.reason == B2COperationState.SUCCESS) {
        _configuration = await AzureB2C.getConfiguration();
    }
});

My auth_config.json is saved under ios > Resources

I've done all the necessary setup needed as described in this link https://github.com/AzureAD/microsoft-authentication-library-for-objc but still no luck, any ideas what I missed ?

Thanks!

Hi @chipscal,

Good day, just wanted to follow up and get your thoughts on my observation above.

Thanks!

Hi,

I think the callback is not triggered as the init fails. I think it happens because the auth conf file is not found. In iOs things work slightly differently from android, you should inform xcode to bundle the configuration file. Sadly, the iOs part is managed by a colleague of mine that is in vacation and I do not exactly remember how to do this. Hope I've helped a bit!

Hi,

Just for reference here's my info.plist, I can't find anything that's wrong but if you can take a second look and just quickly check if there's something I missed here, thanks.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>$(DEVELOPMENT_LANGUAGE)</string>
	<key>CFBundleDisplayName</key>
	<string>Sev Flutter</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>sev_flutter</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>$(FLUTTER_BUILD_NAME)</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>$(FLUTTER_BUILD_NUMBER)</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIMainStoryboardFile</key>
	<string>Main</string>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UIViewControllerBasedStatusBarAppearance</key>
	<false/>
	<key>CADisableMinimumFrameDurationOnPhone</key>
	<true/>
	<key>CFBundleURLTypes</key>
	<array>
    	<dict>
        	<key>CFBundleURLSchemes</key>
        	<array>
            	<string>msauth.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
        	</array>
    	</dict>
	</array>
	<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>msauthv2</string>
		<string>msauthv3</string>
	</array>
</dict>
</plist>

Hi,

good day, just want to follow up on this.

Thanks!

@JudeAlquiza Did you manage to fix this issue? Having the same problem with my code aswell.

I'm able to run now with: flutter_azure_b2c: ^0.0.9