klionmeet.blogg.se

Swift share to instagram story
Swift share to instagram story







  1. SWIFT SHARE TO INSTAGRAM STORY MANUAL
  2. SWIFT SHARE TO INSTAGRAM STORY CODE

If you’re looking at a feeds in Instagram, you’re not looking at one post: you’re seeing a bunch. Now remember this section cell mapping is driven by a feed item. It became really difficult and started to slow us down. Instead of having all these extra individual tiny contained models, we had a huge model. I’m sure we’ve all experienced wanting to make one little change, instead of refactoring and doing what we know is right… we’d like to just slap it on. Over time, we’ve had people come along who wanted to add stuff like video, users, and other sorts of data models. Instagram launched back in 2010, with just the images. It sucked to tell our teammates “no.” Just Slap it On (3:41) It’s a cell, somebody designed it, and a product manager worked on it, but it has an array of users, no comments, and it didn’t make any sense. When somebody comes along and says, “Hey, we want to add a new item to the feed,” but it looks like this, we have to say, “sorry, can’t do it, it’s not a feed item”: Our entire app is built around this feed item data model, and it expects this feed item to have an image, a video, comments, etc. You have a single feed item that decides how many comments there are, if we’re going to show an image, if we’re going to play a video, what the user’s name is, etc. This is driven by a data model that we call a “feed item”. You’ve got a supplementary view at the top, you’ve got a cell for the media, a cell for all the action items, and then all these text cells at the bottom. This breakdown works something like this: When we’re looking at a post on Instagram, we see a big section and we break it up into multiple smaller cells. How did it work? (2:05)įor starters, we use collection views. There were a lot of things that made it really challenging.

swift share to instagram story swift share to instagram story

SWIFT SHARE TO INSTAGRAM STORY MANUAL

There are still a couple pockets of manual memory management, and there’s a lot of mess.

SWIFT SHARE TO INSTAGRAM STORY CODE

If you search through the git history and blame some files, you’ll find some Instagram init code commits in there. Instagram is a 6.5 year old app, but the code base is still the same. Why did we rewrite our feed? In short: technical debt. I want to share a bit about how we work at Instagram through the lens of this story of rewriting our feed. Whenever I go to conferences, I love listening to other industry experience talks because I think it’s fascinating to see how other companies and organizations work. It’s been a really fun process and we’ve learned a lot. For the past year, I’ve been working on rebuilding how our feed works on Instagram. We’ve been doing a lot of really cool work on infrastructure. I’m Ryan Nystrom, an engineer in New York working on Instagram.

swift share to instagram story

In this talk from try! Swift, Ryan Nystrom shares his story of what it takes to ship a successful refactor, and introduces Instagram’s open source gift to us all: IGListKit.

swift share to instagram story

You can investigate documentation for “Shareable Content” details.When the Instagram team rewrote their iOS feed from the ground up, they learned more than they anticipated about collection views, diffing, and the dangers of too much spaghetti code. Since we will be using url schemes we need to add “LSApplicationQueriesSchemes” for instagram to “ist”Īs last step before implementing the functionalities i added sample video and photo to project directory, we will use these ones for passing them to Instagram.įor sharing story we will be using “instagram-stories” url schemes.









Swift share to instagram story