With OS X Yosemite and Xcode 6, it was not possible to build a Swift command line tool that link to my own made or third party Swift Frameworks.Chris Lattner well explained in June 2014 to the community that we have to wait for ABI to reach the required level of stability, and because subject to change, the Swift libraries must be embedded in each app. Since a a Command Line Tool is not a bundle, we can't embed binaries.Fast forward today June 2015 we have OS X El Capitan beta, Xcode 7 beta and Swift 2.0.Under Yosemite, using Xcode 7 I recompiled my stuff to Swift 2.0 but I still can't link my Command Line Tool to the Swift Framework.Is someone have do similar build with success ? Do I need to build and run my Coammand Line Tool under El Capitan ?If its still not possible, I would like to know when the Swift ABI is planned for enough satbility and sytem level availabilty ?Thanks,Datagram
Search results for
Xcode
92,307 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Perhaps more importantly, will the iOS 7.1 simulator still be supported from Xcode 7. I can't currently get it to work, despite being recognized by Xcode.
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Here's a code snippet that compiles and works as expected, but I get a warning for depricated use of the unit .NSYearCalendarUnit. This is within XCode 7 (Swift 2.0)Playground execution failed: /var/folders/37/2hl0kpw50lv18q1d48gbbb5r0000gn/T/./lldb/16158/playground8.swift:52:20: warning: 'NSYearCalendarUnit' was deprecated in iOS 8.0: Use NSCalendarUnitYear insteadvar TermEndDate = NSDate() if (TermYears>0) { TermEndDate = userCalendar.dateByAddingUnit( NSCalendarUnit.NSYearCalendarUnit, value: TermYears, toDate: TermStartDate, options: .WrapComponents )! } if (leaseMonths>0) { TermEndDate = userCalendar.dateByAddingUnit( NSCalendarUnit.NSMonthCalendarUnit, value: TermMonths, toDate: TermEndDate, options: .WrapComponents )! } If I switch to the recommended syntax, it errors out. /var/folders/37/2hl0kpw50lv18q1d48gbbb5r0000gn/T/./lldb/16158/playground8.swift:60:5: error: 'NSCalendarUnit.Type' does not have a member named 'NSCalendarUnitMonth'NSCalendarUnit.NSCalendarUnitMonth,^ ~~~~~~~~~~~~~~~~
Also.... I found a very informative website that has a ton of examples specifically on how to work with dates within Swift.Here's a code snippet that he uses as an example, but does not compile for me, and I have no idea why I get the error: could not find member 'CalendarUnitDay'. Was this syntax changed with Swift 2.0?Every example I could find uses this syntax, but for me... no luck.// Playground - noun: a place where people can play import UIKit let userCalendar = NSCalendar.currentCalendar() // Let's create some dates to work with // ==================================== // It's 3:45:30 a.m., New Year's Day. Time to go home. let goHomeYoureDrunkTimeComponents = NSDateComponents() goHomeYoureDrunkTimeComponents.year = 2015 goHomeYoureDrunkTimeComponents.month = 1 goHomeYoureDrunkTimeComponents.day = 1 goHomeYoureDrunkTimeComponents.hour = 3 goHomeYoureDrunkTimeComponents.minute = 45 goHomeYoureDrunkTimeComponents.second = 30 let goHomeYoureDrunkTime = userCalendar.dateFromComponents(goHomeYoureDrunkTimeCom
Topic:
Programming Languages
SubTopic:
Swift
Tags:
They renamed some enums / options to be more consistent.In Swift, it would now be NSCalendarUnit.Year (type NSCalendarUnit, case .Year). If you double command-click on NSCalendarUnit (or NSYearCalendarUnit) in Xcode in your playground, it will pull up the Swift version of the header.And as far as the example code goes, OptionSets are handled differently now in Swift 2.0 and use set syntax instead of bitwise operators to join and test them.See the Xcode 7 beta release notes or https://forums.developer.apple.com/thread/3623 for more info on that.
Topic:
Programming Languages
SubTopic:
Swift
Tags:
I need to link libz in my project. Normally I would add libz.dylib under the Linked Frameworks and Libraries settings, but now there are only .tbd files and no .dylib files when you search the list of libraries to add. When building I get a warning: skipping file '/Users/me/xcode7/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/lib/libz.tbd' (unexpected file type 'text' in Frameworks & Libraries build phase)Then I build fails with linker errors because of missing symbols. Am I missing something new in the way libraries are linked?
whats the fastest way tocreat a app using xcode
Using Xcode 7 beta, running the following OpenGL ES 2 code on Debug configuration on a iPhone 6 device running iOS 8.3, with Address Sanitizer enabled for the scheme, crashes:#include <OpenGLES/ES2/glext.h> //... EAGLContext *contextA = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; if (!contextA || ![EAGLContext setCurrentContext:contextA]) { return; } GLuint renderBuffer = 0; glGenRenderbuffers(1, &renderBuffer); glBindRenderbuffer(GL_RENDERBUFFER, renderBuffer); [contextA renderbufferStorage:GL_RENDERBUFFER fromDrawable:nil]; GLuint frameBuffer = 0; glGenFramebuffers(1, &frameBuffer); glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderBuffer); glFlush(); EAGLContext *contextB = [[EAGLContext alloc] initWithAPI:contextA.API sharegroup:contextA.sharegroup]; if (!contextB || ![EAGLContext setCurrentContext:contextB]) { return; } [contextB presentRenderbuffer:GL_RENDERBUFFER]; // EXC_BAD_AC
Hello everyone,I just updated my iPhone 5S to iOS 9 Beta and Xcode to Xcode 7.0 Beta. I really regret doing this, since it messed everything up with my current projects in Xcode. I guess I just got excited to get the latest and greatest features. Anyways, Xcode is throwing tons of errors on my app. Some of them don't even make sense. Linker command failed, Unable to open executable MyAppTests. Stuff like that. I have tried the 'Convert to Latest Swift-Syntax' and that didn't seem to do anything with the errors.Should I update to the El Capitan Beta in order to elminate these errors? Or will that have absolutely no impact on my issue?Thanks in advance,I wish I had just waited for the GM updates.-Me
I have this problem, too. No output in playgrounds.The right bar, where it should be, is empty. I'm running Xcode 7 Beta on an old MacBook with OS X 10.10.3. I've tried everything I could find online about this. No luck.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Hello,at WWDC2015 Apple allowed that there is no need to pay $99 for testing iOS app on my iPhone.So, I downloanded Xcode 7 beta and I want to compile and debug (play button) to my connected iPhone via cable.It still says that I don´t have my account in Developer Program.How I can proceed?Thank you
When I opened my project for the first time in Xcode 7, I was given the option to convert all of my code to Swift 2, which I did. But my WatchApp was never updated to WatchOS2. Now when I try to change the Base SDK, Xcode just crashes on me. Is there any other way to migrate my WatchApp and WatchKitExtension to WatchOS 2?
I host repositories on GitHub. I've noticed as of the 7 beta, the UI to authenticate is disabled. As a result I can't get any authentication settings into or out of XCS, so XCS can't access my repositories.http://i.imgur.com/Ilpjgqx.pngI've looked briefly through the XCS logs trying to understand what's going on here and there's nothing obvious.See also rdar://21334520
I am running into this problem: UI testing on MDM device. I can use the UI test to open the app and enroll, but I am not able to automate once the app went to safari to download the MDM profile or go to settings to install the profile. Is there any way I can manage to automate this whole MDM enrollment process?
That is what I'll try at first. We'll see what the bridging brings with the new Xcode 7 and Swift 2. I never tried it with earlier versions but it didn't look to be very seamless.Thanks/Peter
Topic:
Programming Languages
SubTopic:
Swift
Tags: