xcode - Core Data Exporting all tables

I have an app that creates individual events and stores them in core data. What I need to do it load one individually and then export it by email. The code below works except it exports every event where I need it to just export the index path selected one. The code does load the appropriate record because the NSLog (@"My record is: %@", currentItem); does display only the settings for that event but when the data is exported to email all events are sent. I need the selected event with the event name to export. Any thoughts?NSInteger index = ex...Read more

xcode - Linker command failed with exit code 1 (use -v for more details) Xamarin.Mac

I created a Xamarin.Mac App, then add nuget package Pkcs11Interop (it supports mac). And try to tun project but gives an error messages:Build Log:MMP : warning MM2006: Native library 'libdl' was referenced but could not be found. /Library/Frameworks/Mono.framework/Commands/pkg-config --cflags mono-2 -D_THREAD_SAFE -I/Library/Frameworks/Xamarin.Mac.framework/Versions/ /Library/Frameworks/Mono.framework/Commands/pkg-config --variable=libdir mono-2 /Library/Frameworks/Xama...Read more

static libraries - Integrating (C++) library and consumer app in XCode 9

I have created a C++ (static) library libFoo.a.I wish to create an iOS ObjC app in XCode that uses this library.I would like to have both projects side-by-side. So that I can modify the library code, rerun the consumer app, and it will automatically rebuild the library.I also need to be able to single-step through the library code.do I need to create an Xcode workspace and drop both projects into it?When I build a library and inspect the 'Products' group, it still appears red even though the build succeeded. Is this okay?How do I inform the con...Read more

XCode: Preprocessor macros from host target not being found in unit tests

In my target setup I have preprocessor macros that set some URLs I use in the my app. I have some integration tests to test server API integrations we've done. When I run the unit tests, these preprocessor macros are not found and hence the unit tests do not compile. It is my understanding that preprocessor macros set up in the host target will be available when running the tests...Read more

Xcode - Swift 4 Encoding error

I have this code : let data = "NgAzADYANQA1ADEANwA0ADgANQA1ADQANgA4ADgAMAA0ADcALwAvAGIAYQAwAGQAZABlAGQANAAtAGYANAAzAGUALQA0ADAANABkAC0AYQAzAGYAYgAtADQAZQA2ADIAZQBhADkAMgBiADMAYgBiAA==" let dataDecoded = Data(base64Encoded: data, options: NSData.Base64DecodingOptions.ignoreUnknownCharacters)! let decodedString = String(decoding: dataDecoded, as: UTF8.self) print(decodedString)On my output window, i have this result : 636551748554688047//ba0dded4-f43e-404d-a3fb-4e62ea92b3bbBut on my variable, i have : 6\03\06\05\05\01\07\04\08\05...Read more

xcode - Finder Style NSSplitVIew - Resize only right panel on Window Resize

i have a Vertical NSSplitView on my ViewController i set a Width constraint of >=200 for the left controller. This works in the sense that it won't let me size it less than two hundred. However if i expand the form it changes the size of both the Left & Right Views. I want it to default to changing only the Right view. So the user can increase the Left View if she wants but when they resize the form it only resizes the Right View....Read more

xcode - Second view not appearing within view controller

I have just set up two views within a view controller and I am trying to switch from one view to another when a button is pressed. For some reason when I push the button, it seems that one view disappears as intended, however the other does not appear in it's place.I have IBOutlets for both views - budgetDisplayView, budgetEntryViewWhen the button is pressed, this code is ran: budgetEntryView.hidden = true budgetDisplayView.hidden = falseI assumed it would be as simple as that, however I just get a blank screen when the button is ...Read more

xcode - OS X addsubview from xib in swift

I'm trying to add a new sub view form a nib using swift for OS X.So far i've: created a new "Cocoa Application" added a new "Cocoa Class" called "TestSubView" as a subclass of NSViewController with a XIB fileI want to add this subview to my main view when the application loads. in my ViewController ( the ViewController for the main window ) i have. import Cocoaclass ViewController: NSViewController { override func viewDidLoad() { super.viewDidLoad() let newSubView = TestSubView(); self.view.addSubview(newSubView.view); ...Read more

xcode - Connect to ViewController from AppDelegate (Swift)

I have created a new OS X Cocoa Application using the standard Xcode Swift template (using StoryBoards).I have implemented an IBAction in AppDelegate.swift to handle when the users selects "Open..." from the "File" menu. If the chosen file is a valid image file, I create an NSImage which I then want to display in the view of ViewController. @IBAction func openFile(sender: NSMenuItem) { var openPanel = NSOpenPanel() openPanel.beginWithCompletionHandler { (result :Int) -> Void in if result == NSFileHandlingPanelOKButton { ...Read more

xcode - How do I create a multi-page application using Swift for OS X?

I've created an OS X Cocoa Application using the Swift language in Xcode. I have setup my main storyboard like this:And when I run the application and hit the button, it opens a new window for the other View Controller like this which is not what I want. This is what I get:What I want exactly is that the ViewControllers to switch but in the same window, and not in a new window. How do I stop the new window behaviour and make this work in the same window?...Read more

xcode - TextCell in InerfaceBuilder for NSTableView

I am quite new to NSTableView but as I tried to get things straight, I took a look at InterfaceBuilder!!TableView hierarchyI understand that objects are responsible for scrolling and clipping. TableView is the real NSTableView instance. The object titled function list ist the NSTableColumn below that is my TableCellView objects. What I don't understand is the object TextCell. It doesn't seem anything to do. Even wrong colors and alike have no effect at all. I am using a view based variant. Is the TextCell solely for cell based TableViews?I foun...Read more

xcode - NSWindow vs ViewController - OS X - Cocoa

I have been making iOS apps for a while now and I decided that I wanted to start working on making some of them for the Mac too.The question I have is this: is there any need for an NSWindow, now that developing for the Mac is so similar to iOS??So I made a simple cocoa application using Xcode and its comes with a storyboard called "Main", just like on iOS.In that storyboard file, there is a NSWindow which then links to a NSViewController.Can I get rid of that NSWindow? As I tried setting the NSViewController as the "Initial Controller" and the...Read more