Skip to content

Instantly share code, notes, and snippets.

@Henry0422
Henry0422 / fix_ios_errors.md
Created November 12, 2016 18:42 — forked from aldeed/fix_ios_errors.md
Fix iOS Project Swift Errors

Fix iOS Project Swift Errors

In order to build the iOS app in the latest XCode, you need to convert the project to Swift 3.0. After you do this, when you try to run or archive the project, you will get a bunch of errors. This section explains how to fix them.

IMPORTANT NOTE: Fix all the RED errors. There will also be yellow triangles and the option to "update to recommended settings". Do NOT fix these things and do NOT update to recommended settings.

Info from Apple on what has changed in Swift: http://adcdownload.apple.com/Developer_Tools/Xcode_8_beta_6/Release_Notes_for_Xcode_8_beta_6.pdf ("New in Xcode 8 beta 6 - Swift Compiler" section on page 8)

"NSURL" is not implicitly convertible to "URL"

@Henry0422
Henry0422 / assign_field_in_map.go
Created October 20, 2016 00:56
Assign to a field of a map - Golang
var m = make(map[string] newDataType)
type newDataType struct {
x int
y string
}
func main() {
var tmp = m["foo"]
tmp.x = 4