Tag: swift

Where to Write Shared Application Data -Between Users in OSX

I understand that I need to store data in ~/Library/Application Support/YourApp for current user or /Library/Application Support/YourApp for shared users. But it seems I need to get root access to write data to /Library/Application Support/YourApp.. right? Can I write to Users/Shared ,Does this required root privileges? Is there anything wrong in doing this?

How to add texture (image) to SceneKit model so that it covers the model (mesh) uniformly?

Just started playing around with SceneKit & ARKit. One issue I’m having is covering the 3DModel with an image texture. What is happening is that part of the 3DModel when rendered in ARKit uses the texture correctly. The other parts are not. For example I’m using a sofa 3DModel at scale roughly (80 inches W […]

Xcode 9 crashes when debugging in swift

I’m using the latest RxSwift library for reactive programming and facing a strange problem when debugging my code in Xcode 9.1! I have a collectionView inside tableView header and bind selectedItem of collectionView to ViewModel variable to filter out section items. But when I change selected item of collectionView Xcode crashes and I can’t figure […]

UITableViewCell subclass wrong image in cell or old image bug

So guys, well I used to have the Massive View Controller problem, specially when using UITableView, now im changing an old app to be more modal. Before, I used to set the whole cell at cellForRowAt indexPath. set labels, download image etc. Now I’m using the correct approach to set at the UITableViewCell subclass. but […]

Xcode Swift application deployed to iphone losses CoreData after iPhone reboot

My simple Swift application uses an SQLite DB in CoreData for table view data. I deployed the app to my iPhone via the simulator. After a reboot of the iPhone the persistent data was no longer present….but the application launches. What must I do to keep the data persistent? IOS9.2.1 & Swift 2.0

Show Status Bar only for iPhone X

Looking to hide the status bar if it is not iPhone X and show the status bar if it is iPhone X. Most likely this will have to be done programmatically since there is no key that supports this functionality in the plist (closest one I found is UIStatusBarHidden)

Undefined symbols for architecture x86_64: for Firebase in Xcode 8.3.2

I installed firebase by manually to my Xcode for storage data purpose. I followed README from DOCS and integrated. But, the issue is, after everything setup, I am getting following compiler errors. Undefined symbols for architecture x86_64: “_kFIRAppDiagnosticsErrorKey”, referenced from: +[FIRDiagnostics logDiagnostics:] in FirebaseCoreDiagnostics(FIRDiagnostics_0c03a82afb19aa444c2f4902b5217b60.o) “_kFIRAppDiagnosticsSDKNameKey”, referenced from: +[FIRDiagnostics logDiagnostics:] in FirebaseCoreDiagnostics(FIRDiagnostics_0c03a82afb19aa444c2f4902b5217b60.o) “_kFIRAppDiagnosticsSDKVersionKey”, referenced from: +[FIRDiagnostics […]

Shared variable between two tabs for Xcode

I have two view controllers that I am working on which both inherits from a Base view controller class A_ViewController: BaseViewController class B_ViewController: BaseViewController Both of those VC interacts heavily with my firebase database. So I want a variable to keep track of all the downloaded items so those two VC can access it without […]

How to install a swift library consisting just of swift files

Suppose I have a swift library that consists of a large folder with subfolders with subfolders all containing many .swift files I would like my .swift project to be aware of – just as if I had written all that code myself. My swift project targets ios7+ meaning there are some issues with various package […]

How to go about adding a link/reference to another method in documentation Xcode?

I am adding some description to my method in class. This is how I achieved this: And it looks like this upon clicking… How can I make the underlined method clickable? I want it to be referenced so that when a user clicks on it, they are directed to a particular web page for documentation. […]