FLUTTER - Error: No profiles for 'xxx' were found: Xcode couldn't find any iOS App - xcode

I am trying to run my flutter app on my ios simulator after including firebase_core in my project. It was working fine before including firebase_core: ^0.7.0. But now, my build is getting failed with the following errors.
Building com.xxx.xxx for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project:
CAV65P4ALS
Running pod install... 1.5s
Running Xcode build...
Xcode build done. 1.5s
Failed to build iOS app
Error output from Xcode build:
↳
objc[45442]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x205394188) and
?? (0x1145342b8). One of the two will be used. Which one is undefined.
objc[45442]: Class AMSupportURLSession is implemented in both ?? (0x2053941d8) and ??
(0x114534308). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/gauravdangi/Development/work/examples/xxx/ios/Pods/Pods.xcodeproj: warning: The iOS
deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
deployment target versions is 9.0 to 14.5.99. (in target 'path_provider' from project 'Pods')
/Users/gauravdangi/Development/work/examples/xxx/ios/Pods/Pods.xcodeproj: warning: The iOS
deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
deployment target versions is 9.0 to 14.5.99. (in target 'Flutter' from project 'Pods')
error: No profiles for 'com.xxx.xxx' were found: Xcode couldn't find any iOS App
Development provisioning profiles matching 'com.xxx.xxx'. Automatic signing is
disabled and unable to generate a profile. To enable automatic signing, pass
-allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project 'Runner')
/Users/gauravdangi/Development/work/examples/xxx/ios/Pods/Pods.xcodeproj: warning: The iOS
deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
deployment target versions is 9.0 to 14.5.99. (in target 'shared_preferences' from project
'Pods')
/Users/gauravdangi/Development/work/examples/xxx/ios/Pods/Pods.xcodeproj: warning: The iOS
deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
deployment target versions is 9.0 to 14.5.99. (in target 'FMDB' from project 'Pods')
/Users/gauravdangi/Development/work/examples/xxx/ios/Pods/Pods.xcodeproj: warning: The iOS
deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
deployment target versions is 9.0 to 14.5.99. (in target 'image_picker' from project 'Pods')
I tried Signing in to get a Signing certificate in code and got the following error:
There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it.
I have been trying to resolve this issue but no luck. Do I need a real iOS device just to run my app on the simulator?
Also, I have not purchased the apple developer account. Do I need to purchase it for testing my app on the simulator, because as far as I know, we need to purchase only if we decide to publish our app on the apple store.

Related

Swift Compiler Error (Xcode): Compiling for iOS 11.0, but module 'amplify_core' has a minimum deployment target of iOS 13.0

I'm setting up my Flutter build environment on my new M2 MacBook Air. I'm trying to build our company app, which builds fine on my i7 MacBook Pro. I'm getting the error below:
Swift Compiler Error (Xcode): Compiling for iOS 11.0, but module 'amplify_core' has a minimum deployment target of iOS 13.0:
/source/code/path/build/ios/Debug-dev-iphonesimulator/amplify_core/amplify_core.framework/Modules/amplify_core.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
~/flutter/.pub-cache/hosted/pub.dartlang.org/amplify_analytics_pinpoint_ios-0.5.1/ios/Classes/FlutterAnalytics.swift:22:7
Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).
The above error says its building for the x86_64 simulator on my M2? Am I missing a setting somewhere?
EDIT
I can run open ios/Runner.xcworkspace and change the Minimum deployment version of amplify_core to 11.0, but I need a real solution.

Setting iOS Version for React Native app and iOS Simulator

I'm completely confused about targeting a particular version of iOS in my React Native app and the simulator version.
The simulator version is showing iPhone 12 - iOS 14.4 even though when I go to XCode -> Preferences -> Components, I see iOS 13.7 Simulator -- see below:
And when I try to launch the app, even though it succeeds building the app, I get the following warning and as soon as my app launches, it crashes. Here's the warning:
The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range supported deployment target versions is 9.0 to 14.4.99. (in target 'boost-for-react-native' from project 'Pods')
Here's my Podfile:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
target 'myapp' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'myappTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'myapp-tvOS' do
# Pods for myapp-tvOS
target 'ingridtm-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
Anyone can tell me what I'm doing wrong here and how to get these versions right?
P.S. I'm on a MacOS Catalina Version 10.15.7 and the XCode version is 12.4. Thanks
This picture indicates that you have iOS 13.7 Simulator installed, so you can run your app on iOS 13.7 Simulator. At the same time, Xcode always has the latest iOS version installed. So in your case, Xcode 12.4 is shipped with iOS 14.4. Therefore, it means that you can run your app on iOS 13.7 and iOS 14.4 simulators.
For the warning, check out this answer

Flutter Apple silicon fatal Shared_preferences error: 'Flutter/Flutter.h' file not found

I am using an Apple Silicon mac for my Flutter project and I have an issue after passing my program to my new computer.
Xcode's output:
↳
In file included from /Users/gorkem/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/ios/Classes/FLTSharedPreferencesPlugin.m:5:
/Users/gorkem/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/ios/Classes/FLTSharedPreferencesPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
error: the following command failed with exit code 1 but produced no further output
CompileC /Users/gorkem/Library/Developer/Xcode/DerivedData/Runner-ghjviwzylhbejhfsayqxcrbfzwyc/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/local_auth.build/Objects-normal/x86_64/FLTLocalAuthPlugin.o /Users/gorkem/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/local_auth-0.6.3+4/ios/Classes/FLTLocalAuthPlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
Command CompileSwift failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
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 14.4.99. (in target 'shared_preferences' from project 'Pods')
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 14.4.99. (in target 'vibration' from project 'Pods')
I think that the problem comes from the file flutter.h inside the shared preferences package.
Here's one of the part of the problem. If you need more, I can edit it anytime.
I already did many things related to this issue but apparently, it didn't work. If you have a recommendation, I'l listen to it.
BTW, I tried flutter clean and then rerun, tried to update all the packages. None of them work.
Try removing CocoaPod from your project
cd ios
pod deintegrate
flutter clean
flutter run
If this doesn't work try reinstalling flutter or switch to beta channel

Android Studio cannot run the Xcode Simulator

I am trying to simulate my Flutter app with the Xcode iPhone Simulator and I get this error. Before upgrading Android Studio and Xcode it was working fine.
Launching lib/main.dart on iPhone X in debug mode...
Starting Xcode build...
Xcode build done.
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
error: Multiple commands produce '/Users/User/AndroidStudioProjects/my_app/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from '/Users/User/AndroidStudioProjects/my_app/ios/Flutter/Flutter.framework' to '/Users/User/AndroidStudioProjects/my_app/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
warning: ignoring duplicated output file: '/Users/User/AndroidStudioProjects/my_app/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' (in target 'Runner')
note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone X.
Using:
macOS 10.13.6 (17G65)
Android Studio 3.2 Build #AI-181.5540.7.32.5014246, built on September 18, 2018
Xcode 10.0 (10A255)
Xcode Simulator 10.0 (SimulatorApp-869.5 CoreSimulator-572.2)
Should be fixed in master channel
https://github.com/flutter/flutter/issues/20685#issuecomment-421511890
Workarounds
There are two workarounds:
Option 1: Use the legacy build system . As noted by #gi097, open ios/Runner.xcworkspace, and change the build system to Legacy Build
System.
Option 2: Use the new Xcode 10 build system.
Open ios/Runner.xcworkspace
Select the Runner project in the project navigator sidebar.
In the main view, select the Runner target, then select the Build Phases tab.
Expand the Embed Frameworks phase and select Flutter.framework from the embedded frameworks list.
Click - to remove Flutter.framework from the list (be sure to keep App.framework).

Xcode build fails for react-native AwesomeProject

I'm running Xcode 4.6.3 on OS X 10.7.5. I've set the iOS Deployment Target to 6.1 in Xcode and selected the iPhone 6.1 simulator. When I hit Run the React Packager appears and says it is ready.
Xcode then fails to build with four parse errors related to RCTImageDownloader.m and there are also nine Target Integrity warnings:
/Users/SM/AwesomeProject/node_modules/react-native/Libraries/AdSupport/RCTAdSupport.xcodeproj
iOS Deployment Target 7.0 is newer than SDK iOS 6.1 in target
RCTAdSupport
What are my options for resolving this problem?
The tools do not support building for a newer deployment target than the SDK supports. You need to lower the deployment target from 7.0 to 6.1 or use newer tools (which will require a newer version of OSX as well).

Resources