I have an ionic3 project and I'm trying to run it on iphone plus 8, 12.4 emulator. However when I run:
ionic cordova emulate ios --target="iPhone-8-Plus" --verbose
It gives me an error:
** BUILD SUCCEEDED **
Command finished with error code 0: xcodebuild -workspace,MyApp.xcworkspace,-scheme,MyApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 8 Plus,build,CONFIGURATION_BUILD_DIR=/Users/myuser/MyProjects/mobileapp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/myuser/MyProjects/mobileapp/platforms/ios/build/sharedpch,-UseModernBuildSystem=0
No scripts found for hook "after_compile".
No scripts found for hook "after_build".
> native-run ios --app "platforms/ios/build/emulator/MyApp.app" --target iPhone-8-Plus --verbose
[native-run] 2019-08-08T10:01:24.916Z client:usbmuxd connectUsbmuxdSocket
[native-run] 2019-08-08T10:01:24.919Z client:usbmuxd getDevices
[native-run] 2019-08-08T10:01:24.920Z protocol:usbmux socket write: {"messageType":"ListDevices"}
[native-run] 2019-08-08T10:01:25.517Z protocol:usbmux Response: {"DeviceList":[]}
[native-run] 2019-08-08T10:01:25.523Z native-run Caught fatal error: { Error: No device or simulator with UDID "iPhone-8-Plus" found
[native-run] at Object.run (/usr/local/lib/node_modules/native-run/dist/ios/run.js:47:23)
[native-run] at process._tickCallback (internal/process/next_tick.js:68:7) code: 'ERR_TARGET_NOT_FOUND', exitCode: 1, data: undefined }
[native-run] ERR_TARGET_NOT_FOUND: No device or simulator with UDID "iPhone-8-Plus" found
[ERROR] An error occurred while running subprocess native-run.
native-run ios --app "platforms/ios/build/emulator/MyApp.... exited with exit code 1.
I run the following to check the devices:
ionic cordova emulate --list
[native-run] iPad (5th generation) 12.4 80B0D70B-2E2D-4D9C-B098-119AC267E908
[native-run] iPad (6th generation) 12.4 C9975663-AD93-4582-8521-8DECF6BBE611
[native-run] iPad Air 12.4 C6235A65-D421-464E-A0CE-A238E851F511
[native-run] iPad Air (3rd generation) 12.4 672C4237-B6FE-4F30-8BE8-F1D1E6D1A0BA
[native-run] iPad Air 2 12.4 FB5447BD-E1AE-4434-943F-64C940C467D5
[native-run] iPad Pro (10.5-inch) 12.4 54C47CD4-4074-4021-A355-57DBE30A6223
[native-run] iPad Pro (11-inch) 12.4 FCFD179A-C8E1-48AF-94A4-95CFEF37C88C
[native-run] iPad Pro (12.9-inch) 12.4 76BCB2BD-75E1-473C-B73E-3E7D6EE9B7ED
[native-run] iPad Pro (12.9-inch) (2nd generation) 12.4 8F73DCAD-9BDB-4009-AB2E-910745F5EEB0
[native-run] iPad Pro (12.9-inch) (3rd generation) 12.4 ADDC043D-9476-49CF-8FD9-D9F92A0AF4DE
[native-run] iPad Pro (9.7-inch) 12.4 252EB4D4-17A3-465E-8A26-9F0EA1D28999
[native-run] iPhone 5s 12.4 4284CF9C-AEBE-4890-83FF-D8C3B0BA47B9
[native-run] iPhone 6 12.4 A4BF9A50-2FF6-49B0-82B8-F3EDA6DB6E0B
[native-run] iPhone 6 Plus 12.4 904CE565-198F-49BD-A5A3-DE927B320CD0
[native-run] iPhone 6s 12.4 3B3225E7-2591-4441-991E-3B1CE494CE90
[native-run] iPhone 6s Plus 12.4 4A5431F9-B7B5-45F2-A7F9-4CFB633D7BF0
[native-run] iPhone 7 12.4 7DBEA756-7759-4025-809B-D6704FF23223
[native-run] iPhone 7 Plus 12.4 1E7DF2AB-E4AE-4834-8BFA-328E8B7DE34E
[native-run] iPhone 8 12.4 B1BBB831-4C2C-4107-A3B1-F5C3B6699957
[native-run] iPhone 8 Plus 12.4 DFB1E30F-AEC9-4089-8D16-2AC71FC6B704
[native-run] iPhone SE 12.4 30AC9EE2-8132-4A61-B7B2-E651A7C7691E
[native-run] iPhone X 12.4 1C20F1D6-132D-46F1-AE1E-A027984D832A
[native-run] iPhone Xs 12.4 490D0B7C-5044-4E07-830B-E8FDBC8E8B7C
[native-run] iPhone Xs Max 12.4 A5CD7626-8954-4CF9-8603-168CA1BCAAFD
[native-run] iPhone Xʀ 12.4 B776F557-C4BD-49A8-9F81-5F6AD839AD0A
and then:
./myproject/platforms/ios/cordova/lib/list-emulator-images
Apple-Watch-Series-2-38mm, watchOS 5.3
Apple-Watch-Series-2-42mm, watchOS 5.3
Apple-Watch-Series-3-38mm, watchOS 5.3
Apple-Watch-Series-3-42mm, watchOS 5.3
Apple-Watch-Series-4-40mm, watchOS 5.3
Apple-Watch-Series-4-44mm, watchOS 5.3
iPhone-5s, 12.4
iPhone-6, 12.4
iPhone-6-Plus, 12.4
iPhone-6s, 12.4
iPhone-6s-Plus, 12.4
iPhone-7, 12.4
iPhone-7-Plus, 12.4
iPhone-8, 12.4
iPhone-8-Plus, 12.4
iPhone-SE, 12.4
iPhone-X, 12.4
iPhone-XS, 12.4
iPhone-XS-Max, 12.4
iPhone-XR, 12.4
iPad-Air--3rd-generation-, 12.4
iPad-Air, 12.4
iPad-Air-2, 12.4
iPad--5th-generation-, 12.4
iPad-Pro--9-7-inch-, 12.4
iPad-Pro, 12.4
iPad-Pro--12-9-inch---2nd-generation-, 12.4
iPad-Pro--10-5-inch-, 12.4
iPad--6th-generation-, 12.4
iPad-Pro--11-inch-, 12.4
iPad-Pro--12-9-inch---3rd-generation-, 12.4
Apple-TV-1080p, tvOS 12.4
Apple-TV-4K-4K, tvOS 12.4
Apple-TV-4K-1080p, tvOS 12.4
I have tried different target options such as 'iPhone-8-Plus', iPhone 8 Plus, "iPhone-8-Plus, 12.4", "DFB1E30F-AEC9-4089-8D16-2AC71FC6B704" (the id that is beside iphone 8 plus, but without any success.
If I open the project from xcode and run it from there it works properly.
Any ideas?
Thanks
You have to run the below command :
ionic cordova run ios --livereload --target "BA4986B3-9102-4250-91BF-7DDF7D7BC60D"
where target is the device Id from your list
It turns out that the result from $ cordova emulate --list is different from $ native-run --list (you run both commands and you'll see device names are different).
The Ionic CLI uses native-run by default to run the emulator so device names you got with the emulate --list command won't match. You need to run your app using cordova instead of native-run by adding the flag --no-native-run:
$ ionic cordova emulate ios --target="iPhone-8-Plus" --no-native-run
ionic cordova run
This command will first use ionic build to build web assets (or ionic serve with the --livereload option). Then, cordova build is used to compile and prepare your app. Finally, the native-run utility is used to run your app on a device. To use Cordova for this process instead, use the --no-native-run option.
From https://ionicframework.com/docs/cli/commands/cordova-run
Close chrome debugger as well as chrome://inspect tab.
Related
When I remove Razorpay and run the code, it works fine. But when I install Razorpay, it throws this error. It used to work normally previously even after razorpay integration, but it suddenly started throwing this error. I was not able to run the app in ios Simulator through vs code. I was able to run my code in ios simulators through xcode. But now i can't run my code from both vscode and xcode.
Here is my Error Log
Launching lib/main.dart on Adaptabiz's iPad in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: Y2NZK7M69V
Xcode build done. 31.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/gourav/Desktop/VideoTailorClient app/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64-apple-ios.swiftinterface:12:8: error: no such module '_Concurrency'
import _Concurrency
^
/Users/gourav/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.7/ios/Classes/RazorpayDelegate.swift:2:8: error: failed to build module 'Razorpay' from its module interface; the compiler that produced it, 'Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)'
import Razorpay
^
/Users/gourav/Desktop/VideoTailorClient app/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64-apple-ios.swiftinterface:12:8: error: no such module '_Concurrency'
import _Concurrency
^
/Users/gourav/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.7/ios/Classes/RazorpayDelegate.swift:2:8: error: failed to build module 'Razorpay' from its module interface; the compiler that produced it, 'Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)'
import Razorpay
^
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
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.4.99. (in target 'FMDB' from project 'Pods')
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.4.99. (in target 'OrderedSet' from project 'Pods')
Could not build the precompiled application for the device.
Error launching application on Adaptabiz's iPad.
Exited (sigterm)
this is the result of flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.0, on Mac OS X 10.15.7 19H1417 darwin-x64, locale en-SG)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.63.0)
[✓] Connected device (2 available)
! Error: Adaptabiz's iPad is busy: Copying cache files from device. Xcode will continue when Adaptabiz's iPad is finished. (code -10)
• No issues found!
Try updating your flutter,Xcode and Razorpay versions to latest available... This Worked for me.
i am trying to build my flutter app on my iphone 11 with iOS version of 14.7 and my xcode is 12.5, I have seen that there is Xcode 13 but i don't have that update on the appstore, my mac version is Big Surr 11.5.2
what do i do?
When I run for the application from the xcode it works, and same thing
in simulator , but when I do the run from the Android Studio in iphone
device, It displays a white screen and then shuts down, and it appears
like this :
Launching lib/main.dart on iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 7R6D66J964
Running Xcode build...
Xcode build failed due to concurrent builds, will retry in 2 seconds.
Xcode build done. 44.9s
Installing and launching...
Error launching application on iPhone.
flutter doctor :
[✓] Flutter (Channel master, 1.24.0-2.0.pre.55, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-JO)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
[✓] Android Studio (version 4.1)
[✓] Connected device (3 available)
! Error: iPhone is busy: Copying cache files from device. Xcode will continue when iPhone is finished. (code -10)
• No issues found!
Open Xcode
go to Wondow -> Devices & simulator
your phone showing left side
right click on that and unpair
no pair the device and it's working properly
Just installed Flutter but Flutter keep failing to open up a fresh project in iOS Simulator
Error in Terminal
Running Xcode build...
└─Compiling, linking and signing... 2.2s
Xcode build done. 16.0s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
ld: unknown option: -target
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro.
Tried Flutter Clean but it doesn't work.
I ran Flutter Doctor but everything seems fine.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.6 19G73, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.47.3)
[✓] Connected device (1 available)
• No issues found!
Please help.
Update 1 Aug
Ran flutter run -v and here's the result. Still I can't start the file from flutter run. However, Xcode could build and run the file fine. Same goes to Android Studio.
[ +37 ms] Failed to build iOS app
[ ] Error output from Xcode build:
↳
[ ] ** BUILD FAILED **
The following build commands failed:
Ld
/Users/jason/Develop/first/build/ios/Debug-iphonesimulator/Runner.app/Runne
r normal x86_64
(1 failure)
[ ] Xcode's output:
↳
[ +56 ms] Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
-configuration Debug VERBOSE_SCRIPT_LOGGING=YES -workspace
Runner.xcworkspace -scheme Runner
BUILD_DIR=/Users/jason/Develop/first/build/ios -sdk
iphonesimulator
-arch x86_64
SCRIPT_OUTPUT_STREAM_FILE=/var/folders/1n/fywsxx0j35g060rtr5b9ff9c0000gn
/T/flutter_build_log_pipe.KUbRcA/pipe_to_stdout
FLUTTER_SUPPRESS_ANALYTICS=true
COMPILER_INDEX_STORE_ENABLE=NO
Build settings from command line:
ARCHS = x86_64
BUILD_DIR = /Users/jason/Develop/first/build/ios
COMPILER_INDEX_STORE_ENABLE = NO
FLUTTER_SUPPRESS_ANALYTICS = true
SCRIPT_OUTPUT_STREAM_FILE =
/var/folders/1n/fywsxx0j35g060rtr5b9ff9c0000gn/T/flutter_build_log_pipe.
KUbRcA/pipe_to_stdout
SDKROOT = iphonesimulator13.6
VERBOSE_SCRIPT_LOGGING = YES
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
ProcessProductPackaging ""
Anyone got any clue what's happening?
Nevermind. I can't figure out why. Wiped my HD and reinstalled macOS Catalina, Xcode and now it works.
I'm using cordova-plugin-facebook4 on version 1.10.1. When i run ionic cordova emulate ios I'm getting this error:
Undefined symbols for architecture x86_64:
"___isOSVersionAtLeast", referenced from:
-[FBSDKApplicationDelegate application:openURL:sourceApplication:annotation:] in FBSDKCoreKit(FBSDKApplicationDelegate.o)
-[FBSDKApplicationDelegate applicationDidBecomeActive:] in FBSDKCoreKit(FBSDKApplicationDelegate.o)
-[FBSDKApplicationDelegate openURLWithSafariViewController:sender:fromViewController:handler:] in FBSDKCoreKit(FBSDKApplicationDelegate.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I remove the cordoba-plugin-facebook4 the command ionic cordova emulate ios works. I'm using Xcode 8 because my mac OS is 10.11.6 and my machine is too old to upgrade the Mac OS. I will put bellow my execution ambient:
Ionic:
ionic (Ionic CLI) : 4.2.1
Ionic Framework : ionic-angular 3.2.1
#ionic/app-scripts : 1.3.7
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : ios 4.4.0
Cordova Plugins : no whitelisted plugins (13 plugins total)
System:
ios-deploy : 1.9.4
NodeJS : v6.14.4
npm : 3.10.10
OS : OS X El Capitan
Xcode : Xcode 8.0 Build version 8A218a
iOS SDKs:
iOS 10.0 -sdk iphoneos10.0
iOS Simulator SDKs:
Simulator - iOS 10.0 -sdk iphonesimulator10.0
macOS SDKs:
macOS 10.12 -sdk macosx10.12
tvOS SDKs:
tvOS 10.0 -sdk appletvos10.0
tvOS Simulator SDKs:
Simulator - tvOS 10.0 -sdk appletvsimulator10.0
watchOS SDKs:
watchOS 3.0 -sdk watchos3.0
watchOS Simulator SDKs:
Simulator - watchOS 3.0 -sdk watchsimulator3.0
Thanks for any help guys!