What's new in Xcode 7(developer.apple.com) |
What's new in Xcode 7(developer.apple.com) |
Though note that there's a current bug listed that looks like accounts with expired developer memberships currently can't use free provisioning.
(For me, this is mildly irritating, because I let my membership lapse a few days ago on a hunch that they'd combine the developer programmes. And then they did, but I can't use the free provisioning, and the re-enrolment form doesn't seem to be working right now either.)
Really nice to see this though.
More generally, this is an awesome move. Kudos to Apple :)
yeah try/catch is very advanced.
When bitcode is enabled for a target, all the objects, static libraries and user frameworks used when linking that target must contain bitcode. Otherwise, an error or a warning will be issued by the linker. (Note: missing bitcode is currently a warning for iOS, but it will become an error in an upcoming beta release of Xcode 7.) ENABLE_BITCODE should be consistently turned on for all the targets. If you use a library or framework provided by a third party, please contact the vendor for an updated version which contains bitcode."
Dear God, do we need to wait for all libs to update? :S
It boggles my mind how little I hear people complain about this. Aren't these basic tools by now?
There's something else going on with your environment, it shouldn't be giving you this many problems.
I guess Apple just hates refactoring. Why though?
This update is almost surely for Yosemite and above. The cost of developing on Apple platform is crazy these days. I miss the days when they could mock Microsoft for having an expensive Visual Studio. Now they make you buy a new Mac per developer every 2 years.
I'm running a 2008 Mac Pro running Xcode 6 and Yosemite. I have a 2012 MacBook Pro at home running Yosemite and Xcode 6 (but my word is the hard disk in that slow - luck of the draw getting a 5200 Hitachi or a Samsung, eh!!!)
Which 2012 Macs can't run Xcode 6?
I find this difficult to believe, care to provide evidence of it being an Apple problem?
Now, for indie developer setting, these issues might not be huge. But the problem here is - Apple puts businesses in awkward positions, when they have to bulk buy RAMs and upgrade all the systems just to compile on the newest minor release of iOS. Then, they started soldering RAM, so now to compile on 8.3, buy 25 new Macs or fuck off.
Apple's actions that screws us - solder RAM, make only latest XCode work with latest SDK, make OS impossible to run on low RAM, make XCode run only on newest OS.
woops, repetition !
This says it all, regarding what the future for Objective-C looks like.
I really want to start using Swift. And no, can't upgrade.
Also it's very hard to run with 2gb ram. For example you won't be able to use the iOS emulator because the swapping will take so long XCode will timeout when trying to launch the emulator. It's very painful even with 4gb. 8 is probably the minimum.
Regarding Apple, I find it inappropriate (and dishonest) to use the word "advanced", when it is just catching up with a commodity feature. Exceptions are provided by almost every other modern programming language in the world.
That said, the spec here is a bit different than C++ exception I believe.
func loadData() throws { }
func test() {
do {
try loadData()
} catch {
print(error)
}
}
I guess that you have to prefix any statement that might throw with 'try', and cannot prefix other statements with it.If so, their motto really seems to be 'explicit over implicit'. I'm not sure that is an improvement, but I'm not sure that it is bad, either, provided that the refactoring tools work fine (for example when one removes that "throws" from the definition of loadData)
This is the insane part - you're relying on things you have zero control over and zero support for. Apple's requirement is no different than some fatal bug discovered or backdoor discovered in those libraries - except Apple is giving you some notice without immediately putting the liability on you.
Is there a fundamental change of architecture planned for future iOS devices?
My guess is that it is future-proofing towards running iOS apps on Mac OS and/or running (parts of) iOS apps on the Apple Watch. It also might mean that Apple plans to make their own ARM extensions (for example, I suspect having the CPU know about tagged pointers, so that an 'add' instruction can do an indirection, if needed, might be an overall win)
Update: the release notes for the Xcode 7 Beta say:
"• Bitcode. Archive for upload to the App Store in an intermediate LLVM binary representation that the store can then optimize into the 64 or 32-bit executable to be delivered to customers."
This falls under a feature they call 'App Thinning'. It makes the App Store optimize an app for the device it gets installed on, CPU-wise and asset-wise, and also allows your app to download some resources on demand.
http://channel9.msdn.com/Shows/Going+Deep/Mani-Ramaswamy-and...
https://msdn.microsoft.com/en-us/library/dn584397%28v=vs.110...
Once Swift 2 is nailed down, I'm sure refactoring will follow.
Chris Lattner is a bit of a C++ head, no? LLVM is a C++ project...
With that said, yea, refactoring support in Xcode is a drag.
It is a very odd feeling to miss Eclipse, but back when I worked in XCode, that would frequently be how I felt.
> Objective-C lightweight generics are ignored by Swift. Any other types using lightweight generics are imported into Swift as if they were unparameterized.[1]
So it doesn't look like the goal here is Swift interop.
[1]: Excerpt from Using Swift with Cocoa and Objective-C (Swift 2 Prerelease) https://itunes.apple.com/us/book/using-swift-cocoa-objective...
I wonder why they insist on that. Perhaps it is easier to parse?
You need to prefix anything that throws with a "try":
func mightThrow() throws {
try mightAlsoThrow();
}
Other than that, it looks exactly like C++ exceptions: Propagation happens along the chain of functions marked as "throws", until a "catch" handler intercepts it."try" is an expression, by the way, so you can do things like:
let line = try file.readline()
There's also a "try!" statement that throws a runtime exception if the inner statement throws.What would be the selling points for an ARM MAC? Access to the iOS app store software library? (unlikely) Better battery usage? (maybe) Super cheap devices? (un-apple-like)
Changing archs has been done before but I don't see a rosetta for intel apps running smoothly on arm. Virtualizing windows and linux is another killer app for intel macs that would be missed for some.
Perhaps it's also a shot in front of Intel's bow.
That people that can drop money on Apple hardware but can't afford $100 per year doesn't make sense, for the obvious reason that Apple hardware costs many times that.
http://clang.llvm.org/docs/AutomaticReferenceCounting.html#e...
In a word - Yes.
I am a developer from a 3rd world country, and I bought a Mac Mini for $500 (not '$1000+') for the purposes of entering the Apple ecosystem. I'm not going to spend another $500 on an iPhone[2], especially since I'm not sure if it will work out financially. The emulator will have to do (my apoligies to anyone who'll potentially run my apps and encounter bugs I miss because of this).
1. I'm not sure if the smiley is an indicator of sarcasm or not
2. If push comes to shove,I can afford it, but I've already bought the phone I'll use for the next 2-3 years (OnePlus), and I'd rather spend the money on other things - like family.
The $100 is to keep out the shovel ware and crap-- look at all the junk in the store as it is now. Imagine what it would be like if there wasn't that $100 barrier to entry?
Well, there's the rub. Unfortunately, the vast majority of developers just don't make money on the app stores. I'm not going to beat myself up if it doesn't work out - I'm taking this as a long-term learning opportunity.
If one of my apps takes off on Android (as proof that other people find it good - or I'm confident it is good enough), then I'll pay the $100.
I would never build for Mac or iOS if I had to buy a Mac. Since I was able to do so effectively for free, Mac support in our software (which is pretty popular with about 3+ million downloads a year) got a lot better. I didn't enjoy it, and I won't be using that VM for anything other than testing Mac OS X support, but it's silly to act like everyone ought to be willing to shell out money to support a platform (especially in our case, where the vast majority of our paying users are running Linux).
"look at all the junk in the store as it is now. Imagine what it would be like if there wasn't that $100 barrier to entry?"
Whatever happened to the argument that the Apple approval process was to protect users from poor quality software?
40% of mobile developers do not even reach $100 in a month [1]. Having a "good app" is not a guarantee that someone will get $100 in two days.
[1] https://www.developereconomics.com/reports/developer-economi...
The passion for building things doesn't only strike those with four figures of disposable income, you know :)
With credit card? not!
And in my case, is necessary to fax(!) apple and do banking stuff that is a problem if you have credit problems
Oh boy; if this is the start of apps lazy-loading resources and code, I'm really excited. It's the largest barrier to signing in your account from any device.
As of Mavericks, OS X by default refuses to run applications that are not signed with a 99$/year Apple certificate.
And Developer ID certificates are valid much longer than a year, I believe mine expires in 2019. They aren't revoked if you stop paying for program membership, and the expiration applies to the signing operation, apps you've signed in the past will continue to work after the certificate expires.
I used to run a multitude of OSX (xcode developed) applications for beta testing, and while not signed, they were indeed runable.
Plus, more than a few apps have added instructions on their download pages to show users how to get around Gatekeeper. They can clearly take the Gatekeeper hit, so you probably can too.
Yes, lots of apps do post instructions on how to get around it, but lots of apps do all sorts of user-unfriendly things. We Apple users used to make fun of Windows for the endless sea of pointless dialogs its users had to go through. Those apps could take the shitty-UI hit, mine probably could too, but it still sucks. A lot of people are intimidated just looking at instructions like that, and will just give up.
I don't know about you, but I feel like that's a pretty terrible first-run experience for my app. I don't feel comfortable charging people for something they might not even be able to run. Would Apple be willing to put their own apps behind that kind of painwall?
Honestly, if you're charging users, then there's absolutely no question about it, you get the membership. Your entire "expecting the user to do so" point completely goes out the window the second you said it's a paid app. If you have the revenue, then it's simply a cost of doing business in the Apple world. Plus, once again, you're being way overdramatic. "might not even be able to run" is taking it a bit too far. Your app will be able to run. If you don't trust your users enough to click twice, then maybe you need to learn to trust them more. It's not like it's a hard thing to do, and it only needs to happen once.
Remember, this is Apple's OS, Apple's ecosystem, and Apple's SDKs. You play by their rules or not at all. That's the way it's always been, and that's the way it will probably always be (but never say never, look at Microsoft, they're doing things nobody would have ever expected). Yes, it sucks. Yes, it isn't fair. But as with all major companies, it never is. They will always have the upper hand because they're the ones providing the user base and all the tools necessary to get the apps out there and onto their machines. As long as you are developing for their platform, you have to play by their rules. Honestly, be happy they haven't moved the default to the much more restrictive "Mac App Store" yet.
And to be fair, I see where Apple (and Microsoft, IIRC they have SmartScreen which does the same sort of thing but to a lesser extent) are coming from. I'm sure that it lowers the chance of accidentally executing viruses by quite a bit and also slowly is teaching users to think before they execute (especially if you have to right click and click Open).
Yes, because Apple demands rent. They create a problem and then charge you to fix it. This is called rent-seeking. I think that is a bad behavior.
> Plus, once again, you're being way overdramatic. "might not even be able to run" is taking it a bit too far. Your app will be able to run. If you don't trust your users enough to click twice, then maybe you need to learn to trust them more. It's not like it's a hard thing to do, and it only needs to happen once.
I used to do tech support for a medium-sized office. I would frequently get called to people's desks because their computer wasn't working, only to find that their email client had put up a dialog with the message "The email address 'somebody@thatcompany.cok' is not a valid address", I'd have to verbally tell them they mistyped the address — sometimes, even after this, they'd just stare at me like a deer in the headlights and I'd have to type in ".com" for them before they felt like they could use their computer again. And then they'd do it again the next day.
I remember patio11 once shared an anecdote about a school teacher who called his support number because she thought Bingo Card Creator had broken Google. It turned out that she'd gotten a new home computer and Bing was the default search provider, and she couldn't figure out how to operate Bing because it wasn't Google.
I have to wonder if you have had to do a lot of support work, because I think you're trusting users way too much. There are many, many people who are really not stupid, but get flustered when doing unfamiliar tasks on a computer.
> Remember, this is Apple's OS, Apple's ecosystem, and Apple's SDKs. You play by their rules or not at all. That's the way it's always been
No, it isn't. It wasn't even this way just five years ago. I was one of the early adopters of OS X, and one of the things I loved about it was how open it was, so even some kid like me (at the time) could easily make software. Apple has gotten worse and worse about this over the past decade.
A few months ago I sent Apple security an email about a fake Flash installer with a valid Developer ID certificate. It turned out that someone else had written an article about the same malware five days ago, and reported it to Apple, yet the certificate was not revoked yet - so it doesn't seem that Apple has a 'rapid response' system in place currently (or then, anyway), perhaps because incidents are still relatively uncommon. But they did promptly thank me for my report, and I bet they ended up doing something about it (I ought to check) - and thanks to Developer ID, they at least had some kind of payment trail as well as a name, likely making it harder for the same person to get additional certificates.
Of course, this trail could be achieved with a lower price. But you do get a number of benefits with the subscription, and since the Mac and iOS developer programs merged into one today, at the same $99 as each previously was individually, if you develop for both the price just halved. It's a start, at any rate.
I never said that was the way it's always been. I said that "playing by their rules or not at all" was the way it's always been. Which is true, Apple is very big on controlling every aspect of the user experience. It was a matter of time before their massive obsessiveness leaked from iOS to OSX, but it's always been Apple's rules or nothing. Their rules for OSX have historically been very lax, but that wasn't my point at all.
> Yes, because Apple demands rent. They create a problem and then charge you to fix it. This is called rent-seeking. I think that is a bad behavior.
Well, they're providing a service for $99 that extends beyond the signing to be able to run in OSX. They include the ability to list in the various app stores, to have beta programs, access to early APIs, access to developer forums, and more. All that costs them money. They have to get that from somewhere.
> I have to wonder if you have had to do a lot of support work, because I think you're trusting users way too much.
I trust my users just fine. Just because there's one or two crazy stories (I mean, everyone has a few stories of horribly stupid users) does not mean the majority of users are that bad. If you're targeting all 100% of possible users, then sure, those instructions would be useless. However, I'd be confident enough to say that 90-95% (honestly probably leaning towards 95, but still) of users will be able to follow those incredibly simple instructions. So at that point, you have to ask yourself if the $99 (plus all the other perks like early access to APIs) is worth having those 5-10% of users who can't follow them. Because that's what it really comes down to.
I then later, many years later, was given a Mac Plus. I could use BBS software to chat, but remember thinking, it is very hard to even type a conversation back and forth to a user elsewhere with a modem. There really was no software for it, or if there was, it was hard to find or even know about.
How did you know to learn C and then get a compiler? And how did you afford the software to develop back then? Wasn't code warrior around several thousand?
Complaining that they ask for $100/year to use their official distribution channel (which incurs ongoing costs for them) seems unreasonable considering the quality and quantity of tools they provide for free. Xcode is a pretty awesome IDE considering it's free to use.
You realize it's probably one of the easiest tasks ever, and it's literally 3 steps. Anybody even my grandma can do that. If they know how to download your app and "install it" they will be able to do those simple steps.
And it's a one time thing, not like they need to do it every time they go to install an app.
However, I can't think of any other way to gain the security benefits of app signing.
Ultimately, all security is a web of trust. If you're going to put an automated, self-service system at the root of that web (the Apple dev program), then you need reliable ways to establish identity and discourage high-volume fraud. A $100/year credit card charge does both pretty well.
Thinking of the unsigned applications that I do run, if you know about them, I don't feel it's unreasonable to expect the user to know how to get around the signing.
Instruments is pretty cool, though.
I don't think I'd say it's better than VS if that's all you're comparing it to, but it's pretty much on par. When I last used VS heavily it seemed marginally more robust than Xcode but the only real feature I liked vs. Xcode was the ability to use C# rather than Obj-C (which is less relevant now that Swift exists)
Other than that, every single IDE I can think of is relatively unpolished and if you're developing specifically for OS X then the alternatives are practically useless.
I'm really glad Xcode finally has automated GUI testing
I've never seen an IDE that was anywhere close. I suspect that people who hate Xcode are simply familiar with something else and find it frustrating to use it (though they've spent a few hours with it and hundreds of hours with something else they're expect it to beat their old IDE with no effort yet spent learning it.)
Seriously, Microsoft and Google can't even do a competent UI on applications built for consumers. Their developer tools are terrible by comparison.
XCode seems quite spartan compared to Visual Studio. VS will give you many panes left/right/bottom and a myriad of buttons to do things but xcode just gives you that pane on the left, and you will likely benefit from learning the cmd-1,2,3 etc. shortcuts to jump to the different pages of this "notebook". The other benefit if the quick navigation at the top, the useful "callers/callees" access from the "four squares" menu top left of the editing area. As someone else said, it has Instruments built straight in, the ability to monitor CPU/memory/disk and network and a much better thread stack view (xcode 5 was pretty bad with this I recall - you had to navigate using a popup menu).
You might get on differently with it if you're using different languages. I write C++ in it daily and I really enjoy it (clang is quick). The ability to do static code analysis and have it annotated in the editing window is really really really really great. Lack of refactoring with C++ is a bit sad but not a massive issue for me. Whenever I go back to using Visual Studio I find it to be clunky and there's too much on screen (popups, toolbars, etc.) but that's just me. Also, the glitching and artifacting when VS redraws is irritating (might just be a side effect of running in a VM for me), and the "stop build" takes too long thanks to the compiler running in a hidden window. I ought to upgrade to a more recent Visual Studio as I have to use VS2010 at work for now.
Compared to Eclipse and Android Studio, Xcode is good! I find Eclipse and Android Studio to be slow, and they typically break every upgrade. (AS is currently complaining about a modified ant.jar and refusing to upgrade... wasn't me who did that!)
Having said that xcode currently crashes once a day for me. Not sure if it's in the preprocessing/indexing phase as it falls over with large numbers of #defines and ~80k lines of C++.
This isn't the 90s. Two-button mice are the default now, and have been for many years. I'm pretty sure everybody has done it at least once, and probably even knows what the term "right-click" means.
> ignoring the fact that they're doing something it's telling them not to do.
They're not doing something it's telling them not to do. Have you even looked at the dialog? Have you read it yourself? It simply asks the user if they're sure they want to open it as it's from an unidentified developer: https://support.apple.com/library/content/dam/edam/applecare... Nothing in it is telling them they shouldn't or can't open the app, they're not going against anything by saying "Open" (in fact, that might just be why there's an Open button there in the first place, because it's an acceptable choice).
Seriously, you're being overly untrustworthy about your users here. You seriously can't think this is that big of a problem. Because it isn't. Other apps have managed to solve this with download instructions, it's really not difficult, and the fact that they're still alive and running shows that users clearly know what they're doing enough to right click once and press Open once. It's not a difficult task by any means of the imagination.
Dealing with a dialog: it's just another window, just smaller than the main one.... OSX != iOS. (Actually, how do people cope on iPads when it says "5% of battery remaining"? Do they lob it at the floor in fear of the dialog window?)
There's little developers can do if people don't read the text. That's not a developer's fault. Should we put fences up on dangerous beaches to stop people swimming or should people just read the sign saying "no swimming, dangerous currents"....?
Also keep in mind that the standard language for the classic Mac was originally Pascal[1], not C.
In addition to Metrowerks CodeWarrior (which I also recall being pricey), there was also the Borland TurboC++ family. And starting from around System 7 there was MPW from Apple[2], which targeted a number of languages and was eventually free.
[1] http://en.wikipedia.org/wiki/MacApp
[2] http://en.wikipedia.org/wiki/Macintosh_Programmer's_Workshop
There was also a free development environment by Apple for OS 8 (maybe earlier, I don't know) called MPW. I think it was originally a paid product, but Apple ended up just giving MPW away because everybody used CodeWarrior. But I found it difficult to use and didn't get much further than some basic C lessons I found somewhere on the Internet. All the more advanced stuff I found wouldn't work (I think it was probably targeted at Windows or Unix, but all I knew at the time was that MPW couldn't compile it).
Stability wise, there have been a few versions that crashed a lot, but that has improved lately, so I'm not complaining. And I do love how quickly it opens.
I'm currently using AppCode for developing for iOS, and I find substantially better than XCode. It has a full set of refactoring tools, that I use constantly, better search, it actually creates folders when you create groups (unless you tell it not to, and I think that's the sane default). I'm not sure it's a fair comparison, since it does cost as a much as a Developer License.
Google is another story though.
Interface Builder is very nice, I will give it that. I did have it break on me once or twice(wouldn't let met add a particular kind of segue), and having to manually edit the generated XML file was a pain, but still, it is better than most similar things I've used.
The "You broke my Googles. Give my Googles back or I'll tell my husband on you." incident was a customer who installed Bingo Card Creator N minutes before Google had systemic worldwide downtime due to an internal misconfiguration. (http://googleblog.blogspot.jp/2009/01/this-site-may-harm-you...) Her reasoning was "Google worked, I installed BCC, Google doesn't work anymore, accordingly, BCC must have broken Google." Except s/Google/the Googles/g.
My blue Googles/green Googles story happened with several different customers. Basically, they have a mental model of the Internet where it is a lot like a hard drive: your Internet at school and your Internet at home are totes different Internets and so it makes sense that the contents of one are different than the other. They call their Internets Googles, because Google "is the front page of the Internet" or "runs the Internet" or "makes the Internet." One of the Googles -- the blue Googles -- is what a technologist might more readily understand as Microsoft Internet Explorer configured to open to a Bing homepage on a school computer. This "blue Google" will, for any given query, produce different results than the same query run on "green Google" (Chrome/Google/home PC), hence providing further experimental evidence that the user understands adequately what is going on.
The difference between the blue Googles and the green Googles was chiefly relevant to my business in attempting to convince customers that, regardless of the fact that they signed up with an account from the blue Googles, they did not have to sign up for a separate account on the green Googles and then somehow move things from the blue Googles to the green Googles to be able to print them out at home.
What's preventing me from paying some person in a third world country to get a certificate in his name?
You don't need to be NSA level to hide your tracks there, but it's not trivial either. And Apple is likely to work with the FBI/Interpol about that if whatever evil deeds your software does is sufficiently high profile. Theses guys might also not be good enough to catch you - but they have access to the NSA data for parallel construction, allegedly. And the NSA has incriminating evidence against you.
That looks like a "telling them not to" dialog if I ever saw one.
I mean, that said, most instincts would be to double click the app right away, ignoring any instructions, but that's a separate matter of how to best present those instructions for your users.