Monday, August 22, 2016

TestFlight Tutorial: iOS Beta Testing.

Update note: This tutorial has been updated by Tom Elliott. The original tutorial was written by Dani Arnaout.
Learn how to use TestFlight to beta test your iOS apps!
Test Flight Beta Testing is an Apple product that makes it easy to invite users to test your iOS, watchOS and tvOS apps before you release them into the App Store. This TestFlight tutorial will walk you through integrating TestFlight into your own apps.
This is one of those rare tutorials where you don’t have to code — just follow through the steps in this tutorial and you’ll be up and running with TestFlight in no time! :]

Getting Started

Don’t have an app right now but still want to proceed with this tutorial? No problem! Download our beloved Flappy Felipe project and use that as you follow along. Make sure you change the bundle ID of the app to your own unique ID; for example, com.yourname.FlappyFelipe.
This tutorial assumes that your app is set up for provisioning, and has an app ID created in both the developer portal and on iTunes Connect.
This setup is outside the scope of this tutorial, but you should be able to use automatic provisioning as described in Setting up Xcode to automatically manage your provisioning profiles, and create a record in iTunes by following the instructions in Create an iTunes Connect Record for TestFlight Beta Testing in the iTunes Connect Developer Guide.

Submitting your Build to iTunes Connect

Open up your project in Xcode, make sure you have a correct Bundle Identifier, that your Team ID is set, and that you’ve chosen the automatic Distribution Certificate Code Signing Identity:
AA- Code Signing
Choose Product\Archive from the top toolbar:
2- Product Archive
Once Xcode finishes archiving your project, click the shiny blue Upload to App Store… button:
3- Archive
Now you need to choose your development team:
4- Choose Team
Finally, click Upload:
5- Submit
Wait for a few minutes as your build uploads. Grab a coffee, perhaps, or if you have a slow internet connection, go grab a bite. Or two. Or three. :]
6-Upload2.png
Once you’re done, you should receive a success message like the following:
success
That’s all the work required for Xcode. Your beta build is now available on iTunes Connect, and that’s where you’ll be doing the rest of the work to set up TestFlight.

Create and Enable Testers to Beta Test Apps

Your build is ready for testing, but who’s going to test it?
Apple defines two types of testers for Test Flight:
  • Internal Tester: This is an iTunes Connect user that has an Admin, Technical, App Manager, Developer, or Marketer role with access to your app. This is usually a team member or a client you’re developing an app for. You can add up to 25 internal testers.
  • Note: Apple are in the process of deprecating the Technical role in favour of the App Manager role. At the time of writing both roles are available. If you have existing users with the Technical role you should start migrating them over to the App Manager role. New users should be created with the App Manager role.
  • External Tester: This is any user outside of your team that wants to test your app. An external tester has no access to your iTunes Connect account in any way, and can only download and install the app. You can add up to 2000 external testers.
Before your external developers can test your app, you have to submit your app to be reviewed by Apple, just as you would with a normal App Store submission. These reviews tend to go faster than normal app reviews (although don’t count on it), and once it’s approved you can let external developers test your app. Internal testers, on the other hand, are instantaneously able to test new builds.
You’ll learn more about external testers later, but for now, let’s focus on internal testers.
To add an internal tester, head to the Users and Roles section in iTunes Connect:
10 - Users and roles
On the Users and Roles screen, click the + button to add a new user:
11- Users
Fill in your new user info and click Next:
15- Roles
You’ll need to use a unique email address for your new user. If you don’t have a second email account, you can usually append +whateveryouwant to the first part of your email address, and the email will still get delivered to you. For example tom+mytestaccount@razeware.com.
Now you need to assign roles for the user. In most cases, you’ll want to choose App Manager. You can read more about the privileges for each role and choose the appropriate one for your user.
Note: The number of different roles and permissions can be a bit daunting! When it comes to Test Flight, use this handy table to help you.
AdminApp ManagerDeveloperMarketerSales
Can be an Internal Tester
Can Upload a Build
Can Submit a Build for External Testing
Once that’s done, click Next:
16- Roles
Choose the type of notifications you want your new testers to receive, then click Save:
17- notifications
Your user is now created, but as the message indicates, that user first needs to verify his or her email address before the account will show in iTunes Connect.
Creating a new internal beta tester is only the first part of the process. The remaining step is to invite this particular tester to test your latest build.
It’s time to enable your app for testing — so the tester actually has something to test! :]

Starting Beta Testing

To start beta testing of your app, go to the My Apps section on the iTunes Connect home page and click on your app:
20- connect
Select the Activity tab and you’ll find your latest build. Make sure it is no longer marked as processing. If it is, go make another cup of coffee and come back later. :]
Activity
Next, click on the TestFlight tab, then Internal Testing in the left hand menu. Click Select Version to Test and choose the version you just uploaded. Finally, click Start Testing and, in the confirmation pop-up, Start Testingagain.
Start Testing
All selected testers will now receive an email that lets them download and install this build from the TestFlight app. There are detailed instructions on how to do that in the last section of this tutorial.
That takes care of internal testers, but what about external testers?
That’s just as easy! First, go to the Test Information tab and fill in your Feedback Email, Marketing URL and Privacy Policy URL. You can choose to add a License Agreement at this stage as well if you wish, but it is not necessary.
30- TestInformation
Next, go to the External Testing tab, click the + button and select Add New Testers:
32- External
Add the email addresses of any external users you want to add. Once you’re finished, click Add to add these testers to your account. All external testers will count toward your 2000 external tester limit:
33-External2
Click Save.
You now need to select a build (again) for your external testers, and put that build through the Beta App Review.
Note: Why do you need to select the build again? Well you may want your internal and external testers to be testing different builds. For example, your external testers may be testing your next release candidate, but your internal testers are testing your master build. By making you select a build for internal and external testers separately iTunes Connect allows this kind of separation.
Click Add Build To Test, select your build, and then click Next.
34-BetaTest1
Fill in all the fields. Remember – the more information you give Apple the easier it is for them to review your app! Finally, hit Submit.
35-BetaTest2
Your app will be added to the review queue! :]
Note: In my own experience, your first beta app review can take up to 48 hours to be approved. Subsequent beta app reviews are usually much faster.
31-AppInReview
Once the app has passed Beta App Review you will receive an email with confirmation that your app can now be used by external testers.
Note: A build is only valid for 60 days. If you want your testers to use the app beyond that, you’ll have to upload a new build before the expiration date.
Head back to the External Testing section for your app in iTunes Connect, select the build and hit Save. A dialog will pop up confirming that you are about to notify people. Click Start Testing.
32-ConfirmNotification
Your external testers will then receive an invitation email similar to the one received by your internal testers as described above.
Note: What happens if invites go missing? Currently there is no easy way to re-send invite emails if they go missing. For internal testers the easiest approach is probably to upload a new build (as it doesn’t have to go through Beta App Review). For external testers you can either remove the user and then re-add the user as a tester, or remove your app from external testing and then quickly re-add it. This second approach will re-send an email invite to all your external testers so be careful! :]
That shows the developer’s perspective of app testing, but what does it look like from the tester’s perspective?

Testing an App

As an internal tester, you need to link your Apple ID to iTunes Connect (external testers can skip to theTestFlight App section below). By now, you should have received an email from iTunes Connect that looks like this:
21- Email
Click on activate your account and follow the supplied steps. Once your account is ready for testing, get your iOS device and go to the Settings app. Scroll down to iTunes & App Store:
19- Settings
Log in with the account you just verified a minute ago. If you’re already logged in with another account, log out first:
20- Log in

TestFlight App

Go to the App Store, and search for the TestFlight app:
21- Search
Download the TestFlight app and launch it.
Note: If you’re required to log in, simply use the same credentials you used to verify your account.
Internal testers will automatically receive an email when new versions of the app are uploaded to iTunes Connect. External testers will receive a similar email after the app has been through Beta App Review and the build has been pushed out to external testers by an Admin or App Manager in iTunes Connect:
24- Invite Email
Open this email on your testing device, then tap Start Testing. This will launch TestFlight and show you the app you need to test. A tester must tap Start Testing on the device they’ll be testing on; otherwise the app won’t be available for download by the tester. Tap Accept, then Install, and wait for the app to download:
25- Accept
The app will be downloaded and appear on your home screen!
That was the hardest part of being a tester. From now on, whenever a new version of this app is available, you’ll see a notification from TestFlight. All you need to do is update your app and run the latest version.

Where to Go From Here?

In this TestFlight tutorial you learned how to upload your test build and invite internal and external testers to your app.
If you’re interested in knowing more about iTunes Connect in general, and beta testing in particular, read through Apple’s TestFlight Beta Testing Documentation. Apple’s Developer site also has a summary page for TestFlight, which includes links to all the relevant documentation as well as a video outlining the TestFlight process.
You can also check out iOS 8 by Tutorials; the final chapter What’s New with iTunes Connect showcases everything you need to know to manage your testing effort.
If you want to take your app deployment to the next level, take a look at our fastlane tutorial, which covers a set of tools that you can use to automate managing iTunes Connect and submitting apps.
I hope you enjoyed this TestFlight tutorial, and if you have any questions or comments, please join the forum discussion below!
Share:

How To Be a Better Developer with Programming Challenges.

If you’ve ever tried a programming challenge, then you know they are fun and addicting.
But they’re more than just fun – they also help you become a better developer.
Over the past few years, I’ve done hundreds of programming challenges. I’ve noticed the regular practice has made me a smarter, faster, and stronger developer.
In this article, I’ll explain how you can do the same:
  1. First, I’ll explain why programming challenges help you become a better developer.
  2. Next, I’ll recommend how you can get started with programming challenges.
  3. Finally, I’ll wrap up with some tips and tricks.
Get ready to get challenged!

Why Programming Challenges Work

To understand why programming challenges work, first you need to understand muscle memory.

Muscle Memory

Think back to when you were first learning how to drive. At first, it required your complete focus. You had to think about how fast you were going, worry when you were parking or merging into traffic, and so on. But now, you can drive while talking with someone and even singing your favorite song!
Driving while talking and singing
At first, performing an unfamiliar action takes focus. But if you practice enough, you can preform the action almost without thinking.
That’s muscle memory: knowing how to perform an action without conscious effort. And you can develop muscle memory for programming tasks too!

Programming as a Muscle Memory

Think back to when you first started programming on a new platform. It took a lot of effort at first, right? Often you needed to look up method names, read documentation, and so on.
But after a while, you developed muscle memory, and are now able to write code off the top of your head.
Muscle Memory
Consider a few other common programming tasks:
  • Creating a singleton
  • Using reduce to transform an array into a scalar
  • Handling errors and exceptions
When you first try these things, it can often be time consuming or confusing. But if you practice it enough, you will build a muscle memory with the solution.
At this point, you won’t need to think about how to solve the problem anymore. it will just become a normal routine when writing code.
This explains why programming challenges work. They give you opportunities to build muscle memory, via practice on common development challenges.
That way, the next time you need to solve a similar challenge, you’ll have a solution ready! This helps you be efficient and allows you to focus on larger problems, rather than the small details.
image-03-challenges

How To Get Started with Programming Challenges

Ready to start building some muscle memories? Luckily, there are some great sites out there offering programming challenges.
Here’s what I consider the best. I recommend you pick one that sounds interesting and give it a shot!
Note: These are not listed in any particular order.

HackerRank

HackerRank
HackerRank, formerly known as Interview Street, is a platform offering coding challenges, usually in the form of algorithms to implement. I love its slogan: “Your most productive distraction“.
On HackerRank, you’ll find:
  • Domains: A selection of problems to solve, categorized by type (algorithms, mathematic, AI, and more) or language.
  • Contests: Time-limited challenges where you’re challenged by a set of problems grouped by a common subject that must be solved within a predefined timeframe.
  • Rank & leaderboard statistics: See how you’re progressing compared to others and which achievements you’ve earned. A nice feature in the leaderboard is the ranking, grouped by complexity level (O(1), O(logn), O(n), and so forth), which helps with figuring out the average complexity of each user’s solutions.
Big O notation: What is it? It measures the complexity of an algorithm, and it’s used to figure out the expected processing time depending from the problem size.
It usually makes sense when the algorithm performs one or more loops, where the number of iterations is in strict relation with the input size.
For more details, check out our Collection Data Structures in Swift article.
Employers use time-limited challenges on HackerRank to evaluate potential candidates’ programming skills and problem-solving abilities with any of its available languages.
Note that employers can choose to reduce the list of available languages — I presume that a company looking for an Android developer wouldn’t be interested in a candidate who excels in Swift development. Well, at least not today. Tomorrow, who knows? :]
I recently participated in a screening process after getting an invite from Amazon — yes, that Amazon. :] The coding experience was pretty good and the available time was reasonable; I finished it in 1:58, just two minutes shy of the two-hour time limit.
Although the environment includes a web-based editor where you can write code and test, I always prefer a local, desktop-class IDE. In this case, I opted for CodeRunner, a coding editor that supports several languages and capable of compiling and running directly from the IDE.
To some extent, it’s similar to Swift playgrounds. The list of available languages and environments is pretty long — 45 in total — which includes new, old, OO, functional, imperative, shell, DB, and so forth. Just to name a few:
  • Swift
  • Objective-C
  • Pascal
  • Cobol
  • C#
  • F#
  • Haskell
  • Go
  • OCaml
  • R

Math Fights

MathFights
Among all the services reviewed in this article, MathFights is the only one where you don’t code. Actually, it’s not even about programming. As its name suggests, it’s about math challenges that are usually served as 1:1 fights.
Why mathematics? Well, this article is about keeping your brain sharp, and solving math problems does that. Practicing mathematics gives your brain elasticity.
Moreover, you use math daily as a developer, so being able to do calculations quickly can help in your daily life.
How it Works
You start a fight with a click of a button, then you’re matched with a random opponent and the fight begins!
You and your opponent are presented with one question at a time along with a list of potential answers. Your challenge is to determine the correct answer in the shortest possible time, staying within the predefined time limit.
Each question has a winner and loser; the winner is whomever chooses the right answer in the least amount of time. For each round, you and your opponent get a score. At the end of the fight, the player with the highest total score wins.
Pro tip: Keep some paper, a pencil and maybe a calculator nearby because you will have to calculate.
Math problems come in different shades of complexity, so MathFights uses divisions to group questions by difficulty. Division 1 hosts the simplest problems and is where you start. After a certain number of wins, you’re promoted to the next division. Look out: you’ll get a downgrade if you lose too many fights.
You can also create public or private tournaments, which is very handy when you and some friends want to engage in some friendly, intelligent competition.
Lastly, there’s a practice section where you can just solve problems without the pressure of a real opponent. It’s just you against yourself and a clock.
In my personal opinion, MathFights is undeniably addictive and remarkably useful. I used to spend a lot of time on it. One day I realized that it was becoming a distraction, so I decided to stop. This was after reaching division 7. Incidentally, I don’t know that I could have progressed much further. Staying there without getting a downgrade was pretty hard.

TopCoder

TopCoder
TopCoder was the one of the first (if not the first) service to offer coding challenges.
Whereas similar services offer explicit recruitment services to customers, or don’t have a business model at all, Topcoder has a few models that are probably unique in this area.
You, as a developer, can solve challenges, but can also participate in events that are somewhere between a paid gig and a contest. In fact, companies can create an event if they need fresh ideas for development projects, such as:
  • UI/UX design
  • Application development
  • Algorithms
Candidates compete to win a payment from the company. As you might expect, there’s a lot of competition, and usually only one winner per project. On the bright side, it’s absolutely an excellent way to test your capabilities on a real, tangible project.
The list of companies you might potentially work for are respectable names, such as:
  • NASA
  • IBM
  • eBay
  • Honeywell
There are also recurring tournaments, single-round matches and other contests, some of which allow or require teams. If you opt for a team contest, you collaborate with others in a hackathon-like format to solve a problem.
There’s a lot more to TopCoder than can reasonably be discussed here — covering it all would monopolize this article. Have a look, explore, then feel free to talk about what you find in our forums!

CodinGame

CodinGame
CodinGame is about coding games, but it’s not a freeform blank sheet of paper where you have to invent and draw your game.
Don’t let the presence of the word “Game” fool you into thinking this is a casual site — it’s not. It is, however, a unique way to stimulate your brain. In coding game you’re given:
  • A game plot
  • A scenario
  • Some actors
  • A goal
Your task is to write the AI. Pretty awesome and interesting, eh?
The site provides all the graphics, animations, effects, scenography, etc. CodinGame is a bit like being on a movie set where you’re the director; you write your script to control your actors, and then you watch them execute that script.
The list of languages is pretty long — 25 in total. For you Apple Developers, there’s Objective-C and Swift.
How does it work? You have a browser-based IDE, and it’s a full featured build that includes a:
  • Code editor
  • Console output
  • Help panel that has a description of the problem to solve
  • List of test cases
  • Action area, with buttons to run tests, start the simulator, submit your solution, etc.
Codingame IDE
The editor comes prepopulated with some skeleton code and a clear indication of where to write yours. Once you’re done coding you start running test cases.
When running a test case, the simulator actually shows the game with the AI-controlled actor following the orders you gave with your code. By the end of the simulation you know whether the test passed or not. If not, most likely your actor was killed. :]
CodinGame provides you with a rare opportunity to watch your code come to life — and it’s as amusing as it is stimulating. If you like games and coding, then this is the place to be.
Following an established pattern for coding challenge platforms, CodinGame also offers services that are designed for companies that want to hire candidates.
Now tell me: when you’re looking for your next job, which of the following two would you choose to show your expertise?
  1. An option to write code to implement a linked list on a “cold” white board
  2. An option to write AI for a bot whose goal is to kill its enemies that lets you use your browser for your IDE
The choice is clear. Killer AI bots are always the better choice for showing off your skills. :]

CodeFights

CodeFights
As soon as you land to the CodeFights, you immediately notice the appealing superhero avatars. Disappointingly, you can’t use them for your own profile — they’re just there for looks.
However, the site is not about cool avatars; it’s about coding and debugging.
Once you’ve registered, you’ll get an invite to a 1:1 fight with a bot. It’s pretty easy — any developer with 1 day of experience should be able to win the fight.
Each challenge consists of a three-round fight, and there are three types of challenges you need to solve:
  • Debug: you’re given some code and must locate and fix the bug
  • Recovery: you’ve given some incomplete code and must fill the missing part
  • Code writing: you implement a function from scratch
Each round comes with a description of the problem to solve.
One downside of this otherwise useful service is the restricted list of languages. There’s also no Swift or Objective-C, so iOS and macOS developers may feel some disappointment.
On the upside, you have its browser-based editor that sports autocompletion and smart navigation — you can use CTRL + left or right arrow to move to the previous/next word, even with camel case identifiers.
Besides battling bots, what else can you do on CodeFights?
  • Fight against real people — either friends you invite or random opponents
  • Join marathons
  • Participate in tournaments
  • Challenge company bots (Dropbox, Uber, Asana, Quora, and more), which can help you get noticed and maybe even hired
  • Create and submit your own challenge

CodeEval

CodeEval
CodeEval seems like a front end for a recruitment business. While that’s not entirely a negative thing, it is the feeling I got after registering and accessing to the dashboard. But that’s just my subjective take.
Once in the dashboard, I spent some time wondering what to do next. Unlike the other services reviewed here, there’s no guidance and no “check this” nor “do that” kind of UI. You have to explore on your own.
The number of available languages is 26. You won’t find Swift, but Objective-C made the cut. Besides the dashboard, which looks very nice, the rest of the experience is a little spartan.
The editor is suitable. It has auto-complete, but the comment font color is a little difficult to read. Copying and pasting into an external editor is highly recommended.
At CodeEval, there is only one type of challenge: you versus yourself. There are three lists of challenges that are divided by difficulty.
Another potentially useful section is the “Jobs & Offers” page. Here you can find job offers, some of which require you to solve a problem in order to apply — most likely, it’ll require coding. The rest of the posts are more traditional, static job ads.

Advent of Code

Advent Of Code
There are two things that I really love about Advent of Code:
  • Interface: it looks like an old, green phosphor monitor
  • Challenge result: you don’t have to submit your code — you just write the solution
Rather than having an IDE, a list of available languages, complexity, Big O notation, and so forth, Advent of Code just asks you to provide an answer to a question.
How you find the solution does not matter. Nobody cares what language your work in or how efficient your algorithm is. Advent of Code offers complete freedom of choice.

Alternatives to Online Challenges

Challenges are fun and fulfilling but not the only way to keep your brain sharp. There are other ways to stimulate your brain! Here are some of the best:
  • Hackathons: Sure, you’re solving problems, but you’re also fine-tuning your collaboration skills, which is vital for success. While you’re at it, you’ll probably also compete with your colleagues in subtle ways and pick up some new tricks. You might even find your next employer this way! A word of advice: they burn hot and fast and can be quite exhausting. I don’t recommend doing a hackathon every day — or week for that matter.
  • StackOverflow: Real people are very creative when it’s time to solve real problems. Not only can you get help when you’re stuck, but you can help others when they’re stuck. By participating, you’ll learn a lot and increase your fluency with the language(s) of your choice.
  • GitHub: What is there to say about this really? There’s just too much to discuss here in this review. To learn and challenge yourself, just pick a project and start coding.

Tips and Tricks

I’d like to wrap up with a few tips and tricks.

Competition and You

As you may have noticed, many of these programming challenge sites are competitive.
As humans, we’re naturally competitive. We compete on almost everything:
  • Catching the eyes of a special somebody before your friend does
  • Landing a job
  • Sitting in the front seat of a car
  • Having the TV remote
Competition often drives us to try harder than we would otherwise. This can be great when you’re trying to improve your coding skills.
But there are a few gotchas about competition I’d like to point out.
Competition is Not for Bragging
Competition is a tool to improve yourself, what you’re working on, and the people around you. It is not a way to prove you’re superior.
Having this attitude can cause significant problems in the workplace, as Sarah Mei notes:
135789_tweet-people-competing
So remember to stay focused on self-improvement, not superiority. As Swift team member Gemma Barlow said, “…friendly rivalry is always good as long as you’re striving to create a better product for your users”.
Competition has a Time and Place
image-04-devsfighting
Another thing to note is competition isn’t always the proper solution.
Unity team member Barbara Reichart said that she prefers the following:
  • When learning new things, she prefers to use cooperative environments. This way, when you’re learning you can be in a low-risk environment and can take your time.
  • When trying to become great at things you already know, she prefers competitive environments. This way, you can have a fire lit under you to drive you to the next level.
Finally, Gemma points out that competition isn’t for everyone. “It’s good to acknowledge that not all personality types thrive in a competitive environment, and there are other ways to keep your brain sharp.”
So remember – competition is a tool, and deploy it only when appropriate!

Take some Rest

These programming challenge sites can often be addicting, as I know from experience!
But be sure not to overdo it – your brain can only take in so much at a time. It’s better to be consistent and space it out.
Gemma put it well: “I would prefer to be getting some sunshine and resting my brain rather than continuing to stress it”.
That’s a good piece of advice. Don’t expect too much from your brain after you use it all day long. Would you expect your legs to run all day or your arms to do pushups nonstop?
Give it a break and let it relax, from time to time. Just don’t abuse it.
image-05-devcat

Where To Go From Here?

I hope that I’ve convinced you to give programming challenges a try!
Note there are more great places for programming challenges beyond what I’ve covered here. This article focused on those that I’ve used so that I could speak from experience.
I asked our readers what other sites they recommend, and they gave the following list:
Remember, although traditional learning and a challenging workplace are valuable tools, they’re not enough.
To be the best developer you can be, you want to build your muscle memory. You should look outside your comfort zone and work with unfamiliar tools and problems. That’s what programming challenges are all about!
I recommend you take a site mentioned in this article and give it a shot! Whatever you choose, what’s most important is that you do it regularly.
That’s it for now. If you have any questions, comments or suggestions, please join the discussion below!
Share:

Total Pageviews

Popular Posts

Powered by Blogger.