I am a beginner at app development.
I am making an app with flutter, and the following error occurred while building with ios.
Uncategorized (Xcode): Command CompileSwift failed with a nonzero exit code
Swift Compiler Error (Xcode): No such module 'FBSDKCoreKit'
/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7
2
Could not build the application for the simulator.
Error launching application on iPhone 12.
Exited (sigterm)
But I never installed the facebook_auth package.
There is no flutter_facebook_auth in my pubspec.yaml file either.
But I keep getting the above error. Is there any solution?
Thank you for reading.
===============================================================
I did
flutter clean -> flutter pub get -> cd ios -> pod install -> run
And following is the result
/Users/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-1.1.0/ios/Classes/CompressFileHandler.m:109:16: warning: unused variable 'swf' [-Wunused-variable]
const char swf[3] = {'F', 'W', 'S'};
^
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-1.1.0/ios/Classes/CompressFileHandler.m:110:16: warning: unused variable 'swc' [-Wunused-variable]
const char swc[3] = {'C', 'W', 'S'};
^
4 warnings generated.
warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64 ios-arm64_x86_64-simulator ios-arm64_x86_64-maccatalyst' for the current build architectures (arm64 x86_64 i386).
Command CompileSwift failed with a nonzero exit code
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
import FBSDKCoreKit
^
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
import FBSDKCoreKit
^
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
import FBSDKCoreKit
^
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
warning: Skipping duplicate build file in Copy Bundle Resources build phase: /Users//Downloads/GoogleService-Info.plist (in target 'Runner' from project 'Runner')
Result bundle written to path:
/var/folders/ly/7jxqf41945g08nj820kfkblr0000gn/T/flutter_tools.QgWT3r/flutter_ios_build_temp_diruHeVSi/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwift failed with a nonzero exit code
Swift Compiler Error (Xcode): No such module 'FBSDKCoreKit'
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7
2
Could not build the application for the simulator.
Error launching application on iPhone 12.
Pod install result is fine.
This is the part of the pod install result
=================================================
pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7 File contents:
facebookauth.swift file contents
===============================================
I found following-facebook auth related- messages when i run the app on real android device
error msg when running on android device
I resolve this error by doing
remove Podfile.lock and Pods
update Podfile with platform :ios, '12.0' and config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
pod install
I also set the iOS deployment target to be 12.0 in the PROJECT.
https://github.com/darwin-morocho/flutter-facebook-auth/issues/299
I modified my Podfile
platform :ios, '11.0'
and config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' (in my case, both version were not same. 11.0 <-> 9.0)
and the error changed like below:
FIRStorageTypedefs.h:29:19: note: declaration here is not visible
typedef NSString *FIRStorageHandle NS_SWIFT_NAME(StorageHandle);
So I did pod uninstall, update, install, update, install..... T___T
arch -x86_64 pod update
arch -x86_64 pod install
and change the version of these like this
firebase_auth: 4.1.0
firebase_core: 2.1.1
cloud_firestore: 4.0.3
firebase_storage: 11.0.3
firebase_messaging: 14.0.3
cloud_functions: 4.0.3
firebase_remote_config: 3.0.3
Addition:
my command line tools of Xcode are already installed
$xcode-select --install
error: command line tools are already installed
install ffi.. all failed
sudo arch -x86_64 gem install ffi
sudo arch -arm64 gem pristine ffi
Thanks to everyone
I had the same problem,
in the podfile was:
platform :ios, '13.0
...
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
in config.build_settings I changed the version from 9.0 to 13.0
and it helped
Related
How can solve this issues? Error (Xcode): Framework not found Flutter
I tried to more methods,
tried to delete ios then pod install...
tried to flutter clean...
tried to create new project etc.
but still cannot solve.
Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
/Users/pin-chientseng/Desktop/yomate/ios/Runner/Info.plist: Property List error: Found non-key inside <dict> at line 56 / JSON error:
JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0.
Xcode build done. 221.1s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.hhxYin/flutter_ios_build_temp_dirsANWae/temporary_xcresult_bundle
ld: framework not found Flutter
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
warning: Stale file '/Users/pin-chientseng/Desktop/yomate/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist' is
located outside of the allowed root paths.
note: Removed stale file
'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
.build/Debug-iphonesimulator/Runner.build/InputFileList-5F0225AF943341352A9BA345-Pods-Runner-resources-Debug-input-files-37e3c74e
61b246db180ac6f1b6f5519a-resolved.xcfilelist'
note: Removed stale file
'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
.build/Debug-iphonesimulator/Runner.build/InputFileList-678E497CE5823DAA4909D0F3-Pods-Runner-frameworks-Debug-input-files-6f17fb4
132a6c963427e5fd8c0f46475-resolved.xcfilelist'
note: Removed stale file
'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
.build/Debug-iphonesimulator/Runner.build/OutputFileList-5F0225AF943341352A9BA345-Pods-Runner-resources-Debug-output-files-2b94b0
84fd7edee03f689887bc427bd3-resolved.xcfilelist'
note: Removed stale file
'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
.build/Debug-iphonesimulator/Runner.build/OutputFileList-678E497CE5823DAA4909D0F3-Pods-Runner-frameworks-Debug-output-files-3dbe4
531b144e8e556eea6741f7e46e6-resolved.xcfilelist'
note: Removed stale file
'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
.build/Debug-iphonesimulator/Runner.build/Script-5F0225AF943341352A9BA345.sh'
note: Removed stale file
'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
.build/Debug-iphonesimulator/Runner.build/Script-678E497CE5823DAA4909D0F3.sh'
note: Removed stale file
'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
.build/Debug-iphonesimulator/Runner.build/Script-69D48C77EE5D169DAA62588C.sh'
/Users/pin-chientseng/Desktop/yomate/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')
/Users/pin-chientseng/Desktop/yomate/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
'leveldb-library' from project 'Pods')
Result bundle written to path:
/var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.hhxYin/flutter_ios_build_temp_dirsANWae/temporary_xcresult_bundle
Error (Xcode): Framework not found Flutter
Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.
if I used this methods,
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if Gem::Version.new('8.0') > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
end
end
end
end
i will got this error...
Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
Running pod install... 38.2s
Running Xcode build...
Xcode build done. 28.7s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.gk0YEl/flutter_ios_build_temp_dirWL743Q/temporary_xcresult_bundle
/Users/pin-chientseng/Development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_avfoundation-2.3.4/ios/Classes/messages
.g.m:7:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Result bundle written to path:
/var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.gk0YEl/flutter_ios_build_temp_dirWL743Q/temporary_xcresult_bundle
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/pin-chientseng/Development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_avfoundation-2.3.4/ios/Classes/messages.g.m
:6:8
Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.
I have tried many solutions for this error. The only possible solution is to delete the flutter folder in the FLUTTER PATH, and re-copy the flutter folder.
This solved my error.
In my case, I got this error after deleting the flutter instances while trying to clean up some storage on my 258go macbook to update Xcode :(, in doing so I probably deleted the flutter.framework.
The solutions given here have not changed anything for me.
So I tried to clean up everything in the pod, including the cache. The pod install command failed because it missed the ios tools, which can be downloaded with flutter precache --ios.
So the complete process to solve this problem for me was :
cd ios
pod cache clean --all
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
flutter precache --ios
pod install
I hope that this solution will help someone and prevent them from losing a whole day's work as it did for me.
1- flutter channel beta
2- flutter upgrade
3- flutter run
4- flutter channel stable
5- flutter upgrade
6- flutter run
I tried to use OneSignal with MacCatalyst but i get the error below. Everything works if I run it on iOS.
Error:
ld: in /<PROJECT_PATH>/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/OneSignal(OneSignal-x86_64-master.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, file '<PROJECT_PATH>/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/OneSignal'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks!
Environment
Xcode 11.5 (11E608c)
macOS 10.15
OneSignal via Cocoapods (latest version)
Steps to Reproduce Issue:
Enable Mac in your Deployment Info
Install the latest OneSignal iOS SDK using Cocoapods
Setup OneSignal in your NotificationExtension as shown below.
Try to run your code on your Mac using macOS 10.15
ERROR
Anything else:
I tried almost everything that was mentioned on this post https://github.com/OneSignal/OneSignal-iOS-SDK/issues/534, but nothing seem to work.
I also tried to add x86_64h:
This is my Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'MyProjectName' do
# Comment the next line if you don't want to use dynamic frameworks
# Pods for MyProjectName
pod 'FSPagerView'
pod 'Firebase/Analytics'
pod 'Firebase/Crashlytics'
pod 'Firebase/Performance'
pod 'OneSignal'
end
target 'OneSignalNotificationServiceExtension' do
#only copy below line
pod 'OneSignal'
end
Please check below error, I am getting below error once I did some changes in "pubspec.yaml" file.
When I initial setup the project It works, as I did some changes then I am getting below error.
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Warning: CocoaPods not installed. Skipping pod install.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart
side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
Running Xcode build...
Xcode build done. 2.9s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Planning build
note: Constructing build description
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Looking forward for kind response.
You'll need to install the changes made to the pubspec file, you can do this by following either of the 3 options:
Install it
From the terminal: Run flutter pub get.
OR From Android Studio
Click Packages get in the action ribbon at the top of
pubspec.yaml.
OR From VS Code:
Click Get Packages located in right side
of the action ribbon at the top of pubspec.yaml.
Then run the following in the terminal:
sudo gem install cocoapods
terminal:
flutter pub get
or if you are using VSCode with the Flutter extension, you can simply do:
CMD + S on your pubspec.yaml file (saving the file automatically calls flutter pub get)
if the error persists, you can try
flutter clean
and then try "flutter pub get" again.
Thanks everyone for sharing your views.
Above issue has been fixed by below steps:
Open terminal
Run Below commands
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.7.5
pod setup
CocoaPods will be available
Quit VC editor and reopen.
do flutter run
Above steps worked for me.
Thanks.
I'm trying to create a POD but when I run pod lib lint or pod spec lint, I get the next output:
`XXXXXX/LoginService/LoginService.swift:10:8: error: no such module
'TwitterKit' import TwitterKit
^
** BUILD FAILED **
The following build commands failed: CompileSwift normal x86_64
XXXXXX/LoginService/LoginService.swift CompileSwiftSources normal
x86_64 com.apple.xcode.tools.swift.compiler (2 failures) ->
LoginService (0.1.0)
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
- ERROR | [iOS] xcodebuild: /Users/danielfernandez/Documents/tekton_projects/LoginService/LoginService/LoginService.swift:10:8:
error: no such module 'TwitterKit'`
I don't know why, because If I build my project there is no errors, I'm using the TwitterKit without any problem.
This is my first time trying to create a pod. I used cocoapods to install Twitter Kit and my Xcode Version is 8.3.3
This is my POD SPEC:
If I put the s.dependency, I get this error: The 'Pods-App' target has transitive dependencies that include static binaries
If I use --use-libraries I get this error: Pods written in Swift can only be integrated as frameworks; add use_frameworks!
This is my Podfile:
I have a project using the following Podfile:
target 'XXX' do
pod 'Google/Analytics'
pod 'Google/SignIn'
pod 'HockeySDK', '~> 4.0.1'
pod 'GoogleMaps'
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
pod 'TesseractOCRiOS', '4.0.0'
pod 'TOCropViewController'
end
this compiles and runs perfectly.
once I do $pod update then I get lots of updates, see below:
Analyzing dependencies
Downloading dependencies
Installing FirebaseAnalytics (3.2.0)
Installing FirebaseInstanceID (1.0.6)
Installing Google 3.0.3 (was 2.0.3)
Installing Google-Mobile-Ads-SDK 7.8.1 (was 7.8.0)
Using GoogleAnalytics (3.14.0)
Installing GoogleAppUtilities 1.1.1 (was 1.1.0)
Installing GoogleAuthUtilities 2.0.1 (was 2.0.0)
Installing GoogleInterchangeUtilities 1.2.1 (was 1.2.0)
Using GoogleMaps (1.13.2)
Installing GoogleNetworkingUtilities 1.2.1 (was 1.2.0)
Installing GoogleSignIn 4.0.0 (was 3.0.0)
Installing GoogleSymbolUtilities 1.1.1 (was 1.1.0)
Installing GoogleUtilities 1.3.1 (was 1.2.0)
Using HockeySDK (4.0.1)
Using TOCropViewController (1.3.7)
Using TesseractOCRiOS (4.0.0)
Generating Pods project
Integrating client project
Sending stats
Sending stats
Pod installation complete! There are 7 dependencies from the Podfile and 16
total pods installed.
then I try to build and I get the following error:
ld: file not found: /Users/user/Desktop/Personal/xxx/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib_external.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
so I decided to delete the entry from Other Linker Flags ($(PODS_ROOT)/GoogleUtilities/Libraries/libGTM_NSData+zlib_external.a) and that problem went away, but now I get the following error:
ld: file not found: -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am on xcode 7.
any idea? this is driving me nuts.
thanks.
I resolved the problem on my own.
what I did was:
go to my project folder with finder
"show package content" for my project.xcodeproj
edit the file .pbxproj
delete the Other Link section for both debug and release
then I restarted xcode and all worked like a charm again.
phew!