I am developing one application for iPad, this application used some content such as video/audio/image etc, about 8 GB.
So when click the BUILD button in xcode4, it will take nearly 1 hour to build it.
I need to figure out which cause so long time.
I know that once we trigger the building, we have procedures like complier, link etc.(normal sense ), now my purpose is to optimize the building, so need figure out how many procedures happened when trigger building in xcode4, and what is the longest part in my case.
Thanks for your answers in advance.
You could go in Preferences>Behaviors>Build starts>Navigate to>current log.
Related
I am attempting to store my Xcode project files on iCloud Drive, with hopes of accessing them on multiple computers. I am having an issue with a project when accessed from a second computer. The project builds and runs fine in the simulator, but the storyboard is missing objects and just looks completely different.
I am learning git at the moment, so I will eventually handle this properly. But as I learn Swift and programming in general, I thought this method would be easiest for now.
Any ideas what could be causing the storyboard to be different on the second computer?
Thank you.
Just spend a day or two to learn git, you will thank yourself later. Saving the files on a cloud drive will lead to many headaches.
Forget that; learn git now and start using it.
Create an account on bitbucket.org to store your repos privately, which is free for small (< 5 man) teams.
I have iOS app that uses time to download info from data provider. Now problem is, that for some times around midnight, there is a bug in my app and data are not downloaded correctly (there is no problem with data on the server, data are correct). How can I debug this?
Solution with being awake around midnight is not very helpful, because I have only limited window when error occurs and after that, all is OK again. So, before I can pin-point what is wrong, time passes and I have to wait another day :-/
You have 2 options. You can either:
Set your iPhone time manually:
Settings --> General --> Date & Time
Select Set Automatically to OFF
You will see the current time at the very bottom. Select it to show a DateTime wheel to set it to whatever you want.
The Simulator can also be adjusted my adjusting the time on your Mac.
I have run into the same situation and it has helped me.
NOTE: You will have strange things happen if they are also date driven like scheduled appointments.
You might be able to reproduce it by using the iPhone Simulator and setting the system clock on your Mac.
If it's something like time synchronization problems between your app and the server (Amazon Web Services' API does this), then I'm afraid the only solution will likely be to stay up until midnight, or go through your code with a fine-toothed comb. That's hard, but it sometimes works.
A suggestion that would help you in these cases would be something like https://github.com/CocoaLumberjack/CocoaLumberjack, where you can log information to a file and email it, so you can debug issues like this even when not connected to Xcode.
I need to know if I can do Continuous Integration with XCode server. In example: set run the tests every night or when someone commit changes, and more..
I am trying to decide one iOS Ui Automation tool to integrate with my Xcode server
Thanks
There are a few problems here:
UIAutomation has no built in support in Xcode Server. I've filed bugs, I've chased down people at WWDC. Most I've ever gotten on this problem is basically "shrug." I'm not sure UIAutomation is a priority for Apple right now. So you're not going to get any official support.
As was noted, you might be able to use a trigger. The trigger won't be able to add anything to the Xcode Server report, besides possibly the error logging. But you're not going to get anything added to the nice report table.
Running on actual devices has traditionally been a problem (if you care about that.) The loading the app part has been a problem for us, but Xcode Server might be able to preload the app for you. In addition, it seems like this might have changed in the iOS 8 SDK.
There is just a lot of uncertainty around this sort of workflow. I'm hoping Apple eventually makes an announcement or adds a new tool, but the best answer I've gotten is if you want to go down this path, use UI Unit Tests. That's a shame because it requires knowledge of Obj-C or Swift, and means interacting with the app at an API level instead of an abstract level, but if you're looking for the direction Apple wants to see people go, that's it.
Edit 7/4/2015: As of WWDC 2015, there is a new UI Testing component as part of Xcode 7 that, in my experience, seems totally supported, and is promising Xcode Server support. I would very strongly recommend using that, and not using the Instruments UIAutomation tool.
With Xcode6 right around the corner they are adding some features to XCode Server specifically it looks like "Triggers" will be helpful for running iOS UIAutomation tools. Since you can run UI automation scripts from cmd line it should be possible to utilize triggers to run your scripts post builds. This along side the logic for when a bot should run will let you decide if it should be nightly or on every commit.
https://developer.apple.com/library/prerelease/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_6_0.html#//apple_ref/doc/uid/TP40014509-SW1
I wrote a framework around UIAutomation called Illuminator to handle tasks like nightly test runs, pull request tests, and other automated conveniences.
It provides a flexible and extensible command line that can execute any particular subset of tests that you'd like, and produces reports in JUnit format (used by Jenkins).
Not critical, but just wondering - when iterating thru builds it seems that sometimes more than one is running at the same time... here's a screen shot.
(source: kimosabe.net)
Closing the toolkit and reopening it fixes it. Just wondering why it happens.
Thanks.
I recently changed from developing iOS apps on a MacMini to a new MacBook Pro (2.2 GHz Intel Core i7). While working in XCode, I occasionally get pop-ups when the system is apparently trying to do an autosave and runs into a problem.
The pop-ups state "The document [filename] could not be autosaved. The file has been changed by another application. Click Save Anyway to keep your changes and save the changes made by the other application as a version, or click Revert to keep the changes from the other application and save your changes as a version."
Examples of the filename are: AppDelegate.m, MyLoginViewController.m. There shouldn't be anything else that is changing those files.
I can't do anything within XCode until I choose one of the options. Sometimes it seems like the system is trying to overwrite my newest code with an old version of my code, sometimes it seems like it is trying to save my newest code. So, sometimes Revert is what I need to do to keep my current version, and other times Save Anyway is what I need to do. However, sometimes, I can't tell what the system is trying to do and I choose the wrong option and lose hours of work.
This has happened numerous times over a span of three weeks.
I am using OS X 10.7.2 and XCode 4.2.1. The code is on my MacBook's hard drive.
Does anybody have any idea why this is happening?
Thank you.
This is a huge problem, and it looks like it's Lion's force-fed "file-versioning" that is destroying work.
I typed quite a bit of code into my source and saved it regularly (pretty much after every complete paragraph). Suddenly I couldn't find an entire section that I'd just written. I even did a project-wide search, in case I'd accidentally entered it in the wrong file. Suddenly Xcode raised a dialog saying it couldn't autosave the file because it had been modified externally. Did I want to "revert", or save what was in the editor?
In the several times I've seen this come up on two systems over the past few weeks, I've chosen to save what's in the editor, thinking that obviously it must be the most recent version. WRONG. I hit "Revert", and the block of code reappeared.
There is so much wrong here, it's hard to decide what's the most offensive.
Confirming that this happens on XCode 4.3.2 on an iMac running 10.7.4.
I have found that this bug may be related to having the same file open in more than one tab or window in XCode. If you carefully avoid ever having more than one window open on a given file at a time I think you can avoid this problem. However, it undermines the very useful ability to apple-click method names to navigate to the file that contains them.
This has cost me hours of original work and been the source of immense frustration. The derisive comments from others are simply inadequate.
I heard they had a complicated fix for it already at Apple, but unfortunately, it was "accidentally lost" and now they can't remember which files need what changes to make it work again. :-/