(Download PDF) Build Mobile Apps With Swiftui and Firebase Learn Swiftui and Firebase by Building Real World Applications Communicating With A Backend 1St Edition Sullivan de Carli Full Chapter PDF
(Download PDF) Build Mobile Apps With Swiftui and Firebase Learn Swiftui and Firebase by Building Real World Applications Communicating With A Backend 1St Edition Sullivan de Carli Full Chapter PDF
(Download PDF) Build Mobile Apps With Swiftui and Firebase Learn Swiftui and Firebase by Building Real World Applications Communicating With A Backend 1St Edition Sullivan de Carli Full Chapter PDF
https://ebookmass.com/product/pro-iphone-development-with-
swiftui-design-and-manage-top-quality-apps-4th-edition-wallace-
wang/
https://ebookmass.com/product/asynchronous-programming-with-
swiftui-and-combine-1st-edition-peter-friese/
https://ebookmass.com/product/asynchronous-programming-with-
swiftui-and-combine-functional-programming-to-build-uis-on-apple-
platforms-1st-edition-peter-friese/
https://ebookmass.com/product/programming-kotlin-applications-
building-mobile-and-server-side-applications-with-kotlin-brett-
mclaughlin/
Beginning iPhone Development with SwiftUI: Exploring
the iOS SDK (7th Edition) Wallace Wang
https://ebookmass.com/product/beginning-iphone-development-with-
swiftui-exploring-the-ios-sdk-7th-edition-wallace-wang/
https://ebookmass.com/product/postman-for-api-testing-a-
beginners-guide-learn-to-test-apis-like-a-pro-with-postman-with-
real-world-examples-and-step-by-step-guidance-parvin/
https://ebookmass.com/product/building-real-time-marvels-with-
laravel-create-dynamic-and-interactive-web-applications-1st-
edition-sivaraj-selvaraj/
https://ebookmass.com/product/building-real-time-marvels-with-
laravel-create-dynamic-and-interactive-web-applications-sivaraj-
selvaraj/
https://ebookmass.com/product/learn-enough-ruby-to-be-dangerous-
michael-hartl/
Build Mobile Apps
with SwiftUI and
Firebase
Learn SwiftUI and Firebase by Building
Real-World Applications Communicating
with a Backend
—
Sullivan De Carli
Build Mobile Apps
with SwiftUI and
Firebase
Learn SwiftUI and Firebase by
Building Real-World
Applications Communicating
with a Backend
Sullivan De Carli
Build Mobile Apps with SwiftUI and Firebase: Learn SwiftUI and Firebase
by Building Real-World Applications Communicating with a Backend
Sullivan De Carli
Charleville-Mézières, France
v
Table of Contents
vi
Table of Contents
Index�������������������������������������������������������������������������������������������������137
vii
About the Author
Sullivan De Carli is currently Consultant for Deloitte, where he works as
an iOS developer with several Fortune 500 companies as clients. He began
his development journey in 2017 and graduated from the Apple Developer
Academy in Naples, Italy, in 2020. He has built apps for personal projects
and successful entrepreneurial ventures.
ix
About the Technical Reviewer
Alexander Nnakwue is a self-taught software engineer with experience
in backend and full-stack engineering. With an experience spanning
more than four years, he loves to solve problems at scale. Currently, he
is interested in startups, open source web development, and distributed
systems. In his spare time, he loves watching soccer and listening to all
genres of music.
xi
CHAPTER 1
Introduction to
SwiftUI
This first chapter is meant for beginners in iOS development. I will walk
you through the main functionalities of Xcode, your tool to create projects
and run code. Then, we will create a simple application: a map displaying
a few places.
This way, we will explore some SwiftUI APIs to build the user interface
and some basics of Swift such as creating a model. Let’s get started!
Xcode Walk-Through
To build an iOS application, you first need Xcode. This software made by
Apple will be your program to write Swift code, create a user interface,
build and debug your project, and much more. Think of it like Photoshop
for photography or Sketch and Figma for UI design.
The software is available on the Mac App Store; you can easily
download it from there. Navigate to the App Store on your Mac and search
for Xcode, and then click DOWNLOAD (I have “OPEN” since I already
downloaded it):
2
Chapter 1 Introduction to SwiftUI
Click Create a new Xcode project, and the following page will appear:
3
Chapter 1 Introduction to SwiftUI
Xcode will suggest to you a series of templates. In fact, you can build a
lot of things using the Swift language such as an Apple Watch app, a game
that runs on the iPhone, a Safari extension, or a utility app for Mac. We will
select App from the iOS platform for now. It will be the same for the other
projects although our application will also be able to run on the iPad.
Now, I invite you to enter the word Discover; this is going to be the
name of our first project written with SwiftUI.
Also, make sure that the SwiftUI framework is selected together with
the Swift language.
(Make sure to have your name or enterprise in the Team field. If
you’re new to Xcode, it is your Apple account that you use for the App
Store. That should be your team’s name. For me it is “Sullivan De Carli
(Personal Team).”
4
Chapter 1 Introduction to SwiftUI
Great! Now save your project wherever you prefer; I usually save it to
my desktop. We can start exploring the Xcode functionalities!
5
Chapter 1 Introduction to SwiftUI
6
Chapter 1 Introduction to SwiftUI
3 – Canva has been introduced in 2019; it is an easy way to see the user
interface that you are building live. From there, you can see how your app
looks when you make changes in the code.
For example, try to add the keyword .bold() in the second panel right
after the Text("Hello, world!"). Your text will turn to bold right away.
4 – The right tab is going to be your points of information for the file
you are currently viewing. From there, you can rename it, change the
programming language, and even edit some user interface elements, such
as fonts and spacing between elements if you navigate to the last button
at the top. Note that we won’t be using this section much throughout
the book.
Now, you can build your project. I invite you to click the build button,
at the top left of Xcode as follows:
7
Chapter 1 Introduction to SwiftUI
Once you click it, a Simulator app will pop up and present you with a
virtual iPhone running your application. You can also select other types of
iPhones or iPads at the top panel so you can see how what you are building
reacts to different screen sizes.
There are a lot of things to cover about Xcode. So far, what I highlighted
are the main things to know and recognize, but we will discover more
functionalities by coding. We will do just that in the next chapter and build
our first application using Xcode and SwiftUI.
8
Chapter 1 Introduction to SwiftUI
import UIKit
9
Chapter 1 Introduction to SwiftUI
As you can see, we import the framework UIKit at the top. We pass two
delegates to our class: UITableViewDelegate and UITableViewDataSource.
Then, we declare a UITableView to create the list that we manually added
in the viewDidLoad method.
This method is being called when the view is being loaded, presented
to the user. We also conform to this protocol with our two functions that
return the numbers of rows and what they are composed of, here a cell
with a text displaying the number of the current row.
Quite a bit of code to conform to the protocol and to present a basic
user interface composed of ten rows.
Let’s now code it using SwiftUI:
import SwiftUI
10
Chapter 1 Introduction to SwiftUI
Text("\(index)")
}
}
}
That’s it! As you can see, with SwiftUI our list is way shorter. We
import the framework at the top of the file. Then we directly declare a list
in the body variable that contains 11 elements from zero to ten and its
composition: a text displaying one to ten. It is literally two lines of code to
create a List, much clearer and easier to read.
Now that we see that SwiftUI is much more efficient to build user
interfaces, we are going to introduce a few bases. We will create a little
application to introduce some APIs.
C
oding with SwiftUI
To understand SwiftUI, the best thing to do is to build an application. So
we are going to build a simple application that displays a few places on a
map. Along with it, I will explain a few basics about SwiftUI.
Head to the Xcode project we created earlier called Discover. Run the
application. You should have the following starter template:
11
Chapter 1 Introduction to SwiftUI
import MapKit
12
Chapter 1 Introduction to SwiftUI
struct in Swift is used to store variables. Here we give the name of this
struct: Place.
Identifiable is a protocol used to make this class identifiable. Since
we are going to display the data in a List, we need to make each item
identifiable.
Then, we give a few variables of type UUID to give a unique identifier,
String for words, and CLLocationCoordinate2D to pass coordinates
(latitude and longitude).
Great, we just created what is called a model, a modularization of our
object (Place) with a few variables.
Now we can take care of our user interface.
Right under struct ContentView, add the following line of code:
13
Chapter 1 Introduction to SwiftUI
Copy/paste the following code right after the @State you declared earlier:
let annotations = [
Place(title: "Fontana di Trevi", coordinate: CLLoc
ationCoordinate2D(latitude: 41.900833, longitude:
12.483056), architecte: "Nicola Salvi"),
Place(title: "Pantheon", coordinate: CLLocationCoo
rdinate2D(latitude: 41.8986, longitude: 12.4768),
architecte: "Marcus Agrippa"),
Place(title: "Villa Medici", coordinate: CLLocation
Coordinate2D(latitude: 41.908, longitude: 12.483),
architecte: "Bartolomeo Ammannati"),
Place(title: "Colosseo", coordinate: CLLocationCoor
dinate2D(latitude: 41.890278, longitude: 12.492222),
architecte: "Flavian Emperors")
]
14
Chapter 1 Introduction to SwiftUI
Summary
If you are new to Swift, this chapter has been useful to introduce you to
Xcode, your tool to build applications for the Apple platform. Then, we saw
the basics of Swift by creating a model and writing static data. Then, we
used a map to display annotations, importing from the framework MapKit
to access Apple’s map APIs.
Now that we have a clearer idea of how to create a static model of data
and present them, we can go ahead and talk about the backend. The next
chapters will be focused on Firebase and how to download data from a
backend, present them, modify them, and handle user input. Let’s dive
into the Firebase console.
15
CHAPTER 2
Introduction
to Firebase
I am going to introduce you to the Firebase console and how to create a
new project and connect an iOS application.
We will cover what is Firebase, why we are selecting this backend over
others, and the advantages and disadvantages that come with it.
There is a walk-through to create your first Firebase project directly
from the web browser. We are also going to connect our iOS application to
talk to Firebase through its APIs.
By the end of this chapter, you will be able to create a new iOS app
linked to the Firebase backend. For reference, please go to the Firebase
documentation at the following link: HTTPS://FIREBASE.GOOGLE.COM/
DOCS/IOS/SETUP.
What Is Firebase?
Firebase is what we call a backend as a service (BaaS), which means that
rather than running your server to run your online applications, you pass
through their services to read, write, update, and delete data, authenticate
your users, and many more things!
Have a look at the following graphic that shows a native iOS
application built with a custom backend running on the cloud:
Figure 2-1. An iOS app built with a backend host on a cloud service
As you can see, the app will be communicating with a virtual machine
usually coded in Ruby, Node.js, or PHP, itself hosted by a cloud service
(which could also be physical, but it is rare nowadays) such as Amazon
Web Services, Google Cloud Platform, Microsoft Azure, or whatever
service. In complex applications with a large user base, it usually requires
a frontend developer, in our case an iOS developer; a backend developer
to develop the logic and the APIs; and finally a DevOps, responsible
for bringing all of that to a cloud service and distributing it. A full-stack
developer can also do it, but it is rare and requires a lot of experience.
Now, let’s have a look at an iOS application built with Firebase:
18
Chapter 2 Introduction to Firebase
As you see, the architecture is way easier. Our iOS is notifying and
receiving data from Firebase using their APIs that come along with great
documentation. There is no need to write code on the server side or host
it to a third-party provider since it is already built on top of Google Cloud
with no deployment needed by you! Additionally, you can still run backend
code, thanks to the Firebase Cloud function, if you want to achieve more
complex interactions later. In terms of a team, you need an iOS developer,
and you’re ready to publish an application on the App Store.
We have seen how much easier it is to use Firebase rather than running
your backend code, but there is more: it comes with a series of out-of-the-
box tools that help speed up your development.
For example, they have their APIs to authenticate a user with multiple
third-party providers such as Apple, Facebook, Google, etc. They have
Google Analytics preinstalled and ready to go.
Additionally, there are a series of extensions with third-party providers
to sign up users to an email list, adding in-app purchase with RevenueCat
with no code required.
You can discover them at this link:
HTTPS://FIREBASE.GOOGLE.COM/PRODUCTS/EXTENSIONS
–– You are faster to ship your application. You don’t need to write
code on the backend unless you need to execute some more
advanced functionalities.
19
Chapter 2 Introduction to Firebase
–– The data don’t belong to you to store them. The best thing to do
is to run a snapshot of your data every day and store it in a
secure place.
20
Chapter 2 Introduction to Firebase
21
Chapter 2 Introduction to Firebase
For step 1, you just need to give it a name. I invite you to name it “Note”
since it is the application we are going to build in the next chapter, but it
doesn’t matter.
The second step is to enable Google Analytics:
22
Chapter 2 Introduction to Firebase
This comes for free with Firebase, and it gives you access to basic
data about how long your users are spending time on each screen, user
usage over weeks, etc. You can even add events later to create funnels.
For example, you will be able to find out how many users complete the
signup process and then, for all those registered users, how many of them
complete a purchase. For now, simply enable it and click Continue.
23
Chapter 2 Introduction to Firebase
For now, we can simply use the Firebase default account. If you have
a website with Google Analytics tags to track usage and you want to build
a related iOS application, you might want to select directly your Google
Analytics account during this step. Click Create project, and you have
created your first project on Firebase.
Firebase Walk-Through
You’re now on the Firebase console. This is going to be the backbone of
your application. Let me introduce it to you although we’re going to dive in
with our development in the next chapters.
24
Chapter 2 Introduction to Firebase
Once the project is created, you will arrive at something like this:
This is a classic dashboard. In the left panel, you will get access to
different menus categorized into four sections:
25
Chapter 2 Introduction to Firebase
As you can imagine, there are a lot of features to cover with Firebase.
For the scope of this book, you will be 90% of the time between Xcode and
Firebase’s Build section.
On the right, you have your Google account that you can switch as
with every Google product and a “Go to docs” button. It is always good to
refer to the documentation when you want to implement something or
understand better how it works.
At the top, there is your project name. From there you can switch
between projects.
The “Spark plan” label is your billing plan; this one is for free
and comes with quite a lot of things. There is also the “pay as you go”
connected to Google Cloud Platform. You will be billed based on your
users’ usages and the number of documents written and read.
For this book, the Spark plan will be enough although we might need
to switch to pay as you go when we implement some extensions later
because they run on Google Cloud Platform. It is going to be a few cents
anyway since we are at a development stage.
It is now time to add our iOS application to talk to Firebase!
26
Chapter 2 Introduction to Firebase
27
Chapter 2 Introduction to Firebase
Finally, we need to give a name to our project. We will call it Note since
this is the application we are building in the next chapter. Make sure to
select SwiftUI for Interface. The use of Core Data is not required since we
will have Firebase to store data:
28
Chapter 2 Introduction to Firebase
29
Chapter 2 Introduction to Firebase
30
Chapter 2 Introduction to Firebase
Once you have copied your identifier, you can copy/paste it. You also
have the option to leave a nickname and the App Store ID, but these are
optional:
31
Chapter 2 Introduction to Firebase
Click Continue, and this will bring you to step 2, downloading the
GoogleService-Info.plist file. Click the blue download button and save
your file wherever you prefer. I saved it on my desktop:
32
Chapter 2 Introduction to Firebase
Now that you have your file, you can drag and drop it to your Xcode
folder from where you saved it. In my case, I dragged the file with my
mouse directly to Xcode and then clicked the Finish button.
Make sure that Create folder references, Copy items if needed, and the
target Note are selected
33
Chapter 2 Introduction to Firebase
Now that you have the file added to your project, Firebase will be able
to recognize your app when you are making the APIs call it. You can now
click Next.
34
Chapter 2 Introduction to Firebase
In case you lose this file for some reason, you can always find it and
download it from the Firebase console. Next to the project overview,
there is a settings button. Click Project settings and then scroll down to
SDK setup and configuration, and you will be able to download it again
from there:
That being done, we can go to step 3 and install the Firebase Software
Development Kit (SDK). This can be achieved in multiple ways. The most
popular are CocoaPods and Swift Package Manager. We will use the latter
in our case.
You can copy the URL suggested by Firebase indicated in the following
figure (https://github.com/firebase/firebase-ios-sdk):
35
Chapter 2 Introduction to Firebase
Once you have copied it, go back to Xcode and, at the top-left level,
click File ➤ Add Packages…, and a pop-up screen will appear. Enter the
URL you just copied into the search bar, and the Firebase-ios-sdk package
should appear as in the following figure:
36
Chapter 2 Introduction to Firebase
Click the blue button at the bottom right called Add Package, and
fetching will start and will propose you to add a product. For now, we will
only use the three following packages:
–– FirebaseFirestore
–– FirebaseFirestoreSwift
–– FirebaseAuth
Only these three modules will be necessary for our next chapters:
replicating the Apple Notes app. However, for the following project, we will
also be using Firebase Analytics, Firebase Storage, and more.
37
Another random document with
no related content on Scribd:
There is at least one white Negro in Africa. The man in the centre, who said both
his parents were as black as the women beside him, is pure Sudanese, yet he has
a fair skin, rosy cheeks, and flaxen hair.
Services at the Coptic Church at Khartum sometimes last five hours, while the
worshippers stand barefooted on the cold floors. The Copts, direct descendants of
the ancient Egyptians, have been Christians since St. Mark preached at
Alexandria.
“Do you see many changes in the condition of the natives since
the British occupation?”
“Yes. They are doing far better than in the past. They wear more
clothing, they have more wants, and are working to supply them.
Formerly many went naked, and as there was no security of property
and few wants, they had no incentives to save. When we came here
the taxes were levied at the will of the rulers, so the rich native was
sure to be persecuted. Now since the taxes are fairly levied, the
people are learning that their savings will be respected. They are
coming to have faith in us. Our first business was to make them
realize that we intended to treat them fairly and honestly, and I
believe we have succeeded. We had also to organize the country, so
that it might be able to pay the expenses of its government. We are
fast reaching that stage.”
“Is your native population increasing?”
“Very rapidly,” replied Sir Reginald. “I am surprised at the large
number of children that have been born since we took possession of
the Sudan. The provinces fairly swarm with little ones. During a
recent trip through Kordofan I carried a lot of small coin with me to
give to the children. The news of this travelled ahead, so as soon as
we approached a village we would be met by the babies in force.
Nearly every peasant woman came forward with a half dozen or
more little naked blacks and browns hanging about her, and the
children ran out of the tents as we passed on the way. The
Sudanese are naturally fond of children, especially so when times
are good and conditions settled as they are now. They want as many
children and grandchildren as the Lord will give them, and as most of
the men have two or three wives, it is not an uncommon thing for a
father to have several additions to his family per year.”
“Your Excellency has been travelling on camel back through
Kordofan. Is that country likely to be valuable in the future?”
“I do not see why it should not be,” replied the Governor-General.
“It is one of the stock-raising regions of this part of the world,
producing a great number of cattle and camels. Much of the meat
now used in Khartum comes from Kordofan, and camels are bred
there for use throughout the Libyan and Nubian deserts. The
southern half of the country, which is devoted to cattle, is inhabited
by stock-raising people. Every tribe has its herds, and many tribes
are nomadic, driving their stock from pasture to pasture. North of
latitude thirteen, where the camel country begins, one finds camels
by the thousands. That section seems to be especially adapted to
them.”
“What is the nature of the land west of Kordofan?”
“I suppose you mean Darfur. That country is a hilly land traversed
by a mountain range furnishing numerous streams. It is well
populated, and was for a long time a centre of the slave trade. The
natives there are comparatively quiet at present, although every now
and then a war breaks out between some of the tribes. This is true,
too, in Kordofan. The people are brave and proud, and they have
frequent vendettas.”
No matter how far up the Nile or how deep in the desert they live, “backsheesh”
is the cry of the children of Egypt and the Sudan. Young and old alike have learned
the trick of asking a fee for posing.
British experiments in cotton culture in the Sudan have been most successful
and the quality of the product compares favourably with Egyptian varieties.
Irrigation projects under construction will shortly add 100,000 acres to the cotton-
growing area.
The chief public building in Khartum is the Sirdar’s palace, built by Kitchener on
the site of Gordon’s murder. Over it float British and Egyptian flags and two
sentries guard its door, one British, one Sudanese.
I came down the Blue Nile from Khartum in a skiff. The distance is
about five miles, but we had to tack back and forth all the way, so
that the trip took over two hours. The mamour met me on landing.
He had a good donkey for me, and we spent the whole day in going
through the city, making notes, and taking the photographs which
now lie before me.
The people are stranger than any I have ever seen so far in my
African travels. They come from all parts of the Sudan and represent
forty or fifty-odd tribes. Some of the faces are black, some are dark
brown, and others are a rich cream colour. One of the queerest men
I met during my journey was an African with a complexion as rosy as
that of a tow-headed American baby and hair quite as white. He was
a water carrier, dressed in a red cap and long gown. He had two
great cans on the ends of a pole which rested on his shoulder, and
was trotting through the streets carrying water from one of the wells
to his Sudanese customers. His feet and hands, which were bare,
were as white as my own. Stopping him, I made him lift his red fez to
see whether his hair was white from age. It was flaxen, however,
rather than silver, and he told me that his years numbered only
twenty-five. The mamour, talking with him in Arabic, learned that he
was a pure Sudanese, coming from one of the provinces near the
watershed of the Congo. He said that his parents were jet-black but
that many men of his colour lived in the region from whence he
came. I stood him up against the mud wall in the street with two
Sudanese women, each blacker than the ink with which this paper is
printed, and made their photographs. The man did not like this at
first, but when at the close I gave him a coin worth about twenty-five
cents he salaamed to the ground and went away happy.
I am surprised to see how many of these Sudanese have scars on
their faces and bodies. Nearly every other man I meet has the marks
of great gashes on his cheeks, forehead, or breast, and some of the
women are scarred so as to give the idea that terrible brutalities
have been perpetrated upon them. As a rule, however, these scars
have been self-inflicted. They are to show the tribe and family to
which their owners belong. The mamour tells me that every tribe has
its own special cut, and that he can tell just where a man comes from
by such marks. The scars are of all shapes. Sometimes a cheek will
have three parallel gashes, at another time you will notice that the
cuts are crossed, while at others they look like a Chinese puzzle.
The dress of the people is strange. Those of the better classes
wear long gowns, being clad not unlike the Egyptians. Many of the
poor are almost naked, and the boys and girls often go about with
only a belt of strings around the waist. The strings, which are like
tassels, fall to the middle of the thigh. Very small children wear
nothing whatever.
A number of the women wear no clothing above the waist, yet they
do not seem to feel that they are immodest. I saw one near the ferry
as I landed this morning. She was a good-looking girl about
eighteen, as black as oiled ebony, as straight as an arrow, and as
plump as a partridge. She was standing outside a mud hut shaking a
sieve containing sesame seed. She held the sieve with both hands
high up over her head so that the wind might blow away the chaff as
the seed fell to the ground. She was naked to the waist, and her
pose was almost exactly that of the famed “Vestal Virgin” in the
Corcoran Art Gallery at Washington.
Omdurman is the business centre of the Sudan. Goods are sent
from here to all parts of the country, and grain, gum arabic, ostrich
feathers, ivory, and native cotton are brought in for sale. The town
has one hundred restaurants, twenty coffee houses, and three
hundred wells. It has markets of various kinds, and there are long
streets of bazaars or stores in which each trade has its own section,
many of the articles sold being made on the spot. One of the most
interesting places is the woman’s market. This consists of a vast
number of mat tents or shelters under each of which a woman sits
with her wares piled about her. She may have vegetables, grain, or
fowls, or articles of native cloth and other things made by the people.
The women have the monopoly of the sales here. Men may come
and buy, but they cannot peddle anything within the women’s
precincts nor can they open stands there. I understand that the
women are shrewd traders. Their markets cover several acres and
were thronged with black and brown natives as the mamour and I
went through.
Not far from the market I came into the great ten-acre square upon
which centre the streets of the stores. There are a number of
restaurants facing it. In one corner there is a cattle market where
donkeys, camels, and horses are sold. The sales are under the
government, to the extent that an animal must be sold there if a good
title is to go with it. If the transfer is made elsewhere the terms of the
bargain may be questioned, so the traders come to the square to do
their buying and selling.
It is strange to have shops that sell money. I do not mean stock
exchanges or banks, but real stores with money on the counters,
stacked up in bundles, or laid away in piles on the shelves. That is
what they have in Omdurman. There are caravans going out from
here to all parts of north central Africa, and before one starts away it
must have the right currency for the journey. In financial matters
these people are not far from the Dark Ages. Many of the tribes do
not know what coinage means; they use neither copper, silver, nor
gold, and one of our dollars would be worth nothing to them. Among
many of the people brass wire and beads are the only currency.
Strange to say, every locality has its own style of beads, and its
favourite wire. If blue beads are popular you can buy nothing with
red ones, while if the people want beads of metal it is useless to offer
them glass.
In some sections cloth is used as money; in others salt is the
medium of exchange. The salt is moulded or cut out of the rocks in
sticks, and so many sticks will buy a cow or a camel. The owner of
one of the largest money stores of the Sudan is a Syrian, whose
shop is not far from the great market. He told me that he would be
glad to outfit me if I went into the wilds. I priced some of his beads.
Those made of amber were especially costly. He had one string of
amber lumps, five in number. Each bead was the size of a black
walnut, and he asked for the string the equivalent of about fifteen
American dollars. The string will be worn around some woman’s
bare waist, and may form the whole wardrobe of the maiden who
gets it.
Not far from this bead money establishment the mamour and I
entered the street of the silversmiths. This contains many shops in
which black men and boys are busy making the barbaric ornaments
of the Sudan. Jewellery is the savings bank of this region, and many
of the articles are of pure silver and pure gold. Some are very heavy.
I priced rings of silver worth five dollars apiece and handled a pair of
gold earrings which the jeweller said were worth sixty dollars. The
earrings were each as big around as a coffee cup, and about as
thick as a lead pencil at the place where they are fastened into the
ear. The man who had them for sale was barefooted, and wore a
long white gown and a cap of white cotton. His whole dress could not
have cost more than ten dollars. He was a black, and he had half-a-
dozen black boys and men working away in his shop. Each smith sat
on the ground before a little anvil about eight inches high and six
inches wide, and pounded at the silver or gold object he was making.
In another shop I saw them making silver anklets as thick as my
thumb, while in another they were turning out silver filigree work as
fine as any from Genoa or Bangkok. The mamour asked two of the