Closed sajjad-n closed 1 month ago
@sajjad-n hi there, sorry for a bit delay. thank you for your well described issue.
try removing Podfile.lock
,.symlinks
and Pods
inside ios
folder.
make sure you are using the latest version of adtrace_sdk_flutter
go to ios
module using cd ios
reinstall pods using pod install
run the project again.
for more detailed response it will be great if you could say what is your project's environment sdk
in pubspec.yaml
file.
@namini40 Thank you for your response. I followed your description and got this error:
Failed to build iOS app
Error output from Xcode build:
β³
objc[13556]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f2feac10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10eb302c8). One of the two will be used. Which one is undefined.
objc[13556]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f2feac60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10eb30318). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
β³
Writing result bundle at path:
/var/folders/bd/5c7b530j6sb62_rlkg6266180000gn/T/flutter_tools.srxjp3/flutter_ios_build_temp_dirHjxet2/temporary_xcresult_bundle
While building module 'adtrace_sdk_flutter' imported from /Users/sajjad/sunny/ios/Runner/GeneratedPluginRegistrant.m:10:
In file included from <module-includes>:1:
In file included from /Users/sajjad/sunny/build/ios/Debug-iphonesimulator/adtrace_sdk_flutter/adtrace_sdk_flutter.framework/Headers/adtrace_sdk_flutter-umbrella.h:14:
/Users/sajjad/sunny/build/ios/Debug-iphonesimulator/adtrace_sdk_flutter/adtrace_sdk_flutter.framework/Headers/AdTraceSdkDelegate.h:3:9: error: include of non-modular header inside framework module 'adtrace_sdk_flutter.AdTraceSdkDelegate': '/Users/sajjad/sunny/build/ios/Debug-iphonesimulator/Adtrace-sdk/Adtrace_sdk.framework/Headers/Adtrace.h' [-Werror,-Wnon-modular-include-in-framework-module]
#import "Adtrace.h"
^
1 error generated.
/Users/sajjad/sunny/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: could not build module 'adtrace_sdk_flutter'
#import <adtrace_sdk_flutter/AdtraceSdk.h>
~~~~~~~^
While building module 'mobile_scanner' imported from /Users/sajjad/sunny/ios/Runner/GeneratedPluginRegistrant.m:94:
In file included from <module-includes>:2:
/Users/sajjad/sunny/build/ios/Debug-iphonesimulator/mobile_scanner/mobile_scanner.framework/Headers/mobile_scanner-Swift.h:495:31: warning: 'objc_ownership' only applies to Objective-C object or block pointer types; type here is 'CVPixelBufferRef _Nullable' (aka 'struct __CVBuffer *') [-Wignored-attributes]
- (CVPixelBufferRef _Nullable __unsafe_unretained)copyPixelBuffer SWIFT_WARN_UNUSED_RESULT;
^
1 warning generated.
1 warning and 2 errors generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/sajjad/sunny/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'ReachabilitySwift' from project 'Pods')
/Users/sajjad/sunny/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'OrderedSet' from project 'Pods')
/Users/sajjad/sunny/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'FMDB' from project 'Pods')
Result bundle written to path:
/var/folders/bd/5c7b530j6sb62_rlkg6266180000gn/T/flutter_tools.srxjp3/flutter_ios_build_temp_dirHjxet2/temporary_xcresult_bundle
Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'adtrace_sdk_flutter.AdTraceSdkDelegate': '/Users/sajjad/sunny/build/ios/Debug-iphonesimulator/Adtrace-sdk/Adtrace_sdk.framework/Headers/Adtrace.h'
/Users/flutter-sdk/.pub-cache/hosted/pub.dartlang.org/adtrace_sdk_flutter-1.2.0/ios/Classes/AdTraceSdkDelegate.h:2:8
Parse Issue (Xcode): Could not build module 'adtrace_sdk_flutter'
my environment sdk
:
environment:
sdk: ">=2.14.0 <3.0.0"
thank you again. @sajjad-n
about the first error: AMSupportURLConnectionDelegate ...
this link and this link probably help.
about the second error : Include of non-modular ...
try opening ios
module inside xcode
and go to Build Settings
under Target
and set Allow Non-modular Includes in Framework Modules
to YES
in case the problem still exists:
adtrace_sdk_flutter
to it ,build
and run
(you can use example
project in current repo too)adtrace_sdk_flutter
from your project and run
, add it again and see if the problem still remain.namini40@gmail.com
), to help us figure the problem ASAP.
ππBefore I issued the error I searched for the problem and faced these solutions but they didn't work! then I tried a new project and the problem still remained. The compiler points to:
#if __has_include(<adtrace_sdk_flutter/AdtraceSdk.h>)
#import <adtrace_sdk_flutter/AdtraceSdk.h> <-- missing submodule 'adtrace_sdk_flutter.AdtraceSdk'
#else
@import adtrace_sdk_flutter;
#endif
.
.
.
@implementation GeneratedPluginRegistrant
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
[AdtraceSdk registerWithRegistrar:[registry registrarForPlugin:@"AdtraceSdk"]]; <-- Declaration of 'AdtraceSdk' must be imported from module 'adtrace_sdk_flutter.AdTraceSdk' before it is required
lines in GeneratedPluginRegistrant.m
When set Allow Non-modular Includes in Framework Modules
to YES
, the first error I issued is returned.
I also tried adjust_sdk package, and it worked fine.
I tried to re-generate the issue using different set ups and settings but unfortunately no results. I event tried different iOS versions. It would be great if you could send a sample project that generates the error so that i can take a look at it. I will be trying to generate the error again and using locally added package in the meanwhile. if anything came up I'll catch up with you immediately.
I have uploaded the test project and you can find it here, I hope it helps to fix the issue Thank you π
@sajjad-n hello again.
thank to you the problem was detected. we have a new patch on adtrace_sdk_flutter
.
I mentioned you in the Official PR π€
you can test the sdk too and if everything was ok close the issue on your will.
Thank you very much for your support. In a few days, I and @sajjad-n will check again.
Good news! π I've tested the new version and it worked! Thank you @namini40 for your support. π
I add the last version of package and I delete Pods , .symlinks folders and podfile.lock and after do that I run pod install
command in iOS module.
Then I get below error:
Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 25.5s
Failed to build iOS app
Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'adtrace_sdk_flutter.AdTraceSdkDelegate': '/Users/masoudrashidizadeh/projects/flutter/jwaan/stylist-app/build/ios/Debug-iphonesimulator/Adtrace-sdk/Adtrace_sdk.framework/Headers/Adtrace.h'
/Users/masoudrashidizadeh/.pub-cache/hosted/pub.dev/adtrace_sdk_flutter-1.5.0/ios/Classes/AdTraceSdkDelegate.h:1:8
Parse Issue (Xcode): Could not build module 'adtrace_sdk_flutter'
/Users/masoudrashidizadeh/projects/flutter/jwaan/stylist-app/ios/Runner/GeneratedPluginRegistrant.m:9:8
Could not build the application for the simulator.
Error launching application on iPhone 15 Pro Max.
My Flutter sdk version is: 3.24.1 And version of package is: 1.5.0
sorry if I ask again cause you didn't mention it @MasoudRashidi tried this Solution (the second part in solutions)?
any questions or updates on this matter? will be glad to help
closing the issue, feel free to open it if any questions came up
Hi guys π I have implemented the package according to documentation but when I want to build iOS, getting this error :
Flutter doctor output: