From d48e7dbc2d1072fec69998fd163ea099702b1684 Mon Sep 17 00:00:00 2001 From: Federico Bricker Date: Tue, 31 May 2016 11:51:17 -0300 Subject: [PATCH 1/2] Allow to include TBD dependencies in XML for tvOS This allows lime extensions to add things like: This is the only missing extension, since dylib packages are deprecated and replaced by TBD on xcode 7+ --- lime/tools/platforms/TVOSPlatform.hx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lime/tools/platforms/TVOSPlatform.hx b/lime/tools/platforms/TVOSPlatform.hx index c96e1f0c8..1b1540cbd 100644 --- a/lime/tools/platforms/TVOSPlatform.hx +++ b/lime/tools/platforms/TVOSPlatform.hx @@ -132,7 +132,7 @@ class TVOSPlatform extends PlatformTarget { for (dependency in project.dependencies) { - if (!StringTools.endsWith (dependency.name, ".framework") && !StringTools.endsWith (dependency.path, ".framework")) { + if (!StringTools.endsWith (dependency.name, ".framework") && !StringTools.endsWith (dependency.name, ".tbd") && !StringTools.endsWith (dependency.path, ".framework")) { if (dependency.path != "") { @@ -254,16 +254,25 @@ class TVOSPlatform extends PlatformTarget { var name = null; var path = null; + var fileType = null; if (Path.extension (dependency.name) == "framework") { name = dependency.name; path = "/System/Library/Frameworks/" + dependency.name; + fileType = "wrapper.framework"; + } else if (Path.extension (dependency.name) == "tbd") { + + name = dependency.name; + path = "usr/lib/" + dependency.name; + fileType = "sourcecode.text-based-dylib-definition"; + } else if (Path.extension (dependency.path) == "framework") { name = Path.withoutDirectory (dependency.path); path = PathHelper.tryFullPath (dependency.path); + fileType = "wrapper.framework"; } @@ -275,7 +284,7 @@ class TVOSPlatform extends PlatformTarget { ArrayHelper.addUnique (context.frameworkSearchPaths, Path.directory (path)); context.ADDL_PBX_BUILD_FILE += " " + frameworkID + " /* " + name + " in Frameworks */ = {isa = PBXBuildFile; fileRef = " + fileID + " /* " + name + " */; };\n"; - context.ADDL_PBX_FILE_REFERENCE += " " + fileID + " /* " + name + " */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = \"" + name + "\"; path = \"" + path + "\"; sourceTree = SDKROOT; };\n"; + context.ADDL_PBX_FILE_REFERENCE += " " + fileID + " /* " + name + " */ = {isa = PBXFileReference; lastKnownFileType = \"" + fileType + "\"; name = \"" + name + "\"; path = \"" + path + "\"; sourceTree = SDKROOT; };\n"; context.ADDL_PBX_FRAMEWORKS_BUILD_PHASE += " " + frameworkID + " /* " + name + " in Frameworks */,\n"; context.ADDL_PBX_FRAMEWORK_GROUP += " " + fileID + " /* " + name + " */,\n"; From fc932591251fc254b14eb7715acfd33567aa9c9f Mon Sep 17 00:00:00 2001 From: Federico Bricker Date: Tue, 31 May 2016 12:47:44 -0300 Subject: [PATCH 2/2] Add NSAppTransportSecurity section to info.plist with NSAllowsArbitraryLoads enabled --- templates/iphone/PROJ/PROJ-Info.plist | 4 ++++ templates/tvos/PROJ/PROJ-Info.plist | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/templates/iphone/PROJ/PROJ-Info.plist b/templates/iphone/PROJ/PROJ-Info.plist index 61ca41408..d6e842578 100644 --- a/templates/iphone/PROJ/PROJ-Info.plist +++ b/templates/iphone/PROJ/PROJ-Info.plist @@ -38,5 +38,9 @@ ::if (IOS_APP_ORIENTATION != null):: UISupportedInterfaceOrientations ::IOS_APP_ORIENTATION::::end:: + NSAppTransportSecurity + + NSAllowsArbitraryLoads + diff --git a/templates/tvos/PROJ/PROJ-Info.plist b/templates/tvos/PROJ/PROJ-Info.plist index 61ca41408..d6e842578 100644 --- a/templates/tvos/PROJ/PROJ-Info.plist +++ b/templates/tvos/PROJ/PROJ-Info.plist @@ -38,5 +38,9 @@ ::if (IOS_APP_ORIENTATION != null):: UISupportedInterfaceOrientations ::IOS_APP_ORIENTATION::::end:: + NSAppTransportSecurity + + NSAllowsArbitraryLoads +