Skip to content

Commit 22e6ab7

Browse files
committed
Update checks in Tns.build_ios()
1 parent c0ea3db commit 22e6ab7

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

core/tns/tns.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -356,24 +356,20 @@ def build_ios(attributes={}, assert_success=True, tns_path=None):
356356
emu_folder = app_name + "/platforms/ios/build/emulator/"
357357
if "--forDevice" in attributes.keys() or "--for-device" in attributes.keys():
358358
assert "build/device/" + app_id + ".app" in output
359-
assert File.exists(app_name + "/platforms/ios/build/device/" + app_id + ".ipa")
359+
assert File.exists(device_folder + app_id + ".ipa")
360+
output = File.read(device_folder + app_id + ".app/" + app_id)
360361
if "--release" in attributes.keys():
361-
output = File.read(app_name + "/platforms/ios/build/device/" + app_id + ".app/" + app_id)
362362
assert "TKLiveSync" not in output, "TKLiveSync binaries available in release configuration."
363363
else:
364-
pass
365-
output = File.read(app_name + "/platforms/ios/build/device/" + app_id + ".app/" + app_id)
366364
assert "TKLiveSync" in output, "TKLiveSync binaries not available in debug configuration."
367365
else:
368366
assert "build/emulator/" + app_id + ".app" in output
369-
assert File.exists(app_name + "/platforms/ios/build/emulator/" + app_id + ".app")
370367
assert File.exists(app_name + "/platforms/ios/" + app_id + "/" + app_id + "-Prefix.pch")
368+
assert File.exists(emu_folder + app_id + ".app")
369+
output = File.read(emu_folder + app_id + ".app/" + app_id)
371370
if "--release" in attributes.keys():
372-
output = File.read(app_name + "/platforms/ios/build/emulator/" + app_id + ".app/" + app_id)
373371
assert "TKLiveSync" not in output, "TKLiveSync binaries available in release configuration."
374372
else:
375-
pass
376-
output = File.read(app_name + "/platforms/ios/build/emulator/" + app_id + ".app/" + app_id)
377373
assert "TKLiveSync" in output, "TKLiveSync binaries not available in debug configuration."
378374
return output
379375

0 commit comments

Comments
 (0)