Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Social Integration #40

Closed
wants to merge 40 commits into from
Closed

Social Integration #40

wants to merge 40 commits into from

Conversation

Dwar3xwar
Copy link

Fixed branch to develop.

// SocialMediaController.swift
// malaria-ios
//
// Created by Eric Huang on 1/10/16.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this information from your classes

@bphenriques
Copy link
Member

I am not being able to compile the code after pod install and clean. Any idea ?

Moreover, the test file should be on malaria-iOSTests Folder (and project folder). It is on malaria-ios/SocialShareAbleTest.swift.

screen shot 2016-03-11 at 00 51 40

@bphenriques
Copy link
Member

Moreover, sync with master :)

@Dwar3xwar
Copy link
Author

The runtime error is from not being able to import XCTest. I created that file from an old repo so I think that is causing the error. Remaking the file should fix it though.

SocialShareAbleTest was unable to import XCTest because it was made from a different repository. Remaking the file fixes this issue. SocialShareAbleTest was also renamed to TestSocialShareAble to be more aligned with the other unit tests in the project.
@bphenriques
Copy link
Member

This one first good first step for social integration. @Dwar3xwar , can you add touch events to the Stat buttons to trigger share? It seems that you have everything except that. This is what you intended, correct? Regarding the rest 👍

@Dwar3xwar
Copy link
Author

Yup that was my intention but I just wasn't sure how to approach the user experience. The stat buttons make a lot of sense though haha

Stat labels now have touch events. They will present an alert controller to ask a user to pick the social media
they want to share on.
The goal is to make the share method use SocialShareable more intutive. It will now show messages from the
message variable of the SocialShareable object.
@bphenriques
Copy link
Member

Hey there @Dwar3xwar ,

I only saw the updates now! :(

Well, the app crashes on iPad but I have a fix for that:
https://github.com/systers/malaria-app-ios/blob/develop/malaria-ios/ViewControllers/PillStats/MonthyViewController.swift#L189

Regarding the rest everything looks great.

@bphenriques
Copy link
Member

Just for the sake of completness:

[INFO] - CachedStatistics::retrieveDailyStats::75   retrieveingDailyStats
2016-03-18 10:43:36.861 malaria-ios[13249:737951] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController (<UIAlertController: 0x7d9e8e00>) of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem.  If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.'
*** First throw call stack:
(
    0   CoreFoundation                      0x02b1da14 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x04919e02 objc_exception_throw + 50
    2   UIKit                               0x03f07088 -[UIPopoverPresentationController presentationTransitionWillBegin] + 3956
    3   UIKit                               0x035b5e9f __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 2326
    4   UIKit                               0x035b36b0 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 333
    5   UIKit                               0x035f6577 __40+[UIViewController _scheduleTransition:]_block_invoke + 18
    6   UIKit                               0x0342730f _runAfterCACommitDeferredBlocks + 337
    7   UIKit                               0x0343ce19 _cleanUpAfterCAFlushAndRunDeferredBlocks + 103
    8   UIKit                               0x0344ad9b _afterCACommitHandler + 102
    9   CoreFoundation                      0x02a36ffe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
    10  CoreFoundation                      0x02a36f5e __CFRunLoopDoObservers + 398
    11  CoreFoundation                      0x02a2c8dc __CFRunLoopRun + 1340
    12  CoreFoundation                      0x02a2c0e6 CFRunLoopRunSpecific + 470
    13  CoreFoundation                      0x02a2befb CFRunLoopRunInMode + 123
    14  GraphicsServices                    0x069e7664 GSEventRunModal + 192
    15  GraphicsServices                    0x069e74a1 GSEventRun + 104
    16  UIKit                               0x03419bfa UIApplicationMain + 160
    17  malaria-ios                         0x00041c4c main + 140
    18  libdyld.dylib                       0x053bca21 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

The fix for that issue is the above comment

@Dwar3xwar
Copy link
Author

@bphenriques No problem at all. We all have busy schedules :)

I didn't think of testing on the iPad, but good catch!

Seems like there is a conflict with the merge. As this is my first time doing a pull request, I'm not sure how to see what the conflicts are.

@bphenriques
Copy link
Member

You probably have to sync your branch :)

http://stackoverflow.com/questions/7244321/how-to-update-a-github-forked-repository

mahmoudashraf93 and others added 27 commits March 19, 2016 22:41
SocialShareAbleTest was unable to import XCTest because it was made from a different repository. Remaking the file fixes this issue. SocialShareAbleTest was also renamed to TestSocialShareAble to be more aligned with the other unit tests in the project.
Stat labels now have touch events. They will present an alert controller to ask a user to pick the social media
they want to share on.
The goal is to make the share method use SocialShareable more intutive. It will now show messages from the
message variable of the SocialShareable object.
@bphenriques
Copy link
Member

I am not sure about what you did but recheck your sync with our systers branch (https://github.com/systers/malaria-app-ios/commits/develop) so that we are able to merge the pull request,. Afterwards, resubmit the pull request again. It would be great accepting this pull request. Don't give up!

My suggestion:

  • Revert your changes in the "develop" branch
  • Create a new branch called "social-features"
  • Do your work on that branch
  • Submit your pull request

@Dwar3xwar Dwar3xwar mentioned this pull request Mar 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants