chat-sdk / chat-sdk-ios

Chat SDK iOS - Open Source Mobile Messenger
http://sdk.chat
Other
916 stars 274 forks source link

IMPORTANT! Apple just rejected my app! [Solved] #97

Closed RyanElliott94 closed 7 years ago

RyanElliott94 commented 7 years ago

So for the past few days I've been trying to get my iOS app on the store just been rejected!

The issues they said were there:

Guideline 1.2 - Safety - User Generated Content

Your app enables the display of user-generated content but does not have the proper precautions in place.

Next Steps

To resolve this issue, please revise your app to implement all of the following precautions:

This really isn't good and i may now have to forget about the my app all together.

Ryan

ciaoamigo commented 7 years ago

What's new! It's been so for years!

RyanElliott94 commented 7 years ago

So everything else i can easily do myself but I've been trying to add a blocking function but it's just not happening!

It's clear you guys are busy as nothing seems to be getting replied too at the moment but i desperately need this app on the AppStore and i need your help in order for that to happen.

Thanks Ryan

bensmiley commented 7 years ago

Adding simple blocking would actually be quite easy. Imagine this situation - User A blocks User B. To do this you would need to add a button on User B's profile which says "Block user" so that when User A views the profile they can block / unblock the user. Next when User A blocks the user, add the ID of the user who is blocked to User A's meta data using -(void) setMetaValue: (id) value forKey: (NSString *) key;. You can store a NSArray of values. Then call pushUser to save that data to Firebase.

Next, you can just intercept where messages are delivered and check if the user is blocked. In CCThreadWrapper.m look at messagesOn. Before this line:

// This gets the message if it exists and then updates it from the snapshot
CCMessageWrapper * message = [CCMessageWrapper messageWithSnapshot:snapshot];
BOOL newMessage = message.model.delivered.boolValue == NO;

Add something like:

NSArray * blocked = [NM.currentUser metaValueForKey: @"blocked"];
// Loop over user IDs and check if the sender is blocked
// If they are blocked don't register the message

Once you do this, you can also modify the security rules so messages from blocked users aren't added to 1-to-1 chats.

bensmiley commented 7 years ago

I'll try to get a simple blocking module written early next week.

RyanElliott94 commented 7 years ago

Hi, thanks for getting back to me!

Hopefully you will be able to implement simple blocking because i don't have time to do it but for now i need to fix the other issues as i also have a major update to do for the Android version of the app too.

Ryan

Absentia commented 7 years ago

@RyanElliott94 If you feel like sharing your methods for satisfying those other moderation requirements I would greatly appreciate it!

RyanElliott94 commented 7 years ago

I can't use -(void) setMetaValue: (id) value forKey: (NSString *) key; because it'll only add one user rather than multiple ones. My own ways of trying was to create a node on Firebase under the users entityID but i was having a problem trying to read the list from that node and i didn't know where i had to put the code to stop messages from coming in.

So I'm nearly there but again I'm struggling to actually use the list in Firebase.

@Absentia Hello, if i manage to do it before Ben then I'll post the code.

bensmiley commented 7 years ago

Using the set meta value you can pass in an array of ids. That way you could block multiple users. That should solve you're issue.

RyanElliott94 commented 7 years ago

@bensmiley

So i gave the meta value a go but i couldn't get it to work. I do think though that the way I'm trying to go about it, will work but i feel I'm missing something!

This is what i have so far:

 -(RXPromise *) getBlockedUsers {

RXPromise * promise = [RXPromise new];
id<PUser> currentUser = [[BNetworkManager sharedManager].a.core currentUserModel];
FIRDatabaseReference * query = [[FIRDatabaseReference userRef:currentUser.entityID] child:@"blockedUsers"];

[query observeSingleEventOfType:FIRDataEventTypeValue withBlock:^(FIRDataSnapshot * snapshot) {

    if(snapshot.value != [NSNull null]) {

        NSDictionary * dict = snapshot.value;

        NSArray * keys = dict.allKeys;

        NSMutableArray * validUIDs = [NSMutableArray new];

        for (NSString * key in keys) {

            CCUserWrapper * user = [CCUserWrapper userWithEntityID:key];

            [validUIDs addObject:[user once].thenOnMain(^id(id<PUser> u) {

            return u;
            }, Nil)];
        }
        [RXPromise all: validUIDs].then(^id(id success) {
            [promise resolveWithResult:success];

            return Nil;
        }, Nil);

    }

}];
return promise;
 }

That method is what i use to get the contacts from Firebase but with a different reference.

Then this is what i have before the lines you said about and the }else{ is where the message will be received if the user isn't in the list of blocked users.

      [self getBlockedUsers].thenOnMain(^id(NSArray * blockedUsers){
                //id<PUser> currentUser = [[BNetworkManager sharedManager].a.core currentUserModel];
                //NSArray * blocked = [currentUser metaValueForKey:@"blockedUsers"];
                for(id<PUser> user in blockedUsers){
                    if([_model.users.allObjects containsObject:user]){

                    }else{

What doesn't help is that i don't know fully know what data goes into a thread such as how it reads the other user and what information the thread has about the other user.

Any closer to sorting this?

Ryan

jimijon commented 7 years ago

Wow. Definitely need blocking if this framework is to be used. I am about four weeks out to releasing my app to the store so I definitely will need this blocking too. This should be in any default installation.

Absentia commented 7 years ago

@jimijon I have to agree. Even though I am loving this SDK and it is easily the best iOS chat SDK I've found since Scringo shut down, I still find it incredibly frustrating how every iOS chat SDK seems to be oblivious to to the strict rules that are enforced by the iTunes review team. I tried out 4 other chat SDKs before landing on this one and they were all equally unequipped for App Store approval. For the devs - I'm sure I don't need to remind you how many competitors you have in the chat room SDK arena...make Chat SDK comply with all of the App Stores rules and you will have a huge advantage over everybody

RyanElliott94 commented 7 years ago

@Absentia I had a similar problem as you when trying to find an SDK with even the most basic and vital features but i only went from one other SDK but it did mean having to restart my app. I do plan on sticking with this SDK though because i don't see myself being able to find another with the same support you get with this one and i don't think there's many SDK's that use something as easy as Firebase either

Absentia commented 7 years ago

@RyanEllIott94 definitely! I feel like I've spent a year trying to find a good chat SDK and this one is pretty much a godsend. The last one I was using gave me a quote of $450 a month for 10,000 monthly active users...if that's not a monumental ripoff then I don't know what is

jimijon commented 7 years ago

I did search and search. ChatSDK was what I finally decided upon. So what do we actually need to get it approved? Is it just blocking?

RyanElliott94 commented 7 years ago

@Absentia I think i might know which one your talking about, the support on it wasn't overly great either!

@jimijon To get it approved you need a report abuse button, which I've done. You also need to update the EULA, to do that i found this Link and used the 5. Objectionable Content Policy section which i then added to the EULA. Then you need to have a function that allows users to block abusive users and that's what I'm currently stuck on

bensmiley commented 7 years ago

I've written a blocking addon which I will finish testing tomorrow. I'll release it along with an update to the core library. @RyanElliott94 If you've noticed issues with the EULA you could make a pull request and I'll merge those changes with the core library. The same goes for any other changes that you think could be useful.

RyanElliott94 commented 7 years ago

Hello, just thought I'd give a quick update.

So i managed to do everything apple asked me too, including the blocking and reporting (I can't do a pull request with the code because I'm still using an old version of the SDK) but i submitted my app again but yet again it was rejected because they want a video demonstration as they found it hard to understand how the app works. Mainly when it comes to reporting users and abusive content.

Now this is all new to me as this is not only the first iOS app I've ever done but because I'm coming from Android and everything is so so much easier! I don't actually know if a video is a requirement for every app you make and submit but if it's not then i highly recommend everyone else prepares a video just in case and to avoid any rejections!

Ryan

simonsmiley64 commented 7 years ago

Hi @RyanElliott94,

I have successfully submitted a number of apps to the app store containing the Chat SDK. I have had to jump through a number of hoops to get these on as Apple often assume it can't be done without checking. (a good example of this is letting Apple know you can swipe a message to flag it)

In my experience the ease (or difficulty) is often down to the Apple technician you get and I have never been requested to submit a video.

I would always recommend submitting builds well in advance of your release date. These do not need to be submitted but then speed up the final process as you know the main bulk of the code has already been accepted. I also find that subsequent submits get approved faster although I don't know for sure this is because Apple can see your previous code history.

With regard to abusive content I normally explain this to Apple:

  1. Abusive content can be flagged by users
  2. We then monitor the flagged posts and can ban users behind the scenes if needed

For our online version of Chat SDK this was enough of an explanation but, as Ben mentioned, you might need to add blocking functionality. The important thing here is for blocking to be easily achieved by the user and for you to provide simple instructions:

  1. Search for another user in the search tab (give them an example name you know is in the database which is not the test user they are logging on with)
  2. Click the user image and click add to add it as a contact
  3. Click the user image to load their profile
  4. Click "block user"
  5. This users messages will now be blocked from being received

If you do need to make a video this should be very quick to do. Just download quicktime and you can record the screen of your device. You can then quickly run through the process. It shouldn't take more than about 15 minutes.

Hopefully this helps and let us know if you continue to have issues with Apple,

Simon

RyanElliott94 commented 7 years ago

@simonsmiley64 Hello Simon, Thank you for the advice! I created the video yesterday and I've submitted the app again. Now I'm just waiting for a reply and fingers crossed they accept it this time.

Here's the Video for anyone that may be interested.

Ryan

RyanElliott94 commented 7 years ago

It's been rejected again!!!!

PLA 3.3.8

We found that your app records the user but does not have the proper indicators that the app is recording, as required by section 3.3.8 of the Apple Developer Program License Agreement.

Specifically, your app auto-disables the shutter sound of the camera when a photo is taken on iPhone.

Also, your app records audio but does not have a clear visual indicator that the app is recording. Recording indicator is not significant enough.

Next Steps

Please revise your app to implement the required means of indicating the recording activity to all parties. Please note that the recording indicator cannot be disabled and your app cannot go blank during recording.

I'm giving up with this now. I've simply had enough of this!!!.

Thanks for all the help I've been given over the time of making both iOS and Android apps, it's been helpful. Also thanks for creating this SDK.

Ryan

Absentia commented 7 years ago

@RyanElliott94 Honestly it looks like you just happened to get one of those countless Apple reviewers that is dumb as a brick (there's a LOT of them)...I wouldn't blame it on the SDK.

Not that I'm necessarily recommending this, but in the past when I encountered similar situations such as yours with reviewers who seemed determined to reject my app no matter what, I would simply create a new app ID and resubmit the app. New submission = new reviewer. On many occasions this would result in an instant approval.

Again, I have a feeling Apple wouldn't exactly be 100% approving of this method, so I'm not saying you SHOULD do it...just throwing it out there.

Absentia commented 7 years ago

@bensmiley As far as the flagging feature goes...I can see in the UI that I can swipe the message left to show the "FLAG" button. What I'm not sure about is, what exactly does this button do? Where can I view flagged users and ban them if necessary? Is there somewhere in the firebase control panel that I can view flagged users? Because I haven't been able to find it.

Also, hows that blocking add-on coming along? Even if it's a long ways out I'll still be excited to know that it's in the works at least. Thanks!

simonsmiley64 commented 7 years ago

Hi @Absentia,

The flagging feature adds a new branch to the Firebase database. I think it adds it like: flagged -> entityID -> message but don't quote me on this as I don't have the dashboard open in front of me. I would recommend loading up a test version and flagging a few messages with Firebase open in front of you. You should be able to see the messages being added and removed as you flag/unflag. We have customised the information so you can check the list to see the entityID of who posted it, the message they sent, the date etc. If you need to customise this further it would be very easy.

With regard to the audio messages, I might try to do a bit of work in the next week adding a timer to show audio is being recorded. We have never encountered this issue before and as you mention above, have probably always got a good Apple reviewer.

I don't know about the blocking functionality yet, I will talk to @bensmiley about it and will hopefully be able to get it up a rough version in about a week.

Simon

Note: See below the format of flagged messages:

screen shot 2017-07-20 at 08 11 29
RyanElliott94 commented 7 years ago

@simonsmiley64 I do have a timer showing the recording on my app but apple mentioned that the other user needs to know that your recording for some reason. If you'd like the code to add a timer quicker then let me know.

I actually didn't even know the stock SDK had a flagging option, mainly because my app doesn't allow text messages but if i had known then it probably would've been easier to add the flagging option to my app.

Also i have a feeling that Ben would've done the code for blocking completely different to me, in fact his code is most probably far cleaner but if for some reason, he is struggling then I'm more than happy to give my code to you and maybe use it some or all of it.

Ryan

RyanElliott94 commented 7 years ago

Oh and @Absentia Thanks for the advice. I may have to resort to that

simonsmiley64 commented 7 years ago

Hi @RyanElliott94,

There should be no reason for the other user to know that you are recording an audio message. I would ask them to clarify exactly what they mean by this. When I am using Whatsapp they never let me know the other user is recording an audio message! Them requiring this is absolutely crazy (like them needing to let the other user know you are taking a picture before sending an image message).

If you wanted to send me your timer functionality code I could test it and then submit it to the main code base - simon@deluge.co. I might make some modifications to it but these could easily be pulled into your project. You could do the same with the blocking code as it would speed up the process for me. You could also submit a pull request but this might be more complicated as we would need each functionality split out from your project.

Currently @bensmiley, is very busy working on some of our other products (XMPP Chat) meaning he doesn't have as much time as he would like to dedicate to this. I have also been away for 6 weeks meaning he has been working double. Now I am back I will try to get all of these small modifications into the Chat.

I would recommend following up on the Apple issues and getting full clarification and then testing similar functionality on other similar apps. I agree with @Absentia that it is probably a slow-witted Apple worker who is causing these issues and, as in all scenarios when uploading to Apple, you just have to put up with the hoops they create.

Simon

Absentia commented 7 years ago

@simonsmiley64 Thanks for the information about the flagging feature. Strange though, I have been testing out flagging on multiple messages and for some reason the "flag" category never appears in the firebase database. Wonder what's going wrong

simonsmiley64 commented 7 years ago

Hi @Absentia,

Can you create a new ticket for this and post the flag and unflag functions. I remember a few versions ago we disconnected the flagging function and so it would be worth checking if this has been commented out.

If this isn't the issue then I would add some break points and see if the Firebase code is being called properly. With the number of improvements we have made to the chat and how rarely users use the flag functionality it might be that a small bug has got in. If it has I can fix it and push a fix.

Note: Please create a new ticket for this issue so this thread can remain focused on the Apple upload issues.

Simon

CalvinTp commented 7 years ago

Hi @simonsmiley64 , I have taken a look at the flag code before previously on the older version, it has a small bug on the polarity if I am not wrong. So you can take a look to get that fixed.

Thanks, Calvin

RyanElliott94 commented 7 years ago

So finally progress has been made and my app is officially on the AppStore! I literally don't know why it was rejected so many times but still, it's all done now!

Also when i have more time I'll email the blocking code plus other little bits such as a forgot password button and changing the password.

Here's the link to the app: Voice Messenger

I'd like to thank everyone that has helped me this year to get both my apps working and available, it's really appreciated!

Ryan

I just remembered, for some reason notifications aren't working properly but I'll open up another issue.

jimijon commented 7 years ago

congrats! Just downloaded it.

First download,,, no login screen, just a black app screen with nav and toolbar. Kill app... second launch.... just a white screen... hmmm. Kill app... third launch SUCCESS!

Cheers

RyanElliott94 commented 7 years ago

@jimijon Oh that's strange, i haven't had that problem yet, i know it can be a little slow to load first time some times but I've not had that happen. I will obviously look into it! Thanks for letting me know

jimijon commented 7 years ago

Hey.. could be my phone.. .my use case.. who knows... maybe a notification came down. However, the first time I hit "open" from iTunes. If that helps.

Bug? Feature?

I searched for you to add you as a contact. While futzing with trying to record I hit the "BAN" button. It warned me the first time. I said Okay. It warned me a second time (with a typo, "yu" instead of you), I hit Okay. You were on my banned list. BUT! I made a mistake. I didn't want to ban you. OH NO... there was no obvious way to UN-BAN you.

I went back to the contact list. Searched for you again Added you again.

Now I have you in both my Friends List and the Banned List.

What's a user to do now? ;-)

James

RyanElliott94 commented 7 years ago

@jimijon Ah i see, well unblocking people is the same as deleting a contact, you simply click 'Blocked List' then edit then the red circle and there will be an option to unblock.

I probably should check the blocked list before a contacted is added so there's no duplicates!

I am working on an update already so if i can then I'll sort these issues (I still have a huge Android update to do too) so we'll see!

Yeah i noticed the spelling mistake and kept meaning to fix it but always forgot haha

jimijon commented 7 years ago

Ah! Well there you go. I did not notice the "Edit" button in the upper left. I was trying to "left swipe" the row.

RyanElliott94 commented 7 years ago

I did have the swipe option once but because of there being too many options, i figured I'd be better off doing it with a button instead.

simonsmiley64 commented 7 years ago

I am going to close this issue now as it appears to be resolved.

Feel free to open a new issue for extended discussion about the newly released app (congrats 😍 ), if I have time I will download it, check it out and post some comments.

Simon