A framework is a type of bundle that packages dynamic shared libraries with the resources that the library requires, including files (nibs and images), localized strings, header files, and maybe documentation. The .framework is an Apple structure that contains all of the files that make up a framework.
Frameworks are stored in the following location (where the * is the name of an app or framework):
- /Library/Application Support/*/*.app/Contents/
If you just browse through these directories, you’ll see so many things you can use in apps. You can easily add an import followed by the name in your view controllers in Swift. For example, in /System/Library/Frameworks you’ll find the Foundation.framework. Foundation is pretty common as it contains a number of APIs such as NSObject (NSDate, NSString, and NSDateFormatter).
You can import this into a script using the following line:
As with importing frameworks/modules/whatever (according to the language) – you can then consume the methods/variables/etc in your code (e.g. let url = NSURL(fileURLWithPath: “names.plist”).
There are a lot of Apple developers out there these days. And it often seems like few groups like to share information more than those who work in the Apple space. So where can you go to learn more about Apple development? There are a lots of websites and code camps, but what about annual conferences?
- WWDC: San Jose, CA – This is the grandaddy of them all. Hear from the people who build the frameworks and IDEs directly! But registration is limited and no everyone can go to that one place at that one date and time of the year. Also, different conferences can give different perspectives, so even if you go to WWDC every year, it’s worth looking at some of these other conferences as a +1!
- AltConf: San Jose – Everything from iBeacons to how to name a product. The big thing is that it’s held alongside WWDC so I mention it first. By developers for developers – but not really connected to Apple’s developer relations.
- Mac Admin & Developer Conference UK: MacADUK is a great intersection between administration and development. A little bit of everything and a lot of smart. Grows every year.
- MacTech: This is more of an
- Appdevcon: Amsterdam – I like conferences for and by developers. And I like Amsterdam.
- Objective By The Sea: Hawaii!!! – Who doesn’t love a conference in Hawaii?!?! But more importantly, some of the top security minds in the Apple world have signed up for the inaugural conference to
- dot Swift: Paris – A Swift conference in Paris. I prefer how to write code type of conferences, or why pick a framework. So there ya’ go. In Paris.
- RWdevCon: Washington, DC – I love the format of a tutorial-driven conference (and will likely emulate that in the future. Nothing gets rid of the silly touchy-feely stuff in tech conferences more than how-tos!
- Swift by Northwest
- iOSCon 2018: London – Any conference Aaron Hillegass ends up at is gonna’ be good. Especially if you live close.
- iosdevuk: Aberystwyth, Wales, UK – iOS Development
- forwardSwift: San Francisco – Talk about new Swifty-bits!
- FunSwiftConf: New York – Fun is for Functional Swift!
- App Builders: Switzerland – My and for app developers.
- try! Swift: New York and Tokyo
- DeveloperWeek: Oakland, CA – More of an overall development conference
- Playgrounds: Australia – No dates or location for next year, but it’ll be good.
- Swift Summit
- MobileWorld Congress: Barcelona – More upper level but with good dev sessions. Warning, developers sent here might end up writing their own games long term! 😉
- UIKonf: Berlin – I love these videos, test driven development, specific information about frameworks (often from the people that wrote the frameworks. Awesome.
- Teki-Con: Atlanta – Any conference Aaron Hillegass ends up at is gonna’ be good. Especially if you live close.
- 360 iDev: Denver – Good technical workshops that focus on metal and frameworks and all the fun stuffs.
- Game Developers Conference: San Francisco – Guess what? Everything you learn building games translates to building any kind of app you could imagine.
- ADDC: Barcelona – More of a focus on design than hard core coding techniques. Some people are into that!
- OSCON: Portland – Learn about all the latest and greatest open source languages and projects.
- QCon New York – A bit more about organizing software teams and team structure.
- Microsoft Ignite: Orlando – If you build enterprise software, you likely leverage the Active Directory, Azure identity, or even host on Azure, meaning Ignite is very pertinent to what you’re doing. While you might not see sessions on how to drop a specific Swift framework into a project, you might.
- Google I/O: San Francisco – What I said above but for s/Microsoft/Google.
- Facebook F8: San Jose – What I said above but for s/Microsoft/Facebook.
- AWS reInvent: Las Vegas – What I said above but for s/Microsoft/Amazon
- IT/Dev Connections: Dallas – When you deploy software, you likely need to automate the build process. When you get into that intersection between IT and DevOps, you should at least read the session descriptions for this conference to see if it’s something you’re into.
- DockerCon: San Francisco – If you devop (yes, I made up a verb) in Docker all day then this is your conference.
- DevOps Con: Berlin – More on DevOps, but in Germany!
- MacDevOps YVR: Vancouver – More on Devops, but for Macs!
- Jax DevOps: London – Devops, but a little more businessy and processy.
- PowerShell and DevOps Global Summit: Bellevue (Seattleish) – Devops, but more Microsofty.
- GoTo Conference: Chicago – More devops but kinda’ like an unconference. Which leads to some really interesting and diverse sessions. I like getting ideas from really niche workflows.
- O’Reilly Fluent Conference: San Jose – Ever read an O’Reilly book on HTML5 or CSS or Java? If so, you will likely find this a cool conference.
- JavaOne: San Francisco – Like WWDC but for Java.
There are also a number of conferences on general Apple administration topics. If you’re doing general Apple devops and admin work I’d definitely check those out! I have a page of those here:
Apple Admin Conferences
I like engineering topics, but if you’re into the businessy side of Apps, check out:
Top Mobile App Conferences and Events To Go To in (2019)
The following is a list of ISO country codes:
AMERICAN SAMOA AS
ANTIGUA AND BARBUDA AG
BOSNIA AND HERZEGOVINA BA
BOUVET ISLAND BV
BRITISH INDIAN OCEAN TERRITORY IO
BRUNEI DARUSSALAM BN
BURKINA FASO BF
CAPE VERDE CV
CAYMAN ISLANDS KY
CENTRAL AFRICAN REPUBLIC CF
CHRISTMAS ISLAND CX
COCOS (KEELING) ISLANDS CC
CONGO, THE DEMOCRATIC REPUBLIC OF THE CD
COOK ISLANDS CK
COSTA RICA CR
CÔTE D’IVOIRE CI
CZECH REPUBLIC CZ
DOMINICAN REPUBLIC DO
EL SALVADOR SV
EQUATORIAL GUINEA GQ
FALKLAND ISLANDS (MALVINAS) FK
FAROE ISLANDS FO
FRENCH GUIANA GF
FRENCH POLYNESIA PF
FRENCH SOUTHERN TERRITORIES TF
HEARD ISLAND AND MCDONALD ISLANDS HM
HONG KONG HK
IRAN, ISLAMIC REPUBLIC OF IR
KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OF KP
KOREA, REPUBLIC OF KR
LAO PEOPLE’S DEMOCRATIC REPUBLIC (LAOS) LA
LIBYAN ARAB JAMAHIRIYA LY
MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF MK
MARSHALL ISLANDS MH
MICRONESIA, FEDERATED STATES OF FM
MOLDOVA, REPUBLIC OF MD
NETHERLANDS ANTILLES AN
NEW CALEDONIA NC
NEW ZEALAND NZ
NORFOLK ISLAND NF
NORTHERN MARIANA ISLANDS MP
PALESTINIAN TERRITORY, OCCUPIED PS
PAPUA NEW GUINEA PG
PUERTO RICO PR
RUSSIAN FEDERATION RU
SAINT HELENA SH
SAINT KITTS AND NEVIS KN
SAINT LUCIA LC
SAINT PIERRE AND MIQUELON PM
SAINT VINCENT AND THE GRENADINES VC
SAN MARINO SM
SAO TOME AND PRINCIPE ST
SAUDI ARABIA SA
SIERRA LEONE SL
SOLOMON ISLANDS SB
SOUTH AFRICA ZA
SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS GS
SRI LANKA LK
SVALBARD AND JAN MAYEN SJ
SYRIAN ARAB REPUBLIC SY
TANZANIA, UNITED REPUBLIC OF TZ
TRINIDAD AND TOBAGO TT
TURKS AND CAICOS ISLANDS TC
UNITED ARAB EMIRATES AE
UNITED KINGDOM GB
UNITED STATES US
UNITED STATES MINOR OUTLYING ISLANDS UM
VIET NAM VN
VIRGIN ISLANDS, BRITISH VG
VIRGIN ISLANDS, U.S. VI
WALLIS AND FUTUNA WF
WESTERN SAHARA EH
Posted a new swift command line tool to accept serial number data from an Apple device and respond with warranty information about a device at https://github.com/krypted/swiftwarrantylookup
. This is based on pyMacWarranty, at https://github.com/pudquick/pyMacWarranty
Let’s do a typical Hello World example in Swift. I have Xcode installed, so I can invoke a swift environment using xcrun, a command to start an interactive Xcode environment and then defining swift as the language I want to use, as follows using a standard Mac terminal session:
Then I get a welcome screen, which is kind:
Welcome to Apple Swift version 2.1.1 (swiftlang-700.1.101.15 clang-700.1.81). Type :help for assistance.
Then, I can throw some string into a variable:
1> let mystring = "Hello Swift"
And I get a response that the string was accepted, as a string:
mastering: String = "Hello Swift"
Then I can just echo that string out, popping it into a quoted and parenthetical (since it has a variable inside it, made regular by the \):
2> print ("mystring is \(mystring).")
And I get the following response:
mastering is Hello Swift.
Pretty simple syntax. We can also use two strings and then use the + operator to concatenate (a typical programming task):
let firstword = "Hello"
let secondword = "Swift"
let mystring = firstword + secondword
print ("mystring is \(mystring).")
Now that the basics are out of the way, why not build a Swift API…