Discussion Forums  >  Images, Documents, File Locations

Replies: 17    Views: 151

Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
10/29/13 02:35 AM (10 years ago)

How to tell a user there’s a new document to download?

https://www.dropbox.com/s/hn9jpai53aefuxg/push Hi all, Can anyone advise how to set up this kind of push notification to a user to tell them there is a more recent version of a document available to download? Thanks in advance for any help you can provide. Derval
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
10/29/13 06:26 AM (10 years ago)
A couple of options, if you use parse you can make it send json in the push notification so we could make the banner show something has been added and push to that screen. Another option would be to make use of something similar to the refresh data message when you save in the control panel. It could say when app refreshed hey there's some cheeky new stuff added to the pdf menu's. Both requre a little modding to the appdelegate but not too much
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
10/29/13 02:23 PM (10 years ago)
I love the way you make it sound so easy @Kittsy! Can you help me with it? I’d be happy to make a donation to your beer fund ;-)
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
10/30/13 03:13 AM (10 years ago)
I think Kittsy has pretty much cracked this one. He's totally correct. I think that changing the 'Your App has been refreshed' message is going to be the best solution. But this will only work if the only thing you change is the PDF. If you change other properties in the app, then it will show the wrong message. This would be automatic As Kittsy says, you could change it to something like, "A new PDF has been added to this app. Would you like to receive it: YES or NO" Alternatively, just send a push notification when you submit a new PDF, but this will be a manual operation you will have to perform. The advantage with this will be that it will pop up even if the user isn't using the app. But the user may have configured his phone to not receive push notifications from your app. You could do both, but this will be rather irritating for the end user who has both configured. I'm pretty much echoing what Kittsy said, but in a little more detail.
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
10/30/13 03:28 AM (10 years ago)
Thanks @Thomas. That sounds just like what I’m after (the first option). So this needs to be set up in the app delegate file, right? Can you guide me on what needs to be changed? Should I send you or @kittsy the file?
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
10/30/13 05:36 AM (10 years ago)
Hi Dervarlo, had a chrisis at home last night so couldn't respond. Give me a few hours and I'll send you soem info, I'm guessing you would like something with localized information?
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
10/30/13 10:02 AM (10 years ago)
Send it to Kittsy if you're nervous. I'm out of the country right now with no computer other than an iPad! Although it won't be too tricky if you want to learn how to do it. Probably just one line of code.
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
10/30/13 01:58 PM (10 years ago)
Really @Thomas, just one line of code! Now I am curious!! @Kittsy - I hope the crisis on the home front has been sorted out - nothing to do with that horrendous weather you have been having over there I hope. Anyway, no rush on my side and yes, localised would be good. Thanks very much, Derval
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
10/30/13 02:39 PM (10 years ago)
@Derval... We complain about every single thing on this island. We also complain about the Irish and the Italians... but hey, who cares? I believe it should just be one line of code. If I were at my computer, I'd just look at the code and tell you what to put in which location, but I won't have any access to anything like until Monday. From my memory, I think it would be Line 585 of your AppDelegate.m
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
10/30/13 02:40 PM (10 years ago)
Actually, the text is on Line 580. Change the text within the quotes and it should change.
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
10/31/13 01:19 AM (10 years ago)
@Thomas, you’re hilarious! I can’t believe you even memorize the lines in the Appdelegate.m file. Maybe it’s a good thing you have a break from your computer this weekend!! Happy Halloween… or should I say Happy Guy Fawkes Day for next week.. always miffed his plot failed ;-)
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
10/31/13 02:39 AM (10 years ago)
I knew it was around line 585, but didn't know exactly. I had to check exactly, when I found out it was Line 580! I wasn't too far off. Did you get your Apple Tech Talk tickets?
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
10/31/13 02:42 AM (10 years ago)
Afraid not. You?
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
10/31/13 02:05 PM (10 years ago)
Here is line 580. Is this what you were talking about? //build a semi-transparent overlay view (it's huge so it covers all screen sizes, regardless of rotation) self.refreshingView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
10/31/13 03:05 PM (10 years ago)
Apologies for the late reply first time I've got to back in days. For the first option you don't need to make changes to the app delegate you can just change the localised string in the bt config folder line 18 "updatesAvailable" = "This app's content has changed, would you like to refresh?"; change it to something like "updatesAvailable" = "We've just added some new PDF's Check them out"; This will appear every time you make a change in the control panel, but it will keep the user looking around your app for more pdfs lol, use this in conduction with a push and your good to go. If you want something more sophisticated say a push that sends you to a specific pdf that can also be done but a bit more complicated.
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
10/31/13 04:20 PM (10 years ago)
Kittys is probably right. I was looking at an old PDF of mine. It's probably out of date. In the images (step 3) it shows the alert listed on line 580, so that's where I found out. I'll look at the code, because it may be outdated now. https://www.buzztouch.com/files/howtos/AutomaticRefresh.pdf
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
11/07/13 02:21 AM (10 years ago)
Sorry folks, taken so long to come back to you. Don’t want you to think I don’t appreciate your responses :-) Thanks a million
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
11/07/13 02:27 AM (10 years ago)
Just PM’d you both
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.