質問編集履歴

3

大幅な改変

2015/10/27 05:48

投稿

cheeeeeeese
cheeeeeeese

スコア179

test CHANGED
@@ -1 +1 @@
1
- Plist.file記述に関しての質問
1
+ File.plistとATSに関して
test CHANGED
@@ -2,43 +2,39 @@
2
2
 
3
3
 
4
4
 
5
- iOSアプリに対して、「ATSの対策をするために下記のコードをplist.fileに記述しました。」
6
-
7
-
8
-
9
- 結果として、安全な接続では無い状態だと言わてしまました
5
+ ATSの設定の効化を行たい(画像が表示さ)
10
-
11
-
12
-
13
- 現在自分でも問題の解決策を考えています。何かしらご助言頂ければ幸いです。
14
6
 
15
7
 
16
8
 
17
9
  ```
18
10
 
19
- 2015-10-27 13:43:20.068 ITunesMusic[4264:266831] [Error] GET '(null)' (0) [0.0003 s]: Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSUnderlyingError=0x7f8aa2f45c70 {Error Domain=kCFErrorDomainCFNetwork Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection."
11
+ NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection
20
12
 
21
13
  ```
22
14
 
23
15
 
24
16
 
25
- ###現在の状況
17
+ ##方法
26
18
 
27
19
 
28
20
 
29
- ITunesAPIXCode7からATS(App Transport Security)導入されてい
21
+ 方法として、下記の1と2で良いはずなのです、上記エラーが直りせん
30
22
 
31
- そのため、http://系のリクエストが全除外され、https://系のリクエストにければなりせん
23
+ 現在私も解決策を探しいます。何からご助言頂ければと考え
32
24
 
33
25
 
34
26
 
35
- その一番簡単な解決方法としてはPlist.fileに下記の記述行い、http://系のリクエストを許可する事です。
27
+ 1 Info.plistファイルに下記のコード書き込む
36
28
 
37
29
 
38
30
 
39
31
  ```
40
32
 
33
+ iOSアプリ内のInfo.plistに下記コードを記述
34
+
35
+
36
+
41
- <key>NSAppTransportSecurity</key>
37
+ key>NSAppTransportSecurity</key>
42
38
 
43
39
  <dict>
44
40
 
@@ -50,112 +46,6 @@
50
46
 
51
47
  ```
52
48
 
53
- ###ソースコード
54
-
55
- ```swift
56
49
 
57
50
 
58
-
59
- <?xml version="1.0" encoding="UTF-8"?>
60
-
61
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
62
-
63
- <plist version="1.0">
64
-
65
- <dict>
66
-
67
- //ここに記述しています。
68
-
69
- <key>NSAppTransportSecurity</key>
70
-
71
- <dict>
72
-
73
- <key>NSAllowsArbitraryLoads</key>
51
+ 2 AppTransportSecuritySettings配下のAllowArbitraryLoadsをBoolen型/Yesにすると「ATS」が無効化される
74
-
75
- <true/>
76
-
77
- </dict>
78
-
79
- //
80
-
81
- <key>CFBundleDevelopmentRegion</key>
82
-
83
- <string>en</string>
84
-
85
- <key>CFBundleExecutable</key>
86
-
87
- <string>$(EXECUTABLE_NAME)</string>
88
-
89
- <key>CFBundleIdentifier</key>
90
-
91
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
92
-
93
- <key>CFBundleInfoDictionaryVersion</key>
94
-
95
- <string>6.0</string>
96
-
97
- <key>CFBundleName</key>
98
-
99
- <string>$(PRODUCT_NAME)</string>
100
-
101
- <key>CFBundlePackageType</key>
102
-
103
- <string>APPL</string>
104
-
105
- <key>CFBundleShortVersionString</key>
106
-
107
- <string>1.0</string>
108
-
109
- <key>CFBundleSignature</key>
110
-
111
- <string>????</string>
112
-
113
- <key>CFBundleVersion</key>
114
-
115
- <string>1</string>
116
-
117
- <key>LSRequiresIPhoneOS</key>
118
-
119
- <true/>
120
-
121
- <key>UILaunchStoryboardName</key>
122
-
123
- <string>LaunchScreen</string>
124
-
125
- <key>UIMainStoryboardFile</key>
126
-
127
- <string>Main</string>
128
-
129
- <key>UIRequiredDeviceCapabilities</key>
130
-
131
- <array>
132
-
133
- <string>armv7</string>
134
-
135
- </array>
136
-
137
- <key>UISupportedInterfaceOrientations</key>
138
-
139
- <array>
140
-
141
- <string>UIInterfaceOrientationPortrait</string>
142
-
143
- <string>UIInterfaceOrientationLandscapeLeft</string>
144
-
145
- <string>UIInterfaceOrientationLandscapeRight</string>
146
-
147
- </array>
148
-
149
- </dict>
150
-
151
- </plist>
152
-
153
-
154
-
155
-
156
-
157
- ```
158
-
159
-
160
-
161
- ###補足情報(言語/FW/ツール等のバージョンなど)

2

内容の変更

2015/10/27 05:48

投稿

cheeeeeeese
cheeeeeeese

スコア179

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- Appleのアプリに対して、ATSの対策をするために下記のコードをplist.fileに記述しました。
5
+ iOSアプリに対して、ATSの対策をするために下記のコードをplist.fileに記述しました。
6
6
 
7
7
 
8
8
 

1

内容の変更

2015/10/27 04:57

投稿

cheeeeeeese
cheeeeeeese

スコア179

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,25 @@
2
2
 
3
3
 
4
4
 
5
- 下記のplist.file記述に間違いがある場合はご指摘頂ければと思い
5
+ Appleのアプリに対して、ATSの対策をするために下記のコードをplist.file記述した
6
+
7
+
8
+
9
+ 結果として、安全な接続では無い状態だと言われてしまいました。
10
+
11
+
12
+
13
+ 現在自分でも問題の解決策を考えています。何かしらご助言頂ければ幸いです。
14
+
15
+
16
+
17
+ ```
18
+
19
+ 2015-10-27 13:43:20.068 ITunesMusic[4264:266831] [Error] GET '(null)' (0) [0.0003 s]: Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSUnderlyingError=0x7f8aa2f45c70 {Error Domain=kCFErrorDomainCFNetwork Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection."
20
+
21
+ ```
22
+
23
+
6
24
 
7
25
  ###現在の状況
8
26