Well, as weird as it sounds, here’s a trick to make it appear faster:
Just go up to the “Product” menu and hover your mouse over the items. When you highlight “Scheme” the Canvas will get unstuck and display immediately.
At least this works for me in Xcode 15.0.0.
¯\(ツ)/¯
]]>From the book, here’s the idea on how to successfully launch a product:
Product ideas are safer if they are evolutionary, not revolutionary. When a business invests a lot of money in marketing something, and the market isn’t interested (yet), it’s a big risk.
The better option: Like a surfer on the beach, wait for the wave. And jump on it at the right moment.
Ideally, your product creates a wave that breaks the dam. When the product or product category reaches critical mass and everyone wants some of it.
And how to participate in these market waves? Either by launching a me-too product or by innovating. The first one is easy to do but might be more difficult to market. The latter works by looking at the top products that are currently trending and by changing a thing or two about them. Either by adding some feature or by solving the same problem in a different, new way. Or by being cheaper, or by adding some warranty.. and so forth.
Of course companies like Apple are an example of businesses that innovate against themselves. By making the next iPhone a little bit better than the last one, they are essentially killing the previous iPhone. But by doing that they ensure that no one else does it to them. They keep moving.
Now, by now this is probably all common sense. But I think it’s good to have that metaphor with the wave, the right timing, and the pattern of innovation by looking at the current leaders, in mind.
]]>Well, I changed my mind about all of that. People who work sales are now like heroes to me. Let me explain why.
First of all, I am a believer in the free market, in business and entrepreneurship. Think about it.. what would the world look like without entrepreneurs? All the things we do and own.. most of them we’ve purchased from businesses that started as startups, sometimes recently and sometimes long ago.
Anyway, SALES is a big part of business, especially when starting out. Rarely can you open shop and people will just come (although the right shop at the right time might get lucky - “the tide lifts all boats”, they say). One has to go out and find customers, at least until the business reaches a point where it just works by itself.
And it’s not easy. You have to go out and talk to people and suddenly you are the “sleazy” salesperson..
At least that’s kind of what I thought when I started a business many years ago with two other guys. And we decided we had to cold-call businesses. Man, that was HARD. I completely believe when people (one example is Youtube Business Coach Sam Ovens) say they had to drink alcohol just so they can do the calls.
I would say it’s definitely harder than chatting up a girl on the street… just to give a comparison.
Buuuuuut.. it’s necessary. At least for many businesses it is. And what is necessary simply has to be done, but I believe the right mindset is key.
Just as people who think money is the root of all evil will avoid getting rich, consciously and subconsciously, so will salesmen fail who believe they are sleazy liars. So… the answer is selling stuff that we believe is really good for the customers. Or by qualifying them to see if there’s a fit. The golden path is when the salesperson honestly can say .. “yes, this is good for you and your situation”, or “no, this is not for you, I don’t recommend we do business”.
Anyway, I wish I could say I have been in business for 20 years selling stuff.. but I haven’t. I’m just dumping my thoughts here.. and mixing in some of my own experience. Yes, I did cold calls, but it’s been a while.
I just got inspired to write about this topic because last week a salesperson came over to my place. He was selling some sort of installation safety checks for the house. And even though I didn’t buy from him I realized a) that I respect what he does, that b) it isn’t easy - at least for me, and c) it’s curious that salespeople have a bad rep when in fact they are key to businesses and businesses are key to our lives.
P.S.:
Of course there are also many businesses who don’t have direct customer contact. Or they can get it all done with Facebook ads and automatic sales funnels and whatnot. (Although probably they would need to talk to people first, unless they want to spend a fortune trying different ads.)
Thanks for reading, stranger on the Internet!
]]>I was expecting to watch a few minutes and then turn it off but it hooked me after about 10 minutes. It’s just very good and enjoyable.
It’s set in the late 60s, 1967 I think. And it’s the time where people start to think about new ways to live. To make a cut with the life of their parents and to try something new. It’s really nice to see the break performed in the end of the movie. And now, over 50 years later, we can of course look back to what happened later.
What’s interesting for me is that I believe many things have ever since improved a lot. But of course many people don’t feel that way. Those are the conservative voters and those are the fans of people like Jordan Peterson, a Youtube celebrity, teaching young men about conservative values. And it’s interesting to see how much people like Peterson are opposed. (Apparently Marvel Comics even created a villain based on him.)
It looks like the conflict from “The Graduate” is not over yet, after all. It goes on. But I can’t tell if these days it’s still the 20 year olds opposing the parents or not. It seems that many Jordan Peterson fans are older.
Or it might be just my bias, since I tend to see the people who are my age clearer.
I can’t really hear the younger folks, perhaps? - To clarify: This seems to be the major theme in the movie. People of different world views can’t communicate very well in this film. They often say “What?”. Actually there’s a lot of “What?” in The Graduate. This was the director’s way to show the divide of world views. The inability of people to comprehend what the other side is saying. (It climaxes very nicely on that theme but I don’t want to tell about the ending if you haven’t seen the movie yet.)
It’s like the 2020s, in many ways. Or like any year ever in human history. We have our world views, our filters, and unless we can at least learn to accept that other people have a completely different world view, the road ahead may get bumpier. But luckily, I think, we can and do learn to accept it.
]]>I am almost through with the book.
A tidbit from the last chapter I’ve read is how they conduct meetings. There’s much about meetings in the book, but I like this part in particular: In the end they are pushing for a decision. No “we’ll think about it” or “let’s schedule a follow up”. No no. Decide and implement.
By the way I highlight so much in this book.. it’s almost entirely highlighted. Also: Reading about Walmart is like reading about Amazon. Very similar ways of doing things. Especially interesting for me: His musings how computers and tech changed their business and allowed them to do what they do better and cheaper. It’s great to read about their technological transition in the 1970s and 1980s.
]]>For him, a union is a kind of lifeform that lives off the fact that workers and management don’t agree. And once you have them, they will, so to speak, do whatever it takes to survive, meaning, the workers and management will keep not agreeing.
(I’m loosely quoting.)
Anyway, instead, they came up with a profit share program in which employees, he calls them “associates”, can buy stock, or get bonuses in the form of stocks. Walmart stock being what it is for the last 40 years or so, means that a lot of people, including sales clerks and truck drivers, became millionaires.
In defense of unions, it seems that the threat of unionizing pushed Sam and the rest of management in that direction. So an union, even though never founded, had a part in their profit sharing scheme, it seems.
Or maybe that’s not true. And they just saw that by motivating their “associates” with a share of the profits would motivate them quite well to serve the customers even better. And serving the customer well is the number one reason that made them so successful after all.
I wonder. Can social democratic parties pivot towards support for such schemes? By making it easier and advantageous for companies to make their workers partial owners?
]]>It’s of course about seeing the progress we make in our life, and because it’s easy to fool ourselves, and because it’s easy to run in circles (for sometimes ridiculous amounts of time), it’s good to have a way to gauge if we are progressing or stagnating.
The philosopher Seneca said “If one does not know to which port one is sailing, no wind is favorable”. I am using this quote to suggest that having a goal is a great way to prevent stagnation. We can see if the port is coming closer.
But even better, by looking back, and feeling stupid we know that progress has been made. On the level of understanding at least.
Skipping to yesterday: I was in a virtual meeting and I was attacked for the first time in a long time. Someone did not agree with my assessment of a problem we had, and not knowing me, and being a bit full of himself, he decided to attack me rather aggressively. It was ok, I was able to state my case using some good points, but I felt excited, my heart was pumping faster, he had made me nervous. I was not expecting this, so he caught me with my guard completely down.
But! It’s like with feeling stupid in hindsight. This guy gave me an opportunity to learn something about me. How I react to stress, how I deal with direct criticism. He put a spotlight on an area in my life that I can improve.
Now, as I said, this is about “stumbling through life”. I know there are people who are much more guided, driven and frankly strategic about their life. They probably cannot fathom what I am talking about here. (And I am trying to become more like them, too.) But I believe people like me should resonate with this post. Nothing is for everyone after all.
In the end, the question is: How can I get into more such situations like yesterday? How can I get to the point where I can say “Wow, last week I was so stupid.”? Knowing a good method to do that would be cool. I’ll blog about it when I figure it out.
]]>Anyway, I have started reading “Made in America” by Sam Walton, which is the autobiography of the founder of Wal-Mart. Which is one of the first discount stores, meaning, they buy larger quantities of merchandise from producers and wholesale and sell it with just a relatively small markup. But, do that often enough, and a fortune is created.
I started reading it after I heard that every manager at Amazon has to read that book, it’s required reading, as dictated by Jeff Bezos. Being a fan of what Bezos does (and stubbornly ignoring all the bad press about Amazon I guess..), I couldn’t resist to get that book. It must be good!
And indeed, it is. Not all good books are biographies, but most biographies are good books. At least in my experience so far. Because you get to know the person, and how he sees the world. (“He” because I haven’t read any women’s biographies yet.) And what strikes me with Sam Walton are the following traits:
At some point early in life he commits to being a retailer, and that’s it. After that he’s compeltely focused on it. It’s part of his life, the biggest part of course, next to being a family man and a citizen of small towns in Arkansas. (Haven’t finished the book yet, but so far this is what it looks like to me.)
He is relentless. When he travels he checks out the competition. The Waltons go on family trips together and Sam uses every chance to stop a stores that interest him (often he just heard about them somewhere) to check them out. He is constantly learning from the competition. “Everyone does some things well.” seems to be his motto and he’s out to find those things and use them in his own stores.
He is not fancy. He doesn’t mind going through the trash of his competitors to get their pricing (so he can set his lower I suppose), or doesn’t mind if any of his managers does it. The stores are number one on his mind, and social norms or what others think of him isn’t even close. (But he seems to be a very likeable and rather popular guy nonetheless. Very extroverted.)
He is constantly hacking and optimizing. To get into a trade show early he talks a janitor into letting him in. To get from store to store quicker, he buys an old airplane and learns to fly it to save time. And of course he’s constantly on the lookout for new merchandise. (On business trips, when others go out for beers after the day is done, he’s either sleeping or studying merch catalogues.)
He is frugal. In one passage he expresses his hope that future generations of Waltons will not become ‘idle rich’. He really seems to dislike the idea.
He makes a point in understanding bookkeeping and all other rather dull parts of his business. He doesn’t outsource any of it, he’s on top of the books, because they are essential for retailers.
I’ll stop here for now, but the book is so great, I might post again because I’m impressed.
Takeaways for my life: People are different and for me life was always more about variety and adventure. But I understand a) that this is definitely not the case for most people and b) that I need to focus to get things done.
I can tell you two things that I didn’t know to do one year ago: Play guitar and piano at a level that would allow me to join a good band(, however not as the lead pianist or guitarrist, not that). I also learned a lot regarding my work and other things that interest me.
In summary, I have made let’s say 10% progress in the fields of music, engineering, finance etc. The lesson is clear: Had I focused 100% of my attention and time on one thing, say guitar, then I would be a damn good player by now. And Sam Walton, he’s a 100% type of guy. Well, more or less, but he has that guiding north star in his life, and it shows him the way. He’s an essentialist.
There’s a saying, and I’m paraphrasing, but it goes something like this: “If a person starts to focus on a thing, the universe and all in it comes to help.”
]]>What I mean is that it’s possible to view the world based on first principles from the physics world. You can take concepts like energy, equilibrium, entropy etc. and use it as a very good lens to categorize every day experience and to make some predictions on it.
For instance, you’ve probably heard the phrase “Nature abhors a vacuum”. It basically means that nature strives for equilibrium. If you are in a hot room and the room right next to it is cold, then by opening the door an exchange will happen and you will end up with two somewhat warm rooms. Why? Because, applying the vacuum saying, from the point of view of the hot room there is a lack of hot air in the cold room, a vacuum of sorts (not an actual vacuum since there is air), and nature, so to speak (not literally), “doesn’t like that”, and instantly starts working on change.
Again, this is not what happens on the molecular or even energetic level, but it’s a useful metaphor.
Another metaphor may be activation energy. Some chemical reactions require an imput to get going. A combustion engine either needs a lot of pressure (Diesel) or a spark (Gasoline) to set off the combustion that frees all that mechanical power stored in the mixture. It’s the same with us. We do not wan’t to do something until there’s a large enough pressure in our minds to do it. It could be basic like hunger, so we stand up and make a sandwich, or it could be more complicated, like a depression that keeps re-surfacing, and finally it reaches the breaking point at which we open up the browser and start googling for local psycholoigsts.
For some reason I used to exclude the concept of desire. It seemed outside of physics for me and in the realm of human hopes, dreams, relationships and egos. For example I thought it’s not simple phyics why somebody would spend $80.000 on a BMW. That’s a ridiculous price for a car and it’s completely irrational and therefore it cannot have anything to do with physics.
But that is not so. It has everything to do with it. And being a mechanism it can be applied in a larger mechanism (= a business) with predictable results. Bascially it works like a clockwork.
It’s important to first uncover a characteristic of desire, which directly maps to the laws of physics: Desire cannot be created or destroyed. At least not by marketing. And at least not without putting as much effort into doing it as in iventing the fist nuclear bomb.
It just exists, out there, forever and will always exist. It’s the side effect (or even the cause?) of being human. It’s the side effect of how our biology and society evolved. It can change its shape, morph into something specific, like the desire to get a BMW, but it all leads back, essentially, to the root desire which has always been there. (Or, if it wasn’t always there and it was created later on, it was done by large glacier like forces that we cannot control anyway.)
If we reduce the abstraction just a little bit and look at this nebulous thing called desire as light, we can use another useful metaphor so we can start working with it. Because now that it’s light, we can try to build a lens and try to focus this light to come together in a certain point of focus. And this point is our business or product(, but I guess it can also be a person, since people seem to be really into celebrities and easily captured by them).
How? By tuning in to the right frequency (you know light has a wavelength and wavelengths correspond to frequencies, right?). Or hm, let me just use music to illustrate (music is all about frequencies, too): We get out there and play a certain chord on the piano, and if we do it right, all the people that think that the chordsounds great are those with the problem that we are creating a solution for.
If we are tuned in to the desire perfectly, what we say to them will resonate in such a way that they will assume automatically, and with conviction, that we also have the solution. And they will start following and we will have build that magical lens.
Like current that flows through the wire, because it has no better option, the prospects targeted in such a way, will by neccesity buy from us (or at least be magnetically pulled in to stick around and read a bit more of our copy).
As usual, this post developed a life of its own while I was writing it. I just want to emphasize that the shift in my perception was that these things are out there in the world, and they are happening, not because people are generally bored, but by neccessity. And it is possible to introduce things into the world that will have an effect. Not perhaps, but certainly.
Look around. People do it every day.
]]>It’s more work to blog, however, because I have to pay more attention to grammar, readability and choice of words, so I will have to keep it short.
To begin let’s zoom out and start with the basics. There are two main tasks that need to be handled by entrepreneurs:
The first point is concerned with finding a gap between something someone wants to do and their ability to do so. There’s a gap which can consist of the actual ability to do something or the ability to do it better. I mean faster, cheaper, more effectively. The steps are:
There are a few ways to identify the gap. One way is to ask people, but the way we ask is important. For instance, some people will agree that there is a problem just to be polite. In other cases the gap is real but it’s not bad enough or happens not frequently enough that someone will actually pay for a solution. (A good way to find out is researching how they are bridging their gap so far.)
Another way is feeling the gap ourselves. This is known as “scratching your own itch”. If you are annoyed with the snow outside your house every winter, that’s an itch. Perhaps you then decide to invent a better snow shovel. After all, you will know what a good shovel looks like. That sort of thing.
Yet another interesting way I found was people looking at freelancing sites such as fiverr. And looking at demand for certain tasks. If there is a lot of demand for X, let’s say logo design, then it follows that there’s probably a market for logo design providers.
There are more ways, but to keep this post short I’ll stop here and move on to the next main point. Perhaps I’ll write more about finding gaps in a future post.
Ok so let’s say we have found a gap, now let’s move on to step 2: Device means to bridge the gap.
Here it becomes really a matter of skill. CAN we actually provide something useful? Can we build a tool? Can we write a blogpost? Can we connect two people that can help each other out? And so forth.
It really comes down to what we have now.
However, not having it yet is not a deal breaker. There is always the possibility to go out and obtain the needed knowledge or the neccesary tools. And this has probably never been easier than it is today.
Moving on, after we decided on our value proposition, on our solution for the gap or problem, we can build it. Or not even build it, but we can find out if it’s a good solution. If we have already built it (or a basic initial version, “the MVP”) we need to get it in front of possible customers to see if and how they use the solution. And if we haven’t we need to get in front of the customers and try to find out if they would buy it, if it existed, and if not, why not exactly, so that we can tweak our offering.
It’s basically the problem of getting an audience for what we have to offer. And it has always been a problem.
Let’s go back in time. Merchants (and philosophers?) in ancient times would stay in the market (and probably pay a fee for being allowed to do it), because that is where the customers were accustomed to go for their shopping. Jehova’s Witnesses today always stand in places like train stations, because they hope to capture a lot of the human traffic walking to and from the trains. They are all solving the distribution problem.
Online, the people are where? Well, they are on the big services we all know. Google, Facebook, Twitter, Instagram, Tiktok… that’s where a massive amount of people go and that’s why these services can ask a fee from merchants (and philosophers) to set up shop there, so to speak. By posting an ad and getting in front of the eyes of the crowd.
There’s another way, of course. These services consist of all the of makers and hobbyists that post their content there. By positing our own content we can get views, qualified traffic (meaning people who are already interested in our subject), for free. So the two main ways of distribution are:
Of course both are not free. The first one costs money and the second one costs time, and one converts to the other. For instance, if you are employed, you could free up a lot of time by paying someone else to do your job. And you can make money by being a worker. (In the last two sentences yet another secret is hidden almost in plain sight.)
But.. actually, of course, I lied. There are more ways to get distribution. Very interesting ways. But I’ll skip them for now and write about them in some future blogpost. Or rather blogposts, plural, because there are so many.
The interesting thing about writing, blogging or journaling, for me is always that it’s surprising. I don’t know the end result of a post. I start to write and it kind of always writes itself.
Half an hour ago I was expecting to write something about the different kinds of businesses I have researched and some details on the ideas I’ve had but I ended up writing this thing about the very basics of business. Who knew!
There’s SO MUCH more to say about all this. I guess I’ll stop here however and write more later. I have a feeling that I have enough material for a book in my head. Some ideas include: Outcome inequality, keyword marketing (and actual numbers), where to put more effort: marketing or creating the product?, sales funnels, sales copy, cold calling and emailing, using social media to reach interesting people, building an audience on social media, stories of my own past successes, why learning from successes is key and learning from failures is not, surviving despite all the distractions, thoughts on local brick and mortar business, starting business as a software developer, waves in the market and riding them, surfing hype, how the patterns in the stock market map to actual patterns in business and life and the whole universality of it, pattern recognition and avoiding false patterns, how all this stuff is actually very simple in principle and why we like to make it complicated, on being a shovel during a gold rush, about fantastic websites and communities for founders, case studies of some great product launches, my own past product launches (including some nice hacks to get free distribution), stuff on mindset, the underrated insights and philosophies of Steve Zissou and The Big Lebowski, what we can learn about distribution from religions, perhaps specifically Jehova’s Witnesses, .. ah I could go on and no just listing ideas for posts. But I’ll stop now and instead go do my day job.
Thanks for reading, stranger on the Internet!
]]>In a way Bitcoin is a huge brake, like a brake that stops a car, that we are building to reach our ideal of a decentralized democratic digital currency. Why is it like a brake? Because we have to spend energy, a very large amount of energy, to prevent something to happen that is natural. Just like it’s natural for the wheel of a car to continue spinning, and for the car to continue to move forward, we need to spend energy to apply a counter force to slow it down again.
So spinning is natural for the wheel, but what is natural for computers? The answer: Copying data. And performing operations on it. With just a little imagination and the right tools, anyone can make a computer do anything. (Remember Steve Jobs’ “Bicycle for the mind” metaphor.) The state of computers in malleable. So much so, that we invented error correcting codes, checksums and hashes to ensure that the data is unchanged. (These techniques of course play an important part in the technology that is Bitcoin.) But fundamentally, the computer remains a very malleable thing. It’s boundless and anarchistic in nature. Because the basic material it works on is information itself. And information seems to want to flow, just as a river wants to flow downstream. (For example, remember the last time you had to exercise willpower so you don’t tell a juicy secret to someone else?)
Bitcoin relies on having a lot of people agree on one set of data and for that data to be unchangeable (plus some other interesting qualitites). For this to work a mechanism called Proof of Work was invented, but in my metaphor it’s just a huge brake that prevents data from changing. And just as the brake on the car gets hot when it slows down the car by applying pressure and causing friction, the big Bitcoin brake of course also get’s hot and produces all that heat caused by CPUs and GPUs and other hardware calculating all those hashes, which, essentially results in more CO2 in the atmosphere. You just can’t cheat the laws of physics (unless you are Neo in the Matrix).
So what about the Communism? Well it’s similar. It’s a great idea with a lot of appeal at first, for example it seems to empower the little guy in the short term, but in the long term it fails because it opposes what is natural. In the case of Communism certain liberties that were a given in the west, had to restricted, to uphold the assumption that all people are equal (or something like that). What did they end up doing? They had to build huge brakes that prevented the people from leaving. They build sophisticated border walls and fences to contain the people. And on top of it an immense amount of bullshit, lies and brainwashing, had to be applied as well. Just so it worked. But it only worked for a while.
So Communism had to construct a big brake (or many brakes depending how you look at it), because it tried to do what was not natural for people. And Bitcoin has a big brake to prevent from happening what is natural to computers and information in general. Will it also remain a nice utopia that eventually failed because of the upkeep of that brake? Or will it change the rules fundamentally?
For me computers always have been about this nimbleness, this “think it and just do it”-ness, with ever faster CPUs and ever lower barriers to do more and more stuff. Bitcoin seems doomed to do the exact opposite. By making “mining” (Proof of Work) harder and harder (and, arguably, by spending more effort on convincing people that it’s good), it will use more and more energy, and thus it will always be an uphill battle. While computers get faster and faster and, perhaps, more people start asking: Why bother?
Having said all that: I own Bitcoin (and some Ethereum) and I’m happy that the mini amount I have now can buy a car or is worth a very luxurious holiday. So a part of me certainly doesn’t want it to fail.
And yet..
]]>Well since I belive that appearing stupid is a risk worth taking if it helps me to delete some ignorance, I usually ask. And often afterwards others dare to ask their questions, too. Many knowledge gaps get closed this way.
But usually some well informed people (,sometimes just the one person presenting something) wonder why we don’t know. Then a link to a wiki page or offers to forward a helpful PDF are given.
But in reality the people simply have not been properly briefed. Or, in the case of new employees, the on-boarding process was lacking. Instead they were too quickly given their first task to they can slowly learn the ropes. Fast forward a few months and they only know the bits they’ve been working on well.
Here’s what I would suggest instead: Any new employee, after setting up his computer and accounts, is paired with a QA person. QA people know the product well. They know the details of requirements, even old ones. And they do regression tests regularly.
The idea is simple: Have the new guy or gal perform a regression test with the QA person. Preferably a full regression test. Those should occur often enough. Or just have him or her observe as the regression test is performed.
This can take a while of course, but consider how much time would be saved later on.
]]>Let’s say we have a domain name, ourcooldoma.in
. And for some reason we want to redirect all traffic to somecool.org
. And the following things also apply:
ourcooldoma.in
is registered at a hoster like Namecheap.somecool.org
does not belong ot us at all.ourcooldoma.in
and www.ourcooldoma.in
.AWS
.(Told you it was specific..)
Then we can do this:
somecool.org
. Take note of the Endpoint value in the Static Website Hosting box. ACM
to create a certificate that matches ourcooldoma.in
and www.ourcooldoma.in
(or *.ourcooldoma.in
).www.ourcooldoma.in
and ourcooldoma.in
. Use the certificate from the step before.ALIAS
records at Namecheap for www
and @
pointing to the domain name of our Cloudfront distribution.Done!
Now every request to ourcooldoma.in
will result in a DNS query that returns the ALIAS
entry (though I believe ALIAS
is not a standard key but a technicality provided by Namecheap and others to circumvent the restriction of CNAME
, which one would normally use, but which cannot be used with @
unless you are ok with masking your MX
and other subdomain records).
So our request will be actually fired against the IP address at Cloudfront but the client still expects a valid SSL certificate for ourcooldoma.in
. Cloudfront provides that (created in step 3) and we can finally get to the (cached) bucket, which only does one thing: 301
redirect the client to somecool.org
.
I want to add another complication, which is of course optional: The framework is only included for some configurations, for example DebugWithFramework
. It should not be included in all other configs.
First I will show how to do it manually and then I will show the Cocoapods way, which, in my humble developer opinion, is superior.
So let’s say we want to do the above steps manually.
For the optional “only some configurations” requirement make sure the configurations have been created.
We can just pull the binary framework into our file tree in Xcode and we’re done. However, if we only want to include it in some configurations we should uncheck the target membership of the framework and add it manually.
We need to tell our build system about our Framework. I believe this is already done for us if we add the Framework to our target and/or if we drag the Framework into the “Embedded Frameworks” box in settings.
But this part of the post is about the manual approach, with inclusion for only certain configurations, so we need to do two things: Set the Framework Search Path and tell the Linker.
But this is easy:
In Build Settings look for Other Linker Flags and add two lines for the configurations that matter (you may need to click the drop down arrow first): “-framework” and “CoolFramework” if “CoolFramework” is the name of your framework, otherwise please substitute the correct value.
Finally in Build Settings look for Framework Search Paths. Again select the configurations that you care about and add a new line below $(inherited)
that looks something like this:
And you should be good to go.
At this point your app probably compiles but at runtime it crashes complaining that it can’t find the Framework.
That’s because it’s not in the Bundle yet. For that you need the next step:
If it’s supposed to be included for all configs we can just add it by dragging it into the Embedded Frameworks box in our project settings (assuming it’s not already there). Then make sure the option is set to “Embed & Sign” and you’re done.
It gets slightly more complicated if we include it manually. For that we can add a custom script build phase in our Build Phases tab that looks somewhat like this:
Script phases have input and output files (extra input text fields), and in our case we can set it to the following values:
for the Input and
for the output.
So the output specifies where the binary goes in the compiled bundle.
Disclaimer: This code is a slightly modified snippet from Github. If I find it, I’ll link to it later.
The app may run fine now in your Simulator or even on an actual iPhone or iPad, but if we want to submit our app to the AppStore we need to do one more thing: Remove architectures that are not used by the target devices.
Quick sidenote: What are architectures?
Well if you write source code it eventually gets compiled into machine code. Zeroes and Ones that are actually instructions (opcodes + arguments) for the CPU. But CPUs are different, they have different architectures and each architecture has different opcodes. (Simply speaking.) Until Apple switches to Apple Silicon, your mac (and your iOS Simulator) most likely has a x86_64 Intel CPU. And your iPhone most likely has a armv7 CPU.
If you have a binary framework that you did not compile yourself it must have the binary code for correct architectures already included. And the best case is that it has the code for _all_required architectures.
So what do we do before uploading to the AppStore?
We get rid off all binary code that is not for iPhone and iPad.
And we do it using a command line tool called lipo
.
Now remember, Xcode does all this for you automatically, usually, but we are handling a custom case here where our framwork is binary.
Here’s the build script phase for that:
This can be changed a bit to work for all frameworks I guess, but here it’s the special case in which we have one framework, MyCoolFramework
, and two configurations DebugWithFramework
and ReleaseWithFramework
.
Just briefly I want to mention how you can prevent compilation errors by using an #if
clause in your code. Consider this Swift code:
You can use these if-blocks liberally everywhere in your Swift code.
I think we’re done. (If not please write a comment so I can fix it. I don’t have a lot of time to double check everything I’ve written here. Thanks.)
As you can see the manual approach is tiresome but at least we learn somehting about how Xcode builds apps for us!
I want to mention one more complication that can and probably will occur: What if our Framework has dependencies, for example Cocapods that must be present? They can be added in the Podfile but if we need to restrict the inclusion to certain configurations then we must take extra steps.
That’s why we should use Cocoapods all the way in the first place! ;)
Ok let’s look at how that’s done in the second part.
Now we will make our own Cocoapod that simply includes our vendor framework. Now why do we want to do that? Because Cocoapods takes care of all the steps above for us!
That’s right, the batteries are included. Let’s start.
Btw. I assume you are already using Cocoapods and your project already has a Podfile
. (If not, please add Cocoapods now and run pod init
in your project folder.)
A pod is defined by a gemspec file that instructs the pod
binary what to do when installing. I’ll keep it brief and just paste you own for our case. But there are more options which may be required. Especially if you are also having swift and objective c files in there somewhere that must be compiled. Our case is actually simpler because the framework is binary.
We’re writing a local pod by the way. You could have it remotely in some git repo and you could even publish it in the cococapods repository but our case here it’s local only and it’s in the same git repository as our app. It’s basically just in a subfolder.
Here we go:
The gemspec should be in the same folder as they framework and the framework folder should be zipped. Cocoapods will unzip the archive during installation.
There’s also a speciality here: Our framework has dependencies, it requires the RxSwift
pod to run. I’ve added this to show you to demonstrate that it’s easy to add dependencies now and also to show a peculiarity about Cocoapods below.
Let’s see how our Podfile looks now:
And if we don’t care about configurations it’s just this:
Now we can run pod install
and we’re good to go! We can run the app and even submit it to the AppStore, because Cocoapods takes care of all the steps from the manual approach for us!
There’s one thing that you should look out for regarding the configurations. As you see in the Podfile examples, it gets much more verbose when we want to restrict the pod to be included in certain configurations only. That is because Cocoapods requires us to also specify all the dependencies and the dependencies’ dependencies (transitive dependencies) explicitely IF we want to restrict them to some configurations.
Consider this:
Here our framework is not included in the “Debug” stage, however it’s dependencies are. This is something to look out for.
Protip: Build and afterwards look inside your compiled app’s package. There’s a frameworks folder there. You should only see pods that are dependencies of our framework in apps build with those configurations.
That’s it, I hope this helps someone. Please send me any corrections or comment below. Thank you!
]]>For now, you can find “the blog where I randomly ramble about stuff” here.
]]>In any case the Stephen King book which I’ve read recently has inspired me to come up with story ideas.
Maybe what I will type in a few seconds will be really bad, but hey, this is just a quick blog post. The fun part is that I will just start writing the first sentence and then, hopefully, the rest of the idea will write itself.
Let’s try.
Here we go:
The elected president of Ireland is fed up with superstition. He and his party ban all folklore from the school curriculum. As a matter of fact, a new law is passed: If you talk about elves and Leprechauns and so forth in public places such as bars or on Youtube, you can be fined up to 200 euros. Some however won’t have it. They rely on their folklore to sell their merchandise to tourists. So they come up with guerilla tactics that bring back the folklore into the mainstream. So they sabotage public holidays, paint fantasy graffiti and so on. They also uncover something very troubling about this president. He is not a human but an actual Leprechaun. So they are real after all! However, in order to survive the fantasy creatures need humans to forget about them. After this is discovered by the souvenir guerilla activits they face a choice to follow their profits or to protect the actual magical people. They split in two, a very angry leader decides to wipe them out once and for all, so he can forever sell the souvenirs. But through some magic and with the help of some children and a drunk (sorry for the clishee) old storyteller they manage to defeat him somehow. In the end the 21st century begins, everyone is a mobile phone zombie, constantly staring at Instagram and Tik Tok, but it is good. The fairtale creatures can at least live in peace for now.
Ok this has two weaknesses. One: I know nothing about Irish folklore and should definitely research before writing such a story. Also the alcohol clishee is bad. As a matter of fact, if I made such a story I would actually have no one drink in it at all. Secondly, it misses the explanation why the fairytale creatures want to be forgotten.
And where do the children and that old storytelling guy come from?
So many questions. But at least it’s a start.
Anyway, this is fun. I really just started with the first sentence and the rest wrote itself. I’ll do that more often to relax. Fun times. ☘️
]]>If it were, you would like it. At least some parts of it.
Seth Godin writes in one of his books that the spelling errors in Nigerian email scams serve a purpose. They filter out the smarter, arguably more difficult, readers. If you are put off by the spelling and the grammar you won’t reply to the email. Good, they don’t want you to. Because you most probably will be wasting their time. Others will be better victims. The Nigerian Prince email is not for you. [1]
And so it is with everything else.
Liberating, isn’t it? Suddenly we don’t need to make everyone happy with our art and our product. We can’t make everyone happy anyway, because different people have different preferences. But now we don’t have to feel so bad about it.
Another example: You approached a girl on the bus? And she rejected you harshley? That’s fine. You’re not for her.
Isn’t it useful to know that? To know it early?
[1] I doubt it’s always on purpose. I think some of that fraud spam is just 14 year old kids writing.
]]>For instance there are some things I care less about. Other things irk me and I need to fix them. Maybe I need my car to be practical and maybe my clothes send out hints about my profession.
It’s all about harmony. This will sound a bit esoteric but I feel that we all have something surrounding us that is akin to a magnetic field.
(Or, just as valid: It’s just a little metaphor that we can employ to ramble about random things on our blogs.)
When we place a magnet on top of a surface with metal filings they will arrange in a certain way. In physics class, this is how teachers make the invisible magnetic fields visible.
In a similar way, if we put a person in a place and let some time pass, the place will be transformed according to the person.
For example, if a Zen monk from Japan moved into a German home, and he remained a Zen monk, the place would probably change for the better (I’m biased.). It’s a clishee but let’s say the house would be cleaner and the garden would appear very well looked after. At the same time he would be affected by his new life in Germany. Perhaps he would start eating bread or he would begin expressing his annoyance with German trains who are embarrasingly often late. So in reality it’s an interplay. It goes both ways.
The magnetic field doesn’t just affect things. It works with everything including people. We become more like the other humans we spend the most time with and they become more like us. The latter I believe is perhaps generally underrated. We may feel that we are drifting along and that the world is pulling us in a certain direction. That we are merely sentenced to react passively. But actually we too affect the others. By expressing ourselves we make an impression on other people and change their behavior, if ever so slightly. (We always do it regardless if it’s intentional.)
Perhaps a good example is when we become parents. The child is constantly exposed to our field and cannot help but absorb it. It’s the same with our friends. Just like the mental filings in physics class, we adjust. And they do, too. This creates a shared view of life and a sense of belonging.[1]
“Expressing ourselves” seems like such a new thing though. It’s probably more of an ideal of the west and rather foreign in the east. But no matter to which hemisphere we belong, there is some sort of mainstream culture, some great story that is shared by most. So in addition to all the smaller fields there are some bigger ones, shared between members of nations or regions of the earth.
And some shared by all humans.
The more time passes the more the differences between cultures will disappear. Despite a loss of influence by mainstream media the mainstream culture seems stronger than ever. For some reason. Maybe it’s some unifying power inherent in capitalism, which influences us all. Or it’s a fear of a loss of orientation after losing the mainstream narrative.
Perhaps, eventually, some really nice patterns will emerge between all the metal filings, the people, on this big surface we call Earth.
Let’s hope that there will be enough variety left.
Like someone once said: “Imagine the traffic jams if all people liked the same thing.”
[1] But what happens if someone changes? Will there be a force that is invested in keeping him the way he was? You bet.
]]>I suppose this is very good advice. Something that Jordan Peterson may say.
And yet, and yet.. how often have people succeeded at something because they overestimated their odds (and underestimated the difficulties)?
Perhaps luckily, they weren’t very imaginative and didn’t know what else to try. Perhaps they werent very impulsive, and their problems weren’t enough to trigger a flight reponse in them. Or they were just very stubborn. In any case, they sticked around. They tried some more and, eventually, everything worked out in their favor. And they got the treasure.
Sometimes what reads like disadvantages can be just what is required.
* = Link to a translation of the Enchiridion by Epictetus See paragraph 29 for the quote mentioned here.
]]>Speaking of luggage. What fascinates me is that virtually everyone installs the luggage rack the wrong way!
The only exception is the third gen Miata where it’s usually done right, and despite the fact that we all see the 3rd gen on the road most of us still don’t get it.
Here is what I mean:
The rack on this beautfiul 2nd gen should be rotated by 180 degrees. The short sticking out part should be towards the front, not back.
Why?
Because its function is to prevent your luggage from chopping your head off if you crash into something. It’s not there to prevent your luggage from falling down because of the crazy acceleration of the Miata.
Because, let’s face it, the Miata doesn’t accelerate that quickly.
3rd gen (“NC”) owners get it usually right, because the luggage racks are shipped with a brake light, since the rack obscures the 3rd brake lamp. So there’s just one way to install it, the correct way, the way that prevents your bags from killing you.
Or not just you. Everyone else that is unlucky enough to be crashed into by a Miata!
Just saying.
(Fanboy disclaimer: Luckily, this is a mostly theoretical discussion. The Miata handles awesomly. It’s rare that you would loose control and crash.)
But still.. I wonder, what else in life is obviously wrong, that we, the average people who never thought too much about it, don’t get?
]]>