React-Native build on device became extremely slow after switching to iMac - ios

I'm developing a react-native application. I used to work on my personal macbook pro for a while and everything was nice and smooth. Once my macbook broke and I switched to use my company's iMac. Now it takes me a very long time only to build on a real iPhone(which was fairly quick previously), but I have no idea why.

I just checked the performance benchmarks of ssds and usual hard drives. Well, it's huge!! And it also answers the TWO or THREE times slower build time on my new machine. (not to mention that iMac uses 5400rpm hard drives, not even 7200s!)

Related

Xcode builds are taking much longer than usual and causing MacBook fans to go crazy

I am building/running a relatively simple chat application. Every time I run/build the application, the fans on my MacBook get extremely loud and my computer begins to heat up very quickly. Furthermore the builds are taking a ridiculous amount of time to finish, even after editing just a single line of code.
I opened up activity monitor and noticed that "SourceKitService" was using 100% of the CPU.
Earlier today, I deleted the DerivedData folder for my project, and that still doesn't seem to solve this issue.
How can I fix this?
Try doing a deep clean (Command+Shift+K), deleting derived data, closing Xcode, and restart Mac. That usually helps me. However, when I'm running apps on my 8GB memory Mac some cause the same issue while my 16GB Mac runs them just fine.

Node.JS Development on iOS?

I'm wondering if there is any chance to run Node.JS on iOS to develop as on desktop? I definitely realize I must have jailbroken iPad to install node or mongodb. The only I've found is good code editor Diet Coda with FTP/SSH support, but no more. How can I get node in "real" terminal on iPad, launching my .js files on certain port etc?
P.s. I'm not big fan of cloud9 'cause it's requires Internet connection and at this time supports only node 0.6
Found a so-so solution: connect to my server via ssh and develop my app in console. But it requires internet connection, that's not good.
A quick search reveals NodeJS on iOS.
The long story short is that I got NodeJS compiled on my jailbroken iPhone 4! It was a long quest to get it working properly but I've done the hard work and compiled a .deb file compatible with Cydia for your installing pleasure...
It's a year and a half old, so the article might be a little out of date, but it's definitely a good starting point. See also how to set up gcc if you need to do that on your iOS device.
Aside: If you're a rooted Android developer, you may be interested in anode.
I am working on an implementation of Node.js on non-jailbroken iOS devices.
http://www.youtube.com/watch?v=xzFH80-HYTo
It is not ready for a public consumption yet, but I am making a good progress and have a plan to open-source it soon.
You can use node.js on iOS without jailbreaking, and without violating any Apple
terms of service. LiquidCore is an open source project that enables node.js on both Android and iOS for deploying micro applications. iOS support is now available from version 0.5.0.
CodeSandbox for iOS works amazingly well, though it's not a console interface.
CodeSandbox for iOS offers a full-fledged development environment with all the tools you need to develop projects of any size. Create a sandbox to quickly prototype your ideas or work on a large codebase with CodeSandbox Projects: whatever your needs are we have you covered.
I've wondered how much work I could get in something like the IconFactory's WorldWideWeb. That company has been around a while, and WWW makes it easy to do work in a browser-hosted environment.
So CodeSandbox almost answers your question, and, if it disappears at some point, WorldWideWeb might be a fallback in a pinch.

Compile iOS projects on Ubuntu?

Is it possible to compile my Objective-C iOS-specific project on anything other than OSX? I spend a lot of time in Windows and it'd be less of a hassle if I could, at the very least, SSH into my Ubuntu machine and edit code / compile on there. I think the only thing I'd need the Macbook for would be editing storyboards and running the iphone emulator.
I just have a lot of free time every day, but don't have access to my Macbook until I get home around 7pm. Are there any good ways to remotely work on an XCode iOS project?
Yes, it is, although you'll need a jailbroken device for this. You are also going to need to build the opensource, non-official toolchain for yourself, or get a precompiled version.
Hey, you can even make GCC run on your iPhone itself (that's how I use it).
Why not SSH into the Mac and use the command-line tools that come with Xcode?
Or, more comfortably, just remote into the Mac via one of the many remote desktop solutions out there (TeamViewer is free for personal use and quite good at poking through NATs etc., but there are a lot of other options) and use Xcode.

XCode is very slow to suggest autocompletion

When I code in Xcode on my MacBook Pro at work, autosuggestions seem to take 6-8 seconds. On my MacBook Air at home, they appear instantly.
Is there any reason for this? I don't see anything in Xcode's preferences that would cause this:
Any ideas here?
I have a shiny new iMac at work for development. It's an i7 proc, 8 GB memory. Indexing (and the things that go with it, like code sense or quick documentation) was taking a very long time (5 minutes for ~600 files). So was compilation.
The culprit turned out to be the corporate antivirus' on-access scan. I disabled on-access scanning and indexing dropped to around 5 seconds for the same number of files. Might be worth a shot if you have permissions to change antivirus settings.
On one of the developer blogs I follow (I can't find the link at the moment), the author said he regularly has to delete the DerivedData folder for his projects because of corruption that causes issues like this. Give that a try and see if it helps.
It's not SSD vs. non-SSD. My 2009 MacBook Pro shows suggestions nearly instantaneously.

XCode debugging (GDB) randomly hangs while stepping through code

After running into this issue for the 10 billionth time and nearly whipping my mac air out the window in frustration, I've decided to break down and ask if anyone else has run into this...
Environment: running the latest version of XCode (as of this question: 4.2, build 4C199) for an iOS 4.2+ application (universal app).
It appears that GDB randomly decides to completely hang while stepping through lines of code. This has happened to me now on multiple codebases, and in various locations throughout each codebase. The stepping process hangs on an arbitrary point and requires that the running iOS simulator or on-device process be stopped and restarted. Typically, after restarting my debugging session I am able to get to a different arbitrary point in stepping into/thru -- sometimes even enough to actually debug my code entirely (gasp).
I tried wiping my drive, re-installing a fresh copy of Mac OS X 10.6.8 and the aforementioned XCode... No difference.
I tried switching debuggers to LLDB; this resolved the hanging issue, but I'm not as big a fan of LLDB and prefer to use my environment as close to stock as possible.
Any thoughts?
If GDB is still hanging after reinstalling your OS and your SDK, it may be a design issue with your particular code. Does this happen with other projects?
If it makes you feel any better, Apple is moving to LLDB as the stock debugger for Xcode, probably due to issues like your aforementioned issue.

Resources