Flutter not building iOS application, is it a swift error? - swift

I'm not longer able to build an iOS app with XCode, even a brand new flutter application will not run.
Here's the version of Android Studio:
Android Studio 3.1.4
Build #AI-173.4907809, built on July 23, 2018
JRE: 1.8.0_152-release-1024-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.13.6
Here's the version of XCode:
Version 9.4.1 (9F2000)
I get the following error:
Launching lib/main.dart on Andrea's iPad in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: XG2RLBENW5
Starting Xcode build...
Xcode build done.
Failed to build iOS app
Error output from Xcode build:
↳
2018-09-15 15:56:05.469 xcodebuild[39750:2818902] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-14098/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/Runtime/PBXTargetBuildContext.mm:757
Details: unexpected successful exit code from cancelled command
Object:
Method: -createCommandInvocationRecordFromInvocation:
Thread: {number = 9, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
The use of Swift 3 #objc inference in Swift 4 mode is deprecated. Please address deprecated #objc inference warnings, test your code with “Use of deprecated Swift 3 #objc inference” logging enabled, and then disable inference by changing the "Swift 3 #objc Inference" build setting to "Default" for the "Runner" target.
The use of Swift 3 #objc inference in Swift 4 mode is deprecated. Please address deprecated #objc inference warnings, test your code with “Use of deprecated Swift 3 #objc inference” logging enabled, and then disable inference by changing the "Swift 3 #objc Inference" build setting to "Default" for the "Runner" target.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
/Users/pbirdsall/Documents/highline/LeverageGoogleServersPlist/GoogleService-Info.plist:0: error: reading data: The file “GoogleService-Info.plist” couldn’t be opened because there is no such file.
Could not build the precompiled application for the device.
Error launching application on Andrea's iPad.

The error is saying:
"An App ID with Identifier 'com.test.flutterApp' is not available.
Please enter a different string"
You need a different bundle id for your project as com.test.flutterApp may be registered under different Apple ID. Change it to anything unique and try to run it
EDIT
The new error says: GoogleService-Info.plist couldn't be found at
/Users/pbirdsall/Documents/highline/LeverageGoogleServersPlist/GoogleService-Info.plist
Make sure you have the plist file.

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)

GeneratedPluginRegistrant.m:12:9: fatal error: module 'device_info' not found when build flutter app

When I start build the flutter 2.10.x project in macOS 12.4, shows error like this:
"af": 5 untranslated message(s).
To see a detailed report, use the untranslated-messages-file
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection>
This will generate a JSON format file containing all messages that
need to be translated.
Launching lib/main_pro.dart on iPod touch (7th generation) in debug mode...
Running Xcode build...
Xcode build done. 7.1s
Failed to build iOS app
Error output from Xcode build:
↳
2022-06-29 22:18:45.452 xcodebuild[24800:2158061] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-29 22:18:45.452 xcodebuild[24800:2158061] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-29 22:18:45.573 xcodebuild[24800:2158072] apply_selection_policy_once: avoid use of removable GPUs (via com.apple.dt.xcodebuild:GPUSelectionPolicy->avoidRemovable)
** BUILD FAILED **
Xcode's output:
↳
/Users/xiaoqiangjiang/source/reddwarf/frontend/cruise-open/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'device_info' not found
#import device_info;
~~~~~~~^~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Could not build the application for the simulator.
Error launching application on iPod touch (7th generation).
anyone facing the similiar problem? what should I do to fixed this problem?

How do I change/add swift version in my NATIVESCRIPT PROJECT?

So I am trying to run my project from windows. I transferred it to my MacOs to build the iOS part but for some reason this error keeps on popping up.
error:
Xcode build...
2020-06-05 18:35:52.082 xcodebuild[5562:73611] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-16131/DVTFoundation/Utilities/DVTFileSystemUtilities.mm:142
Details: lstat('/Volumes/STORAGE/test/fagck-app/platforms/ios/build/Debug-iphonesimulator/BEMCheckBox/BEMCheckBox.framework') failed with errno 2 (No such file or directory)
Function: DVTRecursiveMkdirResult dvt_recursiveMkdir_returningErrorString(NSString *__strong, NSString *__autoreleasing *)
Thread: <NSThread: 0x7f928cba1110>{number = 14, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 4.0, 4.2, 5.0. This setting can be set in the build settings editor.
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 4.0, 4.2, 5.0. This setting can be set in the build settings editor.
** BUILD FAILED **
Unable to apply changes on device: 0873EB86-B9E3-43E3-9E63-14D6061DC079. Error is: Command xcodebuild failed with exit code 65.
package.json:
dependencies: {
//this helped me move forward on compilation but still same error after further compile
"nativescript-swift-3.0": "^1.0.0",
}

after use google_maps_flutter-0.5.28+1 app in ios not work

i was use google_maps_flutter-0.5.27+1 and after
i updated my macos to macos catalina 10.15.5 and xcode to xcode 11.5
and now i use flutter 1.17.2
i updated all my packages and update google_maps_flutter to 0.5.28+1
and when i run my app in real ios ipad i get this error
Launching lib/main.dart on iPad in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 83YNLV6KMA
Running pod install... 36.8s
Xcode build done. 50.6s
Failed to build iOS app
Error output from Xcode build:
↳
2020-06-02 11:25:57.501 xcodebuild[33948:249015] DTDeviceKit: deviceType from 4a5c1dc1e2024c618604a3b9f8f9d55e73592c5c was NULL
2020-06-02 11:25:57.576 xcodebuild[33948:249009] DTDeviceKit: deviceType from 4a5c1dc1e2024c618604a3b9f8f9d55e73592c5c was NULL
** BUILD FAILED **
Xcode's output:
↳
Command CompileSwift failed with a nonzero exit code
/users/dell/desktop/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.28+1/ios/Classes/FLTGoogleMapsPlugin.m:17:14: error: no visible #interface for 'NSObject<FlutterPluginRegistrar>' declares the selector 'registerViewFactory:withId:gestureRecognizersBlockingPolicy:'
[registrar registerViewFactory:googleMapFactory
~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
Error launching application on iPad.
Exited (sigterm)
how to fix this error?
Copied from other site answered by #robmr88 and it worked for me.
Remove old FLutter.framework
rm -rf ios/Flutter/Flutter.framework and then flutter clean.
it works after i create new flutter project and moved all files to new project

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/