Creating groups using a custom template xcode 8

In case this helps someone, here’s a project template that works with Xcode 12.4: <key>Nodes</key> <array> <string>ViewController.swift:comments</string> <string>ViewController.swift:imports:importCocoa</string> <string>ViewController.swift:implementation(___FILEBASENAME___: UIViewController)</string> <string>ViewController.swift:implementation:methods:viewDidLoad(override func viewDidLoad(\))</string> <string>ViewController.swift:implementation:methods:viewDidLoad:super</string> <string>Info.plist:UIMainStoryboardFile</string> <string>Info.plist:UIApplicationSceneManifest:UISceneStoryboardFile</string> <string>Some/MainCoordinator.swift</string> <string>Some/Other/TestClass.swift</string> </array> <key>Definitions</key> <dict> <key>Some/MainCoordinator.swift</key> <dict> <key>Group</key> <array> <string>Some</string> </array> <key>Path</key> <string>MainCoordinator.swift</string> </dict> <key>Some/Other/TestClass.swift</key> <dict> <key>Group</key> <array> <string>Some</string> <string>Other</string> </array> <key>Path</key> <string>TestClass.swift</string> </dict> </dict> The group is Some. … Read more

Type ‘Any’ Has no Subscript Members in xcode 8 Swift 3 [duplicate]

Try this: let json = try JSONSerialization.jsonObject(with: data!, options:.allowFragments) as! [String:AnyObject] Safe way: do { if let json = try JSONSerialization.jsonObject(with: data!, options:.allowFragments) as? [String:Any] { print(json) } } catch let err{ print(err.localizedDescription) } You have to cast type Any to Swift dictionary type [String:AnyObject]. Edit: Swift 3 In swift 3 the purpose of AnyObject … Read more

NSPhotoLibraryUsageDescription in Xcode8

Localizing of info.plist file may be very unuseful, especially if you use many languages in your apps. The simplest way for localizing NSPhotoLibraryUsageDescription, NSLocationWhenInUseUsageDescriptionor NSCameraUsageDescription keys is to describe it in InfoPlist.strings file. Create new *.strings file with name InfoPlist; Press Localize… button in file inspector and choose the default language; Add new records in … Read more

iTunes software service authentication error domain error 434

So this has what worked for me: Preface: 4 days of debugging, recreated certificates numerous times, nothing worked, every time i try to validate/upload via Xcode it says same error “iTunes software service authentication error domain error 434” Solution without XCode: Create archive in Xcode Export IPA in Organiser (Xcode > window > Organiser) Open … Read more

ios10: viewDidLoad frame width/height not initialized correctly

The most common issues you describe are appearing in iOS 10 only and can be solved by adding this line (if necessary): self.view.layoutIfNeeded() just above the code, that is responsible for changing constraint, layer.cornerRadius etc. OR place your code related to frames / layers into viewDidLayoutSubviews() method: override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() view.layer.cornerRadius = self.myView.frame.size.width/2 … Read more