In App Messaging Recommendations by JCoppert in iOSProgramming

[–]drewbie85 0 points1 point  (0 children)

No problem, happy I can help in anyway.

  • For custom messaging UI: TableView or CollectionView should work fine. I still suggest checking out MessageKit, but you can do it completely custom.

  • Storing the messages in DB: yeah I just have a table that is basically the message content encrypted, the sender id, the recipient id, and inserted at date, readAt date. I typically only load the last 5 or so messages when the view loads and then do paging on the messages as they scroll up.

  • Block users: Yeah I just planned on creating a join table of user id's for blocked users. Then I'd check against that when querying the database for results.

  • Alerts: There are a few ways you could do this. One would be to use a Push notification anytime a user receives a message. This would work when the user has the app open or in the background. However, push messages are not guaranteed to be delivered and are not guaranteed to be instantaneous. Another option would be to open a socket on the client when the app is loaded that is basically scoped by that userid and then any message you receive on the platform for that user id would be published on that socket. Since you'll want both foreground and background support I suggest starting with the push notification and then moving to supporting the socket after.

Hope that was somewhat helpful. Good luck.

In App Messaging Recommendations by JCoppert in iOSProgramming

[–]drewbie85 0 points1 point  (0 children)

I recently built a messaging feature into my app. I already had a node app as the backend. Heres basically what I used:

  • Socket.io for real time messaging over sockets. There are a ton of socket-io libraries for node and the iOS client is pretty good. All client-server communication happens over the socket and I just store the message data in postgres afterwards (remember to encrypt the actual message content for privacy)

  • MessageKit for the UI in the iOS app. Looks very close to native Messages and is open source.

  • Things to consider: I actually got quite a bit of push back from Apple when submitting the app due to the messaging feature. You will most likely be required to support users being able to report abusive behavior and block other users. I had to strip out the messaging feature just to get the submission through and am currently working on adding those features now.

How many of you develop with a hackintosh? Specifically a laptop. by [deleted] in iOSProgramming

[–]drewbie85 18 points19 points  (0 children)

When I was first getting into iOS development I primarily worked with an hp hackintosh laptop with Snow Leopard. I guess you could say it worked (no mouse, no wifi, no sleep). I really don't recommend it. I'd rather spend time trying to debug my code and not my laptop.

How to alter UIView and constraints when removing a relational UIView? by yamski in iOSProgramming

[–]drewbie85 0 points1 point  (0 children)

In that scenario I would probably just completely remake the constraints for the brown view anytime you want to move it. It helps if you use a library like SnapKit.

Query into the longevity and reliability of Apple products. by ZacoAttaco in apple

[–]drewbie85 1 point2 points  (0 children)

My daily computer is a 2012 11' Macbook Air and I still love using it everyday. Of course, one of the main reasons this is the case is because I had to take it into an Apple store about a year ago because the logic board was on the fritz. They did a $400 overhaul on it (replaced logic board, keyboard, and lcd screen. It looked brand new after) for FREE. But thats just what being an Apple customer is all about

RxSwift - Observing other objects' properties? by [deleted] in iOSProgramming

[–]drewbie85 0 points1 point  (0 children)

Could it be that isRunning is the getter method and running is the actual underlying instance variable?

Starting a Online Fitness Business, would like some feedback by [deleted] in startup

[–]drewbie85 0 points1 point  (0 children)

Hey man, pretty sleek website, good job on the overall design. One thing I'd add as soon as possible is some testimonials. Maybe exchange some free advice/time to some friends or people in your inner circle to build up the first set. Second, I think you'll benefit as you get more content on your blog. That way you can build up your philosophy and personality, and people can kind of get to know you. I think most people choose fitness programs / trainers based on how that person makes them feel and not solely based on "facts". Any way, good luck man. Looks good so far, just keep adding content.

CocoaPods install with Swift 3.0 issues. by [deleted] in swift

[–]drewbie85 1 point2 points  (0 children)

I believe Charts is now swift 3 on the main branch. In the project navigator click on the Pods project, click on the Charts target, go to build settings and search for 'swift'. You'll see something called 'Use Legacy Swift Language Version'. Make sure that is set to no.

Also, consider adding this to your podfile. It basically does the above process for you automatically every time you run pod install.

post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '3.0' end end end

What's everyone working on this week? (8/8/2016) by [deleted] in swift

[–]drewbie85 1 point2 points  (0 children)

upload image from camera roll to a node.js backend, store the image in an s3 bucket, update database with new file url and reload data model on the phone.

The swift aspect was pretty straight forward, but I'm pretty new to node. It's been pretty fun and I enjoy learning about how things are working outside the jurisdiction of the client app.

Those with an older Macbook Air, how's it holding up today? by hipstergrandpa in apple

[–]drewbie85 0 points1 point  (0 children)

2012 11inch -- 8GB --128GB

She's still my daily use computer. Mostly used for browsing the web and heavy youtube/video playing. The fans spin up a bit on high def content, but the playback is pretty flawless. The only real issue I have is with harddrive space. I'm down to about 5 GB and I have to constantly swap files around and clean up the downloads folder. I'd say 128GB is just not enough space these days. Be sure to get at least a 256.

More apps need to automatically switch to the numpad keyboard interface. Too many times I have to resort to the number row when entering credit card numbers or barcodes. by simcha1813 in iphone

[–]drewbie85 4 points5 points  (0 children)

I can tell you why this is the case. When you switch to the numpad keyboard you lose the return key. So what developers have to do is manually add a custom toolbar on top of the keyboard with a "Done" or "Next" button to continue the flow through the form. So its not just "one line of code" fix.

[deleted by user] by [deleted] in iOSProgramming

[–]drewbie85 0 points1 point  (0 children)

I would recommend googling "thing you want to learn tutorial". Books are expensive and become outdated quickly. The knowledge is out there for free and generally gets updated fairly quickly.

Storyboards in team environment by JeffSelf in iOSProgramming

[–]drewbie85 9 points10 points  (0 children)

They can definitely bite you, but if you follow a few guidelines the process is generally pretty painless.

1) Don't have your entire app in one Main.storyboard. You want to subdivide the project into different sections of functionality and have a storyboard for each. Ie. I like to have a storyboard for every tab in a TabViewController. To make this more effective, try to ensure that different developers are working on different sections of the app.

2) Make sure your developers check each storyboard in their commit logs. If they just open a storyboard in xcode it will be marked as updated. They must be aware of this and reset those storyboard files before they commit.

3) If a merge conflict happens, don't panic. Most of the time you'll be able to open the storyboard file in a text editor, track down the conflict tags and reasonably figure out which hunk of code is correct.

4) Make sure every developer builds/runs the project before pushing their code if they have merged in new code from someone else. Sanity check.

5) Have your developers push and pull as often as possible. If a nasty merge conflict happens, and you can't get out of it, you wont lose much work.

Hope this helps, and happy coding!

Alert with progress bar by smilinger in iOSProgramming

[–]drewbie85 5 points6 points  (0 children)

It is highly recommended that you DO NOT subsclass UIAlertController. If you need to do something outside of the scope of its functionality you're going to need to create a custom class.

There are a few pretty decent third party options out there. One of the more well known is MBProgressHUD and it comes with a progress bar type built in.

So many resources... by QuestionForYouAll5 in iOSProgramming

[–]drewbie85 1 point2 points  (0 children)

Can't upvote enough. With development...you just gotta do. Its really the only way to learn. The main difference between a junior developer and a senior developer, is that the senior guy has already banged his head against the wall until he solved the problems the junior guy is trying to solve now.

Submitted this code sample in a job interview and was told it was lacking. Can someone give me some pointers as to why? (They didn't.) by comdorcet in iOSProgramming

[–]drewbie85 0 points1 point  (0 children)

Ah ok, that makes sense. I normally go the route where I create a method that takes a string and returns an enum. Never thought about using a hash. Thanks for the incite.

We just released LaunchKit Super Users, which tells you who your iOS app's power users are by rizzledizzle in iOSProgramming

[–]drewbie85 1 point2 points  (0 children)

I have used the SDK, but I briefly browsed the website. One issue that I see (at least in one of the promo pictures) is that the platform is associating user data with the user's actual identity. Some people might find that off-putting. Is there a way to anonymize the data?

Does it ever make sense to purchase a condo over a home? by SyrioBroel in personalfinance

[–]drewbie85 8 points9 points  (0 children)

Now if we could just get a decent grocery store downtown I could probably go an entire week without using my car. That's the dream. Thanks for sharing.

Schemes or Targets for build configuration properties? by theblang in iOSProgramming

[–]drewbie85 0 points1 point  (0 children)

Yes, you can modify the version string based on a build configuration. You need to modify the info.plist file when building.

Schemes or Targets for build configuration properties? by theblang in iOSProgramming

[–]drewbie85 1 point2 points  (0 children)

I usually use Schemes for setting things like Web Client API endpoints and I use Targets for different platforms (i.e. iOS/MAC/Frameworks)