1
00:00:08,000 --> 00:00:10,450
Hey everybody this is Caleb with Dev slopestyle.

2
00:00:10,610 --> 00:00:16,580
And in this video we're going to go ahead and install some cocoa pods Alamo fire and Alamo fire image

3
00:00:16,760 --> 00:00:21,650
to give us the capability to easily make network request as well as download images.

4
00:00:21,680 --> 00:00:24,320
So very very cool to get started.

5
00:00:24,320 --> 00:00:32,240
I actually want to show you the Alamo fire get hub page where there is tons of very very detailed and

6
00:00:32,240 --> 00:00:35,960
incredible documentation which you can read through your own time.

7
00:00:35,970 --> 00:00:37,670
We'll we'll go through a bit of it.

8
00:00:37,850 --> 00:00:42,770
But there is a lot here guys that can do a lot of stuff which is really really cool.

9
00:00:43,280 --> 00:00:51,770
Alamo fire image is a library that comes from the Alamo fireteam as you can see here but it is specifically

10
00:00:52,310 --> 00:00:59,180
for image components so it helps you to download images really easily and convert them into instances

11
00:00:59,240 --> 00:01:02,420
of you image that you can use in your apps which is really cool.

12
00:01:02,420 --> 00:01:08,660
So in order to actually set up cocoa pods for our app what we're going to do is we're going to need

13
00:01:08,660 --> 00:01:12,460
to go and find our project folder which mine is right here.

14
00:01:12,680 --> 00:01:16,670
Then you're going to need to open a terminal window like I have here.

15
00:01:16,760 --> 00:01:20,480
So you're going to need to CD into your directory.

16
00:01:20,480 --> 00:01:25,940
So what I like to do is just type CD space and then drag my folder into the terminal just a little faster

17
00:01:26,630 --> 00:01:27,450
then press enter.

18
00:01:27,470 --> 00:01:33,680
And we have now changed directories to be inside pixel city and open it up here so you can see what

19
00:01:33,680 --> 00:01:34,130
happens.

20
00:01:34,130 --> 00:01:39,160
But in order to set up cocoa pods all you need to do is type pod in it.

21
00:01:39,220 --> 00:01:42,390
Now this assumes that you have cocoa pods installed.

22
00:01:42,530 --> 00:01:51,620
If you don't all you need to type is pseudo gem install Coke cocoa pods like that pseudo gem install

23
00:01:51,620 --> 00:01:56,180
cocoa pods run through all of that and you'll have cocoa pods on your system.

24
00:01:56,180 --> 00:02:03,530
And after that all you need to do is type pod init to initialize an empty pod file press enter and you'll

25
00:02:03,530 --> 00:02:07,270
see that a pod file was created in my project folder.

26
00:02:07,280 --> 00:02:13,330
Now we need to set this up so that we can install both Alamo fire and Alamo fire image.

27
00:02:13,340 --> 00:02:17,020
And so go ahead and right click and I like to use Adam.

28
00:02:17,060 --> 00:02:20,230
That's just the the text editor that I like to use.

29
00:02:20,230 --> 00:02:25,580
There are plenty of them out there but I would advise against using text edit because sometimes the

30
00:02:25,580 --> 00:02:28,330
formatting can get a little screwed up so I like to use ADOM.

31
00:02:28,340 --> 00:02:33,420
It's free and you can download it on online of course.

32
00:02:33,470 --> 00:02:41,120
So pull open that file here and you'll notice there is a blank space called pods for pixel city.

33
00:02:41,120 --> 00:02:44,270
That is where we're going to declare what cocoa pods we want to install.

34
00:02:44,270 --> 00:02:50,270
So let's go ahead and head over to Safari again and we're going to see what we need to do to install

35
00:02:50,270 --> 00:02:56,840
Alamo fire should be here under instillation cocoa pods and you'll see it tells you how to install Cocoa

36
00:02:56,840 --> 00:02:58,750
Puffs just like I showed you.

37
00:02:58,790 --> 00:03:04,280
But what we need to do is we need to add this line into our pod file.

38
00:03:04,280 --> 00:03:10,970
You notice here it says target your target name do we go to our file here we have target pixel city

39
00:03:11,030 --> 00:03:13,370
that's the target pod file is affecting.

40
00:03:13,550 --> 00:03:14,590
And then do.

41
00:03:14,950 --> 00:03:16,100
OK very cool.

42
00:03:16,220 --> 00:03:21,610
Use framework's is here because we're using swift and we want to use dynamic frameworks.

43
00:03:21,620 --> 00:03:22,930
Otherwise it should be commented.

44
00:03:22,940 --> 00:03:29,720
But for this app of course we want that and for the pods all we need to do is to copy Podd Alamo fire

45
00:03:29,720 --> 00:03:31,840
version 4.4.

46
00:03:31,910 --> 00:03:38,570
Copy that in and paste it and I like to put a tab there so it's in the right space with everything else.

47
00:03:38,810 --> 00:03:39,750
Very cool.

48
00:03:39,800 --> 00:03:41,270
So that's Alamo fire.

49
00:03:41,270 --> 00:03:42,230
That's good to go.

50
00:03:42,560 --> 00:03:44,050
Now for Alamo fire image.

51
00:03:44,060 --> 00:03:48,970
It's basically the same thing pod Alamo fire image version 3.1.

52
00:03:48,980 --> 00:03:54,120
So I'm going to copy that and I'm going to press return then paste it into my iPod file.

53
00:03:54,470 --> 00:04:01,280
And at this point I can go ahead and press command s to save my pod file quit Adam and then go back

54
00:04:01,340 --> 00:04:04,520
into your terminal window.

55
00:04:04,520 --> 00:04:09,320
Now we're going to install those two cocoa pods we have just added so to do that all you need to do

56
00:04:09,320 --> 00:04:17,540
is type pod pod install and press enter and you'll notice that it says Downloading dependencies installing

57
00:04:17,540 --> 00:04:22,420
Alamo fire installing Alamo fire image and everything now is good to go.

58
00:04:22,430 --> 00:04:29,120
Although your project folder looks a bit different there is a POD file lock file as well as an X C workspace

59
00:04:29,660 --> 00:04:30,950
when you're using cocoa pods.

60
00:04:30,950 --> 00:04:36,290
That is what happens is your project gets converted into an X-Sea workspace and you have to open that

61
00:04:36,320 --> 00:04:39,240
in order for your project to work with the cocoa pots.

62
00:04:39,320 --> 00:04:39,550
All right.

63
00:04:39,560 --> 00:04:45,470
So go ahead and click pixel city dot X-C workspace and I'm going to make mine fullscreen and you'll

64
00:04:45,470 --> 00:04:50,060
notice there are two projects in here now one called pods and one called pixel city.

65
00:04:50,060 --> 00:04:54,110
Don't worry about pods for now but go ahead and take a look.

66
00:04:54,110 --> 00:05:00,230
Everything else is the same as it was but when you install Pod's you need to go ahead and do a clean

67
00:05:00,230 --> 00:05:01,090
and build.

68
00:05:01,100 --> 00:05:05,060
So go ahead and hold shift command k that will clean your project.

69
00:05:05,060 --> 00:05:11,970
Shift command B and it'll build your project and right now it's analyzing those new libraries but you'll

70
00:05:11,970 --> 00:05:14,240
see it's going to give us some errors.

71
00:05:14,340 --> 00:05:18,440
That is because we're dealing with swift for an ex code beta.

72
00:05:18,570 --> 00:05:21,620
But of fire requires swift 3.2.

73
00:05:21,780 --> 00:05:23,300
So let's change that.

74
00:05:23,310 --> 00:05:29,880
Go to your project here click on Pod's And then what we're going to do is we're going to go to build

75
00:05:29,880 --> 00:05:30,530
settings.

76
00:05:30,630 --> 00:05:31,180
OK.

77
00:05:31,350 --> 00:05:33,580
Now these are the build settings for alum and fire.

78
00:05:33,600 --> 00:05:35,800
These are the build settings for Alamo fire image.

79
00:05:35,810 --> 00:05:42,960
Now what we need to do is to search for swift language version and if you search for it you'll notice

80
00:05:43,050 --> 00:05:49,240
it's asking for swift for but Alamo fire is not yet updated to swift for so Clix with 3.2.

81
00:05:49,590 --> 00:05:54,300
Then for Alamo fire image do the same thing change it to swift 3.2.

82
00:05:54,300 --> 00:05:59,190
Now when we build the app you'll notice we will have no problems.

83
00:05:59,190 --> 00:06:06,120
Those arrows will go away because it's basically kind of like you know on the Nintendo Wii if you wanted

84
00:06:06,120 --> 00:06:08,810
to play Game Cube games you could put a Game Cube game in.

85
00:06:08,820 --> 00:06:13,680
Even though it was the previous system or like on the PlayStation 2 if you wanted to play banjo Kazumi

86
00:06:13,680 --> 00:06:19,290
you could put in the piece X game into the tray and it would work it's called Backwards compatibility

87
00:06:19,290 --> 00:06:24,060
and that's basically what we're doing is we're giving our app the ability to be backwards compatible

88
00:06:24,060 --> 00:06:25,710
with swift 3.2.

89
00:06:25,710 --> 00:06:28,210
So you'll notice all those errors went away.

90
00:06:28,710 --> 00:06:35,220
And if we go into Matt Visi if we tried to import Alamo fire let's give it a shot.

91
00:06:35,340 --> 00:06:41,120
You'll notice it is Alamo fire and Alamo fire image are both in their rightful place.

92
00:06:41,130 --> 00:06:47,940
So that is all we need to do to get Alamo fire and Alamo fire image properly installed and compatible

93
00:06:47,940 --> 00:06:51,520
with X code beta or X cotinine beta.

94
00:06:51,630 --> 00:06:51,960
Awesome.

95
00:06:51,960 --> 00:06:56,550
So in the next video we're going to start building out the user interface for Matt Visi and I'm really

96
00:06:56,550 --> 00:06:57,630
excited to get started.

97
00:06:57,630 --> 00:07:00,520
So let's go ahead and zip on over to the next video.

98
00:07:00,540 --> 00:07:01,490
I'll see you there.

