前提・実現したいこと
ニュースアプリを制作しています。一応完成し、Appstoreに審査を出したのですが、個人がcovid-19に関する情報を提供することはできないと言われました。
そのため、コロナに関する記事を今のヘッドライン上から載せないようにしなければなりません。
どなたかご教授ください。
発生している問題・エラーメッセージ
エラーメッセージ
該当のソースコード
import
1import SwiftyJSON 2import SDWebImageSwiftUI 3import WebKit 4 5struct ContentView: View { 6 7 @ObservedObject var list = getData() 8 9 var body: some View { 10 11 12 13 NavigationView{ 14 15 List(list.datas){i in 16 17 ZStack{ 18 19 NavigationLink(destination: 20 21 webView(url: i.url) 22 ) {EmptyView() 23 24 }.opacity(0) 25 26 27 28 HStack(spacing: 0){ 29 30 31 32 ZStack{ 33 34 Text(i.title) 35 .fontWeight(.black) 36 .foregroundColor(.black) 37 .background(Color.white) 38 39 40 41 //写真 42 if i.image != ""{ 43 WebImage(url: URL(string: i.image)!, options: .highPriority, 44 context: nil) 45 .resizable() 46 .frame(maxWidth: .infinity, maxHeight: .infinity) 47 .scaledToFill() 48 .cornerRadius(15) 49 .edgesIgnoringSafeArea(.all) 50 .shadow(radius: 20) 51 52 53 54 55 56 VStack(alignment: .center){ 57 58 Text(i.title) 59 .fontWeight(.heavy) 60 .foregroundColor(.black) 61 .background(Color.white.opacity(0.5)) 62 63 64 65 } 66 67 } 68 } 69 }.padding(5) 70 } 71 }.navigationBarHidden(true) 72 73 } 74 } 75} 76 77struct ContentView_Previews: PreviewProvider { 78 static var previews: some View { 79 ContentView() 80 } 81} 82 83struct dataType : Identifiable { 84 85 var id : String 86 var title : String 87 var desc : String 88 var url : String 89 var image : String 90 91} 92 93class getData : ObservableObject{ 94 95 @Published var datas = [dataType]() 96 97 init() { 98 99 let source = "https://newsapi.org/v2/top-headlines?articles&country=jp&pageSize=100&apiKey=" 100 101 let url = URL(string: source)! 102 103 let session = URLSession(configuration: .default) 104 105 session.dataTask(with: url) { (data, _, err) in 106 107 if err != nil{ 108 print((err?.localizedDescription)!) 109 return 110 } 111 112 let json = try! JSON(data: data!) 113 114 for i in json["articles"]{ 115 116 let title = i.1["title"].stringValue 117 let description = i.1["description"].stringValue 118 let url = i.1["url"].stringValue 119 let image = i.1["urlToImage"].stringValue 120 let id = i.1["publishedAt"].stringValue 121 DispatchQueue.main.async { 122 123 self.datas.append(dataType(id: id, title: title, desc: description, url:url, image: image )) 124 125 } 126 } 127 128 129 }.resume() 130 131 } 132 133} 134 struct webView : UIViewRepresentable { 135 136 var url: String 137 138 func makeUIView(context: UIViewRepresentableContext<webView>)->WKWebView{ 139 140 let view = WKWebView() 141 view.load(URLRequest(url: URL(string: url)!)) 142 return view 143 } 144 145 func updateUIView(_ uiView: WKWebView, context: 146 UIViewRepresentableContext<webView>) { 147 148 } 149} 150 151struct RefreshControl: View { 152 153 @State private var isRefreshing = false 154 var coordinateSpaceName: String 155 var onRefresh: () -> Void 156 157 var body: some View { 158 GeometryReader { geometry in 159 if geometry.frame(in: .named(coordinateSpaceName)).midY > 50 { 160 Spacer() 161 .onAppear() { 162 isRefreshing = true 163 } 164 } else if geometry.frame(in: .named(coordinateSpaceName)).maxY < 10 { 165 Spacer() 166 .onAppear() { 167 if isRefreshing { 168 isRefreshing = false 169 onRefresh() 170 } 171 } 172 } 173 HStack { 174 Spacer() 175 if isRefreshing { 176 ProgressView() 177 } else { 178 Text("⬇︎") 179 .font(.system(size: 28)) 180 } 181 Spacer() 182 } 183 }.padding(.top, -50) 184 } 185} 186
試したこと
let source = "https://newsapi.org/v2/top-headlines?articles&q=-コロナ&country=jp&pageSize=100&apiKey="としてみた。(NewsApiのホームページを参考にした)
2.NewsApiにメールでどうすればいいか問い合わせをしたが、現在まで返信が来ていない
3.以下はAppStoreの審査からきたメール
Hello,
Thank you for your resubmission.
However, we continue finding below issues.
It would be appropriate to address below issues accordingly.
Guidelines 2.3.7 - Performance - Accurate Metadata
We found your app’s metadata includes references to the COVID-19 pandemic in Keywords.
However, only apps from recognized institutions providing essential services related to the COVID-19 pandemic should reference the pandemic in their metadata. This ensures that App Store users can easily find apps that provide credible information and response services. Promoting access to relevant, credible apps has always been a priority for us, and it is especially important at this time.
Next Steps
To bring your app into compliance with these guidelines, remove all references to the COVID-19 pandemic from your app’s metadata.
Resources
For additional information regarding Apple’s response to the COVID-19 pandemic, please refer to the Ensuring the Credibility of Health & Safety Information update on the Apple Developer website.
Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage
We found in our review that your app provides services or requires sensitive user information related to the COVID-19 pandemic. Since the COVID-19 pandemic is a public health crisis, services and information related to it are considered to be part of the healthcare industry. In addition, the seller and company names associated with your app are not from a recognized institution, such as a governmental entity, hospital, insurance company, non-governmental organization, or university.
Per section 5.1.1 (ix) of the App Store Review Guidelines, apps that provide services or collect sensitive user information in highly-regulated fields, such as healthcare, should be submitted by a legal entity that provides these services, and not by an individual developer.
Next Steps
To resolve this issue, your app must be published under a seller and company name of a recognized institution. If you have developed this app on behalf of such an institution, please advise your client to add you to the development team of their Apple Developer account. If your client does not yet have an Apple Developer account, they can enroll for one as an organization through the Apple Developer website.
Resources
For additional details, please refer to the update on the Apple Developer website about Ensuring the Credibility of Health & Safety Information.
Please see attached screenshots for details.
あなたの回答
tips
プレビュー