Saturday, December 19, 2020

Sharing Experience Reading Symbolicate Crash Log Error Food Today App From App Store iOS

Hi all, it's been a last month of the year. And there are lot things happened in this year. Hope you have a best year. This month I got weird error reported from App Store that I can't find it in debug mode. It happened only on release mode that I need to figure it ou by myself. It's almost three times I got rejected because of the same crash when opening food diary tab.

So until now I don't know why the error happened, I just assume the error. Ok I finally found the error as apple reviewer did. The error happened when I open food diary tab. First I need to figure it out why the error but what I got on error message console is "Lost connection to device". It gave me headache ahaha. BTW it only happened on iOS. I used flutter to create this food today app mobile.

My assumption is out of memory when opening food diary tab. Because my first tab is "food camera" and it takes a lot of memory I guess so I try make when opening tab it will destroy another tab. So that will make the memory is enough to do another thing.

Wednesday, November 18, 2020

I change IDE Android Studio to Visual Code on Mac Big Sur

Visual Code on Mac Big Sur

It's been a month since I used Visual Code as new editor to create or develop flutter apps. I really like it because of the lightweight that I feel mostly. I haven't had a problem so far, but some little issue where I can't add widget using shortcut key like Android Studio does using alt+enter. So I need to do it manually with clicking hint lamp symbol then I choose adding parent widget or stream builder or removing it from parent tree. It's a little bit annoying but for me the performence is more important. I haven't searched the way Android did but later maybe.

And the second thing is about Mac Big Sur that I've installed on my macbook air '17. Before I run Mac OS Catalina of course. There's one headache issue about NVRM SSD. It's when my mac will restart randomly when doing heavy things like compiling or opening many tab browser. It's so weird I tried to reinstall my mac many times. And the result is the same, I think I need to replace the SSD with old one because Now the SSD is updated 256GB and different type I forget the name. But the old one that this macbook own is Samsung SSD. but It's already solved with removing RAM and inserting again.

BTW I still installed Android Studio because I need it for Android testing purpose and emulator. What I feel when upgrading Mac Big Sur is the compile time a little bit more fast. I don't install games or editor video or photo. So the size space only for development and it doesn't take much space so far. 

Tuesday, October 20, 2020

How I handle admob on iOS 14 about IDFA permission

Ok, so first of all we know that iOS 14 is available on iPhone. Starting from iPhone 6s that's my iPhone to test my app until latest iPhone 12. It's quite fun to see a new update that brings something about IDFA. What's IDFA actually? The source I got from the internet said IDFA is Identifier for Advertisers. So basically The IDFA is used for tracking and identifying a user (without revealing personal information).

It's used by Admob to show ads that's relevant to users. So Apple needs permission from iPhone users to allow third party to track their activity. What if iPhone users doesn't allow it maybe third party cannot show ads and It's bad for us who get paid from advertasing. Maybe in the future there'll be a pop up message in the apps that need to active IDFA before using the app. It's something like on website right now. We can't see the content if we don't disable our adblock plugin.

Fortunately We're lucky enough because Apple will delay Its IDFA changes on iOS 14 until early next year. So we have time to prepare implementation in our App. But actually it's not so hard to implement it. You just need to show the permission before showing ads that I'll explain later. I've done it in my native iOS app and cross platform app that use flutter.

Saturday, September 5, 2020

My Two Apps Got Submission Rejected from Play Store


Aug 31, 2020 that's the date when I decided to add my screenshots for 7-inch and 10-inch tablet and video preview of my app for all my apps on Play Store. I have 8 apps on Play Store right now. My most download apps is counting workout. It has 2k active users. So my first app that I updated to add the screenshots and video is counting workout. It doesn't have any issues. Everything works fine, you can check it now, there's new screenshots for 7-inch 10-inch tablets and video from my youtube channel.

And the second app that I updated is "Catatakan Keuangan - Expenses". After I updated the screenshots and the video, I got email from Play Store that has title "Action Required: Your app is not compliant with Google Play Policies (Catatan Keuangan - Expenses)". I was shocked what I have done to violate Google Play Policies. Then I remembered that I only changed "Full Description". It's just a little text that I edited.

I was thinking that maybe it's because of the words that break the Google Play Policies. But I don't think so, I'm sure it's because of bot that wrongly checked my app. And the message that I got from email is not clear what should I change. It just says "We identify risk of abuse using various items such as previous violation history, user feedback, and use of popular brands, characters, and other assets.". It's not spesific like what assets that my app breaks.

Thursday, August 20, 2020

Create Landing Page for My App Food Today Using Firebase Hosting

Hello guys, I'm excited this month because my app Food Today now has landing page. The best thing is usually I used to host my website using heroku like kontaku app. Today I'm gonna share how I create my landing page easy way. First you need to go to console firebase. Make sure you have your own project. It's ok for now if you don't have any apps.

Get your own template for landing page. I used Nova Free Theme for my landing page. I found it free and beatiful, so I used it. I don't have much pages, it's only three actually. There are home, privacy policy and term & conditions. And I design my home page as simple as I could. One screenshoot of my app and title text and description. Two images logo to download my app App Store and Google Play.

After that create your own directory for your landing page. Instal firebase CLI then in your command prompt run firebase init choose hosting. There's a folder called Public, that's where you insert your html files. Last thing to do is firebase deploy. Taraaa now you can check in URL given by firebase like this For detail explanation you can check here

Saturday, August 1, 2020

App runs fine on debug mode but when releasing on Play Store force close Flutter

It's been almost two weeks, I released my app Food Today on Play Store and App Store and I created my landing page too using firebase hosting It's quite fun to do everthing with firebase and flutter. It's like creating start up. I still need an idea to improve this app better again. 

I have an expierence where I need to analayze my code that's on Play Store. Because the error only happened when I installed my app on Play Store. Fortunely I can check my app internally through Play Store developer. So I didn't need to release it to play store because It will much time waiting to be reviewed. 

Now I've been waiting my app reviewed, It's almost two days. I think it's my first time waiting my app to be reviewed for almost more than one day. The update that I did is to add ML kit feature to detect food when user is trying to add food photo in discover food. Updated now it's been updated on Play Store. I usually write my blog a few days. So yesterday my app was still reviewed and now it's approved on Play Store. You can check it to know about the feature ML kit on discover food feature.

Friday, July 10, 2020

Finally Release My Own app Food Today on App Store and Play Store

I have an idea to create an app to photo your food and It will save your food photo in grid mode. In every photo there's time where you take the food photo on right bottom. And below all of it there's date to tell that photo is food today. Then you can share it on your social media or you can just simply save the photo. Before saving photo you can edit the photo like flip, rotate and adjustment about the color.

It's all made using flutter. I design by myself like Icon. UI colors that I chose. It's so fun to use flutter because of hot reload that helped a lot. I'm not best at design but I can easily change color if it's not ok. I used many packages that I learned on the internet. It's almost covering all of I want in this app. 

You know what, I just made this app to release in app store and play store in just three days. It's so fast than I thought. Although the first release is not fully features like know. But I'm glad I can release them so fast so that I don't be afraid to be declined again.

Saturday, June 27, 2020

My first flutter app on Playstore but rejected on AppStore

It's been a month to learn flutter and I really like the idea of designing user interface. No heavy storyboard in Xcode. No more many xml that is on Android Studio. But everything is using dart class. Design and code logic. That's painful for me is bloc pattern that I used. It's good for MVVM pattern I think but I need to create three dart class to handle one screen one bloc. But fortunately It worked on Android and iOS and that's cool.

Okay the app that I created it's called "Helper for Instagram". Basically it helps you to repost, download photo or video and copy caption, hashtag and username and selectable caption. It gives you to "history" to show you what link you have inserted and "save" for favourite post that you want to save. And they will be in app as long as you don't uninstall the app.

For Android the size of the app is 10 MB that I think it's very good because it's native. But for iOS it's 30 MB. It's not bad though. If you're in debug the size will reach almost 100 MB and as I read on the internet it's fine. Debug size certainly is more than Release size. I have ads for my app and app in purchase three of them. I made it to have expierence more, it's usually I only have one in app in purchase. But that's awesome in flutter there's package called "in_app_purchase" and I amazed I can easily add one more.

Monday, June 1, 2020

My Impression about Learning Flutter from scratch

It's a busy month for me to learn new stuff. I'm hungry for knowledge about flutter things haha. I have already learned about android and iOS native long time ago. And it's still awesome to learn. It's been a great long journey though. Now I maybe have learned anything about flutter about two weeks. Learning it from video tutorial is awesome. Don't worry what you learned, it will make your skill more sharp when you learn it everyday. 

First, I confused when to start to learn flutter. That's why I tried to learn directly from flutter documentation. But I need real world example flutter project from case study. That's when I found a good tutorial and easy to understand. It's Flutter course from londonappbrewery. It's free actually because of google. 

But if you need to grasp all of flutter course bootcamp you need to spend 10 bucks. It's very good I think you will learn flutter until Flutter State Management. It's important aspect to create project using flutter. You need to handle state for your apps. It's different from iOS and Android native. If you need to change something directly when your apps is running. You can't make UI changed without using states eventhough your variables changed in console.

Friday, May 15, 2020

Create Button Auth Facebook FBLoginButton Full Width

In my app Dog Master, I have authentication to log in from two platform that are Google and Facebook. Basically I used the login button that is created by Google Firebase and Facebook. These two button are in different width. As you know the google button sign in is easy to be designed in storyboard. But Facebook it's fixed width if we want to make it full width in each edge of screen, it would make space padding.

In this post, I don't talk about how to auth with facebook. But for additional information I used authentication with Firebase auth. It's easy to use if you follow the tutorial given by Firebase documentation. If you have any issue about it maybe I can help you. Just comment below this post.

As you can see above screenshoot image, the facebook login button is basically only the facebook icon and "Continue with Facebook" text. Without blue background behind it. I customized it using UIView and I added tap handler to click FBLoginButton. I created this button on UITableViewCell, so it's basically same with UIViewController. 

Saturday, May 9, 2020

Review Skeleton View for iOS Swift 5

Happy day guys, I hope you are happy and calm. In this tutorial, I'm gonna talk and show to you how Skeleton View works. Many apps nowdays are using it. It's like a common way to load something that's not finished yet. You can use it for loading text or image. And I think it's very good UX. Not jut bored loading spinner by default.

You can use Sekeleton View for UIImageView or UILabel. That's what I used for my app and I will show you later. Before I used Toast-Swift to handle loading. The code is pretty simple though but I still used it for loading stuff. I usually calls this code "self.view.makeToastActivity(.center)" to show loading spinner on center of screen. And After load API finished I hide the loading spinner using self.view.hideToastActivity(). Just like this.

And If you use UITableView, you need to implement SkeletonTableViewDataSource to give Skeleton an idea how to react spesific UITableViewCell through cell identifier. And If you don't it implement it, it's not working I have tried and that's confusing me a little while.

Thursday, April 30, 2020

Create UICollectionView Like Instagram When Exploring Photos

Hello guys, I hope you're doing well. I was doing research about how to make my UICollectionView like Instagram. As you can see on picture above. I have time to search on the internet but somehow I want to custom it by myself. I mean I don't want to use framework.

After I finished my custom UICollectView, I found IGListKit framework for building fast and flexible lists. But I haven't used it Because I think it's not for custom layout UICollectionView. But if I have much time maybe I will try to use that framework. I think it's cool to use framework that's built by iOS Instagram Developer.

What I want to share is a  custom class UICollectionViewLayout called SavedCollectionViewLayout. Because I used this class to show my saved collection photos. But you can edit the name as you want, no problem at all. But I think there's a room for improvement this class. If you have any idea to improve this code. Tell me. I'm glad I have someone to improve my code quality.

Saturday, April 25, 2020

Make Difference between Double Tap and Single Tap in UIView

Hello guys, today I want to talk about Tap in iOS. Of course in swift because Objective-C now is less used for iOS Developer. If we see Instagram app, we can tap an image with double tap. After that an event has occured. If it's in Instagram we can have an event which is we like that photo with heart animation color changed.

If we single tap, it doesn't do nothing in photo but in video we can play the sound of the video. But if we double tap it, the sound would not interrupted by first tap. If we don't set something in iOS code, we can see interrupting happened.

Fortunately we can handle it easily in coding with swift. It just need one line of code to avoid interrupting single tap. But first make sure we have added two gesture recognizer. UITapGestureRecognizer is the class we need it to set. Don't worry I give you an example below.

Friday, April 17, 2020

Be Careful with "UI API called on a background thread"

After maybe one months I'm quarantined, It's so bored to be at home without doing anything. Luckily I have projects to do. And Of course to write post for this ungapps blog. Today I'm glad I can write to make my english writting better. I think day after day my english gets better haha. Yes honestly I still used google translate to translate some vocabularies that I literally have forgotten.

Today, I want to dig a little bit deeper about Thread in iOS Swift. We need to learn this thing. Because It's very important when we're doing UI think with other thread like downloading video. Because if you don't pay attentation enough, your app would be like freeze in a moment. And It's very bad for User Experience.

Luckily Xcode helps us to catch something that's not right. It would show message like title above "UI API callend on a background thread" in a specific line of code. To do that you need Runtime API Checking is ticked. Edit Scheme->Run (Debug)->Diagnostics->Runtime API Checking. By default it should've been ticked.

Sunday, April 12, 2020

How to cache image for temporary use iOS Swift 5

Welcome back to my blog, this week I was too busy to do so many things. I've almost forgot to post new article this week. So I look my old problem that I've already solved and found a problem how to cache image for get dynamic height of UITableview.

I have a problem to reuse UITableViewCell for inserting the height of each cell. I want my cell to display flexible height for UIImageView. And the image itself is fetched from API server which is to need internet to get it and it's not from local. Sometimes it takes a long time to get big size image.

For the very first time to open an app. It will be harder to cache all of images. So if the user doesn't have good internet connection. Cache all of images is good solution, but it will not automatically resolve our issues. For me there's still a little issue when I want to make my height of UIImageView flexible in UITableView. If I already get the height of image, I need to reload the spesific of uitableview row. And it will make weird for UX.

Wednesday, April 1, 2020

Fix "Attempted to call -cellForRowAtIndexPath: on the table view while it was in the process of updating its visible cells, which is not allowed"

Hello guys, Today the title is a little bit long. Because I want to make the title can be searched exactly the same on google searching. This is a warning not a error. So It wouldn't impact to your app if you run it on your device or emulator. The warning appeared on console not in Buildtime as usually in issue navigator.

This warning doesn't give the exact line number where the warning happened. So we need to do breakpoint to check where it's supposed to be. But the warning in console give us a hint. We take the keyword "cellForRowAtIndexPath". So it related to UITableview because "cellForRowAt" is the method that's in UITableVIew.

As you can see my screenshoot of my console above, there's multiple times the warnings happened. It's because of "cellForRow" called many times, not just once. But don't be deceipted to assume that the warning happed in cellForRow method. The warning actually happened in "heightForRowAt", when in the method, it called dequeueReusableCell, the method of UITableview. As you can see in example below.

Wednesday, March 25, 2020

How to pass through click event in UIView and UITableView

Hello guys, We are now have pandemic that makes many of us stay at home. Sometimes we are bored to do something at home. But we need to do something helpful for our life that's why  I'm creating an app that I want to explore with MVVM architecture and new layout. Before I used to always use MVC to create an app. It's good to know other architecture like MVVM or VIPER.

I have started to like using MVVM architecture for my project. If you MVC, you would face the controllers have so many code to handle business logic and UI. If we can seperate business logic to create the class itself, it would be good. The class itself, we call it "ViewModel". We do our business logic in there. Maybe next week I will share my structure project to show you how I handle my project maintable and easy to organize.

But today I don't want to share about architecture in programming but about iOS layout as you can see above. I have two images, there's a button on top right called Show. You can click the button and It will show you another view controller. But on the second image as you can see the show button is behind another layout. It means the show button is behind another UIView. But the view itself is clear background actually.

Wednesday, March 18, 2020

How to make NSMutableAttributedString work with emoji Swift 5

Hello guys, last week I got an issue related to NSMutableAttributedString. It couldn't work with emoji, when I entered three emoji like "". It would only show "" not three emojies. So basically we need to handle about the length of emoji. Because it's different if you don't cast String to NSString.

Sometimes we use NSMutableAttributedString than String only because we want to customize our text like giving it a link and changing the color. Because when we use NSMutableAttributedString, we can give the business logic how it will show in view controller. And it's easy to work with TextView. We only can do "textView.attributedText = NSMutableAttributedString". And it will automatically run like we set in NSMutableAttributedString.

If you don't work NSMutableAttributedString, you would not counter this issue. Because I have tried not to use NSMutableAttributedString in TextView. It just works fine. The solution for the issue is very simple you just need to cast String to NString. Why you need to cast it to NString because the length between String and NString are different when they work with emoji.

Tuesday, March 10, 2020

Avoid Retain Objects When Using Static Var Swift 5

Welcome to my new article, I've just learned about memory in iOS.  It's actually not hard to understand because of ARC (Automatic Reference Counting) that helps a lot about handling memory. But you need to handle a few conditions that ARC can't handle. It usually uses "weak" syantax. It tells to memory that It is not strong pointer. It's literally variable that is used "weak" can be nil.

"weak self" and "unowned self" helps us when we use closure and try to self inside it. It will make iOS can handle better your apps. Use "weak self" if self could be nil and Use "unowned self" if self will be never nil. It's actually confusing for the first time we have heard the theory. So we need to practice it to make it perfect.

But what I actually concern is when we use static var in enum or struct. And I try to access it in view controller or other classes. It will make class or view controller doesn't run deinit which is we need to know our view controller is discarded and it makes our memory cannot be leak. So How do we solve it ? It simply like we have talked before. We need to use "weak" syntax before "static var". So the memory will discard it when no one points to variable. I will give example below, don't worry.

Tuesday, March 3, 2020

Share My Software Aplikasi Apotek Gunsoft Java SE

Hello guys, welcome back to my simple blog. Today is good day for you This is my software that I created in 2014, I think this is one of my best software that I created and took much time. The app is called "Aplikasi Apotek". It means pharmacy application in english language. I'm sorry it only support Indonesia language.

You can see the application above, I was using Java SE and It was pure Java. I didn't use framework like Hibernate, Spring, Struts and etc. Sorry maybe I mislead about it. Of course it uses many libraries that I can't tell here. And about the reports I used jasper. It's very good choice I made because It can cover my all reports. It basically needs to run in windows, but linux and macOS acceptable. But there's a disadvantage about the UI. Like button above it cuts off.

I created this application from zero, and It finished about 9 months. Is it crazy ? haha. I created this application just for fun and I hope I can earn money from this application. But it's ok, It was six years ago. And I'm ok with it. That time, I was still in college. I love programming since I was in senior high school.

Tuesday, February 25, 2020

Learning About Initialization Properties in iOS Swift 5

Hello guys, lately I have watched a good video to learn about iOS programming. It's CS 193P from standford university on youtube. Although I have learned iOS programming more than 4 years. I'm amazed about things that are learned.

Many things I haven't noticed about deep language in swift. I'm so glad that swift is so powerful language. Thanks to the ones who created it. I haven't finished all tutorial videos. But soon day after day I will watch it. Never stop learning when we're in technology haha.

Today I'm gonna share something simple that I haven't used in my project. But I think on the future, I will try to use it. So I will call it "Initialization Properties". You can create "set get property" with closure in swift. It's so easy to do it like example below. And you can do willSet and didSet property condition in method. It's very useful for me when I'm usually put initialization in viewDidLoad.

I haven't found this powerful syntax in java, but I haven't expierenced in kotlin. And I think it must be followed by other programming languages. Easy to use and easy to understand that's what I think about swift.

Wednesday, February 19, 2020

Add Padding Bottom in RecyclerView Android

Hello guys, on this week I want to share something special but I think it's useful for us. It's understable from the title of this post. But I will explain a little bit why I used padding bottom for my RecyclerView in Android. I have something called floating button to add my item in RecyclerView. It will be bad If I scroll to bottom and my floating button above item RecyclerView. I can't see clearly what text item in RecyclerView.

You can see from picture above, I've marked a rectangle in picture above. Imagine if there's no padding bottom. It will truncate my RecyclerView items and it will make my app looks when in interface. So I think I need to have padding bottom in RecyclerView. But How do I do that ? Is it hard to implement ? Or Is it just a few code lines.

I want to make "adding button" always be bottom right on my view and I don't want it to stack above RecyclerView. So the easy solution is to add padding. I changed my xml file layout and I added paddingBottom to 75dp and clipToPadding to false. I added these in RecyclerView widget as you can see below.

Tuesday, February 11, 2020

Create Smooth Dropdown on iOS swift 5

Welcome back to my blog guys, today I want to share something about dropdown thing. Dropdown is not something that is exist on iOS UIKit. On iOS we have something similiar to dropdown menu Android that is Picker View. But sometimes we need to create UI same as Android. It will have better User Expierence.

Fortunetely some people have dealt with our problems. So they created the dropdown menu in their own. What I have used is what I'm gonna share today. It's DropDown created by jriosdev, I will share github link on below, don't worry about it.

You install dropdown in your project using CocoaPods, or You just simply add Dropdown library by creating class named DropDown and add Textfield in your Storyboard then change class Textfield to Dropdown. For more details how to install this library you can check their github. I will give the link github below OK.

Tuesday, February 4, 2020

Fixing Problem UIActivityViewController Share Photo Function Not Working Sometimes

Hello guys, today I got a problem when no errors or warnings message in my IDE (Xcode). It's so confusing for programmer when error happens for no reason. It's like magic we don't know how it happens lol.

When sharing, I use iOS class library UIActivityViewController. It's a feature from iOS when we want to share something on other platforms. Like above image when we want to share something using UIActivityViewController, it will appear popup view dialog like above. You can choose what platform you will want to share.

Basically, UIActivityViewController can provide text and image together. But on some app like Whatsapp, it only applies image or text not both. I have shared the trick to avoid always sharing text when we want to share image.

Tuesday, January 28, 2020

Method Called When Notification Silent is True or False iOS Swift Firebase

Good day guys, today I want to share about iOS programming. Before I got the idea of this article, I got an issue. The issue is when you want to get notification data when user click on notification banner or user is running the app. It's different way to get the notification that I will give you the code below But I will explain a little bit first.

I have tried with firebase library, so make sure you have configured your firebase or any libraries that you used for your notification. But it will be better if we used the same. You need to set it according to documation that I have read. Mostly the configuration will be in AppDelegate class. Then from AppDelegate you will go into your others ViewController.

There are the method that's called that I want to show to you guys, the methods is userNotificationCenter and didReceiveRemoteNotification. I will give silent true or silent false comment for you guys. So It will be easy for you to understand what I'm trying to figure it out.

Tuesday, January 21, 2020

Sharing AFK ARENA Game That I Play Everyday

Hello guys, today I doesn't share about tutorial coding. I keep it for next week, because I want to have variation in my blog. I love playing game to waste time when I'm waiting to do something and make me not bored. I played many mobile games before that I shared sometimes on youtube like Mobile Legends, PUBG, Ragnarak Eternal and World of Kings.

World of kings is latest game I've played genre MMPORG. It's consuming so much time and I stopped then. Fortunely I found a good game that we can play anytime in everyday. It's called AFK ARENA. It's released on April 2019. It's mobile games that created Lilith. The developer is good because they sometimes heard the comunity.

There are two forums that I followed about this facebook and reddit. I played this game last year september month I think. It's about 5 months so far. I created four accounts because I like it to do daily and when we draw to get heroes card. That's making sick for hoping RNG hahaha. That's what community said.

Tuesday, January 14, 2020

How to Make Blinking TextView Android

Good day guys, It's the second of week on 2020 year. We need a good boost to start every day to do something good way. I listened to many new songs and old song too. It's good to refresh my brain to think. Creating an new article every week it's not easy though. I need a problem to solve haha. Maybe I will share what game that I am playing on the next article.

We can see how many visitor in our blog, for me it's not much people see my posts. But I'm gratefully my post will last long because it stands on Blogger. We know blogger it's so long, and I hope it will be better for the future.

So the article for now, it's about TextView Android. I have an app called To Do List. There's a fragment calendar where you can click the day and you will be directed to the date in list view fragment task lists. So it's very helpful for users to choose where they want to see data according to date. Like images above what I mean about.

For making user friendly app. I give a little bit animation blink, so user will notice where the date of header position. The code for this animation, it's simple. It's just a few lines. So don't expect it's too hard to try. You can customize this animation according to your app wanna be.

This is the code guys.

Tuesday, January 7, 2020

Avoid Whatsapp Share Only Text in UIActivityViewController

Hello guys, this is a good day to start a new resolution because. It's still fresh 2020, we can start doing something new or something that we want to complete when this year ends. I hope I can always write a new article every week with good quality. Thanks for support to be consistence it's hard and easy to do if you are in perservence mode.

If you ever have installed app called instagram or others social media, you will find a share feature. where you can share your photo to others app. Like email, notes or social media. Fortunately iOS provide the feature to share called UIActivityViewController. So it's like we use library in iOS, we just create our text or photo sending to UIActivityViewController. Then it will create share feature like above.

But I have a problem when trying to share on Whatsapp. It just showed text when I sent image and text. Unfortunely Whatsapp only support image or text, not both of them. So we need to choose what's gonna we share. In my case I need to share image without text, so how do I check when the user share on whatsapp spesificaly.

So I created two classes for each items. SocialActivityItem and TextActivityitem, SocialActivityItem for sharing image and TextActivityitem for sharing text. It will extent UIActivityItemSource so in order to be used in activityItems. If you're confused with what I'm talking about, I will provide the code for you guys. Sorry I'm not expert to explain something :D.

So this is the code guys.