Giter Site home page Giter Site logo

firebase / friendlypix-ios Goto Github PK

View Code? Open in Web Editor NEW
163.0 60.0 54.0 10.82 MB

Friendly Pix iOS is a sample app demonstrating how to build an iOS app with the Firebase Platform.

Home Page: https://itunes.apple.com/us/app/friendlypix/id1318492920

License: Apache License 2.0

Ruby 0.92% Swift 98.84% Shell 0.23%
firebase photos

friendlypix-ios's Introduction

Friendly Pix iOS

FriendlyPix is a simple app to capture and share your favorite moments. It demonstrates the best practises of building an iOS app on the Firebase Platform. Follow interesting accounts of your choice. Interact with them through the comments. Stay up-to-date with the latest photos posted in the community.

Use FriendlyPix to:

  • Post photos you want to keep on your profile grid.
  • Search profiles for friends and family.
  • Follow accounts to add photos from them in your Home feed.
  • Explore the latest photos from the Trending feed.
  • Interact with community through the comments under each photo.

Initial setup, build tools and dependencies

Friendly Pix iOS is built using Swift and Firebase. The Auth flow is built using Firebase-UI. Dependencies are managed using CocoaPods. Additionally server-side micro-services are built on Cloud Functions for Firebase.

Simply install the pods and open the .xcworkspace file to see the project in Xcode.

$ pod install
$ open your-project.xcworkspace

Create Firebase Project

  1. Create a Firebase project using the Firebase Console.
  2. To add the FriendlyPix app to a Firebase project, use the bundleID com.google.firebase.friendlypix.
  3. Download the generated GoogleService-Info.plist file, and copy it to the root directory of this app.

Google Sign In Setup

  • Go to the Firebase Console and navigate to your project:
    • Select the Auth panel and then click the Sign In Method tab.
    • Click Google and turn on the Enable switch, then click Save.
  • Open your regular Info.plist, navigate to URL types > Item 0 > URL schemes, and replace the value of YOUR_REVERSED_CLIENT_ID with the value of REVERSED_CLIENT_ID from the GoogleService-Info.plist`.
  • Run the app on your device or simulator.
    • Select Sign In and select Google to begin.

Facebook Login Setup

  • Go to the Facebook Developers Site and follow all instructions to set up a new iOS app. When asked for a bundle ID, use com.google.firebase.quickstart.AuthenticationExample.
  • Go to the Firebase Console and navigate to your project:
    • Select the Auth panel and then click the Sign In Method tab.
    • Click Facebook and turn on the Enable switch, then click Save.
    • Enter your Facebook App Id and App Secret and click Save.
  • Open your regular Info.plist and replace the value of the FacebookAppID with the ID of the Facebook app you just created, e.g 124567. Save that file.
  • In the Info tab of your target settings add a URL Type with a URL Scheme of 'fb' + the ID of your Facebook app, e.g. fb1234567.
  • Run the app on your device or simulator.
    • Select Sign In and select Facebook to begin.

Requirements

The mobile FriendlyPix app need the Cloud Functions, the Realtime Database rules and the Cloud Storage rules to be deployed to work properly. You can find instructions at FriendlyPix Web Repository.

Contributing

We'd love that you contribute to the project. Before doing so please read our Contributor guide.

License

© Google, 2011. Licensed under an Apache-2 license.

friendlypix-ios's People

Contributors

dependabot[bot] avatar dpebot avatar morganchen12 avatar ulukaya avatar willlarche avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

friendlypix-ios's Issues

Server-side

Hi,

Where can I find the server-side example?
I mean, the cloud functions necessary for this app work as expected.

I've also checked firebase/friendlypix, firebase/friendlypix-android, firebase/friendlypix-web and firebase/functions-samples for documentation.

Search by name

Hello

How do you search by name with friends?
Firestore isn't able to search by contains a text

I read your code and I think all users come and do filtration locally.
Am I sure? or how to do that else?

Thank you

Home and Feed screens are empty

When running the sample on the simulator, the login via Google account is working but then the Home and Feed screens fail to load any images. The logs:

2017-08-09 15:23:27.575825+0800 FriendlyPix[83333:19626080] [MC] Reading from private effective user settings.
2017-08-09 15:23:49.112 FriendlyPix[83333:19625887] KZPropertyMapper: Ignoring value at index posts as it's not mapped
2017-08-09 15:23:49.113 FriendlyPix[83333:19625887] KZPropertyMapper: Ignoring value at index _search_index as it's not mapped
2017-08-09 15:23:49.113 FriendlyPix[83333:19625887] KZPropertyMapper: Ignoring value at index displayName as it's not mapped
2017-08-09 15:23:49.113 FriendlyPix[83333:19625887] KZPropertyMapper: Ignoring value at index photoUrl as it's not mapped

Looks like the same issue as googlearchive/friendlypix#64

Project in Swift?

Is it possible to have this project ported to Swift? I do think it is super valuable to see how to properly use the Firebase tools, but objective-c is getting outdated. I would love to see this ported to Swift to have a more capable understanding of using the Firebase suite.

Build errors due to incorrect/missing imports

I was unable to get the app to build due to an incorrect import of FirebaseUI and missing imports for FirebaseDatabase and FirebaseStorage. It looks like these references have changed in the latest Firebase SDK. Here's the output from pod install.

$ pod install
Analyzing dependencies
Downloading dependencies
Using Bolts (1.9.0)
Using Cache (4.2.0)
Using Crashlytics (3.10.5)
Using FBSDKCoreKit (4.35.0)
Using FBSDKLoginKit (4.35.0)
Using Fabric (1.7.9)
Using Firebase (5.4.1)
Using FirebaseAnalytics (5.0.1)
Using FirebaseAuth (5.0.2)
Using FirebaseCore (5.0.6)
Using FirebaseDatabase (5.0.2)
Using FirebaseDynamicLinks (3.0.1)
Using FirebaseInstanceID (3.1.1)
Using FirebaseInvites (3.0.0)
Using FirebaseMessaging (3.0.3)
Using FirebasePerformance (2.0.1)
Using FirebaseStorage (3.0.0)
Using FirebaseSwizzlingUtilities (2.0.0)
Using FirebaseUI (5.1.3)
Using GTMOAuth2 (1.1.6)
Using GTMSessionFetcher (1.2.0)
Using GoogleAPIClientForREST (1.3.5)
Using GoogleSignIn (4.1.2)
Using GoogleToolboxForMac (2.1.4)
Using Hue (3.0.1)
Using ImagePicker (3.0.0)
Using Imaginary (3.0.3)
Using Lightbox (2.1.2)
Using MDFInternationalization (1.0.4)
Using MDFTextAccessibility (1.2.0)
Using MaterialComponents (59.0.0)
Using Protobuf (3.6.0)
Using SDWebImage (4.4.2)
Using leveldb-library (1.20)
Using nanopb (0.3.8)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 20 dependencies from the Podfile and 35 total pods installed.

add videos

Hello
Can you show me how can i add videos besides pictures.
Thank you on advance

Add a flag that specifies with which client was a post created

On the web i started adding an attribute to posts that specifies which client wrote the post. Valid values are web, ios and android:

image

Could you add the client: "ios" attribute for each posts created via the iOS app for tracking and debugging purposes?

Frequent NSInternalConsistencyException Crashes

Hello, first of all, just wanted to say that Ibrahim and the rest of the team at Google that worked on FriendlyPix did a wonderful job!

I am forking the FriendlyPix iOS code for a side project and noticed that the app crashes quite often due to an "NSInternalInconsistencyException". It seems that when items in the feed are added or deleted (especially the more users there are concurrently using the feed), this error will crash the app. Here are some examples:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to delete item 2 from section 0 which only contains 1 items before the update'

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of sections. The number of sections contained in the collection view after the update (16) must be equal to the number of sections contained in the collection view before the update (18), plus or minus the number of sections inserted or deleted (1 inserted, 1 deleted).'

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to delete section 4, but there are only 4 sections before the update'

Would you happen to know how this can be fixed? It's a difficult bug to reproduce consistently as it just seems to happen randomly. I have tried implementing some fixes that others have suggested online related to collection view-related crashes, but to no avail. Thanks so much in advance!

it works ??

I've tried it but there's a lot of warning (102), app start with main logo on center but i can do nothing..
No error, no login page..

whats wrong ?

No REVERSED_CLIENT_ID

Hi, I'm following the guide in the readme file and in the google sign up method, it says to replace the REVERSED_CLIENT_ID in info.plist. I can see it in googleservice-info.plist but there is no REVERSED_CLIENT_ID in info.plist. I tried adding it but there's no option for it so I just created it. I tried running the app and it crashes because of this. What to do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.