changes in MainStoryboard doesn't effect the app - ios

I've made a few changes in my app, the changes are in the MainStoryboard.
When I click run, the changes doesn't appear in the application. What is the problem?
Example: I add a label in the main screen and when I click run I can't see this label.

I had this issue after I started internationalizing my project. I had one storyboard and two strings files. However, when I hoked around in the project using Terminal, I found that the old version of the storyboard was still there, so I moved it out.
All that said, to fix the issue I had to physically delete the app from the device/simulator and run it again. Performing a clean build didn't work for me.
If performing a clean build and deleting the app from the device/simulator doesn't work, then have a look inside your project directory for any rouge storyboard files.

clean your build folder. Complete remove all the build that are already install in your device or simulator.
I have also the same problem, actually I have two build install in the simulator with different identifier that is causing the problem

Related

old Ios App Icon Is availlabe even after changing

I have an app where I recently replaced the app icons, I removed all of the old assets from everywhere in the project.i removed cache and also uninstalled the app from mobile. After installing and running I am getting the deleted App Icon again in the App
Completely delete the binand obj folders in your project folders (all projects from solution).
This might help on top of what you've already tried.
Other possibility is, you have forgotten a resource ;)
Often times, the problem is between the keyboard and the chair.
Try this solution :
Use "Build > Clean all Targets" and then build and run. Xcode doesn't always see that images have been updated, and leaves them out of incremental builds. Cleaning before building makes Xcode build the app file from scratch, and will pick up any images it's failing to get
Clean and build your project.most of the case it works. :)

How to solve the apple LLVM 5.0 error in xcode 5?

I was running my application without any problems on both the simulator and device. All of a sudden i get this error:
fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionView.h' has been modified since the precompiled header '/Users/rashidasgari/Library/Developer/Xcode/DerivedData/ModuleCache/SWBH8ZAWBXAH/UIKit.pcm' was built
note: after modifying system headers, please delete the module cache at '/Users/rashidasgari/Library/Developer/Xcode/DerivedData/ModuleCache/SWBH8ZAWBXAH'
I tried any solution i could find and still no luck. Note that i tried running the application on another MacBook and everything works fine without any errors.
Cleaning the project is the first port of call (menu under Product).
If that doesn't help, delete the derived data. That can be done via the Locations section of the preferences or by navigating to the directory in Finder and deleting it (there is a little -> button in preferences to get there, or use Go To Folder... option in the Finder.
Ok after trying almost every solution on web, i decided to reinstall xcode and it finally worked.
I solved this problem by changing DerivedData folder name..see how i did
Xcode->preferences->Then you will be redirected to preferences screen
Then click on locations tab under menu selection->then you will have options like Derived data,snap shots ,archives
under Derived data you can see some thing like /Users/SENABI/Library/Developer/Xcode/DerivedData-> then click on that arrow button that's it there you can see DerivedData folder click on that and rename it. your error will be removed.
This is my experience and it worked for me hope it will be helpful to someone.
Error occurs when system header files are modified.
Solution :
If you have the backup of XCode then reinstall the XCode (Better solution).
Delete the DerivedData folder and then build the project
Use CMD+Shift+K to clean the build and then relaunch. This should solve the issue.
you don't have to delete anything.
you messed up a git pull somewhere probably. just quit Xcode and the simulator, reset any changes (or stash them) try another git pull, start Xcode again, clean your project and run it again.

How does Xcode compile files when changes are made in a project?

I am new to iOS programming and Xcode. Please help me understand how does Xcode compile and run the code.
Ideally an IDE knows the changes made in the progranm and the next time when we compile or run it, it knows which files need to be compiled again. But while I was trying to add storyboards in a project which was working fine with a few ViewControllers and XIB files,
I moved the view from an existing xib file to a ViewController in the storyboard and changed the name of the class to its respective ViewController in the Identity Inspector and I deleted the XIB file. When I ran the program, I didn't see anything different happening. Out of curiosity I deleted all the XIB files and then again ran the program but the still the project ran perfectly.
Then finally I deleted all the files present in my project and when prompted to either "Send to Trash" or "Remove References" I chose remove references and again built and ran the application, but there was no problem and again it ran perfectly.
After that I closed the project and again opened the project from the 'Finder' and ran it this time finally I got more than 30 errors which were not resolved even after I added all the files back to the project in Xcode.
Please help me understand how Xcode compiles the projects and also that what I may be doing wrong to move the views in the XIB files to "Storyboard" in a project.
You are right in your understanding that XCode should detect changes and know when to rebuild things, however, XCode is not perfect, and is sometimes buggy. You can "Clean" the project under the Product menu to get it to rebuild.
You did not say if you were running on the simulator or not. I often have problems when adding or removing resources and running on a device. To fix these issues, you can delete the app on the device.
Restarting XCode also often fixes issues.
Also, ensure you have the latest version of XCode.
If you get to the point where you can recreate issues, consider submitting a bug report.

Displaying the wrong launch image on my app. Tried to replace it in several ways

I have a problem with my app´s launch image. Early on in the development I added a sample image as launch image. Now when the app is ready for release, I can’t change the launch image.
I have tried changing it inside xcode in the project summary, deleting the files from the project file and replacing the files with the new image with the correct name. No luck. It still displays wrong on all devices.
I don’t even have the image in the project anymore.
Is there anyone in here who knows what’s wrong, or have experienced anything like this?
The launch image is for iPhone and iPad, portrait.
Go back to before you tried to replace the image. Replace the image file with your new one.
Ah, but that didn't work, right? Here's the catch:
Clean your build folder. The build process may not always pick up your new launch image. (Hold down Option when looking at the Product menu, or delete the contents of ~/Library/Developer/Xcode/DerivedData.)
Delete the app from the simulator and/or phone. The application installer will usually not copy the new image over.
(These steps are not always both necessary, but since they must be performed in this order if they're both needed, I just do them both as listed.)
Here's why:
When you build, Xcode copies the various files that are part of your product to DerivedData. This may not always copy changed files over existing files.
When you install to the simulator or device for debugging, this is yet another file copy which may not always copy changed files over existing files.
Note that the App Store installer on the phone does a better job of installing, and you won't get partial installs like this. However, until you can prove to yourself that your application has been built with the right image — i.e. that you're failing in #2, not #1 — I wouldn't trust this.
In addition to deleting derived data as part of the clean I found that it wasn't enough to delete the app from the test device, I also had to reboot the device.
Nothing worked for me until I did the following steps:
Go to project's files in xcode
Open the Products Folder
Right Click on your *.app product
Choose show in finder
Go up 3 levels up to Build Folder
Delete this Build folder
Build
That's it
You may also want to try both approaches of deleting the files from
~/Library/Developer/Xcode/DerivedData
Good Luck!
I'm using XCode 8.2.1, lots of targets, and asset catalogs. I could not reliably set the app icon set or launch image set for configuration of any target.
If my image sets are named globally uniquely to the workspace, I have no problem specifying the right one.
If the image sets in different catalogs have the same name, i.e. AppIcon, LaunchImage, XCode seems to pick the image set from the alphabetically first asset catalog.
So, my solution was to name each image set in every asset catalog prefixed with the asset catalog's name. That way it's organized and globally unique.
For Xamarin users, the only solution I could find to this problem was to do the following:
Remove the app from the device/simulator
Restart the device/simulator
Deploy and run the app
Deleting the app, cleaning the build, deleting the bin and obj directories, and rebuilding, doesn't work. The device/simulator has to be restarted for it to forget the old cached image.
As Steven Fisher points out, this wouldn't happen for a proper install from the App Store, where it 'does a better job of installing'.

Why is Xcode 4 not running my latest build?

I was originally working from my desktop on a project. I then decide to continue working on the same project over at a friend's house. I come home and decide to use the newest project (on a different folder even) open the project I run it and it shows the same thing I had before... for some reason it appears nothing got updated.
Any ideas why this is occurring?
You might try cleaning the project (Command-Shift-K) to see if that helps. I usually have to do this when I don't change code and only change a resource such as a xib or image file.

Resources