ios应用程序的启动流程_我如何与青少年一起启动iOS应用程序

ios应用程序的启动流程

by Sean Choi

通过蔡恩

如何帮助青少年启动iOS应用 (How to help a Teenager launch an iOS App)

如何在App Store中从Scratch转到iPhone应用程序 (How to go from Scratch to an iPhone app in the App store)

As a follow up to two of my prior articles, (How to teach programming to teenagers and Beginner’s Guide to Raspberry Pi), I want to share my experiences in helping a teenager go from coding in Scratch to building and deploying an iOS app.

作为我之前的两篇文章(《 如何向青少年教编程》《 Raspberry Pi入门指南》 )的后续,我想分享我的经验,以帮助青少年从Scratch编码到构建和部署iOS应用程序。

As mentioned in one of my prior articles, I noticed that teenagers have a strong desire to do something that feels more real. So, the natural question that repetitively came up in many of my classes was “Can we build an iPhone App?”. I felt that the time was right for the students to build an app, and I asked them each to pitch an idea.

正如我以前的一篇文章中提到的那样,我注意到青少年强烈渴望做一些更真实的事情。 因此,在我的许多课程中反复出现的自然问题是“我们可以构建iPhone应用程序吗?”。 我觉得现在是时候让学生构建一个应用程序了,我要求他们每个人提出一个想法。

A week later, one of the students came back with an idea and it seemed really really interesting, so we decided to take some time outside of the regular class time and build it together. And we ended up with a cool app called SwimGrader.

一周后,一位学生提出了一个主意,这个主意似乎真的很有趣,因此我们决定在常规课堂时间之外花一些时间,将它们放在一起。 最后,我们开发了一个很酷的应用程序SwimGrader

SwimGrader是如何产生的? (How did SwimGrader come about?)

My student is an avid swimmer and has always been curious how good his swimming is. Assessing your own swimming ability is not really obvious, and you often need some expert to tell you how good you are.

我的学生是一个狂热的游泳者,一直对自己的游泳状况感到好奇。 评估自己的游泳能力并不是很明显,您通常需要一些专家来告诉您自己的状态。

We all know that lowering lap time is the goal most athletes shoot for, so a lot of people attempt to do that. However, it is quite hard to know in detail what you must work on to achieve lower lap times. Of course, you can just try to kick faster and practice more to gain more swimming muscles, but that usually is not the best way to improve your swimming.

众所周知,缩短单圈时间是大多数运动员追求的目标,因此很多人都试图做到这一点。 但是,很难详细了解要实现更快的圈速必须做什么。 当然,您可以试着更快踢一下,多做些练习以获得更多的游泳肌肉,但这通常不是改善游泳的最佳方法。

Coming from this, my student thought that people needed something that could pinpoint an area of swimming they should work on next. So, his brilliant idea was to build an app that could assess various aspects of your swimming and tell you which area you should work to improve.

因此,我的学生认为人们需要一些可以确定下一步应该游泳的区域。 因此,他的绝妙想法是建立一个可以评估游泳各个方面并告诉您应该改进哪些领域的应用程序。

Knowing from experience how hard it is to improve my swimming, I was really impressed by his idea. It was nothing that I had heard of before and it had a specific use case that could potentially benefit a lot of people. However, since my student had never built an iPhone app before, we decided to work on it together from scratch.

从经验是多么困难,提高我的游泳知道,我真的被他的想法所折服。 我以前从没听说过,它有一个特定的用例,可以使很多人受益。 但是,由于我的学生以前从未构建过iPhone应用程序,因此我们决定从头开始一起研究它。

入门 (Getting started)

Not being a competitive swimmer myself and also thinking that it would be a good thought exercise, I asked my student to come up with the design of the app and the metrics we could use to grade the swimmer in the app.

我本人不是一名竞技游泳者,并且也认为这将是一个很好的思考练习,所以我要求我的学生提出该应用程序的设计以及可用于对该应用程序中的游泳者评分的指标。

This process ended up to be a really good learning experience. Not only did this exercise helped the student iron out the details of the project, but it also kept my and my student’s expectations in line. As mentioned in my articles about teaching teenagers, teenagers have high expectations about doing anything with programming. So, after talking through every detail from which data to collect, which pages to create, how each page transition works and which metrics to show, both of us were to clearly set our goals and our expectations.

这个过程最终是一个非常好的学习体验。 这项练习不仅帮助学生弄清了项目的细节,而且使我和我的学生的期望保持一致。 正如我在有关教导青少年的文章中提到的那样,青少年对编程方面的工作抱有很高的期望。 因此,在讨论了从哪些细节中收集数据,创建哪些页面,每个页面过渡如何工作以及显示了哪些指标之后,我们俩都将明确设定我们的目标和期望。

And knowing the exact end-product we were planning to make helped the student stay constantly engaged.

知道我们计划制造的确切最终产品有助于学生保持不断的投入。

Digressing a little bit from the main topic, we often learn things that we don’t know when we will ever apply in our lives. This can make us feel like we are walking through a long dark tunnel with no light at the end.

与主要主题有所不同,我们经常学习到什么时候才能应用到我们的生活中,而我们所不知道的事情。 这会让我们感到自己正走在一条漫长的黑暗隧道中,尽头没有光明。

This is especially true when you are younger, as you are most likely being told to learn certain things. I believe that this causes many students to not get excited about what they learn. I learned that setting the right expectations by showing the end of the journey of a learning exercise really helps motivate students and increases the efficiency of the learning exercise itself.

当您年轻时尤其如此,因为您很可能被告知要学习某些东西。 我相信这会使许多学生对他们学到的东西不感到兴奋。 我了解到,通过显示学习练习的结束来设定正确的期望确实可以激发学生的积极性,并提高学习练习本身的效率。

So, back to the design and the metrics of the app that the student suggested: my student first suggested that the app, in general, should not add any overhead for the swimmer. He wanted to build an app that would be able to collect statistics without hampering the swimmer’s performance.

因此,回到学生建议的应用程序的设计和度量标准:我的学生首先建议,该应用程序通常不应增加游泳者的开销。 他想开发一款能够收集统计数据而又不影响游泳者性能的应用程序。

The student already had a measuring device in mind to serve this exact purpose, which I will share in the next section. After some discussion to come up with a minimal viable product, we decided that we should focus on collecting two specific metrics: head bops and turn speed.

该学生已经想到了一种可以实现此精确目的的测量设备,我将在下一部分中分享。 经过讨论以提出最小可行的产品,我们决定应该集中精力收集两个特定指标: 头部起跳转弯速度

Since head bops are a mostly extraneous movement that can reduce the efficiency of swimming, if we can simply count the number of head bops within some time interval, we thought that we could suggest a reduction in extraneous head movements.

由于头撞是一种大多数无关紧要的动作,可能会降低游泳效率,因此,如果我们可以简单地计算某个时间间隔内头撞的次数,我们认为可以建议减少头上的晃动。

We also agreed that fast turns are necessary for reducing lap times. So, if we could measure the time it takes the swimmer to make a turn at the end of the lane, we could grade the swimmer based on time.

我们还同意减少转圈时间需要快速转弯。 因此,如果我们可以衡量游泳者在泳道尽头转弯所花费的时间,则可以根据时间对游泳者进行评分。

Given this design and the idea, we only needed to start implementing it with the right sensor.

有了这种设计和想法,我们只需要使用正确的传感器就可以开始实施它。

那么,哪种硬件使SwimGrader成为可能? (So, which hardware made SwimGrader possible?)

Although the latest iPhones are waterproof, swimmers probably don’t want to risk taking their super expensive iPhones into the pool. So, my student suggested that we use a sensor from mbientlab and enclose it in a waterproof case.

尽管最新的iPhone可以防水,但游泳者可能不想冒险将其超贵的iPhone放入游泳池。 因此,我的学生建议我们使用mbientlab传感器并将其封装在防水盒中。

This sensor allows you to collect various data from the environment and from your movements, as it houses an accelerometer, a gyroscope, a barometer, a thermometer and so on. Also, they have some sample code that you can use to bootstrap your application so you can immediately collect the data of interest.

该传感器装有加速计,陀螺仪,气压计,温度计等,可让您从环境和运动中收集各种数据。 此外,它们还有一些示例代码 ,您可以用来引导应用程序,以便立即收集感兴趣的数据。

So, our idea was to put the sensor inside his swimming cap. He felt that this would minimally impact the swimmers’ ability to swim, which I agreed with. We immediately purchased two of these sensors and started building our app. I will not go over the details of building a simple multi-page iOS app using Swift, because they have covered in thousands of other articles (here is a good medium article that presents many of them).

因此,我们的想法是将传感器放入泳帽内。 他认为这将最小程度地影响游泳者的游泳能力,我对此表示同意。 我们立即购买了其中两个传感器,并开始构建我们的应用程序。 我不会详细介绍使用Swift构建一个简单的多页面iOS应用程序的细节,因为它们涵盖了成千上万的其他文章( 是一篇很好的中等文章,其中介绍了许多文章)。

SwimGrader简介 (Introducing SwimGrader)

So, after hours of programming and going through Apple to get our app approved for the App Store, we were finally able to launch SwimGrader. It was really surprising to see this, because I only helped with the initial setup of the project, which consisted of setting up a single page app Swift project and helping with adding buttons and text fields, and simple hardware integration to retrieve data from the sensor.

因此,经过数小时的编程并经过苹果公司的审核,以使我们的应用程序获得App Store的批准,我们终于能够启动SwimGrader 。 看到这一点真的很令人惊讶,因为我只帮助完成了项目的初始设置,这包括设置一个单页面应用程序Swift项目,并帮助添加按钮和文本字段,以及简单的硬件集成以从传感器中检索数据。 。

To give a sense of how easy the hardware integration was, here is a snippet of code to make the LED on the sensor flash green. Retrieving data was just as simple, as can be seen by the example below.

为了使硬件集成变得多么容易,这里有一段代码使传感器上的LED呈绿色闪烁。 如下面的示例所示,检索数据非常简单。

import MetaWearimport MetaWearCpp
MetaWearScanner.shared.startScan(allowDuplicates: true) { (dev) in    // We found a MetaWear board, see if it is close by    if dev.rssi.intValue > -50 {        // We found a MetaWear board!        MetaWearScanner.shared.stopScan()        // Connect to the board we found        dev.connectAndSetup().continueWith { t in            if let error = t.error {                // Sorry we couldn't connect                print(error)            } else {                // We are connected! Flash its LED!                var pattern = MblMwLedPattern()                mbl_mw_led_load_preset_pattern(                    &pattern, MBL_MW_LED_PRESET_PULSE)                mbl_mw_led_stop_and_clear(device.board)                mbl_mw_led_write_pattern(                    device.board, &pattern, MBL_MW_LED_COLOR_GREEN)                mbl_mw_led_play(device.board)            }        }    }}

Given only a limited about of help, my student went far beyond my expectations to build a grading algorithm and a graphical interface. He retrieved the X, Y, Z data from the sensor and gave a grade on how much the head moved in each direction. He searched online for a graphing library on iOS and displayed what his sensor reported. And, after finishing his app, he went ahead and tested his app in the pool!

仅提供有限的帮助,我的学生就远远超出了我的期望,无法构建评分算法和图形界面。 他从传感器中检索了X,Y,Z数据,并对头部在每个方向上移动了多少进行了评分。 他在线搜索了iOS上的图形库,并显示了传感器报告的内容。 并且,在完成他的应用程序后,他继续进行并在游泳池中测试了他的应用程序!

It is an effort by a middle school student, so it’s not going to look fancy like Clash of Clans. However, I think it is really impressive, coming from a young student who has never built an iPhone app before! After finishing this, the student asked me,

这是一名中学生的努力,因此不会像《部落冲突》那样花哨。 但是,我认为这确实令人印象深刻,来自一个从未曾开发过iPhone应用程序的年轻学生! 完成这个后,学生问我,

Can we build an Apple Watch App for this?
我们可以为此构建一个Apple Watch App吗?

I told him that he could definitely build an Apple Watch version of the app in the future, but that he could probably build it without my help :).

我告诉他,他将来肯定可以构建该应用程序的Apple Watch版本,但是他可能可以在没有我帮助的情况下构建它:)。

最后的想法 (Final Thoughts)

As grown-ups, I think it is really hard to keep our ideas fresh, wild and up-to-date. So, I think it’s really educational to hear what these young students have to say and to support what they want to do in all the ways we can.

作为成年人,我认为保持我们的想法新鲜,野性和最新是非常困难的。 因此,我认为倾听这些年轻学生的话并以我们所有的方式支持他们想做的事情真的很有教育意义。

Not only do these opportunities open the gate to building new and exciting products, but supporting students to pitch and build their own ideas gives them the best educational experiences. Seeing my student asking people to download his app makes me smile. I am hoping that I can maybe build a cool app someday and showcase it to my friends. Although, my student just beat me to that :)

这些机会不仅为开发新颖有趣的产品打开了大门,而且支持学生宣传和建立自己的想法为他们提供了最佳的教育体验。 看到我的学生要求人们下载他的应用程序使我微笑。 我希望有一天我可以构建一个很棒的应用程序并将其展示给我的朋友。 虽然,我的学生只是击败了我:)

On a side note, I learned that building a cool iOS app is easier than ever. There are so many articles helping you build apps for every possible purpose: games, single view apps, social network apps and many more. Also, there is more hardware than ever that you can easily hook up to your phone and extend the capabilities of your phone.

附带说明,我了解到,构建出色的iOS应用比以往任何时候都容易。 有太多文章可帮助您为各种可能目的构建应用程序:游戏,单视图应用程序,社交网络应用程序等等。 而且,您可以轻松连接到手机并扩展手机功能,硬件比以往任何时候都多。

I hope I can soon share experiences of building my own app. I am just worried if my students will find my app cool…

我希望我能尽快分享构建自己的应用程序的经验。 我只是担心我的学生是否会觉得我的应用很酷……

Thank you for reading this article! I hope I can convince you to work with your students or your children and start building a simple app! I am also open to hearing about your cool app ideas.

感谢您阅读本文! 希望我能说服您与您的学生或孩子们一起工作,并开始构建一个简单的应用程序! 我也乐意听到您关于酷应用的想法。

翻译自: https://www.freecodecamp.org/news/how-i-launched-an-ios-app-with-a-teenager-926b5a65a991/

ios应用程序的启动流程

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值