Routing app coverage file not copied to the simulator - ios

Since updating to Xcode 6, I see this warning every time I run the app on the simulator. My app has a routing app coverage file and I want it copied to the simulator but it's not happening. This seems like it might be a bug. Is there a workaround?

I had a similar error some time back, because XCode may be using a precompiled version of the app.
This is how I solved it:
In xCode, make sure that your app isn't running in the simulator (click the stop button), then
Build menu > Clean target or SHIFT-CMD-K.
Additionally, clean the content in the Derived Data folder ~/Library/Developer/Xcode/DerivedData/.
Hope it works for you.

Related

Xcode 8 app runs on Simulator but doesn't display

I'm using the release version of xCode 8 and am trying to run my app on the simulators. They are all the iOS 10 simulators.
No matter which simulator I use, when I run the app the app icon shows up in the simulator but then that's it. The app never displays in the simulator. I only see the app icons of the iOS home screen.
I put some break points in my initial view controller at the viewDidLoad, viewWillAppear, and viewDidAppear methods. All of them triggered. So as far as my app is concerned, it is displaying on the device. I also get all the normal log output and networking calls happening just fine. It even shows the popups for permission to access the calendar and notifications. But my app is not brought to the foreground.
If I then click on the app icon in the simulator, my app runs normally. But it should be automatic when I hit run from xCode.
When I run my app on an iOS 10 device I get the same behaviour as all three of those view methods are called. However I don't get any of my normal log output. In fact I don't get any log output. However the app was already installed from when the device was on iOS 9.x. Not sure if that is a factor. But aside from the simulator issues, this is the bigger issue.
I've tried cleaning the build, deleting the app, I even tracked down the derived data folder and deleted that from the simulator. None worked. I also updated all my cocoa pods I have installed too.
Any one else experienced this?
That sounds weird but I read a lot of threads on the Apple Developer Forums on the same problem during the different Xcode 8 beta version, try these steps:
reset the simulator using the menu "iOS Simulator" -> "Reset Content and Settings..."
remove your 'xcuserdata' directory inside your .xcodeproj directory
do a clean build folder (hold down option key when selecting clean)
reboot your Mac
If these steps don't solve anything you can try this solution:
Copy-paste Xcode-beta.app from Applications folder to somewhere else, e.g. - Documents folder.
Delete Xcode-beta.app from Applications folder.
Move Xcode-beta.app from Documents to Applications folder again.
originally posted here, obviously using your Xcode.app instead of Xcode-beta.app.

Meteor App Can't Run on iOS Device (Mobile Configuration Issue)

I'm having trouble with my iOS build. Not sure what it is.
After running meteor run ios-device command. It launches Xcode, but the "build and run" button is greyed out.
And when i expand the device drop-down, my phone is listed as "ineligible device" and the simulators is not even shown there.
I suspect there's something wrong inside my mobile-config.js file. Because when i remove this file, it runs as expected (but with default settings).
Hope someone can help explain this. I'm very new to both Meteor and iOS. Sending my packages and platform files as well for reference.
I had this issue too. There were one of two things that fixed it:
1) Make sure your project is linked up to your the correct iOS dev team/account & its not set to "none":
2) I had this issue come back again, besides fixing up the above.
So I restarted the computer, logged in and out and deleted the folder over at .meteor/local/cordova-build and ran meteor run ios-device to rebuild it. This was related to the mobile-config file because I changed the name of my app after I ran it the first time. Clearing up the cordova build stuff forced it to rebuild and perhaps this is why it fixe it.
I also deleted the previous app installed on the device (before I renamed the project in mobile-config.js. I did this because I suspected it had trouble installing because of the naming changes.

Storyboard won't update in simulator

I have a working app in Xcode, however when I try to build and run it the simulator displays an older version of the storyboard I was working on. I had changed some of the design on the storyboard but this does not reflect in the simulator, nothing is updated.
Does anyone have any ideas?
Delete the App on the simulator.
Clean
List item
Build & Run
Use NSLog(#"") in your controller to check code execution.
I just spent at least 6 hours on this. I have a solution, but I also submitted a technical support ticket to apple to try to get more info on the cause and proper solution.
Simply remove the references to your storyboard files and add them back in the same file group.
This seems to include the storyboard files back into the app bundle generated during build(which can be seen in the
DerivedData/APPNAME/Build/Products/Debug-iphonesimultator/APPNAME.app
From here I can see my changes reflected from the storyboards as expected.
PS - Are you using localization at all? I was.
I lost 2 hours to this.
Solution was braindead simple: delete app, turn OFF the iPhone 5S (iOS 7.1.1), and turn it bavk on.
When you turn on localization,
xcode moves storyboard file in localization folder (ex. Base.lproj/name.storyboard). When you build and run project on simulator, xcode copy name.storyboard into "derivedData"/Base.lproj/name.storyboard, but previous, created before localization "derivedData"/name.storyboard still exists. In this case simulator uses the file which can be found easier, i.e simulator uses old file "derivedData"/name.storyboard to operate.
Solution: Just rename the storyboard file, in navigator and in targets/general.
This error happened to me for the first time when I had multiple copies of a project on my computer. For whatever reason, the fact that there were multiple copies were making it look as if the storyboard had not been updated between copies and in some cases the code was not updated. I thought I had forgotten to throw the right copy on my flash drive before going home, but it turned out it's an XCode error.
Delete any multiple copies using the same name, restart XCode and open your most recent copy. Extremely bizarre, but I will probably use BitBucket or GitHub from now on instead of throwing it on a flash drive.
Deleting
~/Library/Developer/Xcode/derivedData/
worked for me!
I just have the same problem after localizationMy solution is clicking Product, Clean build folder. Then it will be fine
The storyboard on the simulator was what it should have been. The storyboard on the device would not update. I had to delete the application from the iPhone and then re-run it on the device in order to get the Storyboard to update on the device. Fortunately for me it was only test data, but I was using Auto-Layout on one view and went back to manual. I think that's what caused the issue for me.
I find that removing and adding storyboard file back doesn't work in my case, also it has side effects like it will automatically add a main nib entry into App's plist file (which subsequently makes the App fails to launch in iPhone simulator).
I don't want to try to delete the application from the simulator since I have many files under the Document directory of the App.
At last I find another way that works well: simply delete the "/Users/$username/Library/Application Support/iPhone Simulator/7.1/Applications/$app/$yourapp.app" file. The files under Documents directory are untouched.
(I have localized my storyboard as well.)
I found this same thing happened with Xcode 6.1.1 if I happened to have copied a project; the new project run in the simulator was actually still reflecting the old, original project.
In my case the problem was with how the default area was set up for derived data (essentially the location where the binary files go for a build). Mine was set to legacy and the simulator was using the wrong project, even after a clean. The solution was to go to Preferences->Locations, press Advanced, and change the location from Legacy to Unique.
I get this too when using localized storyboards - Run in Xcode just refuses to install the latest version of the compiled storyboard. I think it is something to do with the way Run copies changed resources across to the device - it does it differently than other forms of on device app installation.
The quickest way to get past this without deleting the app and losing any data is to:
Generate an Archive build in Xcode
Export this for Adhoc deployment
Double-click on the generated IPA to add it to iTunes
From the device page in iTunes force an update to that app
In order for iTunes to see that you have a new version your app build number will need to be incremented (if you don't do that already), before generating the archive.
I find this method means you don't have to delete an app off the device, you're just forcing it to install the entire install package rather than a diff which is what I think Run is doing.
I'm not sure what causes this, if it is a localized resources bug or what, but this is still a problem in Xcode 7 for me.

iPad apps never install in Retina simulator

I've racked my brains over this one, and I'm probably just making a stupid mistake. After switching to Xcode 4.5.1 (it may have happened at 4.5) I simply cannot load an app into the iPad Retina simulator. I've edited the compilation scheme to say to always use the Retina display for the iPad. No love. It used to be that you could change simulators on the fly and whatever one was open would be the one the project compiled for. But I can't figure out how to do this in 4.5. Help!
Something funky is going on, which seems to be not acting as expected. Try these solutions in the following order.
Your method is correct, you set your Simulator Display preference when editing your schemes. Make sure your destination for the scheme is the iPad simulator, that it's tied to the Run scheme, and set iPad Simulator display to Retina. Save/apply your scheme changes, try to run your app. If that doesn't work, close + re-open Xcode, check scheme settings to see if they stuck, and try again
You may want to double check if your changes stuck. Delve into your project file (by right clicking on your project file, and selecting "Show Package Contents"). Then navigate to:
xcuserdata->username.xcuserdatad->xcschemes->ProjectName.xcscheme
Open it up in your favourite editor, and check to see if there's a:
simulatorIPadDisplay = "2.000000"
...for your required scheme
If none of that worked, then it may be an issue with your derived data (unlikely, but step 1 should have worked). Go to Organizer, and select the Projects tab. Then hit 'Delete...' for derived data. Do the same as before; run, close Xcode, check and re-run.
Well we really are in a pickle, that is the only method to set your preferred simulator display for a build scheme. You may need to resort to removing Xcode and re-installing, and trying the previous steps again.
What on earth is going on?! We've exhausted our methods, you may need to let Apple know about this issue.
Well, after a long session of "find all of my settings files and save them, delete Xcode and all of its settings files, reinstall Xcode, re-download simulators and dockets, replace settings files, etc., etc." I found myself in the same position. No Retina simulator for me.
The problem wasn't Xcode or the project file--the 5.0 simulator will simply not launch in Retina mode. The 5.1 and 6.0 simulators work fine, as I discovered when I switched to them in the compilation scheme. Switch back to 5.0 and I'm stuck in normal simulator mode. The reason I've been using the 5.0 simulator was to test lowest-common-denominator iOS features. That, and there is a bug in iOS 6.0 that affects large packet transfer via IPSec that hasn't been fixed yet.
So, I still don't know what the missing Derived Data status was all about, except that it's fixed now and I assume that reinstalling the app was the fix.

iPad2 device build does not update when I do a new build

I am having a consistent problem with multiple different apps that the build on the device does not update when I make code changes. Here's my set up:
OSX Lion
Xcode 4.1
iOS 4.3.5
I build, and then run, the app launches on the device but it still runs the last installed version. In order to get the build to update, I have to do the following...
Remove the app from the device (press and hold on the icon, and click the x)
Clean and then build in Xcode
At this point if I try and run the app does not run. Xcode log says the app has started and stopped. If I restart Xcode and run, then the app runs successfully and is the updated version
If I make a single line of code change I have to go through all the steps above to get the app to update. The project is very large so a clean build takes 2-3 minutes.
Any ideas?
Update
I found the solution, this is related to the use of static libraries. The following article helped me solve this:
Changing the source of a static library needs clean and build in xcode 4
and for general background this was very helpful too:
http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/
Double check your provisioning files and targets. Be extra sure to check the App ID in your targets, and Bundle ID in info.plist. Did you change any of that info before you saw this problem? I've noticed strange behavior like what you mentioned when updating those specific pieces of data.
Command+Shift+K -- Clean. I have found that you have to do a manual clean every time now to ensure that the build updates correctly.
In the event that xCode does not run at all, you just have to restart xCode.

Resources