@@ -377,24 +377,26 @@ def build_android(attributes={}, assert_success=True, tns_path=None):
377
377
return output
378
378
379
379
@staticmethod
380
- def build_ios (attributes = {}, assert_success = True , tns_path = None ):
380
+ def build_ios (attributes = {}, assert_success = True , tns_path = None , log_trace = False ):
381
381
382
382
if "--provision" not in attributes .keys ():
383
383
attr = {"--teamId" : DEVELOPMENT_TEAM }
384
384
attributes .update (attr )
385
385
386
- output = Tns .run_tns_command ("build ios" , attributes = attributes , tns_path = tns_path )
386
+ output = Tns .run_tns_command ("build ios" , attributes = attributes , tns_path = tns_path , log_trace = log_trace )
387
387
388
388
app_name = Tns .__get_app_name_from_attributes (attributes = attributes )
389
389
app_name = app_name .replace ("\" " , "" ) # Handle projects with space
390
390
app_id = Tns .__get_final_package_name (app_name , platform = Platform .IOS )
391
391
392
392
if assert_success :
393
- assert "BUILD SUCCEEDED" in output
394
393
assert "Project successfully built" in output
395
394
assert "ERROR" not in output
396
395
assert "malformed" not in output
397
- assert "CodeSign" in output
396
+
397
+ if log_trace :
398
+ assert "BUILD SUCCEEDED" in output
399
+ assert "CodeSign" in output
398
400
399
401
# Verify release/debug builds
400
402
if "--release" in attributes .keys ():
@@ -410,9 +412,10 @@ def build_ios(attributes={}, assert_success=True, tns_path=None):
410
412
device_folder = app_name + "/platforms/ios/build/device/"
411
413
emu_folder = app_name + "/platforms/ios/build/emulator/"
412
414
if "--forDevice" in attributes .keys () or "--for-device" in attributes .keys ():
413
- assert "build/device/" + app_id + ".app" in output
414
- assert "ARCHIVE SUCCEEDED" in output
415
- assert "EXPORT SUCCEEDED" in output
415
+ if log_trace :
416
+ assert "build/device/" + app_id + ".app" in output
417
+ assert "ARCHIVE SUCCEEDED" in output
418
+ assert "EXPORT SUCCEEDED" in output
416
419
assert File .exists (device_folder + app_id + ".ipa" ), "IPA file not found!"
417
420
bundle_content = File .read (device_folder + app_id + ".app/" + app_id )
418
421
xcode_project = Tns .__get_xcode_project_file (app_name )
@@ -422,7 +425,8 @@ def build_ios(attributes={}, assert_success=True, tns_path=None):
422
425
assert DEVELOPMENT_TEAM in xcode_project or DISTRIBUTION_PROVISIONING in xcode_project , \
423
426
"TeamID not passed to Xcode!"
424
427
else :
425
- assert "build/emulator/" + app_id + ".app" in output
428
+ if log_trace :
429
+ assert "build/emulator/" + app_id + ".app" in output
426
430
assert File .exists (app_name + "/platforms/ios/" + app_id + "/" + app_id + "-Prefix.pch" )
427
431
assert File .exists (emu_folder + app_id + ".app" )
428
432
bundle_content = File .read (emu_folder + app_id + ".app/" + app_id )
0 commit comments