I have the latest version of appium (1.4.0) on a mac. I'm trying to use the element inspector on an app. So, I tried to launch the app through my device but I keep getting an error saying could not initialize ideviceinstaller. So, I tried running it on the simulator. But, the app keeps crashing and i get the log message that DYShaderAnalyzerNextGPU is implemented in two locations. Then, a WebKit threading error and finally that Instruments exited with code 253.
This could be a few things..
First, did you install ideviceinstaller?
if you have homebrew installed, you can install it with brew install ideviceinstaller
Second, the error you're seeing with DYShaderAnalyzerNextGPU can be caused when the DYShaderAnalyzerNextGPU class is a member of multiple targets in a single app. Does your project contain multiple targets? Is this file a member of both? You can still build/run the app relatively safely with this error, but it would be good practice to organize the project such that DYShaderAnalyzerNextGPU only needs to belong to one target.
Third, does your app run successfully in the simulator at all? If you're trying to do special graphics work inside WebKit, it is possible that you need to be running on a real device. Also, you should not attempt to manipulate what thread WebKit is using, I think it typically wants to be the main thread.
Related
Tried to run a variety of applications, including the base is generated at the project initialization nativescript, ionic (2) framework.
Compiling succeeds after xcode runs the simulator and it opens the app or I'll open it by clicking on the icon opens the icon background and hangs indefinitely, and at the end of the log is always the same error regardless of the framework:
CoreLocation: Error occurred while trying to retrieve motion state update: CMErrorDomain Code:104
This error Google, but at the moment I only found an open topic without solutions.
Could this be due to the fact that in macos virtualke and if so, how?
I'm usually not a Mac/Xcode user, please forgive me for incorrect terms or understandings.
I have a 2D Unity game which I can successfully build and run on Android and Windows Phone devices/emulators. When building for iOS, I can successfully create the Xcode project, open it and build the app in there. The only change in the iOS-specific player settings I made was to set SDK Version to Simulator SDK.
However, when trying to run it inside the simulator, the splash screen appears, then Xcode pauses on something that looks like an assemby file with an error message: Thread 1: EXC_BAD_ACCESS (code=1, address=0x4).
As I had no idea on what to do, I started stripping down my project (in Unity) until I had no more gameObjects but the camera left on the start scene. Also, I removed all other scenes from the build. The only thing that changed was that above error message now seems to appear on another assembly file.
What could be the issue here? How should I investigate further?
Update
This is the stacktrace:
Update 2
I've created a new blank Unity project, and I get the exactly same error there. The problem seems to be related to Unity or my machine, not the app itself.
Workaround
After days of researching, I still couldn't resolve the issue and finally built for a real devices instead of the simulator. Since I don't own one, I "blindly" submitted the result to the app store, and it got accepted.
For me, that's the proof that the issue is solely related to the combination of Unity and the iOS simulator, i.e. that those two don't work together reliably.
On the other hand, it seems relatively safe to assume that an app will work on iOS if it's been successfully tested on Android, Windows Phone and the default player. Of course, unless iOS-specific features are implemented.
I only know one reason, that leads to this behaviour (device builds work, but simulator builds won't).
=> This could happen, when using native iOS code / plugins
To fix that, you'll have to modify the <path-to-xcode-project>/Libraries/RegisterMonoModules.cpp file, cause somehow Unity does not register those classes/methods for the simulator.
Just look for #if !(TARGET_IPHONE_SIMULATOR) defines and shift them to have all your plugins included, also in the simulator. There will be some move mono_dl_register_symbol() that you'll need.
I've built a starter app for myself and wanted to transfer it to my iPhone 4 but unfortunately when it's transferred from Xcode to my iPhone, Xcode throws an error which terminates the app (of sorts) and I get nothing on the screen except the app logo. All of which is beyond my understanding.
The debugger shows an error in the main.m file highlighting the following line:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
whilst labelling the above line with the following words:
Thread 1: signal SIGABRT
I would like to point out that my device is jailbroken also. Please let me know what I need to do to get my app running on my device successfully.
The correct way to fix this depends on which way you're expecting to upload and run your code - i.e. do you upload your code via ssh in a user-specified script, or do you use the apple-provided way with provisioning profiles? Your question is currently lacking the information needed for answering this.
Since you're jailbroken, you should always be able to add a post-build hook which signs the binary using ldid -S, uploads the binary to the iPhone, and runs it.
(You won't be able to use the debugger integrated into XCode without major hackery if you use this way, and there's probably a simpler way of achieving this.)
Probably the device recognizes your Apple certificate isn't valid (if you even have one) or the software refuses to run the app on a device that isn't fully legit according to Apple's standards.
That is one reason but that's something I'm fully certain. I searched stackoverflow and found another possible explanation. This topic states that a new xcode project only runs on the newest OS. At the moment iOS 7 is still in beta so a startup project launches default in iOS 6.1.
To make it run on an older version you'll just need to adjust the deployment target to the version you prefer. Ofcourse working in an older OS will take effect in the language and "set you back". And here is how to change your deployment target. Hope this helped?
My app has been running fine on iPhone simulator. I have hit an issue (discussed here: Intermittent error accessing core data model / contacts database) and now all of a sudden, it won't build and run on iPhone simulator. I have the following error:
Couldn't register com.yourcompany.XXX with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.(lldb)
Any thoughts? I have tried totally closing and resetting iPS as well as deleting the app and reinstalling but to no avail.
Very frustrating!!!
Reset your iphone simulator and clean up your xcode project.
Type
apple-alt-shift-k
in xcode.
It happens quite a lot for me, especially during frequent restarts of the simulated app. I tracked it down to (at least sometimes) a race condition or deadlock when the simulated app is shutting down and a new one is starting up.
Quitting the simulator usually work
If that does not help, restart Xcode
Sometimes processes may linger and restarting the Mac is ususally the quickest way to recover (although clever use of the killall command can salvage the situation if it is really inconvenient to restart).
Quit the iPhone simulator and run it again.
Quit the simulator and xcode.Also delete the app from your simulator.... and if it does not work goto target setting and change something like name of app in bundle identifier . and it should work
You are using Core Data. So its possible you changed the dataModel and NSManagedObject class is changed. So it will crash until you delete application from simulator and run your project again..
I created a build for ad-hoc distribution of our product and installed the same on my device. Now I want to run the time profiler on the running process but Instruments is unable to attach to it. This is the error that I get when I try to attach to a running process on the iPhone:
Target failed to run : Could not attach to process <app-name> (<pid>)
I also tried "Choose Target" > app-name but that too failed with the following error:
Target failed to run : Remote exception encountered : 'Failed to get task for pid <pid>'
Here are the details of my setup:
OS X 10.7.2
Xcode 4.2.1 (Build 4D502)
Instruments 4.2 (4233)
iPhone OS 5.0.1 (Build 9A405)
I had the same problem. I didn't solve it initially, but an easy workaround is to launch the app yourself and then attach to it from the "Attach to Process..." command in the Target menu in the Instruments window.
After some digging around it seems this is a common topic of discussion on the apple developer forums: Instruments does not work on Xcode 4 with device
It appears that different Apple products will change/update the MobileDevice framework. Some of these updates break the Instruments integration.
To fix this on my own machine, I installed the iTunes 10.5 beta v6. Fire up XCode, and I'm back in business Instrumenting on my device.
I would recommend this tutorial since it is one of the better ones for explaining how to use Instruments
It can be very confusing at first, but take the time to get to know it and it'll ease a lot of headaches later.
Hope atleast one of these approaches work for you.
In Xcode 10: don't launch Instruments separately. Instead:
From Xcode’s menu bar, select Product\Profile, or press ⌘I. This will build the app and launch Instruments. You will be greeted with a selection window...
Full Tutorial
Note
If you do launch separately you'll get the failed to attach to target error with the recommendation to disable System Integrity.