Unable to set alternate app icons in iOS 11

I am unable to change the app's icon to an alternate icon in iOS 11 (Xcode 9, beta 3). However, it works fine in iOS 10.3 (with the following code): if #available(iOS 10.3, *) { guard let iconName = MySingletonClass.sharedInstance.icon...
more »

2017-07-18 16:07 (0) Answers

Xcode 8 automatic build when any change

I'm using both Xcode 8.2.1 and when I write anything, even a single space, Xcode builds automatically the entire project, It's very annoying and make my Mac really slow I disabled "Live build" option in General setting, C language to compiler default...
more »

2017-07-18 09:07 (2) Answers

Protocols, Structs, but no concrete type

Ok I have a protocol called Environment protocol Environment { var rootURL: String {get} } Then two structs: struct Production: Environment { var rootURL = "www.api.mybackend.com/v1" } struct Development: Environment { var rootURL = "www.a...
more »

2017-07-18 01:07 (2) Answers

Library not loaded- Alamofire

I have been plagued by a bug for hours. I am building a framework using Alamofire and am testing it in an iOS project. Whenever I run the project, I get this error: dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire Referenced fr...
more »

2017-07-17 22:07 (2) Answers

How to call a a different view by code in xcode 7

I am new to xcode 7 and it would be great if you could help me with something. I have two ViewControllers and I would like to call ViewController2 from ViewController1. I need to do that by code. (I would like to call it from the viewDidLoad()-func...
more »

2017-07-17 20:07 (1) Answers

NSUrlRequest works in simulator but not on iphone

I have an app which records sound from microphone and then sends it to my website through NSUrlRequest. To test it, I added that audio is played from website so I can hear if it worked. When I test it on simulator, everything works fine: audio is re...
more »

2017-07-17 13:07 (1) Answers

Handling Add Tasks intent, siri kit

Although I believe I am following the right instructions for the handle function of the intent handler; everything finishes as it should (the data is saved), I send the success code back from the handle function and yet when the request is finished, ...
more »

2017-07-17 11:07 (1) Answers

Swift how to reuse my JSON HTTP Request header

I am making an application which makes a lot of requests from an API. So I don't want to copy and past the code over and over. I was wondering how I can reuse my code in a some more efficient way? Maybe with extensions? This is my code know: func ...
more »

2017-07-17 09:07 (2) Answers

How to ensure Generic's Type is a Closure

I am trying to make a generic class in swift that ensures its type argument is a closure. This closure can take any number of arguments of any type. class ClassWithClosure<Closure> {} var sensical = ClassWithClosure<(Int) -> Double>(...
more »

2017-07-17 05:07 (0) Answers

Mysterious EXC_BAD_ACCESS in simple code

I have some project where I created convenient architecture for my needing and all things was fine until I encountered mysterious crashes with EXC_BAD_ACCESS at runtime. I posted here the smallest code which represents the issue and here is the expla...
more »

2017-07-17 00:07 (1) Answers

Pass the url from the marker into the controller

I'm doing the app for viewing IP cameras and want to add cameras to the map so you can click on the desired marker and go to see the desired camera. I have a map and PlayerViewController which reproduce a webcam. Now each marker only transmits the f...
more »

2017-07-16 19:07 (1) Answers

how to get svg from url and cache it in swift 3?

I used PocketSVG library to get SVG path and render it. Now SVG images are shown but this library can't cache them. Because of that, when the tableview has scrolled all of request would sent again and the collectionView would be froze. until getting ...
more »

2017-07-16 14:07 (0) Answers

How to run app without storyboard?

New to Xcode 8 and Swift 3. Any help would be much appreciated. I've been doing as much research as possible but I'm still having trouble running my app without using the storyboard. Seems I get a black screen when I launch it in the simulator due to...
more »

2017-07-15 08:07 (2) Answers