Build successful but unable to run on iOS simulator - ios

I am making a demo of cordova app. The console log is showing me build successful but after sometime it shows this error and run fails :
2016-07-30 09:34:47.609 instruments[9268:1431174] WebKit Threading
Violation - initial use of WebKit from a secondary thread. Instruments
Usage Error: Unknown device specified:
"B7257830-92A2-4C85-A4BA-342D7237F9A8"
Known Devices:
test's iPhone (8.4.1) [7fdfcc5aaeb179fdb53a86343ba18796a1825bc4]
The error is to replace UDID with known devices but I am unable find the file where it is mentioned.
Please share the path of file or file name or anything related to this error. Thanks in advance.

I solved this error simply following two steps.
Step 1: Go to Run Options and select Run Configuration as image shown below.
Step 2 : Now a window will open as shown below & select your device from simulator list.

Related

ionic4-iOS white screen in iOS Simulator

I'm using XCode11 and ionic4. cordova version ios#5.0.0
project builds successfully using ionic cordova build ios
also successfull build in xcode
but when running on simulator, it end up showing white screen and nothing happens next. here is the console output showing the issues:
Log1
Log2
stuck on this for 4 days. checked so many suggestions on ionic blogs and nothing worked so far. I regret using ionic because its very buggy/unstable... please help
ISSUES:
-Failed to load webpage with error: the operation couldnt be completed(NSURLErrorDomain error -999)
-NSURL Connection finished with error -code -1100
-ERROR: HTTP Request(OSRequestRegisterUser) must contain an app_id parameter
-ERROR: Encountered error during push registration with OneSignal
in addition to the above errors, the iOS simulator hangs on "White Screen", the application does not load and nothing happens next.
Try this:
On your xcode, navigate to your plugin folder, locate a file named OneSignalPush.m
Inside, locate the initOneSignalObject,
add this: appId = "your-app-id-here";
right after this code:
[OneSignal setValue:#"Cordova" forKey:#"mSDKType"];
That did the trick for me.

Flutter run does not output error message or stack-trace ("[VERBOSE-2:dart_error.cc(16)] Unhandled exception:")

There is an exception throwing somewhere in the codebase of my flutter application.
However this is what the console output:
[VERBOSE-2:dart_error.cc(16)] Unhandled exception:
// (nothing, should be printing stack-trace or error message here)
Not having the stack-trace makes it very hard to find where this bug is coming from.
Does anyone know if it is normal that the stack-trace or the error message does not print?
Is there a mode in which I should run flutter run in order to see more information about the error being thrown?
Setup :
flutter: 0.2.8
running on an iphone device
One insight to obtuse ios physical device / flutter errors is review the the physical device console and device logs. In my case, I'm using an iphone 6S trying to work on a camera app.
The logs are available via Xcode --> Window --> Devices and Simulators --> choose Devices, then select either "View Device Logs" or "Open Console" button. Select the button for "Errors and Faults" to make this a bit easier.
In my case I discovered an error in camera permissions that wasn't visible at all from my development environment. The app just crashed, I had no clue why... Then I found this in the log...
error 21:51:03.438135 -0700 tccd Refusing TCCAccessRequest for service kTCCServiceCamera and client /var/containers/Bundle/Application/A817FC3E-F55D-46F5-9EF2-372E4FC90B1B/Runner.app[319] without NSCameraUsageDescription key
error 21:51:03.476854 -0700 Runner This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.
The fix for my camera dilemma on the iPhone is as follows:
Find the Info.plist file (Location = flutter_image_picker/ios/Runner/Info.plist )
Add the following key/string pair:
<key>NSCameraUsageDescription</key>
<string>Camera used to take photos in support of the app.</string>
All fixed!

Xcode 8 : PAC Fetch failed with error [NSURLErrorDomain:-1003] log on Console window

I’m getting some strange log on console window while working on project. These are mentioned below :
nw_parameters_set_source_application Failed to convert from PID (0) to UUID. This could lead to wrong data usage accounting.
PAC Fetch failed with error [NSURLErrorDomain:-1003]
nw_proxy_resolver_create_parsed_array PAC evaluation error
I”ve checked below links but didn’t found any useful.
Link 1
Link 2
Note : I’m using Xcode 8.3.2 with iPhone 6 Plus device (iOS 10.3) and Swift 3 language in Project. It seems that there is no issue with this.
These logs appears all of sudden although there is no change in my code.
Most important thing is that my project is working as usual. So why I’m getting this issue?
Apart from this will there be an issue when app is uploaded on AppStore?
It's system logs that does not make sense in 99% cases. You should disable this logs in scheme settings
Click on scheme icon -> Edit Scheme -> Arguments -> Environment Variables
And add that variable:

Simple XCTest for UITest is failing all the time?

I start a new project from File -> New -> project
I add a button to ViewController.
I open UITest folder which created by xcode by default. Run the test code.
It fails:
2016-03-16 12:57:09.191 XCTRunner[3511:150419] Continuing to run tests in the background with task ID 1
t = 10.18s Assertion Failure: UI Testing Failure - Failed to background test runner.
/Users/Bernard/Desktop/ExampleTestApplication/ExampleTestApplicationUITests/test2.m:27: error: -[test2 testExample] : UI Testing Failure - Failed to background test runner.
2016-03-16 12:57:12.789 XCTRunner[3511:150419] *** Terminating app due to uncaught exception '_XCTestCaseInterruptionException', reason: 'Interrupting test'
Now I add a break point as follow:
Now test is successful! Anyone can explain the reason?
I was also facing same issues and none of the available solutions worked for me. Issue was not letting app to attach to the simulator itself.
I checked the log and saw that i did a mistake in code while locating the element. for Predicate instead of BEGINSWITH i wrote STARTSWITH and this was stopping the app to get attached.
So check your logs in the test report to get the issue.
I was getting this error happening when the iOS simulator was already launched (which may not necessarily mean you can see it in the OS X dock). You can check the state of the various simulators using the simctl command.
I.e.
xcrun simctl list devices
Then, ensure that any devices listed as "Booted" are shutdown:
xcrun simctl shutdown <device-udid-here>
Then, try running your UI tests again.

Xcode attach to process could not locate installed application

When I use the iOS simulator I've no issues with attaching to a process. But when I want to attach to a process on my iPhone it doesn't work. When I type in the process name and click on Attach it takes a while before showing me the following error:
It seems that I get the same error for any process identifier, even when the process identifier doesn't exist:
I think this issue is due to my iPhone (5S iOS 8.3), because on another iPhone (5) I don't have this issue. Can someone please help me...
This issue was only occurring on my iPhone 5S and after a factory reset the issue didn't occur anymore.

Resources