質問編集履歴

1

内容の改善

2020/01/12 07:47

投稿

hkawai
hkawai

スコア4

test CHANGED
File without changes
test CHANGED
@@ -16,6 +16,20 @@
16
16
 
17
17
 
18
18
 
19
+ 状況としまして、他人のPodfile元データをそのままpod installにて実行すると
20
+
21
+ ローカルのライブラリのインストールの際?にエラーとなってしまう為、Podfile内容の
22
+
23
+ 書き換えを行い、外部→ローカルと2回に分けてインストールの実行をしました。
24
+
25
+
26
+
27
+ すると、2回目のインストール実行の際、1回目にインストールされた外部ライブラリが
28
+
29
+ 何故か削除されてしまう為、解決策を教えて頂ければ幸いです。
30
+
31
+
32
+
19
33
  ### 元のPodfile内容
20
34
 
21
35
 
@@ -118,9 +132,151 @@
118
132
 
119
133
 
120
134
 
135
+ 上記のように元データのまま、pod installを行うとエラーとなる為、
136
+
121
- ### Podfile内容を外部→ローカルと2回に分けて書き換えを行いPod installをなっ場合
137
+ 次のようにPodfile内容書き換えを行い、2分割に分けて実しまし
138
+
139
+
140
+
122
-
141
+ ### 分割1回目
142
+
143
+ ```podfile
144
+
145
+ # Uncomment the next line to define a global platform for your project
146
+
147
+ # platform :ios, '9.0'
148
+
149
+ platform :ios, '11.0'
150
+
151
+ project 'FSLiPad.xcodeproj'
152
+
153
+
154
+
155
+ target 'FSLiPad' do
156
+
157
+ # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
158
+
159
+ source 'https://github.com/CocoaPods/Specs.git'
160
+
161
+ source 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Specs.git'
162
+
163
+
164
+
165
+ use_frameworks!
166
+
167
+
168
+
169
+ pod 'SalesforceSDKCommon'
170
+
171
+ pod 'SalesforceAnalytics'
172
+
173
+ pod 'SalesforceSDKCore'
174
+
175
+
176
+
177
+ end
178
+
179
+
180
+
181
+ # Comment the following if you do not want the SDK to emit signpost events for instrumentation. Signposts are enabled for non release version of the app.
182
+
183
+ post_install do |installer_representation|
184
+
185
+ installer_representation.pods_project.targets.each do |target|
186
+
187
+ target.build_configurations.each do |config|
188
+
189
+ if config.name == 'Debug'
190
+
191
+ config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'DEBUG=1','SIGNPOST_ENABLED=1']
192
+
193
+ config.build_settings['OTHER_SWIFT_FLAGS'] = ['$(inherited)', '-DDEBUG','-DSIGNPOST_ENABLED']
194
+
195
+ end
196
+
197
+ end
198
+
199
+ end
200
+
201
+ end
202
+
123
- ```
203
+ ```
204
+
205
+
206
+
207
+ pod 'SmartStore'
208
+
209
+ pod 'SmartSync'
210
+
211
+ 上記2つのライブラリは、下記記事を確認したところSalesforceSDKCoreと
212
+
213
+ 連動するため、pod宣言する必要がないとわかりました。
214
+
215
+ https://trailhead.salesforce.com/ja/content/learn/modules/mobile_sdk_native_ios/mobilesdk_ios_cocoapods
216
+
217
+
218
+
219
+
220
+
221
+ ```install
222
+
223
+ Installing SalesforceAnalytics (7.3.0)
224
+
225
+ Installing SalesforceSDKCommon (7.3.0)
226
+
227
+ Installing SalesforceSDKCore (7.3.0)
228
+
229
+ Generating Pods project
230
+
231
+ Integrating client project
232
+
233
+ Pod installation complete! There are 3 dependencies from the Podfile and 3 total pods installed.
234
+
235
+ ```
236
+
237
+
238
+
239
+ ### 分割2回目
240
+
241
+ ```podfile
242
+
243
+ # Uncomment the next line to define a global platform for your project
244
+
245
+ # platform :ios, '9.0'
246
+
247
+ platform :ios, '11.0'
248
+
249
+
250
+
251
+ target 'FSLiPad' do
252
+
253
+ # Comment the next line if you're not using Swift and don't want to use dynamic
254
+
255
+ pod 'RealmSwift', '~> 3.17', :modular_headers => true
256
+
257
+ pod 'Realm', '~> 3.17', :modular_headers => true
258
+
259
+ pod 'FSCalendar'
260
+
261
+ pod 'MBProgressHUD', '~> 1.1.0'
262
+
263
+ pod 'DeployGateSDK'
264
+
265
+ end
266
+
267
+ ```
268
+
269
+ pod 'RealmSwift', '~> 3.17', :modular_headers => true
270
+
271
+ pod 'Realm', '~> 3.17', :modular_headers => true
272
+
273
+ 上記2つは下記記事のもの、エラー対応のため書き換えました。
274
+
275
+ https://tutorialmore.com/questions-258199.htm
276
+
277
+
278
+
279
+ ```install
124
280
 
125
281
  Installing DeployGateSDK (1.0.7)
126
282
 
@@ -128,44 +284,30 @@
128
284
 
129
285
  Installing MBProgressHUD (1.1.0)
130
286
 
131
- Installing Realm (4.3.0)
132
-
133
- Installing RealmSwift (4.3.0)
134
-
135
- [!] The following Swift pods cannot yet be integrated as static libraries:
136
-
137
-
138
-
139
- The Swift pod `RealmSwift` depends upon `Realm`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
140
-
141
- ```
142
-
143
-
144
-
145
- ### 試したこと
146
-
147
-
148
-
149
- 上記、内容にある通り、元データにてローカル・外部のライブラリを一括で行うとエラーが
150
-
151
- 出てしまった為、2回に分けてpod installを試してみたのですが、どちらかのライブラリが
152
-
153
- インストールエラー、または削除されてしまうといった状況になります。
154
-
155
-
156
-
157
- 外部ライブラリについは、調べてる中下記記事のものだとわかりました。
158
-
159
- https://trailhead.salesforce.com/ja/content/learn/modules/mobile_sdk_native_ios/mobilesdk_ios_cocoapods
160
-
161
-
162
-
163
- ### 補足情報(FW/ツールのバージョンなど)
164
-
165
- macOS:10.14.6
166
-
167
- Xcode:11.3 (11C29)
168
-
169
-
170
-
171
- ※他、ご回答頂くのに必要な情報がありましたらご指摘の頂ければと存じます。
287
+ Installing Realm (3.21.0)
288
+
289
+ Installing RealmSwift (3.21.0)
290
+
291
+ Removing SalesforceAnalytics
292
+
293
+ Removing SalesforceSDKCommon
294
+
295
+ Removing SalesforceSDKCore
296
+
297
+ Generating Pods project
298
+
299
+ Integrating client project
300
+
301
+ Pod installation complete! There are 5 dependencies from the Podfile and 5 total pods installed.
302
+
303
+ ```
304
+
305
+
306
+
307
+ Removing SalesforceAnalytics
308
+
309
+ Removing SalesforceSDKCommon
310
+
311
+ Removing SalesforceSDKCore
312
+
313
+ 上記の通り、先にインストールした外部ライブラリが何故か削除されしまいました。