本文整理汇总了Python中core.tns.tns.Tns.plugin_add方法的典型用法代码示例。如果您正苦于以下问题:Python Tns.plugin_add方法的具体用法?Python Tns.plugin_add怎么用?Python Tns.plugin_add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core.tns.tns.Tns
的用法示例。
在下文中一共展示了Tns.plugin_add方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_301_prepare_android_does_not_prepare_ios
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import plugin_add [as 别名]
def test_301_prepare_android_does_not_prepare_ios(self):
Tns.plugin_add("nativescript-social-share", attributes={"--path": self.app_name})
Tns.plugin_add("[email protected]", attributes={"--path": self.app_name})
output = Tns.prepare_android(attributes={"--path": self.app_name})
assert "nativescript-iqkeyboardmanager is not supported for android" in output
assert "Successfully prepared plugin nativescript-social-share for android" in output
示例2: test_390_LSApplicationQueriesSchemes_merged
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import plugin_add [as 别名]
def test_390_LSApplicationQueriesSchemes_merged(self):
# https: // github.com / NativeScript / nativescript - cli / issues / 3108
Folder.cleanup(os.path.join(self.app_name, 'app', 'App_Resources', 'iOS', 'Info.plist'))
info_c = os.path.join('data', 'issues', 'info-plist', 'app', 'Info.plist')
info_p = os.path.join(self.app_name, 'app', 'App_Resources', 'iOS')
Folder.copy(info_c, info_p)
Tns.plugin_add("nativescript-geolocation", attributes={"--path": self.app_name})
Folder.cleanup(
os.path.join(self.app_name, 'node_modules', 'nativescript-geolocation', 'platforms', 'ios', 'Info.plist'))
info_plugin_c = os.path.join('data', 'issues', 'info-plist', 'plugin', 'Info.plist')
info_plugin_p = os.path.join(self.app_name, 'node_modules', 'nativescript-geolocation', 'platforms', 'ios')
Folder.copy(info_plugin_c, info_plugin_p)
Tns.build_ios(attributes={"--path": self.app_name})
output = File.read(os.path.join(self.app_name, 'platforms', 'ios', 'TestApp', 'TestApp-Info.plist'))
assert 'itms' in output
assert "itms-apps" in output
assert "LSApplicationQueriesSchemes" in output
示例3: test_100_plugin_add_sandbox_pod_can_write_in_app_folder
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import plugin_add [as 别名]
def test_100_plugin_add_sandbox_pod_can_write_in_app_folder(self):
Tns.create_app(self.app_name)
Tns.platform_add_ios(attributes={"--path": self.app_name,
"--frameworkPath": IOS_PACKAGE})
plugin = os.path.join(TEST_RUN_HOME, "data", "CocoaPods", "nativescript-ios-working-with-sandbox-plugin.tgz")
output = Tns.plugin_add(plugin, attributes={"--path": self.app_name}, assert_success=False)
assert "Successfully installed plugin nativescript-ios-working-with-sandbox-plugin." in output
assert "nativescript-ios-working-with-sandbox-plugin" in File.read(self.app_name + "/package.json")
output = Tns.prepare_ios(attributes={"--path": self.app_name})
assert "Successfully prepared plugin " + \
"nativescript-ios-working-with-sandbox-plugin for ios." in output
assert "content" in File.read(self.app_name + "/platforms/ios/TestApp/app/I_MADE_THIS_FILE.txt")
示例4: test_400_plugin_add_sandbox_pod_can_write_outside_app_folder_by_default
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import plugin_add [as 别名]
def test_400_plugin_add_sandbox_pod_can_write_outside_app_folder_by_default(self):
Tns.create_app(self.app_name)
Tns.platform_add_ios(attributes={"--path": self.app_name,
"--frameworkPath": IOS_PACKAGE})
plugin = os.path.join(TEST_RUN_HOME, "data", "CocoaPods", "nativescript-ios-fail-with-sandbox-plugin.tgz")
output = Tns.plugin_add(plugin, attributes={"--path": self.app_name}, assert_success=False)
assert "Successfully installed plugin nativescript-ios-fail-with-sandbox-plugin." in output
assert "nativescript-ios-fail-with-sandbox-plugin" in File.read(self.app_name + "/package.json")
output = Tns.prepare_ios(attributes={"--path": self.app_name}, assert_success=False)
assert "Successfully prepared " + \
"plugin nativescript-ios-fail-with-sandbox-plugin for ios." in output
assert "sh: ../I_MADE_THIS_FILE.txt: Operation not permitted" not in output
assert File.exists(self.app_name + "/platforms/I_MADE_THIS_FILE.txt")
示例5: test_401_plugin_add_sandbox_pod_can_not_write_outside_app_folder_if_use_pod_sandbox_is_true
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import plugin_add [as 别名]
def test_401_plugin_add_sandbox_pod_can_not_write_outside_app_folder_if_use_pod_sandbox_is_true(self):
File.replace("node_modules/nativescript/config/config.json", '"USE_POD_SANDBOX": false',
'"USE_POD_SANDBOX": true')
Tns.create_app(self.app_name)
Tns.platform_add_ios(attributes={"--path": self.app_name, "--frameworkPath": IOS_PACKAGE})
plugin = os.path.join(TEST_RUN_HOME, "data", "CocoaPods", "nativescript-ios-fail-with-sandbox-plugin.tgz")
output = Tns.plugin_add(plugin, attributes={"--path": self.app_name}, assert_success=False)
assert "Successfully installed plugin nativescript-ios-fail-with-sandbox-plugin." in output
assert "nativescript-ios-fail-with-sandbox-plugin" in File.read(self.app_name + "/package.json")
output = Tns.prepare_ios(attributes={"--path": self.app_name}, assert_success=False)
assert "Successfully prepared " + \
"plugin nativescript-ios-fail-with-sandbox-plugin for ios." in output
assert "sh: ../I_MADE_THIS_FILE.txt: Operation not permitted" in output
assert not File.exists(self.app_name + "/platforms/I_MADE_THIS_FILE.txt")
示例6: test_202_plugin_add_xcconfig_after_platform_add_ios
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import plugin_add [as 别名]
def test_202_plugin_add_xcconfig_after_platform_add_ios(self):
Tns.platform_add_ios(attributes={"--path": self.app_name, "--frameworkPath": IOS_PACKAGE})
plugin_path = TEST_RUN_HOME + "/data/CocoaPods/xcconfig-plugin.tgz"
output = Tns.plugin_add(plugin_path, attributes={"--path": self.app_name}, assert_success=False)
assert "Successfully installed plugin xcconfig-plugin." in output
assert File.exists(self.app_name + "/node_modules/xcconfig-plugin/package.json")
assert File.exists(self.app_name + "/node_modules/xcconfig-plugin/platforms/ios/build.xcconfig")
assert File.exists(self.app_name + "/node_modules/xcconfig-plugin/platforms/ios/module.modulemap")
assert File.exists(self.app_name + "/node_modules/xcconfig-plugin/platforms/ios/XcconfigPlugin.h")
assert "xcconfig-plugin" in File.read(self.app_name + "/package.json")
output = Tns.build_ios(attributes={"--path": self.app_name})
assert "Successfully prepared plugin xcconfig-plugin for ios." in output
output = File.read(self.app_name + "/platforms/ios/plugins-debug.xcconfig")
assert "OTHER_LDFLAGS = $(inherited) -l\"sqlite3\"" in output
output = File.read(self.app_name + "/platforms/ios/TestApp/build-debug.xcconfig")
assert "#include \"../plugins-debug.xcconfig\"" in output