“SimulatorTrampoline.xpc” would like to access the microphone - xcode

I recently upgraded to Swift 5, Xcode version 10.2 (10E125), and after fixing a few compile issues on an app in progress, see this new and never-seen-before request. I can find no evidence of it in my project via direct searching, and no search returns on the net. No return from the pods within the project either.
This concerns me and wondered if anyone has any info on it.

This is part of Apple's fix for radar 45715977, where Simulator devices would prompt repeatedly to access the microphone (as often as every time your app was run). You can find a brief reference to the fix in the Xcode 10.2 release notes.
There are no references in your project because the prompt comes from part of Xcode itself; it's there so that your apps can use audio services in the Simulator, rather than having to be run on a device. I wouldn't worry about it.

Related

Difference in behavior between Xcode and OTA Ad-hoc distribution

I have my app working to my satisfaction both in the simulator and on two devices when debugging through Xcode 4.3.2. I use OTA Ad-hoc distribution to send to my beta testers. After archiving, saving, and uploading my ipa and plist file to my website, I then download and successfully install the app on my phone.
Sounds good, right?
HOWEVER, I am using CoreAudio and CoreData, and low and behold suddenly there is no sound in my app. I delete and install OTA on the same devices I am debugging with, so I am at a loss to where the problem is occurring.
I have a feeling that there might be an underlying problem with my Core Data model (which feeds my sound) but checks upon checks seem to verify that it is working. It DOES work when I install from Xcode, unplug, close, and reopen the app on the device. Only the OTA install has this problem.
Has anyone encountered any differences in behavior like this? I checked my build settings and the only difference I see for AdHoc is using the Entitlements.plist, which only useful setting appears to be NO to debugging.

Xcode Instruments is stripping symbols despite all build settings to the contrary

Problem
Instruments' Time Profiler is stripping all symbols except system libraries from my app, despite the fact that I have disabled this behavior in all relevant build settings in Xcode — but only on one development machine. The other dev machine behaves normally.
Description
Instruments' Time Profiler is stripping all symbols except system libraries, despite the fact that I have disabled this behavior in all relevant build settings in Xcode — but this is only happening on one of my development machines. I have two development machines running the same version of OS X, Xcode, and Instruments, and each machine is using an identical copy of the same Xcode project with identical build settings, schemes, and other configurations, and the app is profiled using the same test device (iPhone 4S with the latest public version of iOS 5).
Machine 1
- Mac OS X 10.7.4
- Xcode 4.3.2 (4E2002)
- Instruments 4.3 (4321)
Machine 2
- Mac OS X 10.7.4
- Xcode 4.3.2 (4E2002)
- Instruments 4.3 (4321)
Steps To Reproduce
Open included sample project on each machine.
Make sure the iPhone 4S is selected as the test device.
Select Product > Profile
When Instruments launches, select Time Profiler and continue.
Run the app.
Notice how the symbols are stripped when running on the iMac (Machine 1) but not on the MacBook Air (Machine 2).
Expected Behavior
Symbols from my own code should appear in the Time Profiler on both machines.
Regression
I have tried all of the following, with no change in the actual results:
Rebooting the machine.
Trying other Xcode projects
Deleting the "Derived Data" for all projects in the Xcode Organizer.
Re-symbolicating the document in Instruments (carefully selecting the correct DSYM file in ~/Library/blahBlahBlah…)
Final Notes
Here is a link to a .zip file of a sample project: Sample Project .zip
I was finally able to get it to work by a method that's just shy of a nuke-and-pave scenario:
Make absolutely sure all symbol stripping is disabled for your current build configuration. Make sure you've done this for your Release config if that's what's being profiled for Instruments.
Delete the app from the iOS device.
Restart the iOS device.
Restart the Mac (I don't trust Xcode or Lion at all to quit all relevant processes otherwise).
Launch Xcode, go to Organizer > Projects and delete Derived Data for the affected project.
Clean your project. Hell, why not?
Build and profile for Instruments.
Choose the Time Profiler in Instruments for clarity.
The first run will not show the symbols, but don't quit. Leave Instruments running!
Re-symbolicate the document in Instruments, navigating carefully to the correct dSYM file for the current build. This should be easier since you've deleted the derived data in step 5.
Now you should be able to see your symbols. It helps if you hide non-objective-C symbols.
Why do I suggest that you delete the app and restart the iOS device in Steps 2 and 3? I have a suspicion that Xcode doesn't perform a clean installation of each build, but may install deltas, such that the symbol addresses present in Instruments are a mixture of the current build plus previous builds. If so, then this issue is even more common for someone like me, who shares a single test device between more than one Mac. This assumption could be wildly incorrect.
If the above steps don't work for you, please let me know in the comments. I'd like to create a detailed radar report at some point in the future.
I'm not sure that it has been fixed in the 4.3 but this is a known problem in 4.2 seen here
Instruments
There is a known issue with the Profile action from Xcode 4.2. After a build in which no source files have changed, Instruments will be unable to gather symbols for the target application.
This affects projects where both:
The Release configuration is selected for the Profile action.
(default)
The Strip Linked Product build setting is set to "Yes”, or
a custom Run Script build phase strips the product. (non-default)
The workaround is to do any one of the following:
Perform a "Clean" on the product before initiating the Profile
action.
Do a Clean of the product and temporarily set the Strip Linked
Product build setting to "No" while Profiling.
Set the configuration of the Profile action to Debug.
Run successive profiles directly from within Instruments when you do
not need to rebuild. When developing Mac apps, using the GC Monitor
template in Instruments may cause Instruments to crash. To
workaround the problem please consider migrating your application to
ARC.
I've had a similar problem for days. I was able to profile the Debug configuration, but not Release. First I tried to make a copy of the release configuration (as suggested somewhere on the web), but that copy did not work either.
Then I made a copy of Debug, called it Profile, tried it and the symbols of Profile were shown in the profiler. Great! I then changed the optimization levels etc. to the same as Release, and now it works! Just wanted to share this, as this comment would have spared me hours...
Have been facing the same and stumbled upon this thread.
I realized that I first profiled the app with release build and after changing the scheme in Xcode for the same app, the profiler was still unable to symbolize. I have tried all obvious solutions you mentioned above but in vain.
The profiler somehow is still referring to the first build (release build)'s settings and hence it is not able to symbolize. So, I just changed the app's bundle identifier for testing purpose so that a new app is created altogether for profiling purpose. I could check the code where leaks exist now.
Try it out and let me know if this works for you too. Still pondering over why Instruments is failing to symbolize though.
I had a similar issue where I had no symbols in my os x application that I built from the command line (so in this case it is not an iphone or xcode issue). It turned out the problem was due to a bad DYLD_LIBRARY_PATH that contained my PATH. When I got rid of all those non-library paths, such as /usr/bin/, it worked.
I have a lot of third party frameworks whose symbols and binaries are unfortunately getting lost.
Additionally, my app's binary was getting lost.
I.e. if I selected File > Symbols, clicked my target, and found the similarly named item, the Binary Path was showing up red.
The solution was to go to Instruments > Preferences > Symbols, and add /Users/<MY_USER>/Library/Developer/Xcode/DerviedData to the search paths. Library is not indexed by Spotlight. After doing this, I have at least had the symbols for my app. The little circle next to my app's name goes from Yellow to Green when I do this, and persists between restarting Instruments, unlike other solutions to manually set the binary.
Let me know if you can tell me how to get all the ones for my third party frameworks. I use Carthage for some, others installed manually. Have had no luck with these yet.
I've managed to solve this by:
Disconnecting the device
Deleting the iOS Device Support files for the device's version of iOS in ~/Library/Developer/Xcode/iOS Device Support
Reconnecting the device and letting Xcode reinstall device support.
To be safe I first quit Xcode and Instruments, deleted derived data, and did a clean build as mentioned above, but no need to delete the app or restart any devices this way.
Try open XCode 3 and him Organizer. And try add from this Organizer a devices to both machines.
Just open Organizer and wait him processes. If you're see a button "Use for development" then click him.
Sometimes, XCode 4 can't add a device a truely for full development.

Xcode 4.3.2 and iOS 5.1.1 + jailbreak: App installs but crash on launch

I don't have the Apple 79€/year account. In iOS 5.0 and Xcode 4.2.1 I changed SDKSettings.plist ecc... And it works. In iOS 5.1.1 and Xcode 4.3.2 no, I already changed settings ecc but don't work, the app installs on device but crash on launch... How can I run my app on device without crashes? Thanks, and sorry for my english.
I have had this issue before on a jailbroken device. You have a few solutions depending on the exact issue. First you can install app sync in order to allow unsigned code to work on your device if you are not using a valid code signing identity. The second option is to actually get a valid code signing identity along with the provision profile so you can run the application correctly. This involves paying for the developer program so this may not be the best option.
Last is a very common issue with jailbroken devices. Which is that you will receive an error such as "failed to get the task for process xxxxx". This tends to happen a lot with jailbroken devices. This is because Xcode notices you are not using a provision profile that is required to report error logs. All you have to do is launch the application again on the device and everything should work.
This is just Xcode not being able to fully launch your application because of the missing provision profile so it results in a crash. If none of these solutions solve your problem please post a more detailed explanation of the issue you are having.

Xcode cannot run using the selected device No provisioned iOS devices are available

One of my coworkers set me up with a provisioning profile through our corporate profile. I have read through several tutorials and none of them corresponded to the steps he actually took to get it set up. In the end my device was listed under the devices section of the organizer with a green circle next to it (I am guessing that's good?) but when I try to run the application on my device I get the error I mentioned in the subject of this post. I should mention my device is jailbroken running iOS 4.2.6. Is the "jailbrokenness" of my device an issue?
This is like day one with Xcode and it is pretty overwhelming coming from the Linux command line and Emacs. I don't expect a complete walk through from any of you. But if you can point me to a nice long tutorial showing me how to set this up with the latest version of Xcode I would appreciate it.
Check if you can see your device in Organizer and verify iOS version installed on the device with the deployment target for your application. This is very often the case as you won't be able to deploy 4.3 application to 4.2.1 device (for example).
In Xcode Set the target to project_name | iOS Device
Then in Xcode From the product menu=>Build For=> Build For Testing

Why doesn't iPhone ad hoc distribution in iOS 4 (Xcode 3.2.3) work?

Before iOS 4, I could successfully build my app using the ad hoc distribution profile and send it to my clients for testing.
Now. under Xcode 3.2.3, when I (and my client) drag and drop the .app folder into iTunes, the app does not appear among the list of apps and no message (error, warning, etc) is displayed.
Is there a known problem with ad hoc distribution in Xcode 3.2.3?
Hey, so I just ran into this, and I found that I could fix it by setting the value:
"LSRequiresIPhoneOS" to true (checked) in the application's Info.plist file.
I had a look back at all my old projects, and found that they all had this checked. I'm guessing that what happens is that when you open an old iPhone project in Xcode 3.2.3, it corrupts that parameter for some reason. I also encountered another other weird thing when I opened the project: a build parameter that is iPhone specific ("iPhone OS Deployment Target") was not there, and instead, the parameter "Mac OS Deployment Target" was there. This issue was resolved by saving the project. It all seems to point to Xcode failing to be backwards compatible with iPhone projects, which I've definitely seen other manifestations of in previous SDK upgrades.
Anyhow, hope this helps! If anybody has any deeper insights I'd love to hear them.

Resources