添加firebase读取配置信息
@ -48,4 +48,5 @@ pod 'FirebaseFirestore'
|
||||
pod 'FacebookCore'
|
||||
pod 'FirebaseRemoteConfig'
|
||||
pod 'KeychainAccess'
|
||||
pod 'SDWebImage'
|
||||
end
|
||||
|
||||
23
SwiftProject/SwiftProject/Assets.xcassets/mine/menuvc/menuvc_feedback.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Group_1597880421.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_1597880421@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_1597880421@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
SwiftProject/SwiftProject/Assets.xcassets/mine/menuvc/menuvc_feedback.imageset/Group_1597880421.png
vendored
Normal file
|
After Width: | Height: | Size: 270 B |
|
After Width: | Height: | Size: 419 B |
|
After Width: | Height: | Size: 674 B |
23
SwiftProject/SwiftProject/Assets.xcassets/mine/menuvc/menuvc_privacy.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Group_1597880413.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_1597880413@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_1597880413@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
SwiftProject/SwiftProject/Assets.xcassets/mine/menuvc/menuvc_privacy.imageset/Group_1597880413.png
vendored
Normal file
|
After Width: | Height: | Size: 420 B |
|
After Width: | Height: | Size: 992 B |
|
After Width: | Height: | Size: 1.8 KiB |
@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Group_1597880409.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_1597880409@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_1597880409@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 379 B |
|
After Width: | Height: | Size: 657 B |
|
After Width: | Height: | Size: 1.4 KiB |
23
SwiftProject/SwiftProject/Assets.xcassets/mine/menuvc/menuvc_terms.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Group_1597880414.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_1597880414@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_1597880414@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
SwiftProject/SwiftProject/Assets.xcassets/mine/menuvc/menuvc_terms.imageset/Group_1597880414.png
vendored
Normal file
|
After Width: | Height: | Size: 255 B |
BIN
SwiftProject/SwiftProject/Assets.xcassets/mine/menuvc/menuvc_terms.imageset/Group_1597880414@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 399 B |
BIN
SwiftProject/SwiftProject/Assets.xcassets/mine/menuvc/menuvc_terms.imageset/Group_1597880414@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 642 B |
@ -135,24 +135,44 @@ class MenuVC: BaseController,UITableViewDelegate,UITableViewDataSource {
|
||||
//数据源第一组(Share VPCamera And Feedback),key值为image、title
|
||||
private func getDatasourceOneSection () -> [[String:Any]] {
|
||||
return [
|
||||
["image":UIImage(named: "")!, "title":NSLocalizedString("v1.5_share vpcamera", comment: "")],
|
||||
["image":UIImage(named: "")!, "title":NSLocalizedString("v1.5_feedback", comment: "")]
|
||||
["image":UIImage(named: "menuvc_sharevpcamera")!, "title":NSLocalizedString("v1.5_share vpcamera", comment: "")],
|
||||
["image":UIImage(named: "menuvc_feedback")!, "title":NSLocalizedString("v1.5_feedback", comment: "")]
|
||||
]
|
||||
}
|
||||
//数据源第二组(Privacy Policy And Terms of Service),key值为image、title
|
||||
private func getDatasourceTwoSection () -> [[String:Any]] {
|
||||
return [
|
||||
["image":UIImage(named: "")!, "title":NSLocalizedString("v1.5_privacy policy", comment: "")],
|
||||
["image":UIImage(named: "")!, "title":NSLocalizedString("v1.5_terms of service", comment: "")]
|
||||
["image":UIImage(named: "menuvc_privacy")!, "title":NSLocalizedString("v1.5_privacy policy", comment: "")],
|
||||
["image":UIImage(named: "menuvc_terms")!, "title":NSLocalizedString("v1.5_terms of service", comment: "")]
|
||||
]
|
||||
}
|
||||
//数据源第三组,网络获取,key值为 image、title、url
|
||||
private func getDatasourceThreeSection () -> [[String:Any]] {
|
||||
let url = URL(string: "XXXXXX")
|
||||
let config = FirebaseRemoteConfig.RemoteConfig.remoteConfig()
|
||||
let menuParams = config.configValue(forKey: "menuParams")
|
||||
guard let dicInfo = menuParams.jsonValue as? [String:Any] else {
|
||||
return [["":""]]
|
||||
}
|
||||
guard let contactConfig = dicInfo["contactConfig"] as? [String:Any] else {
|
||||
return [["":""]]
|
||||
}
|
||||
|
||||
return [
|
||||
["image":UIImage(named: ""), "title":"title", "url":"url"]
|
||||
]
|
||||
|
||||
var localConfig = contactConfig[NSLocalizedString("menu_lang", comment: "")] as? [[String:Any]]
|
||||
if localConfig == nil {
|
||||
localConfig = contactConfig["default"] as? [[String:Any]]
|
||||
}
|
||||
var dataDictionary:[[String:Any]] = []
|
||||
localConfig?.forEach({ item in
|
||||
|
||||
let iconUrl = item["icon"] as! String
|
||||
let title = item["title"] as! String
|
||||
let jumpUrl = item["url"] as! String
|
||||
|
||||
dataDictionary.append(["image":UIImage(named: ""), "title":item["title"] as! String, "url":item["url"] as! String])
|
||||
})
|
||||
|
||||
return dataDictionary
|
||||
}
|
||||
|
||||
//MARK: - TableViewDelegate and DataSource
|
||||
|
||||
@ -122,13 +122,14 @@
|
||||
"v1.5_negative" = "Negative";
|
||||
"v1.5_feedbackdesc" = "Do you like VPCamera?\nPlease rate a Five star or give a feed\n back to us";
|
||||
//V1.5版本,用于功能集合页
|
||||
"v1.5_share vpcamera" = "Share VPCamera"
|
||||
"v1.5_feedback" = "Feedback"
|
||||
"v1.5_privacy policy" = "Privacy Policy"
|
||||
"v1.5_terms of service" = "Terms of Service"
|
||||
"v1.5_contact us" = "Contact us"
|
||||
"v1.5_problem/suggestion placeholder" = "Please let us kno'w your prablems or suggestions. Our service team will deal with it soon."
|
||||
"v1.5_problem/suggestion title" = "Problem/Suggestion description"
|
||||
"v1.5_contact information placeholder" = "Please @xxxx.com"
|
||||
"v1.5_contact information title" = "Contact information"
|
||||
"v1.5_submit" = "Submit"
|
||||
"v1.5_share vpcamera" = "Share VPCamera";
|
||||
"v1.5_feedback" = "Feedback";
|
||||
"v1.5_privacy policy" = "Privacy Policy";
|
||||
"v1.5_terms of service" = "Terms of Service";
|
||||
"v1.5_contact us" = "Contact us";
|
||||
"v1.5_problem/suggestion placeholder" = "Please let us kno'w your prablems or suggestions. Our service team will deal with it soon.";
|
||||
"v1.5_problem/suggestion title" = "Problem/Suggestion description";
|
||||
"v1.5_contact information placeholder" = "Please @xxxx.com";
|
||||
"v1.5_contact information title" = "Contact information";
|
||||
"v1.5_submit" = "Submit";
|
||||
"menu_lang" = "en";
|
||||
|
||||
@ -118,13 +118,14 @@
|
||||
"右侧亮度循环按键" ="右侧亮度循环按键\n长按 3s 切换 HSBS\n长按 7s 切换 FSBS";
|
||||
|
||||
//V1.5版本,用于功能集合页
|
||||
"v1.5_share vpcamera" = "分享 VPCamera"
|
||||
"v1.5_feedback" = "反馈意见"
|
||||
"v1.5_privacy policy" = "隐私政策"
|
||||
"v1.5_terms of service" = "服务条款"
|
||||
"v1.5_contact us" = "联系我们"
|
||||
"v1.5_problem/suggestion title" = "问题/建议描述"
|
||||
"v1.5_problem/suggestion placeholder" = "请告知我们您的问题或建议。我们的服务团队将尽快处理。"
|
||||
"v1.5_contact information title" = "联系信息"
|
||||
"v1.5_contact information placeholder" = "请输入 @xxxx.com"
|
||||
"v1.5_submit" = "提交"
|
||||
"v1.5_share vpcamera" = "分享 VPCamera";
|
||||
"v1.5_feedback" = "反馈意见";
|
||||
"v1.5_privacy policy" = "隐私政策";
|
||||
"v1.5_terms of service" = "服务条款";
|
||||
"v1.5_contact us" = "联系我们";
|
||||
"v1.5_problem/suggestion title" = "问题/建议描述";
|
||||
"v1.5_problem/suggestion placeholder" = "请告知我们您的问题或建议。我们的服务团队将尽快处理。";
|
||||
"v1.5_contact information title" = "联系信息";
|
||||
"v1.5_contact information placeholder" = "请输入 @xxxx.com";
|
||||
"v1.5_submit" = "提交";
|
||||
"menu_lang" = "zh";
|
||||
|
||||