@@ -199,16 +199,21 @@ describe("iOSProjectService", () => {
199199 }
200200 } ;
201201 }
202- it ( "by default exports xcodearchive to platforms/ios/build/archive/<projname>.xcarchive" , async ( ) => {
203- let setup = await setupArchive ( ) ;
204- await setup . run ( ) ;
205- setup . assert ( ) ;
206- } ) ;
207- it ( "can pass archivePath to xcodebuild -archivePath" , async ( ) => {
208- let setup = await setupArchive ( { archivePath : "myarchive.xcarchive" } ) ;
209- await setup . run ( ) ;
210- setup . assert ( ) ;
211- } ) ;
202+
203+ if ( require ( "os" ) . platform ( ) !== "darwin" ) {
204+ console . log ( "Skipping iOS archive tests. They can work only on macOS" ) ;
205+ } else {
206+ it ( "by default exports xcodearchive to platforms/ios/build/archive/<projname>.xcarchive" , async ( ) => {
207+ let setup = await setupArchive ( ) ;
208+ await setup . run ( ) ;
209+ setup . assert ( ) ;
210+ } ) ;
211+ it ( "can pass archivePath to xcodebuild -archivePath" , async ( ) => {
212+ let setup = await setupArchive ( { archivePath : "myarchive.xcarchive" } ) ;
213+ await setup . run ( ) ;
214+ setup . assert ( ) ;
215+ } ) ;
216+ }
212217 } ) ;
213218
214219 describe ( "exportArchive" , ( ) => {
@@ -282,13 +287,17 @@ describe("iOSProjectService", () => {
282287 assert . ok ( xcodebuildExeced , "Expected xcodebuild to be executed" ) ;
283288 }
284289
285- it ( "calls xcodebuild -exportArchive to produce .IPA" , async ( ) => {
286- await testExportArchive ( { } , noTeamPlist ) ;
287- } ) ;
290+ if ( require ( "os" ) . platform ( ) !== "darwin" ) {
291+ console . log ( "Skipping iOS export archive tests. They can work only on macOS" ) ;
292+ } else {
293+ it ( "calls xcodebuild -exportArchive to produce .IPA" , async ( ) => {
294+ await testExportArchive ( { } , noTeamPlist ) ;
295+ } ) ;
288296
289- it ( "passes the --team-id option down the xcodebuild -exportArchive throug the -exportOptionsPlist" , async ( ) => {
290- await testExportArchive ( { teamID : "MyTeam" } , myTeamPlist ) ;
291- } ) ;
297+ it ( "passes the --team-id option down the xcodebuild -exportArchive throug the -exportOptionsPlist" , async ( ) => {
298+ await testExportArchive ( { teamID : "MyTeam" } , myTeamPlist ) ;
299+ } ) ;
300+ }
292301 } ) ;
293302} ) ;
294303
0 commit comments