Skip to content

Commit

Permalink
170830 - Firebase 저장소 바꿈 #207
Browse files Browse the repository at this point in the history
  • Loading branch information
JuneBuug committed Aug 30, 2017
1 parent 58083b1 commit 2df0cf6
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 21 deletions.
16 changes: 8 additions & 8 deletions iOSProject/pyunrihae/pyunrihae.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@
981E932A1F38666E004BE63B /* RankingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981E93291F38666E004BE63B /* RankingViewController.swift */; };
981E932C1F386677004BE63B /* ReviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981E932B1F386677004BE63B /* ReviewViewController.swift */; };
981E932E1F386681004BE63B /* MypageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981E932D1F386681004BE63B /* MypageViewController.swift */; };
984395861F32F29A0016B67D /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 984395851F32F29A0016B67D /* GoogleService-Info.plist */; };
9860609F1F4BE0C30014E4D5 /* MainReviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9860609E1F4BE0C30014E4D5 /* MainReviewView.swift */; };
9865E4F61F387C7A00014795 /* TabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9865E4F51F387C7A00014795 /* TabBarViewController.swift */; };
9865E5081F3943BD00014795 /* Button.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9865E5071F3943BD00014795 /* Button.swift */; };
9865E5181F39C2A000014795 /* stars.png in Resources */ = {isa = PBXBuildFile; fileRef = 9865E5171F39C2A000014795 /* stars.png */; };
9865E5241F3AE04C00014795 /* Label.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9865E5231F3AE04C00014795 /* Label.swift */; };
9865E52C1F3AF3EE00014795 /* MypageTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9865E52B1F3AF3EE00014795 /* MypageTableViewCell.swift */; };
9865E5301F3AFA0300014795 /* ProductDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9865E52F1F3AFA0300014795 /* ProductDetailViewController.swift */; };
Expand All @@ -42,6 +40,8 @@
986A88911F55666600FFAED1 /* star35.png in Resources */ = {isa = PBXBuildFile; fileRef = 986A888B1F55666600FFAED1 /* star35.png */; };
986A88921F55666600FFAED1 /* star45.png in Resources */ = {isa = PBXBuildFile; fileRef = 986A888C1F55666600FFAED1 /* star45.png */; };
98768AA01F39A5D600654C19 /* DataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98C5AAD71F342C3900610115 /* DataManager.swift */; };
9876AD171F56396D006BB3CD /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9876AD161F56396D006BB3CD /* GoogleService-Info.plist */; };
9876AD191F563CC2006BB3CD /* review_default.png in Resources */ = {isa = PBXBuildFile; fileRef = 9876AD181F563CC2006BB3CD /* review_default.png */; };
989FA79A1F511E40001D1E42 /* ReviewPopupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 989FA7991F511E40001D1E42 /* ReviewPopupView.swift */; };
989FA79C1F511E59001D1E42 /* ReviewPopupView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 989FA79B1F511E59001D1E42 /* ReviewPopupView.xib */; };
989FA7A01F52BEC8001D1E42 /* Popup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 989FA79F1F52BEC8001D1E42 /* Popup.swift */; };
Expand Down Expand Up @@ -173,11 +173,9 @@
981E93291F38666E004BE63B /* RankingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RankingViewController.swift; sourceTree = "<group>"; };
981E932B1F386677004BE63B /* ReviewViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReviewViewController.swift; sourceTree = "<group>"; };
981E932D1F386681004BE63B /* MypageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MypageViewController.swift; sourceTree = "<group>"; };
984395851F32F29A0016B67D /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
9860609E1F4BE0C30014E4D5 /* MainReviewView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainReviewView.swift; sourceTree = "<group>"; };
9865E4F51F387C7A00014795 /* TabBarViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarViewController.swift; sourceTree = "<group>"; };
9865E5071F3943BD00014795 /* Button.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Button.swift; sourceTree = "<group>"; };
9865E5171F39C2A000014795 /* stars.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = stars.png; sourceTree = "<group>"; };
9865E5231F3AE04C00014795 /* Label.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Label.swift; sourceTree = "<group>"; };
9865E52B1F3AF3EE00014795 /* MypageTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MypageTableViewCell.swift; sourceTree = "<group>"; };
9865E52F1F3AFA0300014795 /* ProductDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProductDetailViewController.swift; sourceTree = "<group>"; };
Expand All @@ -197,6 +195,8 @@
986A888A1F55666600FFAED1 /* star25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = star25.png; sourceTree = "<group>"; };
986A888B1F55666600FFAED1 /* star35.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = star35.png; sourceTree = "<group>"; };
986A888C1F55666600FFAED1 /* star45.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = star45.png; sourceTree = "<group>"; };
9876AD161F56396D006BB3CD /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
9876AD181F563CC2006BB3CD /* review_default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = review_default.png; sourceTree = "<group>"; };
989FA7991F511E40001D1E42 /* ReviewPopupView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReviewPopupView.swift; sourceTree = "<group>"; };
989FA79B1F511E59001D1E42 /* ReviewPopupView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ReviewPopupView.xib; sourceTree = "<group>"; };
989FA79F1F52BEC8001D1E42 /* Popup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Popup.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -415,13 +415,13 @@
986A888C1F55666600FFAED1 /* star45.png */,
98F865941F4407A700C2F333 /* ic_review_selected.png */,
98F865951F4407A700C2F333 /* ic_review.png */,
9876AD181F563CC2006BB3CD /* review_default.png */,
989FA7A71F53EA9A001D1E42 /* empty_star.png */,
98F865801F43FB1A00C2F333 /* star4.png */,
9876AD161F56396D006BB3CD /* GoogleService-Info.plist */,
98F865811F43FB1A00C2F333 /* star3.png */,
98F865821F43FB1A00C2F333 /* star5.png */,
9865E5171F39C2A000014795 /* stars.png */,
98F172F51F32EDB70044FD0D /* Info.plist */,
984395851F32F29A0016B67D /* GoogleService-Info.plist */,
);
name = Asset;
sourceTree = "<group>";
Expand Down Expand Up @@ -716,7 +716,6 @@
98CBA0C21F467E7D003D0370 /* ic_add.png in Resources */,
986A888E1F55666600FFAED1 /* star05.png in Resources */,
98D5691E1F4BE6DA002693E9 /* bad.png in Resources */,
9865E5181F39C2A000014795 /* stars.png in Resources */,
98F8658B1F44021000C2F333 /* logo_cu.png in Resources */,
98F865991F4407A700C2F333 /* ic_my.png in Resources */,
98D8390A1F452E6200CDF699 /* ic_pyunrihae.png in Resources */,
Expand All @@ -740,6 +739,7 @@
98F865A31F442A3000C2F333 /* bg_login.png in Resources */,
98F865861F43FB1A00C2F333 /* star3.png in Resources */,
98CBA0B61F458AFC003D0370 /* ic_user.png in Resources */,
9876AD171F56396D006BB3CD /* GoogleService-Info.plist in Resources */,
98F865B11F44340E00C2F333 /* ic_complete.png in Resources */,
989FA7A81F53EA9A001D1E42 /* empty_star.png in Resources */,
98CBA0D21F46AF3B003D0370 /* ic_nickname.png in Resources */,
Expand All @@ -752,14 +752,14 @@
98D9F2E41F418DF3009D0E10 /* YNSearch.xcassets in Resources */,
98B288601F53EF43007673FF /* ic_default_product.png in Resources */,
986A888D1F55666600FFAED1 /* star0.png in Resources */,
984395861F32F29A0016B67D /* GoogleService-Info.plist in Resources */,
986A888F1F55666600FFAED1 /* star15.png in Resources */,
98F865AB1F442F8B00C2F333 /* ic_password.png in Resources */,
98F865A71F442EE100C2F333 /* ic_close.png in Resources */,
98D569201F4BE6EC002693E9 /* useful.png in Resources */,
0E9724ED1F52905100AAAD91 /* ic_emailsignup.png in Resources */,
986A88911F55666600FFAED1 /* star35.png in Resources */,
98CBA0B81F458BA8003D0370 /* back_right.png in Resources */,
9876AD191F563CC2006BB3CD /* review_default.png in Resources */,
98F8659B1F4407A700C2F333 /* ic_ranking.png in Resources */,
98F865981F4407A700C2F333 /* ic_my_selected.png in Resources */,
98CBA0D61F4AE17B003D0370 /* ic_common.png in Resources */,
Expand Down
4 changes: 2 additions & 2 deletions iOSProject/pyunrihae/pyunrihae/DataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ class DataManager{
var components = autoId.components(separatedBy: "review/")
autoId = components[1]
// Create a storage reference from our storage service
let storageRef = storage.reference(forURL: "gs://pyeonrehae.appspot.com")
let storageRef = storage.reference(forURL: "gs://prh-woowa.appspot.com")
let imagesRef = storageRef.child("images/" + autoId + ".jpeg")
var update = ["bad": 0, "useful": 0, "user": user, "user_image": user_image, "brand": brand, "category": category, "comment": review, "grade": grade, "price": priceLevel, "flavor": flavorLevel, "quantity": quantityLevel, "product_image": product_image,"p_id": p_id, "p_name": p_name, "p_price": p_price, "timestamp": today, "id": autoId] as [String : Any]
if let data = UIImageJPEGRepresentation(p_image, 0.1) {
Expand Down Expand Up @@ -560,7 +560,7 @@ class DataManager{

let storage = Storage.storage()

let storageRef = storage.reference(forURL: "gs://pyeonrehae.appspot.com")
let storageRef = storage.reference(forURL: "gs://prh-woowa.appspot.com")
let imagesRef = storageRef.child("images/" + user.id + ".jpeg")

if let data = UIImageJPEGRepresentation(profile, 0.1) {
Expand Down
16 changes: 8 additions & 8 deletions iOSProject/pyunrihae/pyunrihae/GoogleService-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
<string>ca-app-pub-3940256099942544/4411468910</string>
<key>CLIENT_ID</key>
<string>296270517036-ha63c7pv4n84hiq7bf2ja0a7mlrouq6s.apps.googleusercontent.com</string>
<string>947458280146-lnapphs8qd03rhts9j06nha0spqnklil.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.296270517036-ha63c7pv4n84hiq7bf2ja0a7mlrouq6s</string>
<string>com.googleusercontent.apps.947458280146-lnapphs8qd03rhts9j06nha0spqnklil</string>
<key>API_KEY</key>
<string>AIzaSyA8edZGLResgnFsVn-1YNv0w-CFrnJul8A</string>
<string>AIzaSyC5mElh2rdkjIdmcjNvrhJ5bGz2CNv4DDE</string>
<key>GCM_SENDER_ID</key>
<string>296270517036</string>
<string>947458280146</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.busride.pyunrihae</string>
<key>PROJECT_ID</key>
<string>pyeonrehae</string>
<string>prh-woowa</string>
<key>STORAGE_BUCKET</key>
<string>pyeonrehae.appspot.com</string>
<string>prh-woowa.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<true/>
<key>IS_ANALYTICS_ENABLED</key>
Expand All @@ -33,8 +33,8 @@
<key>IS_SIGNIN_ENABLED</key>
<true/>
<key>GOOGLE_APP_ID</key>
<string>1:296270517036:ios:ec29ce6a1599d2ab</string>
<string>1:947458280146:ios:ec29ce6a1599d2ab</string>
<key>DATABASE_URL</key>
<string>https://pyeonrehae.firebaseio.com</string>
<string>https://prh-woowa.firebaseio.com</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion iOSProject/pyunrihae/pyunrihae/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.296270517036-ha63c7pv4n84hiq7bf2ja0a7mlrouq6s</string>
<string>com.googleusercontent.apps.947458280146-lnapphs8qd03rhts9j06nha0spqnklil</string>
</array>
</dict>
</array>
Expand Down
5 changes: 4 additions & 1 deletion iOSProject/pyunrihae/pyunrihae/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class MainViewController: UIViewController {
if url != nil {
myImageView?.af_setImage(withURL: url!)
}else{
myImageView?.af_setImage(withURL: URL(string: "https://firebasestorage.googleapis.com/v0/b/pyeonrehae.appspot.com/o/ic_background_default.png?alt=media&token=09d05950-5f8a-4a73-95b3-a74faee4cad3")!)
myImageView?.image = UIImage(named: "review_default.png")
}
myImageView?.contentMode = UIViewContentMode.scaleAspectFill
brandLabel?.text = review.brand
Expand Down Expand Up @@ -326,6 +326,9 @@ class MainViewController: UIViewController {
if reviewScrollView.contentOffset.x != 0{
index = 2 - Int(reviewScrollView.frame.width / reviewScrollView.contentOffset.x)
}
if index >= reviewList.count {
return
}
review = reviewList[index]
Popup.showPopup(popup: popup, index: index, reviewList: reviewList, review: review, view: self.view, validator: popup.validator)
// 카카오톡 공유 버튼 누르기
Expand Down
2 changes: 1 addition & 1 deletion iOSProject/pyunrihae/pyunrihae/Popup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Popup{
if URL(string: review.p_image) != nil{
popup.uploadedImage.af_setImage(withURL: URL(string: review.p_image)!)
} else {
popup.uploadedImage.af_setImage(withURL: URL(string: "https://firebasestorage.googleapis.com/v0/b/pyeonrehae.appspot.com/o/ic_background_default.png?alt=media&token=09d05950-5f8a-4a73-95b3-a74faee4cad3")!)
popup.uploadedImage.image = UIImage(named: "review_default.png")
}
popup.brand.contentMode = .scaleAspectFit
if review.brand == "CU" {
Expand Down
2 changes: 2 additions & 0 deletions iOSProject/pyunrihae/pyunrihae/ProductInfoTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class ProductInfoTableViewCell: UITableViewCell {
self.foodImage.contentMode = .scaleAspectFit
self.foodImage.backgroundColor = UIColor.white
self.foodImage.clipsToBounds = true


self.foodImage.af_setImage(withURL: URL(string: product.image)!, placeholderImage: UIImage(), completion:{ image in
self.foodImageBtn.setBackgroundImage(self.foodImage.image, for: .normal)
self.loading.stopAnimating()
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed iOSProject/pyunrihae/pyunrihae/stars.png
Binary file not shown.

0 comments on commit 2df0cf6

Please sign in to comment.