xcode6

swift programming NSErrorPointer error etc

可紊 提交于 2019-12-18 13:52:45
问题 var data: NSDictionary = NSJSONSerialization.JSONObjectWithData(responseData, options:NSJSONReadingOptions.AllowFragments, error: error) as NSDictionary; This line of code gives me error NSError is not convertable to NSErrorPointer. So I then thought to change the code to: var data: NSDictionary = NSJSONSerialization.JSONObjectWithData(responseData, options:NSJSONReadingOptions.AllowFragments, error: &error) as NSDictionary; which would turn the NSError error into a NSErrorPointer. But then I

How can I programmatically find Swift's version?

假装没事ソ 提交于 2019-12-18 13:37:44
问题 I know I can find the version of Swift I'm running right now reverting to a Terminal and typing: xcrun swift --version Swift version 1.1 (swift-600.0.57.4) Target: x86_64-apple-darwin13.4.0 Also, I've been reading about the Preprocessor Macros in Swift, but no luck finding a Swift version constant. As Swift 1.2 approaches it will be nice to flag old code that only runs on Swift 1.1 (Xcode up to 6.2) or new code that needs Xcode 6.3 (Swift 1.2) Note: I can also use system() to do something

Xcode6:Embedded binary is not signed with the same certificate as the parent app

雨燕双飞 提交于 2019-12-18 12:44:54
问题 After I add Today App Extension Target,I become impossible to compile project. below is error: error: Embedded binary is not signed with the same certificate as the parent app. Verify the embedded binary target's code sign settings match the parent app's. Embedded Binary Signing Certificate: iPhone Developer: (Developer name) (number) Parent App Signing Certificate: iPhone Developer: (Developer name) (number) but Embedded binary certificate and parent app's cerificate are the same. So I'm

Access build folder in Xcode Server CI bot run (env variables?)

柔情痞子 提交于 2019-12-18 12:29:09
问题 I need to access the folder that is created dynamically during each bot integration. On one of the run it is something like this - /Library/Developer/XcodeServer/Integrations/Caches/ a3c682dd0c4d569a3bc84e58eab88a48 /DerivedData/Build/Products/Debug-iphonesimulator/my.app I would like to get to this folder in an post trigger, how do I go about it? Based on the wwdc talk it seems like some environment variables like 'XCS_INTEGRATION_RESULT' and XCS_ERROR_COUNT etc.. are being used. Also I can

Xcode 7 will NOT build a valid Archive from the same project that builds a valid archive in Xcode 6

老子叫甜甜 提交于 2019-12-18 12:24:44
问题 When using Xcode 7b5 to build my app that contains a Today Extension I cannot create a valid archive. When I make an archive the build succeeds and then in Organizer it shows up under "Other Items" instead of under "iOS Apps". If I close the project and open up the same project in Xcode 6.3.2 when I make the archive it shows up under "iOS Apps". I compared the archives and the one thing I noticed is that my Today Widget is being placed outside of the Applications directory. The structure

How to use custom font in iOS ( Eg: Helvetica CY.ttf ) with Xcode programatically

风流意气都作罢 提交于 2019-12-18 11:59:39
问题 I am trying to use Helvetica CY font in my app. I have configured it as recommended by apple docs. The custom font shows up in dropdown in Storyboard, but unable to use the same font programatically in my class file. I have logged all font families available for the app, but " Helvetica CY " is not printed on console log. Any help will be appreciated. Thanks! 回答1: Its simple only. Its working for me in xcode6.1 too. Try using this steps : Step 1: Include your fonts in your XCode project Step

How to do Custom Fonts at design time in Xcode 6?

ぐ巨炮叔叔 提交于 2019-12-18 11:50:01
问题 It was explained in the WWDC 2014 videos that you can have Custom Fonts at designing time directly in Storyboard, but so far I only see the list of iOS fonts. Any help? 回答1: All you have to do is to drag and drop the font files to your Xcode project, then you can find the font in the Custom font list. You don't even have to have them included in your Application Plist. That makes things simpler. If you already had fonts added to Xcode 5.1 project, they will not show up in the custom fonts

Unable to determine simulator device to boot. - Xcode

给你一囗甜甜゛ 提交于 2019-12-18 10:58:34
问题 I just downloaded Xcode 6 & played with it a bit. After switching back to previous version of Xcode and running in simulator, I keep getting this error. Unable to determine simulator device to boot. How do we resolve this? Thanks in advance. 回答1: Make sure you have only one iOS Simulator instance running in the Dock. 回答2: There was a simple answer to this for me: Open the simulator via Xcode -> Open Developer Tool -> iOS simulator (even if it can't launch, the app will be open). With the

Swift Error: Variable used within its own initial value

大憨熊 提交于 2019-12-18 10:58:13
问题 When I'm initializing an instance of an entity I'm getting the error Variable used within its own initial value . Here is the code throwing the error: class func buildWordDefinition (word:String, language:Language, root:TBXMLElement) -> WordDefinition { let word = WordDefinition(word: word, language: language) The error points at the word variable. Here is the WordDefinition class: class WordDefinition { let word: String let language: Language init(word: String, language:Language) { self.word

How do I add certificates for OS X Server 3.2.1 with Xcode 6.0.1

大城市里の小女人 提交于 2019-12-18 10:56:27
问题 After I have upgraded both Xcode (to 6.0.1) and OS X Server (to 3.2.1) I can't figure out how to add certificates for the provisioning profiles so the Xcode bot can find them. I have successfully added the provisioning file by copying the .mobileprovision file to /Library/Developer/XcodeServer/ProvisioningProfiles But the error I get in the log is now: CodeSign /Library/Developer/XcodeServer/Integrations/Caches/017d83d8975db54bc8279c2fcc0304a6/DerivedData/Build/Products/Server\ build-iphoneos