From 126cf0a02439df667c9734d4685ce5eb42bf57f8 Mon Sep 17 00:00:00 2001 From: Nevyn Bengtsson Date: Tue, 3 Jan 2017 13:04:20 +0100 Subject: [PATCH] WIP Podspec; get iOS libffi through CocoaPods --- Examples/Support/ffi | 1 + .../iOS/NuRemoting2.xcodeproj/project.pbxproj | 86 +++++++++++++++++-- Examples/iOS/Podfile | 3 + Examples/iOS/Podfile.lock | 12 +++ LICENSE | 2 +- NuRemoting.podspec | 46 ++++++++++ 6 files changed, 143 insertions(+), 7 deletions(-) create mode 120000 Examples/Support/ffi create mode 100644 Examples/iOS/Podfile create mode 100644 Examples/iOS/Podfile.lock create mode 100644 NuRemoting.podspec diff --git a/Examples/Support/ffi b/Examples/Support/ffi new file mode 120000 index 0000000..dcf55b0 --- /dev/null +++ b/Examples/Support/ffi @@ -0,0 +1 @@ +../iOS/Pods/Headers/Public/libffi \ No newline at end of file diff --git a/Examples/iOS/NuRemoting2.xcodeproj/project.pbxproj b/Examples/iOS/NuRemoting2.xcodeproj/project.pbxproj index 2868f6b..5937382 100755 --- a/Examples/iOS/NuRemoting2.xcodeproj/project.pbxproj +++ b/Examples/iOS/NuRemoting2.xcodeproj/project.pbxproj @@ -11,8 +11,6 @@ 0511A720145DCEA90060519A /* AsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 0511A71A145DCEA90060519A /* AsyncSocket.m */; }; 0511A721145DCEA90060519A /* RemotingClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 0511A71C145DCEA90060519A /* RemotingClient.m */; }; 0511A722145DCEA90060519A /* SPNuRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 0511A71F145DCEA90060519A /* SPNuRemote.m */; }; - 0511A72F145DCF630060519A /* ffi.c in Sources */ = {isa = PBXBuildFile; fileRef = 0511A725145DCF630060519A /* ffi.c */; }; - 0511A730145DCF630060519A /* ffi.S in Sources */ = {isa = PBXBuildFile; fileRef = 0511A727145DCF630060519A /* ffi.S */; }; 0511A734145DCF630060519A /* Nu.m in Sources */ = {isa = PBXBuildFile; fileRef = 0511A72D145DCF630060519A /* Nu.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 05F08E221285F81000CB9E22 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05F08E211285F81000CB9E22 /* CFNetwork.framework */; }; 1D3623260D0F684500981E51 /* NuRemoting2AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* NuRemoting2AppDelegate.m */; }; @@ -25,6 +23,7 @@ 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; }; 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* RootViewController.m */; }; 28D3F202112F7DC200FD0661 /* NuRemoting2.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 28D3F201112F7DC200FD0661 /* NuRemoting2.xcdatamodeld */; }; + C8906635B386A3FC86D16A3E /* libPods-NuRemoting2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CA93BE194A248584DAA1F8D /* libPods-NuRemoting2.a */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -43,6 +42,7 @@ 0511A72C145DCF630060519A /* Nu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Nu.h; sourceTree = ""; }; 0511A72D145DCF630060519A /* Nu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Nu.m; sourceTree = ""; }; 05F08E211285F81000CB9E22 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; + 1CA93BE194A248584DAA1F8D /* libPods-NuRemoting2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NuRemoting2.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D3623240D0F684500981E51 /* NuRemoting2AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NuRemoting2AppDelegate.h; sourceTree = ""; }; 1D3623250D0F684500981E51 /* NuRemoting2AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NuRemoting2AppDelegate.m; sourceTree = ""; }; @@ -57,7 +57,9 @@ 28C286DF0D94DF7D0034E888 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; 28C286E00D94DF7D0034E888 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 65C08BC911A6C2E8E18BFEB2 /* Pods-NuRemoting2.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NuRemoting2.debug.xcconfig"; path = "Pods/Target Support Files/Pods-NuRemoting2/Pods-NuRemoting2.debug.xcconfig"; sourceTree = ""; }; 8D1107310486CEB800E47090 /* NuRemoting2-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "NuRemoting2-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + E166FFC2C147FC38D6034EC2 /* Pods-NuRemoting2.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NuRemoting2.release.xcconfig"; path = "Pods/Target Support Files/Pods-NuRemoting2/Pods-NuRemoting2.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -70,6 +72,7 @@ 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, 28860BE50F44EE6400985440 /* CoreData.framework in Frameworks */, 05F08E221285F81000CB9E22 /* CFNetwork.framework in Frameworks */, + C8906635B386A3FC86D16A3E /* libPods-NuRemoting2.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -151,6 +154,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, + D794DCF960736ABC987AA736 /* Pods */, ); name = CustomTemplate; sourceTree = ""; @@ -183,10 +187,20 @@ 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, 28860BE40F44EE6400985440 /* CoreData.framework */, 05F08E211285F81000CB9E22 /* CFNetwork.framework */, + 1CA93BE194A248584DAA1F8D /* libPods-NuRemoting2.a */, ); name = Frameworks; sourceTree = ""; }; + D794DCF960736ABC987AA736 /* Pods */ = { + isa = PBXGroup; + children = ( + 65C08BC911A6C2E8E18BFEB2 /* Pods-NuRemoting2.debug.xcconfig */, + E166FFC2C147FC38D6034EC2 /* Pods-NuRemoting2.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -194,9 +208,12 @@ isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "NuRemoting2" */; buildPhases = ( + 96A044272FB52097B5C393C3 /* [CP] Check Pods Manifest.lock */, 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, + 516BECC085A0F21521D09086 /* [CP] Embed Pods Frameworks */, + 8803524B76C3DABB81BBEC69 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -226,6 +243,7 @@ en, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( @@ -246,6 +264,54 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 516BECC085A0F21521D09086 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NuRemoting2/Pods-NuRemoting2-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 8803524B76C3DABB81BBEC69 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NuRemoting2/Pods-NuRemoting2-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 96A044272FB52097B5C393C3 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 1D60588E0D05DD3D006BFB54 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -258,8 +324,6 @@ 0511A720145DCEA90060519A /* AsyncSocket.m in Sources */, 0511A721145DCEA90060519A /* RemotingClient.m in Sources */, 0511A722145DCEA90060519A /* SPNuRemote.m in Sources */, - 0511A72F145DCF630060519A /* ffi.c in Sources */, - 0511A730145DCF630060519A /* ffi.S in Sources */, 0511A734145DCF630060519A /* Nu.m in Sources */, 050181FC145EF54C00D60A47 /* NRStats.m in Sources */, ); @@ -270,10 +334,12 @@ /* Begin XCBuildConfiguration section */ 1D6058940D05DD3E006BFB54 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 65C08BC911A6C2E8E18BFEB2 /* Pods-NuRemoting2.debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; DEVELOPMENT_TEAM = M4Q2TE45WT; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/..\"", @@ -283,17 +349,18 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = NuRemoting2_Prefix.pch; INFOPLIST_FILE = "NuRemoting2-Info.plist"; - OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = NuRemoting2; }; name = Debug; }; 1D6058950D05DD3E006BFB54 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = E166FFC2C147FC38D6034EC2 /* Pods-NuRemoting2.release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = YES; DEVELOPMENT_TEAM = M4Q2TE45WT; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/..\"", @@ -301,7 +368,6 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = NuRemoting2_Prefix.pch; INFOPLIST_FILE = "NuRemoting2-Info.plist"; - OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = NuRemoting2; VALIDATE_PRODUCT = YES; }; @@ -321,6 +387,10 @@ ../Support, ); IPHONEOS_DEPLOYMENT_TARGET = 8.0; + OTHER_LDFLAGS = ( + "-ObjC", + "$(inherited)", + ); PREBINDING = NO; SDKROOT = iphoneos; }; @@ -341,6 +411,10 @@ ); IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + OTHER_LDFLAGS = ( + "-ObjC", + "$(inherited)", + ); PREBINDING = NO; SDKROOT = iphoneos; }; diff --git a/Examples/iOS/Podfile b/Examples/iOS/Podfile new file mode 100644 index 0000000..867f898 --- /dev/null +++ b/Examples/iOS/Podfile @@ -0,0 +1,3 @@ +target 'NuRemoting2' do + podspec :path => "../../NuRemoting.podspec" +end diff --git a/Examples/iOS/Podfile.lock b/Examples/iOS/Podfile.lock new file mode 100644 index 0000000..b814c70 --- /dev/null +++ b/Examples/iOS/Podfile.lock @@ -0,0 +1,12 @@ +PODS: + - libffi (3.0.13) + +DEPENDENCIES: + - libffi (~> 3.0) + +SPEC CHECKSUMS: + libffi: 1f65dbbdb2c88491c06640dd3bb96030070ca97c + +PODFILE CHECKSUM: cd2cabc952f6eb6f28403fb119797b6e77c901b4 + +COCOAPODS: 1.1.1 diff --git a/LICENSE b/LICENSE index 1fc06d0..9687a1a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2011 Joachim Bengtsson +Copyright (c) 2016 Nevyn Bengtsson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/NuRemoting.podspec b/NuRemoting.podspec new file mode 100644 index 0000000..c137bcf --- /dev/null +++ b/NuRemoting.podspec @@ -0,0 +1,46 @@ +# `pod spec lint NuRemoting.podspec' +# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |s| + s.name = "NuRemoting" + s.version = "1.2" + s.summary = "Remote control your iOS app using Nu (lisp-on-objc)" + + # This description is used to generate tags and improve search results. + # * Think: What does it do? Why did you write it? What is the focus? + # * Try to keep it short, snappy and to the point. + # * Write the description between the DESC delimiters below. + # * Finally, don't worry about the indent, CocoaPods strips it! + s.description = <<-DESC + Script your iOS app over the network from your Mac. Introspect the state of your app, + push button, gather stats, or just wirelessly get the console log from your app. + DESC + + s.homepage = "https://github.com/nevyn/NuRemoting" + s.screenshots = "https://camo.githubusercontent.com/bbdbb3dc7914b665062ccde639cd52f6d1107709/687474703a2f2f662e636c2e6c792f6974656d732f3333304a305534363351334430413275303331422f53637265656e25323053686f74253230323031312d31302d3331253230617425323032312e33342e33392e706e67" + s.license = { :type => "MIT", :file => "LICENSE" } + + s.author = { "Nevyn Bengtsson" => "nevyn.jpg@gmail.com" } + s.social_media_url = "http://twitter.com/nevyn" + + s.ios.deployment_target = "8.0" + s.osx.deployment_target = "10.7" + + s.source = { :git => "https://github.com/nevyn/NuRemoting.git", :tag => "#{s.version}" } + s.public_header_files = "NuRemote/*.h" + s.frameworks = "CFNetwork" + s.dependency "libffi", "~> 3.0" + s.requires_arc = true + + s.subspec 'arc' do |ss| + ss.source_files = "NuRemote" + ss.requires_arc = true + end + s.subspec 'no-arc' do |ss| + ss.source_files = "Examples/Support/objc/*.{h|m}" + ss.requires_arc = false + end + +end