loganwright / SimpleChat

An Easy To Use Bubble Chat Interface
Mozilla Public License 2.0
262 stars 53 forks source link

LGChatMessage.swift errors on XCode 6.3 #24

Closed omarps closed 9 years ago

omarps commented 9 years ago

Hi everybody, firts congrats for an awesome chat component. You know, with a new XCode release, new challenges arrived. Init errors, convertion errors, some methods that couldn't find, etc. Any of you had these problems?

omarps commented 9 years ago

After a moment of panic, I began to review the code, with some minor tweaks could fix the code to make it work with Swift 1.2. I'm going to make a branch with these fixes for review and after that do a merge with master.

loganwright commented 9 years ago

Hi @omarps

Thanks for doing that. I figured that there would be some incompatibility issues w Swift 1.2, but I'm traveling at the moment and haven't been able to do the upgrade. There should be some sort of conversion tool in Xcode to upgrade to 1.2 (according to the release notes). If that works, submit a PR and I'll merge it in!

ghost commented 9 years ago

Hi @omarps, can you help me to solve the same your problem? I have made a "Conversion to The latest swift syntax" but i have problem. Any idea?

omarps commented 9 years ago

Conversion... feature only solve the Optional issues, but there is a problem with init constructor with no arguments. I couldn't add it, so I just call the constructors with frame and textContainer args.

// before swift 1.2
private let textView = LGStretchyTextView()
// after swift 1.2
private let textView = LGStretchyTextView(frame: CGRectZero, textContainer: nil)

Better approaches are welcome!

There is also a replace of the countElements function. Use count instead.

ghost commented 9 years ago

Yes, ok, I have many experience with obj-c but my problem is that I don't write swift code yet.

omarps commented 9 years ago

I am trying to commit my branch, but it seems that I have an authentication problem: Authentication Failed You may not have permission to access SimpleChat. Check Preferences to make sure you’re still logged in.

loganwright commented 9 years ago

Hi @omarps

You're not authorized to push to this repo, so that makes sense 😄

In general, I try to avoid pushing to master because pull requests provide an opportunity to code review before merging it in. Would you mind submitting a pull request?

I know it's a bit more work on your part, but it makes for a much safer integration to master :)

I can help if you're unfamiliar with the process. The basic steps are:

  1. Fork the repo
  2. Make your changes on your repo.
  3. Push up those changes
  4. Go back to GitHub and click on the little PR button screen shot 2015-04-10 at 12 58 31 pm
  5. Select this repo and submit the PR.

Then, I'll review the code and merge it in!

Best,

Logan

omarps commented 9 years ago

It's ok, I made the changes in my fork, and sent the pull request.