@@ -20,6 +20,7 @@ import {
20
20
ISpawnResult ,
21
21
} from "../common/declarations" ;
22
22
import { injector } from "../common/yok" ;
23
+ import { XcodeSelectService } from "../common/services/xcode-select-service" ;
23
24
24
25
export class CocoaPodsService implements ICocoaPodsService {
25
26
private static PODFILE_POST_INSTALL_SECTION_NAME = "post_install" ;
@@ -32,7 +33,8 @@ export class CocoaPodsService implements ICocoaPodsService {
32
33
private $errors : IErrors ,
33
34
private $logger : ILogger ,
34
35
private $config : IConfiguration ,
35
- private $xcconfigService : IXcconfigService
36
+ private $xcconfigService : IXcconfigService ,
37
+ private $xcodeSelectService : XcodeSelectService
36
38
) {
37
39
this . getCocoaPodsFromPodfile = _ . memoize (
38
40
this . _getCocoaPodsFromPodfile ,
@@ -164,6 +166,13 @@ ${versionResolutionHint}`);
164
166
projectData : IProjectData ,
165
167
platformData : IPlatformData
166
168
) : Promise < void > {
169
+ const xcodeVersionData = await this . $xcodeSelectService . getXcodeVersion ( ) ;
170
+
171
+ // only apply EXCLUDED_ARCHS workaround on XCode 12
172
+ if ( + xcodeVersionData . major !== 12 ) {
173
+ return ;
174
+ }
175
+
167
176
const { projectRoot } = platformData ;
168
177
const exclusionsPodfile = path . join ( projectRoot , "Podfile-exclusions" ) ;
169
178
@@ -179,7 +188,6 @@ post_install do |installer|
179
188
end` . trim ( ) ;
180
189
this . $fs . writeFile ( exclusionsPodfile , exclusions ) ;
181
190
}
182
-
183
191
await this . applyPodfileToProject (
184
192
"NativeScript-CLI-Architecture-Exclusions" ,
185
193
exclusionsPodfile ,
0 commit comments