From c6f20df8da729af9d242c6a6911206c55d0f8376 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 30 May 2017 13:47:50 -0700 Subject: [PATCH] Added examples/apple --- README.md | 6 +- examples/apple/README.md | 6 + .../project.pbxproj | 1082 +++++++++++++++++ .../contents.xcworkspacedata | 7 + .../ZeroTierSDK_Apple.xcscmblueprint | 30 + .../xcschemes/ZeroTierSDK_OSX.xcscheme | 80 ++ .../ZeroTierSDK_Unity3D_OSX.xcscheme | 80 ++ .../ZeroTierSDK_Unity3D_iOS.xcscheme | 80 ++ .../xcschemes/ZeroTierSDK_iOS.xcscheme | 80 ++ .../xcdebugger/Breakpoints_v2.xcbkptlist | 5 + .../xcschemes/xcschememanagement.plist | 57 + .../ZeroTierSDK_OSX/Info.plist | 28 + .../ZeroTierSDK_OSX/ZeroTierSDK_OSX.h | 19 + .../ZeroTierSDK_Unity3D_OSX/Info.plist | 28 + .../ZeroTierSDK_Unity3D_iOS/Info.plist | 28 + .../ZeroTierSDK_iOS/Info.plist | 26 + .../ZeroTierSDK_iOS/ZeroTierSDK_iOS.h | 19 + .../Example_OSX_App.xcodeproj/project.pbxproj | 338 +++++ .../contents.xcworkspacedata | 7 + .../xcdebugger/Breakpoints_v2.xcbkptlist | 23 + .../xcschemes/Example_OSX_App.xcscheme | 91 ++ .../xcschemes/xcschememanagement.plist | 22 + .../OSX/Example_OSX_App/AppDelegate.swift | 24 + .../AppIcon.appiconset/Contents.json | 58 + .../Base.lproj/Main.storyboard | 917 ++++++++++++++ .../OSX/Example_OSX_App/Info.plist | 34 + .../OSX/Example_OSX_App/ViewController.swift | 275 +++++ examples/apple/example_app/OSX/README.md | 78 ++ .../Example_iOS_App.xcodeproj/project.pbxproj | 346 ++++++ .../contents.xcworkspacedata | 7 + .../xcdebugger/Breakpoints_v2.xcbkptlist | 87 ++ .../xcschemes/Example_iOS_App.xcscheme | 91 ++ .../xcschemes/xcschememanagement.plist | 22 + .../iOS/Example_iOS_App/AppDelegate.swift | 46 + .../AppIcon.appiconset/Contents.json | 73 ++ .../Base.lproj/LaunchScreen.storyboard | 27 + .../Base.lproj/Main.storyboard | 186 +++ .../iOS/Example_iOS_App/Info.plist | 47 + .../iOS/Example_iOS_App/ViewController.swift | 295 +++++ examples/apple/example_app/iOS/README.md | 54 + 40 files changed, 4806 insertions(+), 3 deletions(-) create mode 100644 examples/apple/README.md create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.pbxproj create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.xcworkspace/xcshareddata/ZeroTierSDK_Apple.xcscmblueprint create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_OSX.xcscheme create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_Unity3D_OSX.xcscheme create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_Unity3D_iOS.xcscheme create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_iOS.xcscheme create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_OSX/Info.plist create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_OSX/ZeroTierSDK_OSX.h create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Unity3D_OSX/Info.plist create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Unity3D_iOS/Info.plist create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_iOS/Info.plist create mode 100644 examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_iOS/ZeroTierSDK_iOS.h create mode 100644 examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/project.pbxproj create mode 100644 examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/Example_OSX_App.xcscheme create mode 100644 examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 examples/apple/example_app/OSX/Example_OSX_App/AppDelegate.swift create mode 100644 examples/apple/example_app/OSX/Example_OSX_App/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 examples/apple/example_app/OSX/Example_OSX_App/Base.lproj/Main.storyboard create mode 100644 examples/apple/example_app/OSX/Example_OSX_App/Info.plist create mode 100644 examples/apple/example_app/OSX/Example_OSX_App/ViewController.swift create mode 100644 examples/apple/example_app/OSX/README.md create mode 100644 examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/project.pbxproj create mode 100644 examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/Example_iOS_App.xcscheme create mode 100644 examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 examples/apple/example_app/iOS/Example_iOS_App/AppDelegate.swift create mode 100644 examples/apple/example_app/iOS/Example_iOS_App/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 examples/apple/example_app/iOS/Example_iOS_App/Base.lproj/LaunchScreen.storyboard create mode 100644 examples/apple/example_app/iOS/Example_iOS_App/Base.lproj/Main.storyboard create mode 100644 examples/apple/example_app/iOS/Example_iOS_App/Info.plist create mode 100644 examples/apple/example_app/iOS/Example_iOS_App/ViewController.swift create mode 100644 examples/apple/example_app/iOS/README.md diff --git a/README.md b/README.md index 7846e03..7ded821 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,13 @@ if((fd = zts_socket(AF_INET, SOCK_STREAM, 0)) < 0) { printf("error creating ZeroTier socket"); } if((err = zts_connect(fd, (const struct sockaddr *)addr, sizeof(addr))) < 0) { - printf("error connecting to remote host (%d)\n", err); + printf("error (%d) connecting to remote host\n", err); } -int wrote = zts_write(fd, str.c_str(), str.length()); +int wrote = zts_write(fd, str, strlen(str)); zts_close(fd); ``` -Bindings also exist for [many popular languages](). +Bindings also exist for [many popular languages](examples). ## Build Targets ### Static Library diff --git a/examples/apple/README.md b/examples/apple/README.md new file mode 100644 index 0000000..7bc2aad --- /dev/null +++ b/examples/apple/README.md @@ -0,0 +1,6 @@ +ZeroTierSDK_Apple builds the following targets: + + - iOS framework `make ios_app_framework` + - OSX framework `make osx_app_framework` + - iOS Unity3D bundle `make ios_unity3d_bundle` + - OSX Unity3D bundle `make osx_unity3d_bundle` diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.pbxproj b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.pbxproj new file mode 100644 index 0000000..db2ff1d --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.pbxproj @@ -0,0 +1,1082 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 7C810ACB1EDE0F100044F5A6 /* picoTCP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AC41EDE0F100044F5A6 /* picoTCP.cpp */; }; + 7C810ACC1EDE0F100044F5A6 /* SocketTap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AC61EDE0F100044F5A6 /* SocketTap.cpp */; }; + 7C810ACD1EDE0F100044F5A6 /* Utilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AC81EDE0F100044F5A6 /* Utilities.cpp */; }; + 7C810ACE1EDE0F100044F5A6 /* ZeroTierSDK.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810ACA1EDE0F100044F5A6 /* ZeroTierSDK.cpp */; }; + 7C810AD61EDE0F380044F5A6 /* ClusterGeoIpService.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AD01EDE0F380044F5A6 /* ClusterGeoIpService.cpp */; }; + 7C810AD71EDE0F380044F5A6 /* OneService.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AD21EDE0F380044F5A6 /* OneService.cpp */; }; + 7C810AD81EDE0F380044F5A6 /* SoftwareUpdater.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AD41EDE0F380044F5A6 /* SoftwareUpdater.cpp */; }; + 7C810AED1EDE0F500044F5A6 /* Arp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AD91EDE0F500044F5A6 /* Arp.cpp */; }; + 7C810AEE1EDE0F500044F5A6 /* BSDEthernetTap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810ADD1EDE0F500044F5A6 /* BSDEthernetTap.cpp */; }; + 7C810AEF1EDE0F500044F5A6 /* Http.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810ADF1EDE0F500044F5A6 /* Http.cpp */; }; + 7C810AF01EDE0F500044F5A6 /* ManagedRoute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AE11EDE0F500044F5A6 /* ManagedRoute.cpp */; }; + 7C810AF11EDE0F500044F5A6 /* NeighborDiscovery.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AE31EDE0F500044F5A6 /* NeighborDiscovery.cpp */; }; + 7C810AF21EDE0F500044F5A6 /* OSUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AE51EDE0F500044F5A6 /* OSUtils.cpp */; }; + 7C810AF31EDE0F500044F5A6 /* PortMapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AE81EDE0F500044F5A6 /* PortMapper.cpp */; }; + 7C810AF41EDE0F500044F5A6 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AEA1EDE0F500044F5A6 /* README.md */; }; + 7C810B3B1EDE0F5B0044F5A6 /* C25519.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AF91EDE0F5B0044F5A6 /* C25519.cpp */; }; + 7C810B3C1EDE0F5B0044F5A6 /* Capability.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AFB1EDE0F5B0044F5A6 /* Capability.cpp */; }; + 7C810B3D1EDE0F5B0044F5A6 /* CertificateOfMembership.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AFD1EDE0F5B0044F5A6 /* CertificateOfMembership.cpp */; }; + 7C810B3E1EDE0F5B0044F5A6 /* CertificateOfOwnership.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810AFF1EDE0F5B0044F5A6 /* CertificateOfOwnership.cpp */; }; + 7C810B3F1EDE0F5B0044F5A6 /* Cluster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B021EDE0F5B0044F5A6 /* Cluster.cpp */; }; + 7C810B401EDE0F5B0044F5A6 /* Identity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B081EDE0F5B0044F5A6 /* Identity.cpp */; }; + 7C810B411EDE0F5B0044F5A6 /* IncomingPacket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B0A1EDE0F5B0044F5A6 /* IncomingPacket.cpp */; }; + 7C810B421EDE0F5B0044F5A6 /* InetAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B0C1EDE0F5B0044F5A6 /* InetAddress.cpp */; }; + 7C810B431EDE0F5B0044F5A6 /* Membership.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B0F1EDE0F5B0044F5A6 /* Membership.cpp */; }; + 7C810B441EDE0F5B0044F5A6 /* Multicaster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B111EDE0F5B0044F5A6 /* Multicaster.cpp */; }; + 7C810B451EDE0F5B0044F5A6 /* Network.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B151EDE0F5B0044F5A6 /* Network.cpp */; }; + 7C810B461EDE0F5B0044F5A6 /* NetworkConfig.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B171EDE0F5B0044F5A6 /* NetworkConfig.cpp */; }; + 7C810B471EDE0F5B0044F5A6 /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B1A1EDE0F5B0044F5A6 /* Node.cpp */; }; + 7C810B481EDE0F5B0044F5A6 /* OutboundMulticast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B1D1EDE0F5B0044F5A6 /* OutboundMulticast.cpp */; }; + 7C810B491EDE0F5B0044F5A6 /* Packet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B1F1EDE0F5B0044F5A6 /* Packet.cpp */; }; + 7C810B4A1EDE0F5B0044F5A6 /* Path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B211EDE0F5B0044F5A6 /* Path.cpp */; }; + 7C810B4B1EDE0F5B0044F5A6 /* Peer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B231EDE0F5B0044F5A6 /* Peer.cpp */; }; + 7C810B4C1EDE0F5B0044F5A6 /* Poly1305.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B251EDE0F5B0044F5A6 /* Poly1305.cpp */; }; + 7C810B4D1EDE0F5B0044F5A6 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B271EDE0F5B0044F5A6 /* README.md */; }; + 7C810B4E1EDE0F5B0044F5A6 /* Revocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B281EDE0F5B0044F5A6 /* Revocation.cpp */; }; + 7C810B4F1EDE0F5B0044F5A6 /* Salsa20.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B2B1EDE0F5B0044F5A6 /* Salsa20.cpp */; }; + 7C810B501EDE0F5B0044F5A6 /* SelfAwareness.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B2D1EDE0F5B0044F5A6 /* SelfAwareness.cpp */; }; + 7C810B511EDE0F5B0044F5A6 /* SHA512.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B2F1EDE0F5B0044F5A6 /* SHA512.cpp */; }; + 7C810B521EDE0F5B0044F5A6 /* Switch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B321EDE0F5B0044F5A6 /* Switch.cpp */; }; + 7C810B531EDE0F5B0044F5A6 /* Tag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B341EDE0F5B0044F5A6 /* Tag.cpp */; }; + 7C810B541EDE0F5B0044F5A6 /* Topology.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B361EDE0F5B0044F5A6 /* Topology.cpp */; }; + 7C810B551EDE0F5B0044F5A6 /* Utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B381EDE0F5B0044F5A6 /* Utils.cpp */; }; + 7C810B581EDE0F790044F5A6 /* one.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B571EDE0F790044F5A6 /* one.cpp */; }; + 7C810B611EDE0FA60044F5A6 /* pico_device.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B591EDE0FA60044F5A6 /* pico_device.c */; }; + 7C810B621EDE0FA60044F5A6 /* pico_frame.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B5A1EDE0FA60044F5A6 /* pico_frame.c */; }; + 7C810B631EDE0FA60044F5A6 /* pico_md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B5B1EDE0FA60044F5A6 /* pico_md5.c */; }; + 7C810B641EDE0FA60044F5A6 /* pico_protocol.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B5C1EDE0FA60044F5A6 /* pico_protocol.c */; }; + 7C810B651EDE0FA60044F5A6 /* pico_socket_multicast.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B5D1EDE0FA60044F5A6 /* pico_socket_multicast.c */; }; + 7C810B661EDE0FA60044F5A6 /* pico_socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B5E1EDE0FA60044F5A6 /* pico_socket.c */; }; + 7C810B671EDE0FA60044F5A6 /* pico_stack.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B5F1EDE0FA60044F5A6 /* pico_stack.c */; }; + 7C810B681EDE0FA60044F5A6 /* pico_tree.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C810B601EDE0FA60044F5A6 /* pico_tree.c */; }; + 7CC003261D1216E3003E68DC /* ZeroTierSDK_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CC003251D1216E3003E68DC /* ZeroTierSDK_iOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 7C810AC31EDE0F100044F5A6 /* Connection.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Connection.hpp; path = ../../../src/Connection.hpp; sourceTree = ""; }; + 7C810AC41EDE0F100044F5A6 /* picoTCP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = picoTCP.cpp; path = ../../../src/picoTCP.cpp; sourceTree = ""; }; + 7C810AC51EDE0F100044F5A6 /* picoTCP.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = picoTCP.hpp; path = ../../../src/picoTCP.hpp; sourceTree = ""; }; + 7C810AC61EDE0F100044F5A6 /* SocketTap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SocketTap.cpp; path = ../../../src/SocketTap.cpp; sourceTree = ""; }; + 7C810AC71EDE0F100044F5A6 /* SocketTap.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = SocketTap.hpp; path = ../../../src/SocketTap.hpp; sourceTree = ""; }; + 7C810AC81EDE0F100044F5A6 /* Utilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Utilities.cpp; path = ../../../src/Utilities.cpp; sourceTree = ""; }; + 7C810AC91EDE0F100044F5A6 /* Utilities.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Utilities.hpp; path = ../../../src/Utilities.hpp; sourceTree = ""; }; + 7C810ACA1EDE0F100044F5A6 /* ZeroTierSDK.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZeroTierSDK.cpp; path = ../../../src/ZeroTierSDK.cpp; sourceTree = ""; }; + 7C810ACF1EDE0F380044F5A6 /* ClusterDefinition.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ClusterDefinition.hpp; path = ../../../zto/service/ClusterDefinition.hpp; sourceTree = ""; }; + 7C810AD01EDE0F380044F5A6 /* ClusterGeoIpService.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClusterGeoIpService.cpp; path = ../../../zto/service/ClusterGeoIpService.cpp; sourceTree = ""; }; + 7C810AD11EDE0F380044F5A6 /* ClusterGeoIpService.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ClusterGeoIpService.hpp; path = ../../../zto/service/ClusterGeoIpService.hpp; sourceTree = ""; }; + 7C810AD21EDE0F380044F5A6 /* OneService.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OneService.cpp; path = ../../../zto/service/OneService.cpp; sourceTree = ""; }; + 7C810AD31EDE0F380044F5A6 /* OneService.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = OneService.hpp; path = ../../../zto/service/OneService.hpp; sourceTree = ""; }; + 7C810AD41EDE0F380044F5A6 /* SoftwareUpdater.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SoftwareUpdater.cpp; path = ../../../zto/service/SoftwareUpdater.cpp; sourceTree = ""; }; + 7C810AD51EDE0F380044F5A6 /* SoftwareUpdater.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = SoftwareUpdater.hpp; path = ../../../zto/service/SoftwareUpdater.hpp; sourceTree = ""; }; + 7C810AD91EDE0F500044F5A6 /* Arp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Arp.cpp; path = ../../../zto/osdep/Arp.cpp; sourceTree = ""; }; + 7C810ADA1EDE0F500044F5A6 /* Arp.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Arp.hpp; path = ../../../zto/osdep/Arp.hpp; sourceTree = ""; }; + 7C810ADB1EDE0F500044F5A6 /* Binder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Binder.hpp; path = ../../../zto/osdep/Binder.hpp; sourceTree = ""; }; + 7C810ADC1EDE0F500044F5A6 /* BlockingQueue.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = BlockingQueue.hpp; path = ../../../zto/osdep/BlockingQueue.hpp; sourceTree = ""; }; + 7C810ADD1EDE0F500044F5A6 /* BSDEthernetTap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BSDEthernetTap.cpp; path = ../../../zto/osdep/BSDEthernetTap.cpp; sourceTree = ""; }; + 7C810ADE1EDE0F500044F5A6 /* BSDEthernetTap.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = BSDEthernetTap.hpp; path = ../../../zto/osdep/BSDEthernetTap.hpp; sourceTree = ""; }; + 7C810ADF1EDE0F500044F5A6 /* Http.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Http.cpp; path = ../../../zto/osdep/Http.cpp; sourceTree = ""; }; + 7C810AE01EDE0F500044F5A6 /* Http.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Http.hpp; path = ../../../zto/osdep/Http.hpp; sourceTree = ""; }; + 7C810AE11EDE0F500044F5A6 /* ManagedRoute.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ManagedRoute.cpp; path = ../../../zto/osdep/ManagedRoute.cpp; sourceTree = ""; }; + 7C810AE21EDE0F500044F5A6 /* ManagedRoute.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ManagedRoute.hpp; path = ../../../zto/osdep/ManagedRoute.hpp; sourceTree = ""; }; + 7C810AE31EDE0F500044F5A6 /* NeighborDiscovery.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NeighborDiscovery.cpp; path = ../../../zto/osdep/NeighborDiscovery.cpp; sourceTree = ""; }; + 7C810AE41EDE0F500044F5A6 /* NeighborDiscovery.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = NeighborDiscovery.hpp; path = ../../../zto/osdep/NeighborDiscovery.hpp; sourceTree = ""; }; + 7C810AE51EDE0F500044F5A6 /* OSUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OSUtils.cpp; path = ../../../zto/osdep/OSUtils.cpp; sourceTree = ""; }; + 7C810AE61EDE0F500044F5A6 /* OSUtils.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = OSUtils.hpp; path = ../../../zto/osdep/OSUtils.hpp; sourceTree = ""; }; + 7C810AE71EDE0F500044F5A6 /* Phy.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Phy.hpp; path = ../../../zto/osdep/Phy.hpp; sourceTree = ""; }; + 7C810AE81EDE0F500044F5A6 /* PortMapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PortMapper.cpp; path = ../../../zto/osdep/PortMapper.cpp; sourceTree = ""; }; + 7C810AE91EDE0F500044F5A6 /* PortMapper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = PortMapper.hpp; path = ../../../zto/osdep/PortMapper.hpp; sourceTree = ""; }; + 7C810AEA1EDE0F500044F5A6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../../../zto/osdep/README.md; sourceTree = ""; }; + 7C810AEB1EDE0F500044F5A6 /* TestEthernetTap.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = TestEthernetTap.hpp; path = ../../../zto/osdep/TestEthernetTap.hpp; sourceTree = ""; }; + 7C810AEC1EDE0F500044F5A6 /* Thread.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Thread.hpp; path = ../../../zto/osdep/Thread.hpp; sourceTree = ""; }; + 7C810AF51EDE0F5B0044F5A6 /* Address.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Address.hpp; path = ../../../zto/node/Address.hpp; sourceTree = ""; }; + 7C810AF61EDE0F5B0044F5A6 /* Array.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Array.hpp; path = ../../../zto/node/Array.hpp; sourceTree = ""; }; + 7C810AF71EDE0F5B0044F5A6 /* AtomicCounter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = AtomicCounter.hpp; path = ../../../zto/node/AtomicCounter.hpp; sourceTree = ""; }; + 7C810AF81EDE0F5B0044F5A6 /* Buffer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Buffer.hpp; path = ../../../zto/node/Buffer.hpp; sourceTree = ""; }; + 7C810AF91EDE0F5B0044F5A6 /* C25519.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = C25519.cpp; path = ../../../zto/node/C25519.cpp; sourceTree = ""; }; + 7C810AFA1EDE0F5B0044F5A6 /* C25519.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = C25519.hpp; path = ../../../zto/node/C25519.hpp; sourceTree = ""; }; + 7C810AFB1EDE0F5B0044F5A6 /* Capability.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Capability.cpp; path = ../../../zto/node/Capability.cpp; sourceTree = ""; }; + 7C810AFC1EDE0F5B0044F5A6 /* Capability.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Capability.hpp; path = ../../../zto/node/Capability.hpp; sourceTree = ""; }; + 7C810AFD1EDE0F5B0044F5A6 /* CertificateOfMembership.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CertificateOfMembership.cpp; path = ../../../zto/node/CertificateOfMembership.cpp; sourceTree = ""; }; + 7C810AFE1EDE0F5B0044F5A6 /* CertificateOfMembership.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = CertificateOfMembership.hpp; path = ../../../zto/node/CertificateOfMembership.hpp; sourceTree = ""; }; + 7C810AFF1EDE0F5B0044F5A6 /* CertificateOfOwnership.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CertificateOfOwnership.cpp; path = ../../../zto/node/CertificateOfOwnership.cpp; sourceTree = ""; }; + 7C810B001EDE0F5B0044F5A6 /* CertificateOfOwnership.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = CertificateOfOwnership.hpp; path = ../../../zto/node/CertificateOfOwnership.hpp; sourceTree = ""; }; + 7C810B011EDE0F5B0044F5A6 /* CertificateOfRepresentation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = CertificateOfRepresentation.hpp; path = ../../../zto/node/CertificateOfRepresentation.hpp; sourceTree = ""; }; + 7C810B021EDE0F5B0044F5A6 /* Cluster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Cluster.cpp; path = ../../../zto/node/Cluster.cpp; sourceTree = ""; }; + 7C810B031EDE0F5B0044F5A6 /* Cluster.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Cluster.hpp; path = ../../../zto/node/Cluster.hpp; sourceTree = ""; }; + 7C810B041EDE0F5B0044F5A6 /* Constants.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Constants.hpp; path = ../../../zto/node/Constants.hpp; sourceTree = ""; }; + 7C810B051EDE0F5B0044F5A6 /* Credential.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Credential.hpp; path = ../../../zto/node/Credential.hpp; sourceTree = ""; }; + 7C810B061EDE0F5B0044F5A6 /* Dictionary.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Dictionary.hpp; path = ../../../zto/node/Dictionary.hpp; sourceTree = ""; }; + 7C810B071EDE0F5B0044F5A6 /* Hashtable.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Hashtable.hpp; path = ../../../zto/node/Hashtable.hpp; sourceTree = ""; }; + 7C810B081EDE0F5B0044F5A6 /* Identity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Identity.cpp; path = ../../../zto/node/Identity.cpp; sourceTree = ""; }; + 7C810B091EDE0F5B0044F5A6 /* Identity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Identity.hpp; path = ../../../zto/node/Identity.hpp; sourceTree = ""; }; + 7C810B0A1EDE0F5B0044F5A6 /* IncomingPacket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IncomingPacket.cpp; path = ../../../zto/node/IncomingPacket.cpp; sourceTree = ""; }; + 7C810B0B1EDE0F5B0044F5A6 /* IncomingPacket.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = IncomingPacket.hpp; path = ../../../zto/node/IncomingPacket.hpp; sourceTree = ""; }; + 7C810B0C1EDE0F5B0044F5A6 /* InetAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InetAddress.cpp; path = ../../../zto/node/InetAddress.cpp; sourceTree = ""; }; + 7C810B0D1EDE0F5B0044F5A6 /* InetAddress.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = InetAddress.hpp; path = ../../../zto/node/InetAddress.hpp; sourceTree = ""; }; + 7C810B0E1EDE0F5B0044F5A6 /* MAC.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = MAC.hpp; path = ../../../zto/node/MAC.hpp; sourceTree = ""; }; + 7C810B0F1EDE0F5B0044F5A6 /* Membership.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Membership.cpp; path = ../../../zto/node/Membership.cpp; sourceTree = ""; }; + 7C810B101EDE0F5B0044F5A6 /* Membership.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Membership.hpp; path = ../../../zto/node/Membership.hpp; sourceTree = ""; }; + 7C810B111EDE0F5B0044F5A6 /* Multicaster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Multicaster.cpp; path = ../../../zto/node/Multicaster.cpp; sourceTree = ""; }; + 7C810B121EDE0F5B0044F5A6 /* Multicaster.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Multicaster.hpp; path = ../../../zto/node/Multicaster.hpp; sourceTree = ""; }; + 7C810B131EDE0F5B0044F5A6 /* MulticastGroup.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = MulticastGroup.hpp; path = ../../../zto/node/MulticastGroup.hpp; sourceTree = ""; }; + 7C810B141EDE0F5B0044F5A6 /* Mutex.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Mutex.hpp; path = ../../../zto/node/Mutex.hpp; sourceTree = ""; }; + 7C810B151EDE0F5B0044F5A6 /* Network.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Network.cpp; path = ../../../zto/node/Network.cpp; sourceTree = ""; }; + 7C810B161EDE0F5B0044F5A6 /* Network.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Network.hpp; path = ../../../zto/node/Network.hpp; sourceTree = ""; }; + 7C810B171EDE0F5B0044F5A6 /* NetworkConfig.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkConfig.cpp; path = ../../../zto/node/NetworkConfig.cpp; sourceTree = ""; }; + 7C810B181EDE0F5B0044F5A6 /* NetworkConfig.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = NetworkConfig.hpp; path = ../../../zto/node/NetworkConfig.hpp; sourceTree = ""; }; + 7C810B191EDE0F5B0044F5A6 /* NetworkController.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = NetworkController.hpp; path = ../../../zto/node/NetworkController.hpp; sourceTree = ""; }; + 7C810B1A1EDE0F5B0044F5A6 /* Node.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Node.cpp; path = ../../../zto/node/Node.cpp; sourceTree = ""; }; + 7C810B1B1EDE0F5B0044F5A6 /* Node.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Node.hpp; path = ../../../zto/node/Node.hpp; sourceTree = ""; }; + 7C810B1C1EDE0F5B0044F5A6 /* NonCopyable.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = NonCopyable.hpp; path = ../../../zto/node/NonCopyable.hpp; sourceTree = ""; }; + 7C810B1D1EDE0F5B0044F5A6 /* OutboundMulticast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OutboundMulticast.cpp; path = ../../../zto/node/OutboundMulticast.cpp; sourceTree = ""; }; + 7C810B1E1EDE0F5B0044F5A6 /* OutboundMulticast.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = OutboundMulticast.hpp; path = ../../../zto/node/OutboundMulticast.hpp; sourceTree = ""; }; + 7C810B1F1EDE0F5B0044F5A6 /* Packet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Packet.cpp; path = ../../../zto/node/Packet.cpp; sourceTree = ""; }; + 7C810B201EDE0F5B0044F5A6 /* Packet.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Packet.hpp; path = ../../../zto/node/Packet.hpp; sourceTree = ""; }; + 7C810B211EDE0F5B0044F5A6 /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Path.cpp; path = ../../../zto/node/Path.cpp; sourceTree = ""; }; + 7C810B221EDE0F5B0044F5A6 /* Path.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Path.hpp; path = ../../../zto/node/Path.hpp; sourceTree = ""; }; + 7C810B231EDE0F5B0044F5A6 /* Peer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Peer.cpp; path = ../../../zto/node/Peer.cpp; sourceTree = ""; }; + 7C810B241EDE0F5B0044F5A6 /* Peer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Peer.hpp; path = ../../../zto/node/Peer.hpp; sourceTree = ""; }; + 7C810B251EDE0F5B0044F5A6 /* Poly1305.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Poly1305.cpp; path = ../../../zto/node/Poly1305.cpp; sourceTree = ""; }; + 7C810B261EDE0F5B0044F5A6 /* Poly1305.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Poly1305.hpp; path = ../../../zto/node/Poly1305.hpp; sourceTree = ""; }; + 7C810B271EDE0F5B0044F5A6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../../../zto/node/README.md; sourceTree = ""; }; + 7C810B281EDE0F5B0044F5A6 /* Revocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Revocation.cpp; path = ../../../zto/node/Revocation.cpp; sourceTree = ""; }; + 7C810B291EDE0F5B0044F5A6 /* Revocation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Revocation.hpp; path = ../../../zto/node/Revocation.hpp; sourceTree = ""; }; + 7C810B2A1EDE0F5B0044F5A6 /* RuntimeEnvironment.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = RuntimeEnvironment.hpp; path = ../../../zto/node/RuntimeEnvironment.hpp; sourceTree = ""; }; + 7C810B2B1EDE0F5B0044F5A6 /* Salsa20.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Salsa20.cpp; path = ../../../zto/node/Salsa20.cpp; sourceTree = ""; }; + 7C810B2C1EDE0F5B0044F5A6 /* Salsa20.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Salsa20.hpp; path = ../../../zto/node/Salsa20.hpp; sourceTree = ""; }; + 7C810B2D1EDE0F5B0044F5A6 /* SelfAwareness.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SelfAwareness.cpp; path = ../../../zto/node/SelfAwareness.cpp; sourceTree = ""; }; + 7C810B2E1EDE0F5B0044F5A6 /* SelfAwareness.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = SelfAwareness.hpp; path = ../../../zto/node/SelfAwareness.hpp; sourceTree = ""; }; + 7C810B2F1EDE0F5B0044F5A6 /* SHA512.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SHA512.cpp; path = ../../../zto/node/SHA512.cpp; sourceTree = ""; }; + 7C810B301EDE0F5B0044F5A6 /* SHA512.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = SHA512.hpp; path = ../../../zto/node/SHA512.hpp; sourceTree = ""; }; + 7C810B311EDE0F5B0044F5A6 /* SharedPtr.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = SharedPtr.hpp; path = ../../../zto/node/SharedPtr.hpp; sourceTree = ""; }; + 7C810B321EDE0F5B0044F5A6 /* Switch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Switch.cpp; path = ../../../zto/node/Switch.cpp; sourceTree = ""; }; + 7C810B331EDE0F5B0044F5A6 /* Switch.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Switch.hpp; path = ../../../zto/node/Switch.hpp; sourceTree = ""; }; + 7C810B341EDE0F5B0044F5A6 /* Tag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Tag.cpp; path = ../../../zto/node/Tag.cpp; sourceTree = ""; }; + 7C810B351EDE0F5B0044F5A6 /* Tag.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Tag.hpp; path = ../../../zto/node/Tag.hpp; sourceTree = ""; }; + 7C810B361EDE0F5B0044F5A6 /* Topology.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Topology.cpp; path = ../../../zto/node/Topology.cpp; sourceTree = ""; }; + 7C810B371EDE0F5B0044F5A6 /* Topology.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Topology.hpp; path = ../../../zto/node/Topology.hpp; sourceTree = ""; }; + 7C810B381EDE0F5B0044F5A6 /* Utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Utils.cpp; path = ../../../zto/node/Utils.cpp; sourceTree = ""; }; + 7C810B391EDE0F5B0044F5A6 /* Utils.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Utils.hpp; path = ../../../zto/node/Utils.hpp; sourceTree = ""; }; + 7C810B3A1EDE0F5B0044F5A6 /* World.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = World.hpp; path = ../../../zto/node/World.hpp; sourceTree = ""; }; + 7C810B561EDE0F6B0044F5A6 /* ZeroTierOne.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZeroTierOne.h; path = ../../../zto/include/ZeroTierOne.h; sourceTree = ""; }; + 7C810B571EDE0F790044F5A6 /* one.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = one.cpp; path = ../../../zto/one.cpp; sourceTree = ""; }; + 7C810B591EDE0FA60044F5A6 /* pico_device.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pico_device.c; path = ../../../ext/picotcp/stack/pico_device.c; sourceTree = ""; }; + 7C810B5A1EDE0FA60044F5A6 /* pico_frame.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pico_frame.c; path = ../../../ext/picotcp/stack/pico_frame.c; sourceTree = ""; }; + 7C810B5B1EDE0FA60044F5A6 /* pico_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pico_md5.c; path = ../../../ext/picotcp/stack/pico_md5.c; sourceTree = ""; }; + 7C810B5C1EDE0FA60044F5A6 /* pico_protocol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pico_protocol.c; path = ../../../ext/picotcp/stack/pico_protocol.c; sourceTree = ""; }; + 7C810B5D1EDE0FA60044F5A6 /* pico_socket_multicast.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pico_socket_multicast.c; path = ../../../ext/picotcp/stack/pico_socket_multicast.c; sourceTree = ""; }; + 7C810B5E1EDE0FA60044F5A6 /* pico_socket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pico_socket.c; path = ../../../ext/picotcp/stack/pico_socket.c; sourceTree = ""; }; + 7C810B5F1EDE0FA60044F5A6 /* pico_stack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pico_stack.c; path = ../../../ext/picotcp/stack/pico_stack.c; sourceTree = ""; }; + 7C810B601EDE0FA60044F5A6 /* pico_tree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pico_tree.c; path = ../../../ext/picotcp/stack/pico_tree.c; sourceTree = ""; }; + 7CC003181D1216B0003E68DC /* ZeroTierSDK_Unity3D_iOS.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZeroTierSDK_Unity3D_iOS.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 7CC0031A1D1216B0003E68DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7CC003231D1216E3003E68DC /* ZeroTierSDK_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ZeroTierSDK_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7CC003251D1216E3003E68DC /* ZeroTierSDK_iOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZeroTierSDK_iOS.h; sourceTree = ""; }; + 7CC003271D1216E3003E68DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7CC003301D1216F8003E68DC /* ZeroTierSDK_OSX.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ZeroTierSDK_OSX.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7CC003321D1216F8003E68DC /* ZeroTierSDK_OSX.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZeroTierSDK_OSX.h; sourceTree = ""; }; + 7CC003341D1216F8003E68DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7CC0033C1D121741003E68DC /* ZeroTierSDK_Unity3D_OSX.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZeroTierSDK_Unity3D_OSX.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 7CC0033E1D121742003E68DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7CC003151D1216B0003E68DC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7CC0031F1D1216E3003E68DC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7CC0032C1D1216F8003E68DC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7CC003391D121741003E68DC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7C969B211DB99CA800BD3F7F /* picoTCP */ = { + isa = PBXGroup; + children = ( + 7C810B591EDE0FA60044F5A6 /* pico_device.c */, + 7C810B5A1EDE0FA60044F5A6 /* pico_frame.c */, + 7C810B5B1EDE0FA60044F5A6 /* pico_md5.c */, + 7C810B5C1EDE0FA60044F5A6 /* pico_protocol.c */, + 7C810B5D1EDE0FA60044F5A6 /* pico_socket_multicast.c */, + 7C810B5E1EDE0FA60044F5A6 /* pico_socket.c */, + 7C810B5F1EDE0FA60044F5A6 /* pico_stack.c */, + 7C810B601EDE0FA60044F5A6 /* pico_tree.c */, + ); + name = picoTCP; + sourceTree = ""; + }; + 7CC002FB1D12164D003E68DC = { + isa = PBXGroup; + children = ( + 7C969B211DB99CA800BD3F7F /* picoTCP */, + 7CC003131D12167D003E68DC /* SDK */, + 7CC003121D121677003E68DC /* ZeroTier */, + 7CC003191D1216B0003E68DC /* ZeroTierSDK_Unity3D_iOS */, + 7CC003241D1216E3003E68DC /* ZeroTierSDK_iOS */, + 7CC003311D1216F8003E68DC /* ZeroTierSDK_OSX */, + 7CC0033D1D121742003E68DC /* ZeroTierSDK_Unity3D_OSX */, + 7CC003061D12164D003E68DC /* Products */, + ); + sourceTree = ""; + }; + 7CC003061D12164D003E68DC /* Products */ = { + isa = PBXGroup; + children = ( + 7CC003181D1216B0003E68DC /* ZeroTierSDK_Unity3D_iOS.bundle */, + 7CC003231D1216E3003E68DC /* ZeroTierSDK_iOS.framework */, + 7CC003301D1216F8003E68DC /* ZeroTierSDK_OSX.framework */, + 7CC0033C1D121741003E68DC /* ZeroTierSDK_Unity3D_OSX.bundle */, + ); + name = Products; + sourceTree = ""; + }; + 7CC003121D121677003E68DC /* ZeroTier */ = { + isa = PBXGroup; + children = ( + 7C810B571EDE0F790044F5A6 /* one.cpp */, + 7C810B561EDE0F6B0044F5A6 /* ZeroTierOne.h */, + 7C810AF51EDE0F5B0044F5A6 /* Address.hpp */, + 7C810AF61EDE0F5B0044F5A6 /* Array.hpp */, + 7C810AF71EDE0F5B0044F5A6 /* AtomicCounter.hpp */, + 7C810AF81EDE0F5B0044F5A6 /* Buffer.hpp */, + 7C810AF91EDE0F5B0044F5A6 /* C25519.cpp */, + 7C810AFA1EDE0F5B0044F5A6 /* C25519.hpp */, + 7C810AFB1EDE0F5B0044F5A6 /* Capability.cpp */, + 7C810AFC1EDE0F5B0044F5A6 /* Capability.hpp */, + 7C810AFD1EDE0F5B0044F5A6 /* CertificateOfMembership.cpp */, + 7C810AFE1EDE0F5B0044F5A6 /* CertificateOfMembership.hpp */, + 7C810AFF1EDE0F5B0044F5A6 /* CertificateOfOwnership.cpp */, + 7C810B001EDE0F5B0044F5A6 /* CertificateOfOwnership.hpp */, + 7C810B011EDE0F5B0044F5A6 /* CertificateOfRepresentation.hpp */, + 7C810B021EDE0F5B0044F5A6 /* Cluster.cpp */, + 7C810B031EDE0F5B0044F5A6 /* Cluster.hpp */, + 7C810B041EDE0F5B0044F5A6 /* Constants.hpp */, + 7C810B051EDE0F5B0044F5A6 /* Credential.hpp */, + 7C810B061EDE0F5B0044F5A6 /* Dictionary.hpp */, + 7C810B071EDE0F5B0044F5A6 /* Hashtable.hpp */, + 7C810B081EDE0F5B0044F5A6 /* Identity.cpp */, + 7C810B091EDE0F5B0044F5A6 /* Identity.hpp */, + 7C810B0A1EDE0F5B0044F5A6 /* IncomingPacket.cpp */, + 7C810B0B1EDE0F5B0044F5A6 /* IncomingPacket.hpp */, + 7C810B0C1EDE0F5B0044F5A6 /* InetAddress.cpp */, + 7C810B0D1EDE0F5B0044F5A6 /* InetAddress.hpp */, + 7C810B0E1EDE0F5B0044F5A6 /* MAC.hpp */, + 7C810B0F1EDE0F5B0044F5A6 /* Membership.cpp */, + 7C810B101EDE0F5B0044F5A6 /* Membership.hpp */, + 7C810B111EDE0F5B0044F5A6 /* Multicaster.cpp */, + 7C810B121EDE0F5B0044F5A6 /* Multicaster.hpp */, + 7C810B131EDE0F5B0044F5A6 /* MulticastGroup.hpp */, + 7C810B141EDE0F5B0044F5A6 /* Mutex.hpp */, + 7C810B151EDE0F5B0044F5A6 /* Network.cpp */, + 7C810B161EDE0F5B0044F5A6 /* Network.hpp */, + 7C810B171EDE0F5B0044F5A6 /* NetworkConfig.cpp */, + 7C810B181EDE0F5B0044F5A6 /* NetworkConfig.hpp */, + 7C810B191EDE0F5B0044F5A6 /* NetworkController.hpp */, + 7C810B1A1EDE0F5B0044F5A6 /* Node.cpp */, + 7C810B1B1EDE0F5B0044F5A6 /* Node.hpp */, + 7C810B1C1EDE0F5B0044F5A6 /* NonCopyable.hpp */, + 7C810B1D1EDE0F5B0044F5A6 /* OutboundMulticast.cpp */, + 7C810B1E1EDE0F5B0044F5A6 /* OutboundMulticast.hpp */, + 7C810B1F1EDE0F5B0044F5A6 /* Packet.cpp */, + 7C810B201EDE0F5B0044F5A6 /* Packet.hpp */, + 7C810B211EDE0F5B0044F5A6 /* Path.cpp */, + 7C810B221EDE0F5B0044F5A6 /* Path.hpp */, + 7C810B231EDE0F5B0044F5A6 /* Peer.cpp */, + 7C810B241EDE0F5B0044F5A6 /* Peer.hpp */, + 7C810B251EDE0F5B0044F5A6 /* Poly1305.cpp */, + 7C810B261EDE0F5B0044F5A6 /* Poly1305.hpp */, + 7C810B271EDE0F5B0044F5A6 /* README.md */, + 7C810B281EDE0F5B0044F5A6 /* Revocation.cpp */, + 7C810B291EDE0F5B0044F5A6 /* Revocation.hpp */, + 7C810B2A1EDE0F5B0044F5A6 /* RuntimeEnvironment.hpp */, + 7C810B2B1EDE0F5B0044F5A6 /* Salsa20.cpp */, + 7C810B2C1EDE0F5B0044F5A6 /* Salsa20.hpp */, + 7C810B2D1EDE0F5B0044F5A6 /* SelfAwareness.cpp */, + 7C810B2E1EDE0F5B0044F5A6 /* SelfAwareness.hpp */, + 7C810B2F1EDE0F5B0044F5A6 /* SHA512.cpp */, + 7C810B301EDE0F5B0044F5A6 /* SHA512.hpp */, + 7C810B311EDE0F5B0044F5A6 /* SharedPtr.hpp */, + 7C810B321EDE0F5B0044F5A6 /* Switch.cpp */, + 7C810B331EDE0F5B0044F5A6 /* Switch.hpp */, + 7C810B341EDE0F5B0044F5A6 /* Tag.cpp */, + 7C810B351EDE0F5B0044F5A6 /* Tag.hpp */, + 7C810B361EDE0F5B0044F5A6 /* Topology.cpp */, + 7C810B371EDE0F5B0044F5A6 /* Topology.hpp */, + 7C810B381EDE0F5B0044F5A6 /* Utils.cpp */, + 7C810B391EDE0F5B0044F5A6 /* Utils.hpp */, + 7C810B3A1EDE0F5B0044F5A6 /* World.hpp */, + 7C810AD91EDE0F500044F5A6 /* Arp.cpp */, + 7C810ADA1EDE0F500044F5A6 /* Arp.hpp */, + 7C810ADB1EDE0F500044F5A6 /* Binder.hpp */, + 7C810ADC1EDE0F500044F5A6 /* BlockingQueue.hpp */, + 7C810ADD1EDE0F500044F5A6 /* BSDEthernetTap.cpp */, + 7C810ADE1EDE0F500044F5A6 /* BSDEthernetTap.hpp */, + 7C810ADF1EDE0F500044F5A6 /* Http.cpp */, + 7C810AE01EDE0F500044F5A6 /* Http.hpp */, + 7C810AE11EDE0F500044F5A6 /* ManagedRoute.cpp */, + 7C810AE21EDE0F500044F5A6 /* ManagedRoute.hpp */, + 7C810AE31EDE0F500044F5A6 /* NeighborDiscovery.cpp */, + 7C810AE41EDE0F500044F5A6 /* NeighborDiscovery.hpp */, + 7C810AE51EDE0F500044F5A6 /* OSUtils.cpp */, + 7C810AE61EDE0F500044F5A6 /* OSUtils.hpp */, + 7C810AE71EDE0F500044F5A6 /* Phy.hpp */, + 7C810AE81EDE0F500044F5A6 /* PortMapper.cpp */, + 7C810AE91EDE0F500044F5A6 /* PortMapper.hpp */, + 7C810AEA1EDE0F500044F5A6 /* README.md */, + 7C810AEB1EDE0F500044F5A6 /* TestEthernetTap.hpp */, + 7C810AEC1EDE0F500044F5A6 /* Thread.hpp */, + 7C810ACF1EDE0F380044F5A6 /* ClusterDefinition.hpp */, + 7C810AD01EDE0F380044F5A6 /* ClusterGeoIpService.cpp */, + 7C810AD11EDE0F380044F5A6 /* ClusterGeoIpService.hpp */, + 7C810AD21EDE0F380044F5A6 /* OneService.cpp */, + 7C810AD31EDE0F380044F5A6 /* OneService.hpp */, + 7C810AD41EDE0F380044F5A6 /* SoftwareUpdater.cpp */, + 7C810AD51EDE0F380044F5A6 /* SoftwareUpdater.hpp */, + ); + name = ZeroTier; + sourceTree = ""; + }; + 7CC003131D12167D003E68DC /* SDK */ = { + isa = PBXGroup; + children = ( + 7C810AC31EDE0F100044F5A6 /* Connection.hpp */, + 7C810AC41EDE0F100044F5A6 /* picoTCP.cpp */, + 7C810AC51EDE0F100044F5A6 /* picoTCP.hpp */, + 7C810AC61EDE0F100044F5A6 /* SocketTap.cpp */, + 7C810AC71EDE0F100044F5A6 /* SocketTap.hpp */, + 7C810AC81EDE0F100044F5A6 /* Utilities.cpp */, + 7C810AC91EDE0F100044F5A6 /* Utilities.hpp */, + 7C810ACA1EDE0F100044F5A6 /* ZeroTierSDK.cpp */, + ); + name = SDK; + sourceTree = ""; + }; + 7CC003191D1216B0003E68DC /* ZeroTierSDK_Unity3D_iOS */ = { + isa = PBXGroup; + children = ( + 7CC0031A1D1216B0003E68DC /* Info.plist */, + ); + path = ZeroTierSDK_Unity3D_iOS; + sourceTree = ""; + }; + 7CC003241D1216E3003E68DC /* ZeroTierSDK_iOS */ = { + isa = PBXGroup; + children = ( + 7CC003251D1216E3003E68DC /* ZeroTierSDK_iOS.h */, + 7CC003271D1216E3003E68DC /* Info.plist */, + ); + path = ZeroTierSDK_iOS; + sourceTree = ""; + }; + 7CC003311D1216F8003E68DC /* ZeroTierSDK_OSX */ = { + isa = PBXGroup; + children = ( + 7CC003321D1216F8003E68DC /* ZeroTierSDK_OSX.h */, + 7CC003341D1216F8003E68DC /* Info.plist */, + ); + path = ZeroTierSDK_OSX; + sourceTree = ""; + }; + 7CC0033D1D121742003E68DC /* ZeroTierSDK_Unity3D_OSX */ = { + isa = PBXGroup; + children = ( + 7CC0033E1D121742003E68DC /* Info.plist */, + ); + path = ZeroTierSDK_Unity3D_OSX; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 7CC003201D1216E3003E68DC /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 7CC003261D1216E3003E68DC /* ZeroTierSDK_iOS.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7CC0032D1D1216F8003E68DC /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 7CC003171D1216B0003E68DC /* ZeroTierSDK_Unity3D_iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7CC0031B1D1216B0003E68DC /* Build configuration list for PBXNativeTarget "ZeroTierSDK_Unity3D_iOS" */; + buildPhases = ( + 7CC003141D1216B0003E68DC /* Sources */, + 7CC003151D1216B0003E68DC /* Frameworks */, + 7CC003161D1216B0003E68DC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ZeroTierSDK_Unity3D_iOS; + productName = ZeroTierSDK_Unity3D_iOS; + productReference = 7CC003181D1216B0003E68DC /* ZeroTierSDK_Unity3D_iOS.bundle */; + productType = "com.apple.product-type.bundle"; + }; + 7CC003221D1216E3003E68DC /* ZeroTierSDK_iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7CC003281D1216E3003E68DC /* Build configuration list for PBXNativeTarget "ZeroTierSDK_iOS" */; + buildPhases = ( + 7CC0031E1D1216E3003E68DC /* Sources */, + 7CC0031F1D1216E3003E68DC /* Frameworks */, + 7CC003201D1216E3003E68DC /* Headers */, + 7CC003211D1216E3003E68DC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ZeroTierSDK_iOS; + productName = ZeroTierSDK_iOS; + productReference = 7CC003231D1216E3003E68DC /* ZeroTierSDK_iOS.framework */; + productType = "com.apple.product-type.framework"; + }; + 7CC0032F1D1216F8003E68DC /* ZeroTierSDK_OSX */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7CC003351D1216F8003E68DC /* Build configuration list for PBXNativeTarget "ZeroTierSDK_OSX" */; + buildPhases = ( + 7CC0032B1D1216F8003E68DC /* Sources */, + 7CC0032C1D1216F8003E68DC /* Frameworks */, + 7CC0032D1D1216F8003E68DC /* Headers */, + 7CC0032E1D1216F8003E68DC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ZeroTierSDK_OSX; + productName = ZeroTierSDK_OSX; + productReference = 7CC003301D1216F8003E68DC /* ZeroTierSDK_OSX.framework */; + productType = "com.apple.product-type.framework"; + }; + 7CC0033B1D121741003E68DC /* ZeroTierSDK_Unity3D_OSX */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7CC0033F1D121742003E68DC /* Build configuration list for PBXNativeTarget "ZeroTierSDK_Unity3D_OSX" */; + buildPhases = ( + 7CC003381D121741003E68DC /* Sources */, + 7CC003391D121741003E68DC /* Frameworks */, + 7CC0033A1D121741003E68DC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ZeroTierSDK_Unity3D_OSX; + productName = ZeroTierSDK_Unity3D_OSX; + productReference = 7CC0033C1D121741003E68DC /* ZeroTierSDK_Unity3D_OSX.bundle */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7CC002FC1D12164D003E68DC /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0820; + ORGANIZATIONNAME = "ZeroTier Inc."; + TargetAttributes = { + 7CC003171D1216B0003E68DC = { + CreatedOnToolsVersion = 7.3; + }; + 7CC003221D1216E3003E68DC = { + CreatedOnToolsVersion = 7.3; + DevelopmentTeam = 8ZD9JUCZ4V; + }; + 7CC0032F1D1216F8003E68DC = { + CreatedOnToolsVersion = 7.3; + DevelopmentTeam = 8ZD9JUCZ4V; + }; + 7CC0033B1D121741003E68DC = { + CreatedOnToolsVersion = 7.3; + }; + }; + }; + buildConfigurationList = 7CC002FF1D12164D003E68DC /* Build configuration list for PBXProject "ZeroTierSDK_Apple" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7CC002FB1D12164D003E68DC; + productRefGroup = 7CC003061D12164D003E68DC /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7CC003171D1216B0003E68DC /* ZeroTierSDK_Unity3D_iOS */, + 7CC0033B1D121741003E68DC /* ZeroTierSDK_Unity3D_OSX */, + 7CC003221D1216E3003E68DC /* ZeroTierSDK_iOS */, + 7CC0032F1D1216F8003E68DC /* ZeroTierSDK_OSX */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7CC003161D1216B0003E68DC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7CC003211D1216E3003E68DC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7CC0032E1D1216F8003E68DC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7CC0033A1D121741003E68DC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7CC003141D1216B0003E68DC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7C810B651EDE0FA60044F5A6 /* pico_socket_multicast.c in Sources */, + 7C810AEE1EDE0F500044F5A6 /* BSDEthernetTap.cpp in Sources */, + 7C810B4F1EDE0F5B0044F5A6 /* Salsa20.cpp in Sources */, + 7C810AEF1EDE0F500044F5A6 /* Http.cpp in Sources */, + 7C810B3D1EDE0F5B0044F5A6 /* CertificateOfMembership.cpp in Sources */, + 7C810B511EDE0F5B0044F5A6 /* SHA512.cpp in Sources */, + 7C810B631EDE0FA60044F5A6 /* pico_md5.c in Sources */, + 7C810B481EDE0F5B0044F5A6 /* OutboundMulticast.cpp in Sources */, + 7C810B471EDE0F5B0044F5A6 /* Node.cpp in Sources */, + 7C810B411EDE0F5B0044F5A6 /* IncomingPacket.cpp in Sources */, + 7C810ACE1EDE0F100044F5A6 /* ZeroTierSDK.cpp in Sources */, + 7C810B441EDE0F5B0044F5A6 /* Multicaster.cpp in Sources */, + 7C810B431EDE0F5B0044F5A6 /* Membership.cpp in Sources */, + 7C810B3C1EDE0F5B0044F5A6 /* Capability.cpp in Sources */, + 7C810AD71EDE0F380044F5A6 /* OneService.cpp in Sources */, + 7C810AED1EDE0F500044F5A6 /* Arp.cpp in Sources */, + 7C810B661EDE0FA60044F5A6 /* pico_socket.c in Sources */, + 7C810B421EDE0F5B0044F5A6 /* InetAddress.cpp in Sources */, + 7C810ACD1EDE0F100044F5A6 /* Utilities.cpp in Sources */, + 7C810B4D1EDE0F5B0044F5A6 /* README.md in Sources */, + 7C810B4A1EDE0F5B0044F5A6 /* Path.cpp in Sources */, + 7C810B491EDE0F5B0044F5A6 /* Packet.cpp in Sources */, + 7C810ACC1EDE0F100044F5A6 /* SocketTap.cpp in Sources */, + 7C810B531EDE0F5B0044F5A6 /* Tag.cpp in Sources */, + 7C810B3B1EDE0F5B0044F5A6 /* C25519.cpp in Sources */, + 7C810B3E1EDE0F5B0044F5A6 /* CertificateOfOwnership.cpp in Sources */, + 7C810B641EDE0FA60044F5A6 /* pico_protocol.c in Sources */, + 7C810AD61EDE0F380044F5A6 /* ClusterGeoIpService.cpp in Sources */, + 7C810AF41EDE0F500044F5A6 /* README.md in Sources */, + 7C810B3F1EDE0F5B0044F5A6 /* Cluster.cpp in Sources */, + 7C810B621EDE0FA60044F5A6 /* pico_frame.c in Sources */, + 7C810B451EDE0F5B0044F5A6 /* Network.cpp in Sources */, + 7C810AD81EDE0F380044F5A6 /* SoftwareUpdater.cpp in Sources */, + 7C810AF11EDE0F500044F5A6 /* NeighborDiscovery.cpp in Sources */, + 7C810AF31EDE0F500044F5A6 /* PortMapper.cpp in Sources */, + 7C810AF01EDE0F500044F5A6 /* ManagedRoute.cpp in Sources */, + 7C810B401EDE0F5B0044F5A6 /* Identity.cpp in Sources */, + 7C810B611EDE0FA60044F5A6 /* pico_device.c in Sources */, + 7C810B4C1EDE0F5B0044F5A6 /* Poly1305.cpp in Sources */, + 7C810B671EDE0FA60044F5A6 /* pico_stack.c in Sources */, + 7C810B551EDE0F5B0044F5A6 /* Utils.cpp in Sources */, + 7C810B501EDE0F5B0044F5A6 /* SelfAwareness.cpp in Sources */, + 7C810B521EDE0F5B0044F5A6 /* Switch.cpp in Sources */, + 7C810B581EDE0F790044F5A6 /* one.cpp in Sources */, + 7C810B4B1EDE0F5B0044F5A6 /* Peer.cpp in Sources */, + 7C810B4E1EDE0F5B0044F5A6 /* Revocation.cpp in Sources */, + 7C810B681EDE0FA60044F5A6 /* pico_tree.c in Sources */, + 7C810B541EDE0F5B0044F5A6 /* Topology.cpp in Sources */, + 7C810ACB1EDE0F100044F5A6 /* picoTCP.cpp in Sources */, + 7C810B461EDE0F5B0044F5A6 /* NetworkConfig.cpp in Sources */, + 7C810AF21EDE0F500044F5A6 /* OSUtils.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7CC0031E1D1216E3003E68DC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7CC0032B1D1216F8003E68DC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7CC003381D121741003E68DC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 7CC0030B1D12164D003E68DC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 7CC0030C1D12164D003E68DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 7CC0031C1D1216B0003E68DC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + ENABLE_BITCODE = NO; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../../zerotierone", + "$(SRCROOT)/../../../ext/lwip/src/include/", + "$(SRCROOT)/../../../ext/lwip/src/include/ipv4/", + "$(SRCROOT)/../../../ext/", + "$(SRCROOT)/../../../src", + "$(SRCROOT)/../../../src/stack_drivers/lwip/", + ); + INFOPLIST_FILE = ZeroTierSDK_Unity3D_iOS/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + OTHER_CFLAGS = ( + "-D__UNITY_3D__", + "-DSDK", + "-DSDK_DEBUG", + "-D__IOS__", + "-DSDK_IPV4", + "-DSDK_LWIP", + ); + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.ZeroTierSDK-Unity3D-iOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + 7CC0031D1D1216B0003E68DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + ENABLE_BITCODE = NO; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../../zerotierone", + "$(SRCROOT)/../../../ext/lwip/src/include/", + "$(SRCROOT)/../../../ext/lwip/src/include/ipv4/", + "$(SRCROOT)/../../../ext/", + "$(SRCROOT)/../../../src", + "$(SRCROOT)/../../../src/stack_drivers/lwip/", + ); + INFOPLIST_FILE = ZeroTierSDK_Unity3D_iOS/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + OTHER_CFLAGS = ( + "-D__UNITY_3D__", + "-DSDK", + "-D__IOS__", + "-DSDK_IPV4", + "-DSDK_LWIP", + ); + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.ZeroTierSDK-Unity3D-iOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; + 7CC003291D1216E3003E68DC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../../ext/lwip/src/include/ipv4", + "$(SRCROOT)/../../../ext/lwip/src/include", + "$(SRCROOT)/../../../ext", + "$(SRCROOT)/../../../zerotierone", + "$(SRCROOT)/../../../src/stack_drivers/lwip", + "$(SRCROOT)/../../../src", + ); + INFOPLIST_FILE = ZeroTierSDK_iOS/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_CFLAGS = ( + "-DSDK_DEBUG", + "-DSDK", + "-D__IOS__", + "-DSDK_BUNDLED", + "-DUSING_BRIDGING_HEADER", + "-DSDK_IPV4", + "-D_APP_FRAMEWORK", + "-DSDK_LWIP", + ); + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.ZeroTierSDK-iOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 7CC0032A1D1216E3003E68DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../../ext/lwip/src/include/ipv4", + "$(SRCROOT)/../../../ext/lwip/src/include", + "$(SRCROOT)/../../../ext", + "$(SRCROOT)/../../../zerotierone", + "$(SRCROOT)/../../../src/stack_drivers/lwip", + "$(SRCROOT)/../../../src", + ); + INFOPLIST_FILE = ZeroTierSDK_iOS/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + ONLY_ACTIVE_ARCH = YES; + OTHER_CFLAGS = ( + "-DSDK", + "-D__IOS__", + "-DSDK_BUNDLED", + "-DUSING_BRIDGING_HEADER", + "-D__APP_FRAMEWORK__", + "-DSDK_IPV4", + "-DSDK_LWIP", + ); + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.ZeroTierSDK-iOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 7CC003361D1216F8003E68DC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../../zerotierone/", + "$(SRCROOT)/../../../ext/lwip/src/include", + "$(SRCROOT)/../../../ext/lwip/src/include/ipv4/", + "$(SRCROOT)/../../../ext/", + "$(SRCROOT)/../../../src", + ); + INFOPLIST_FILE = ZeroTierSDK_OSX/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + OTHER_CFLAGS = ( + "-DSDK", + "-DSDK_SERVICE", + "-DSDK_BUNDLED", + "-DSDK_DEBUG", + "-D__XCODE__", + "-DSDK_IPV4", + "-DUSING_BRIDGING_HEADER", + "-DSDK_LWIP", + "-D__APP_FRAMEWORK__", + ); + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.ZeroTierSDK-OSX"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 7CC003371D1216F8003E68DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../../zerotierone/", + "$(SRCROOT)/../../../ext/lwip/src/include", + "$(SRCROOT)/../../../ext/lwip/src/include/ipv4/", + "$(SRCROOT)/../../../ext/", + "$(SRCROOT)/../../../src", + ); + INFOPLIST_FILE = ZeroTierSDK_OSX/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + ONLY_ACTIVE_ARCH = YES; + OTHER_CFLAGS = ( + "-DSDK", + "-DSDK_SERVICE", + "-DSDK_BUNDLED", + "-D__XCODE__", + "-D__APP_FRAMEWORK__", + "-DSDK_IPV4", + "-DSDK_LWIP", + ); + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.ZeroTierSDK-OSX"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 7CC003401D121742003E68DC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../../ext/lwip/src/include/ipv4/", + "$(SRCROOT)/../../../zerotierone", + "$(SRCROOT)/../../../ext/lwip/src/include/", + "$(SRCROOT)/../../../ext", + "$(SRCROOT)/../../../src", + ); + INFOPLIST_FILE = ZeroTierSDK_Unity3D_OSX/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + OTHER_CFLAGS = ( + "-DSDK_DEBUG", + "-DSDK", + "-D__UNITY_3D__", + "-DSDK_BUNDLED", + "-DSDK_IPV4=1", + "-DSDK_LWIP=1", + ); + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.ZeroTierSDK-Unity3D-OSX"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + 7CC003411D121742003E68DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../../ext/lwip/src/include/ipv4/", + "$(SRCROOT)/../../../zerotierone", + "$(SRCROOT)/../../../ext/lwip/src/include/", + "$(SRCROOT)/../../../ext", + "$(SRCROOT)/../../../src", + ); + INFOPLIST_FILE = ZeroTierSDK_Unity3D_OSX/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + ONLY_ACTIVE_ARCH = YES; + OTHER_CFLAGS = ( + "-DSDK", + "-DUSE_SOCKS_PROXY", + "-D__UNITY_3D__", + "-DSDK_BUNDLED", + "-DSDK_IPV4=1", + "-DSDK_LWIP=1", + ); + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.ZeroTierSDK-Unity3D-OSX"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7CC002FF1D12164D003E68DC /* Build configuration list for PBXProject "ZeroTierSDK_Apple" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7CC0030B1D12164D003E68DC /* Debug */, + 7CC0030C1D12164D003E68DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7CC0031B1D1216B0003E68DC /* Build configuration list for PBXNativeTarget "ZeroTierSDK_Unity3D_iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7CC0031C1D1216B0003E68DC /* Debug */, + 7CC0031D1D1216B0003E68DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7CC003281D1216E3003E68DC /* Build configuration list for PBXNativeTarget "ZeroTierSDK_iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7CC003291D1216E3003E68DC /* Debug */, + 7CC0032A1D1216E3003E68DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7CC003351D1216F8003E68DC /* Build configuration list for PBXNativeTarget "ZeroTierSDK_OSX" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7CC003361D1216F8003E68DC /* Debug */, + 7CC003371D1216F8003E68DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7CC0033F1D121742003E68DC /* Build configuration list for PBXNativeTarget "ZeroTierSDK_Unity3D_OSX" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7CC003401D121742003E68DC /* Debug */, + 7CC003411D121742003E68DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7CC002FC1D12164D003E68DC /* Project object */; +} diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..7e32231 --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.xcworkspace/xcshareddata/ZeroTierSDK_Apple.xcscmblueprint b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.xcworkspace/xcshareddata/ZeroTierSDK_Apple.xcscmblueprint new file mode 100644 index 0000000..0d8a914 --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/project.xcworkspace/xcshareddata/ZeroTierSDK_Apple.xcscmblueprint @@ -0,0 +1,30 @@ +{ + "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "E606611F311EBBA46CDC9112D11FA5B7A3480FA9", + "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { + + }, + "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { + "ABA3617E9F0148F844A82502F0D808DE6591AA97" : 0, + "E606611F311EBBA46CDC9112D11FA5B7A3480FA9" : 0 + }, + "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "0231F1D2-335A-48B9-9ED2-F5EC32297E1C", + "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { + "ABA3617E9F0148F844A82502F0D808DE6591AA97" : "zerotiersdk\/zerotierone\/", + "E606611F311EBBA46CDC9112D11FA5B7A3480FA9" : "zerotiersdk\/" + }, + "DVTSourceControlWorkspaceBlueprintNameKey" : "ZeroTierSDK_Apple", + "DVTSourceControlWorkspaceBlueprintVersion" : 204, + "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "integrations\/apple\/ZeroTierSDK_Apple\/ZeroTierSDK_Apple.xcodeproj", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "http:\/\/git.int.zerotier.com\/ZeroTier\/ZeroTierOne.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "ABA3617E9F0148F844A82502F0D808DE6591AA97" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "http:\/\/git.int.zerotier.com\/zerotier\/zerotiersdk.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "E606611F311EBBA46CDC9112D11FA5B7A3480FA9" + } + ] +} \ No newline at end of file diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_OSX.xcscheme b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_OSX.xcscheme new file mode 100644 index 0000000..1c6b21b --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_OSX.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_Unity3D_OSX.xcscheme b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_Unity3D_OSX.xcscheme new file mode 100644 index 0000000..929b3fa --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_Unity3D_OSX.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_Unity3D_iOS.xcscheme b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_Unity3D_iOS.xcscheme new file mode 100644 index 0000000..a7313fe --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_Unity3D_iOS.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_iOS.xcscheme b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_iOS.xcscheme new file mode 100644 index 0000000..4e4a561 --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcshareddata/xcschemes/ZeroTierSDK_iOS.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..fe2b454 --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..373e0b2 --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Apple.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,57 @@ + + + + + SchemeUserState + + ZeroTierSDK_OSX.xcscheme_^#shared#^_ + + orderHint + 3 + + ZeroTierSDK_Unity3D_OSX.xcscheme_^#shared#^_ + + orderHint + 4 + + ZeroTierSDK_Unity3D_iOS.xcscheme_^#shared#^_ + + orderHint + 1 + + ZeroTierSDK_iOS.xcscheme_^#shared#^_ + + orderHint + 2 + + + SuppressBuildableAutocreation + + 7CC003041D12164D003E68DC + + primary + + + 7CC003171D1216B0003E68DC + + primary + + + 7CC003221D1216E3003E68DC + + primary + + + 7CC0032F1D1216F8003E68DC + + primary + + + 7CC0033B1D121741003E68DC + + primary + + + + + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_OSX/Info.plist b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_OSX/Info.plist new file mode 100644 index 0000000..44f4d61 --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_OSX/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright + Copyright © 2016 ZeroTier Inc. All rights reserved. + NSPrincipalClass + + + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_OSX/ZeroTierSDK_OSX.h b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_OSX/ZeroTierSDK_OSX.h new file mode 100644 index 0000000..ce3efcf --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_OSX/ZeroTierSDK_OSX.h @@ -0,0 +1,19 @@ +// +// ZeroTierSDK_OSX.h +// ZeroTierSDK_OSX +// +// Created by Joseph Henry on 6/15/16. +// Copyright © 2016 ZeroTier Inc. All rights reserved. +// + +#import + +//! Project version number for ZeroTierSDK_OSX. +FOUNDATION_EXPORT double ZeroTierSDK_OSXVersionNumber; + +//! Project version string for ZeroTierSDK_OSX. +FOUNDATION_EXPORT const unsigned char ZeroTierSDK_OSXVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import +#import + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Unity3D_OSX/Info.plist b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Unity3D_OSX/Info.plist new file mode 100644 index 0000000..a3ef5c8 --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Unity3D_OSX/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSHumanReadableCopyright + Copyright © 2016 ZeroTier Inc. All rights reserved. + NSPrincipalClass + + + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Unity3D_iOS/Info.plist b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Unity3D_iOS/Info.plist new file mode 100644 index 0000000..a3ef5c8 --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_Unity3D_iOS/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSHumanReadableCopyright + Copyright © 2016 ZeroTier Inc. All rights reserved. + NSPrincipalClass + + + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_iOS/Info.plist b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_iOS/Info.plist new file mode 100644 index 0000000..d3de8ee --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_iOS/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_iOS/ZeroTierSDK_iOS.h b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_iOS/ZeroTierSDK_iOS.h new file mode 100644 index 0000000..65f44c2 --- /dev/null +++ b/examples/apple/ZeroTierSDK_Apple/ZeroTierSDK_iOS/ZeroTierSDK_iOS.h @@ -0,0 +1,19 @@ +// +// ZeroTierSDK_iOS.h +// ZeroTierSDK_iOS +// +// Created by Joseph Henry on 6/15/16. +// Copyright © 2016 ZeroTier Inc. All rights reserved. +// + +#import + +//! Project version number for ZeroTierSDK_iOS. +FOUNDATION_EXPORT double ZeroTierSDK_iOSVersionNumber; + +//! Project version string for ZeroTierSDK_iOS. +FOUNDATION_EXPORT const unsigned char ZeroTierSDK_iOSVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/project.pbxproj b/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0b56caf --- /dev/null +++ b/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/project.pbxproj @@ -0,0 +1,338 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 7C74DAD31D3C485800A6C0B9 /* ZeroTierSDK_OSX.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C74DAD01D3C472C00A6C0B9 /* ZeroTierSDK_OSX.framework */; }; + 7C74DAD41D3C485800A6C0B9 /* ZeroTierSDK_OSX.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7C74DAD01D3C472C00A6C0B9 /* ZeroTierSDK_OSX.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 7C7D529B1DBEAED300896C93 /* XcodeWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C7D52981DBEAED300896C93 /* XcodeWrapper.cpp */; }; + 7C7D529C1DBEAED300896C93 /* ztsdk.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C7D529A1DBEAED300896C93 /* ztsdk.swift */; }; + 7C7D529E1DBEAF0000896C93 /* Apple-Bridging-Header.h in Sources */ = {isa = PBXBuildFile; fileRef = 7C7D529D1DBEAEE500896C93 /* Apple-Bridging-Header.h */; }; + 7CFCB4311D1AFEE800D3E66C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CFCB4301D1AFEE800D3E66C /* AppDelegate.swift */; }; + 7CFCB4331D1AFEE800D3E66C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CFCB4321D1AFEE800D3E66C /* ViewController.swift */; }; + 7CFCB4351D1AFEE800D3E66C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7CFCB4341D1AFEE800D3E66C /* Assets.xcassets */; }; + 7CFCB4381D1AFEE800D3E66C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7CFCB4361D1AFEE800D3E66C /* Main.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 7CA571071D1B0DA100720883 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 7C74DAD41D3C485800A6C0B9 /* ZeroTierSDK_OSX.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 7C74DAD01D3C472C00A6C0B9 /* ZeroTierSDK_OSX.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ZeroTierSDK_OSX.framework; path = ../../../../build/osx_app_framework/Debug/ZeroTierSDK_OSX.framework; sourceTree = ""; }; + 7C7D52981DBEAED300896C93 /* XcodeWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XcodeWrapper.cpp; path = ../../../../../src/wrappers/swift/XcodeWrapper.cpp; sourceTree = ""; }; + 7C7D52991DBEAED300896C93 /* XcodeWrapper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = XcodeWrapper.hpp; path = ../../../../../src/wrappers/swift/XcodeWrapper.hpp; sourceTree = ""; }; + 7C7D529A1DBEAED300896C93 /* ztsdk.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ztsdk.swift; path = ../../../../../src/wrappers/swift/ztsdk.swift; sourceTree = ""; }; + 7C7D529D1DBEAEE500896C93 /* Apple-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Apple-Bridging-Header.h"; path = "../../../../../src/wrappers/swift/Apple-Bridging-Header.h"; sourceTree = ""; }; + 7CFCB42D1D1AFEE800D3E66C /* Example_OSX_App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example_OSX_App.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7CFCB4301D1AFEE800D3E66C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7CFCB4321D1AFEE800D3E66C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 7CFCB4341D1AFEE800D3E66C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7CFCB4371D1AFEE800D3E66C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 7CFCB4391D1AFEE800D3E66C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7CFCB42A1D1AFEE800D3E66C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7C74DAD31D3C485800A6C0B9 /* ZeroTierSDK_OSX.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7CFCB4241D1AFEE800D3E66C = { + isa = PBXGroup; + children = ( + 7C74DAD01D3C472C00A6C0B9 /* ZeroTierSDK_OSX.framework */, + 7CFCB42F1D1AFEE800D3E66C /* Example_OSX_App */, + 7CFCB42E1D1AFEE800D3E66C /* Products */, + ); + sourceTree = ""; + }; + 7CFCB42E1D1AFEE800D3E66C /* Products */ = { + isa = PBXGroup; + children = ( + 7CFCB42D1D1AFEE800D3E66C /* Example_OSX_App.app */, + ); + name = Products; + sourceTree = ""; + }; + 7CFCB42F1D1AFEE800D3E66C /* Example_OSX_App */ = { + isa = PBXGroup; + children = ( + 7C7D529D1DBEAEE500896C93 /* Apple-Bridging-Header.h */, + 7C7D52981DBEAED300896C93 /* XcodeWrapper.cpp */, + 7C7D52991DBEAED300896C93 /* XcodeWrapper.hpp */, + 7C7D529A1DBEAED300896C93 /* ztsdk.swift */, + 7CFCB4301D1AFEE800D3E66C /* AppDelegate.swift */, + 7CFCB4321D1AFEE800D3E66C /* ViewController.swift */, + 7CFCB4341D1AFEE800D3E66C /* Assets.xcassets */, + 7CFCB4361D1AFEE800D3E66C /* Main.storyboard */, + 7CFCB4391D1AFEE800D3E66C /* Info.plist */, + ); + path = Example_OSX_App; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7CFCB42C1D1AFEE800D3E66C /* Example_OSX_App */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7CFCB43C1D1AFEE800D3E66C /* Build configuration list for PBXNativeTarget "Example_OSX_App" */; + buildPhases = ( + 7CFCB4291D1AFEE800D3E66C /* Sources */, + 7CFCB42A1D1AFEE800D3E66C /* Frameworks */, + 7CFCB42B1D1AFEE800D3E66C /* Resources */, + 7CA571071D1B0DA100720883 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Example_OSX_App; + productName = Example_OSX_App; + productReference = 7CFCB42D1D1AFEE800D3E66C /* Example_OSX_App.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7CFCB4251D1AFEE800D3E66C /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = "ZeroTier Inc."; + TargetAttributes = { + 7CFCB42C1D1AFEE800D3E66C = { + CreatedOnToolsVersion = 7.3; + LastSwiftMigration = 0810; + }; + }; + }; + buildConfigurationList = 7CFCB4281D1AFEE800D3E66C /* Build configuration list for PBXProject "Example_OSX_App" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7CFCB4241D1AFEE800D3E66C; + productRefGroup = 7CFCB42E1D1AFEE800D3E66C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7CFCB42C1D1AFEE800D3E66C /* Example_OSX_App */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7CFCB42B1D1AFEE800D3E66C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7CFCB4351D1AFEE800D3E66C /* Assets.xcassets in Resources */, + 7CFCB4381D1AFEE800D3E66C /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7CFCB4291D1AFEE800D3E66C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7C7D529E1DBEAF0000896C93 /* Apple-Bridging-Header.h in Sources */, + 7C7D529B1DBEAED300896C93 /* XcodeWrapper.cpp in Sources */, + 7CFCB4331D1AFEE800D3E66C /* ViewController.swift in Sources */, + 7C7D529C1DBEAED300896C93 /* ztsdk.swift in Sources */, + 7CFCB4311D1AFEE800D3E66C /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 7CFCB4361D1AFEE800D3E66C /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7CFCB4371D1AFEE800D3E66C /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 7CFCB43A1D1AFEE800D3E66C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../../../build/OSX_app_framework/Debug"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 7CFCB43B1D1AFEE800D3E66C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../../../build/OSX_app_framework/Debug"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + 7CFCB43D1D1AFEE800D3E66C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../../../../build/OSX_app_framework/Release"; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../../../src", + "$(SRCROOT)/../../../../src/wrappers/swift", + ); + INFOPLIST_FILE = Example_OSX_App/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.Example-OSX-App"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/../../../../src/wrappers/swift/Apple-Bridging-Header.h"; + "SWIFT_OBJC_BRIDGING_HEADER[arch=*]" = "$(PROJECT_DIR)/../../../../src/wrappers/swift/Apple-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 2.3; + }; + name = Debug; + }; + 7CFCB43E1D1AFEE800D3E66C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../../../../build/OSX_app_framework/Release"; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../../../src", + "$(SRCROOT)/../../../../src/wrappers/swift", + ); + INFOPLIST_FILE = Example_OSX_App/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.Example-OSX-App"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/../../../../src/wrappers/swift/Apple-Bridging-Header.h"; + SWIFT_VERSION = 2.3; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7CFCB4281D1AFEE800D3E66C /* Build configuration list for PBXProject "Example_OSX_App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7CFCB43A1D1AFEE800D3E66C /* Debug */, + 7CFCB43B1D1AFEE800D3E66C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7CFCB43C1D1AFEE800D3E66C /* Build configuration list for PBXNativeTarget "Example_OSX_App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7CFCB43D1D1AFEE800D3E66C /* Debug */, + 7CFCB43E1D1AFEE800D3E66C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7CFCB4251D1AFEE800D3E66C /* Project object */; +} diff --git a/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..31bb97f --- /dev/null +++ b/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..c23880e --- /dev/null +++ b/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,23 @@ + + + + + + + + + diff --git a/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/Example_OSX_App.xcscheme b/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/Example_OSX_App.xcscheme new file mode 100644 index 0000000..0c2c652 --- /dev/null +++ b/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/Example_OSX_App.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist b/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..35a845d --- /dev/null +++ b/examples/apple/example_app/OSX/Example_OSX_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + Example_OSX_App.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 7CFCB42C1D1AFEE800D3E66C + + primary + + + + + diff --git a/examples/apple/example_app/OSX/Example_OSX_App/AppDelegate.swift b/examples/apple/example_app/OSX/Example_OSX_App/AppDelegate.swift new file mode 100644 index 0000000..46d1f86 --- /dev/null +++ b/examples/apple/example_app/OSX/Example_OSX_App/AppDelegate.swift @@ -0,0 +1,24 @@ +// +// AppDelegate.swift +// Example_OSX_App +// +// Created by Joseph Henry on 6/22/16. +// Copyright © 2016 ZeroTier Inc. All rights reserved. +// + +import Cocoa + +@NSApplicationMain +class AppDelegate: NSObject, NSApplicationDelegate { + + func applicationDidFinishLaunching(aNotification: NSNotification) { + // Insert code here to initialize your application + } + + func applicationWillTerminate(aNotification: NSNotification) { + // Insert code here to tear down your application + } + + +} + diff --git a/examples/apple/example_app/OSX/Example_OSX_App/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/apple/example_app/OSX/Example_OSX_App/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2db2b1c --- /dev/null +++ b/examples/apple/example_app/OSX/Example_OSX_App/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/apple/example_app/OSX/Example_OSX_App/Base.lproj/Main.storyboard b/examples/apple/example_app/OSX/Example_OSX_App/Base.lproj/Main.storyboard new file mode 100644 index 0000000..316a5de --- /dev/null +++ b/examples/apple/example_app/OSX/Example_OSX_App/Base.lproj/Main.storyboard @@ -0,0 +1,917 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apple/example_app/OSX/Example_OSX_App/Info.plist b/examples/apple/example_app/OSX/Example_OSX_App/Info.plist new file mode 100644 index 0000000..5717660 --- /dev/null +++ b/examples/apple/example_app/OSX/Example_OSX_App/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2016 ZeroTier Inc. All rights reserved. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + + diff --git a/examples/apple/example_app/OSX/Example_OSX_App/ViewController.swift b/examples/apple/example_app/OSX/Example_OSX_App/ViewController.swift new file mode 100644 index 0000000..c677611 --- /dev/null +++ b/examples/apple/example_app/OSX/Example_OSX_App/ViewController.swift @@ -0,0 +1,275 @@ +// +// ViewController.swift +// Example_OSX_App +// +// Created by Joseph Henry on 6/22/16. +// Copyright © 2016 ZeroTier Inc. All rights reserved. +// + +import Cocoa + +class ViewController: NSViewController { + + let zt = ZTSDK(); + + @IBOutlet weak var btnJoinNetwork: NSButton! + @IBOutlet weak var btnLeaveNetwork: NSButton! + @IBOutlet weak var txtNWID: NSTextField! + @IBOutlet weak var segmentAPISelector: NSSegmentedCell! + @IBOutlet weak var segmentProtocolSelector: NSSegmentedCell! + @IBOutlet weak var txtAddr: NSTextField! + @IBOutlet weak var txtPort: NSTextField! + @IBOutlet weak var btnConnect: NSButton! + @IBOutlet weak var btnBind: NSButton! + + @IBOutlet weak var txtTX: NSTextField! + @IBOutlet weak var txtRX: NSTextField! + + var serverPort:Int32 = 8080 + var serverAddr:String = "0.0.0.0" + var sock:Int32 = -1 + var accepted_sock:Int32 = -1 + + @IBAction func txtAddrChanged(sender: AnyObject) { + if(sender.stringValue != nil) { + serverAddr = sender.stringValue + } + } + @IBAction func txtPortChanged(sender: AnyObject) { + serverPort = sender.intValue + } + // Join a ZeroTier network + @IBAction func UI_JoinNetwork(sender: AnyObject) { + zt.join_network(txtNWID.stringValue); + } + // Leave a ZeroTier network + @IBAction func UI_LeaveNetwork(sender: AnyObject) { + zt.leave_network(txtNWID.stringValue); + } + // Select an API + var selectedShim:Int32 = 0 + @IBAction func UI_SelectAPI(sender: AnyObject) { + selectedShim = sender.intValue // 0 = BSD-style, 1 = SOCKS5 Proxy, etc + } + // Select a protocol + // Protocol { TCP / UDP } + var selectedProtocol:Int32 = 0 + @IBAction func UI_SelectProtocol(sender: AnyObject) { + switch sender.intValue + { + case 0: + selectedProtocol = SOCK_STREAM + case 1: + selectedProtocol = SOCK_DGRAM + default: + break; + } + } + + // CONNECT + var connect_thread : NSThread! + func attempt_connect() + { + // TCP + if(selectedProtocol == SOCK_STREAM) + { + sock = zt.socket(AF_INET, SOCK_STREAM, 0) + let ztaddr: ZTAddress = ZTAddress(AF_INET, serverAddr, Int16(serverPort)) + let connect_err = zt.connect(sock, ztaddr) + + print("connect_err = \(connect_err),\(errno)") + if connect_err < 0 { + let err = errno + print("Error connecting IPv4 socket \(err)") + return + } + } + + // UDP + if(selectedProtocol == SOCK_DGRAM) + { + + } + } + + // Connect to remote host on ZeroTier virtual network + @IBAction func UI_Connect(sender: AnyObject) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { + self.connect_thread = NSThread(target:self, selector:#selector(ViewController.attempt_connect), object:nil) + self.connect_thread.start() + }); + } + + // BIND + var bind_thread : NSThread! + func attempt_bind() + { + sock = zt.socket(AF_INET, SOCK_STREAM, 0) + let ztaddr: ZTAddress = ZTAddress(AF_INET, serverAddr, Int16(serverPort)) + let bind_err = zt.bind(sock, ztaddr) + + print("bind_err = \(bind_err),\(errno)") + if bind_err < 0 { + let err = errno + print("Error binding IPv4 socket \(err)") + return + } + + // Put socket into listening state + zt.listen(sock, 1); + + // TCP + if(selectedProtocol == SOCK_STREAM) { + while(accepted_sock < 0) { + accepted_sock = zt.accept(sock, ztaddr) + } + print("accepted connection") + } + // UDP + if(selectedProtocol == SOCK_DGRAM) { + // nothing + } + } + + // Bind a ZeroTier socket + @IBAction func UI_Bind(sender: AnyObject) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { + self.bind_thread = NSThread(target:self, selector:#selector(ViewController.attempt_bind), object:nil) + self.bind_thread.start() + }); + } + + // TX + @IBOutlet weak var btnSend: NSButton! + @IBAction func UI_SendData(sender: AnyObject) { + // Use ordinary read/write calls on ZeroTier socket + // TCP + if(selectedProtocol == SOCK_STREAM) + { + write(sock, txtTX.description, txtTX.description.characters.count); + } + // UDP + if(selectedProtocol == SOCK_DGRAM) + { + // zt_sendto + } + } + + // RX + @IBOutlet weak var btnReadData: NSButton! + @IBAction func UI_ReadData(sender: AnyObject) { + // Use ordinary read/write calls on ZeroTier socket + // TCP + if(selectedProtocol == SOCK_STREAM) + { + var buffer = [UInt8](count: 100, repeatedValue: 0) + read(accepted_sock, &buffer, 1024); + print(buffer) + + } + // UDP + if(selectedProtocol == SOCK_DGRAM) + { + // zt_recvfrom + } + } + + // Watch for incoming data + var rx_thread : NSThread! + func update_rx() { + while(true) + { + sleep(1) + dispatch_async(dispatch_get_main_queue()) { + let str_buf = [Int8](count: 16, repeatedValue: 0) + print("addr = ", String.fromCString(str_buf)) + } + + // TCP + if(selectedProtocol == SOCK_STREAM) + { + let len = 32 + var buffer = [UInt8](count: len, repeatedValue: 0) + let n = read(accepted_sock, &buffer, len); + if(n > 0) + { + if let str = String(data: NSData(bytes: &buffer, length: len), encoding: NSUTF8StringEncoding) { + dispatch_async(dispatch_get_main_queue()) { + self.txtRX.stringValue = str + } + } else { + print("not a valid UTF-8 sequence") + } + } + } + // UDP + if(selectedProtocol == SOCK_DGRAM) + { + // zt_recvfrom + } + } + } + + + // Built-in SOCKS5 Proxy Server Test + func test_client_proxy_nsstream() + { + // For HTTP request + var buffer = [UInt8](count: 100, repeatedValue: 0) + let str = "GET / HTTP/1.0\r\n\r\n" + //let str = "Welcome to the machine" + print("strlen = %d\n", str.characters.count) + let encodedDataArray = [UInt8](str.utf8) + + var inputStream:NSInputStream? + var outputStream:NSOutputStream? + + // As usual, get our streams to our desired "local" address + NSStream.getStreamsToHostWithName(serverAddr, port: Int(serverPort), inputStream: &inputStream, outputStream: &outputStream) + + // SOCKS Proxy config dictionary + let myDict:NSDictionary = [NSStreamSOCKSProxyHostKey : "0.0.0.0", + NSStreamSOCKSProxyPortKey : 1337, + NSStreamSOCKSProxyVersionKey : NSStreamSOCKSProxyVersion5] + + // Give configuration to NSStreams + inputStream!.setProperty(myDict, forKey: NSStreamSOCKSProxyConfigurationKey) + outputStream!.setProperty(myDict, forKey: NSStreamSOCKSProxyConfigurationKey) + + inputStream!.open() + outputStream!.open() + + // TX + outputStream?.write(encodedDataArray, maxLength: encodedDataArray.count) + + // RX + sleep(5) + inputStream?.read(&buffer, maxLength: 100) + print("buffer = \(buffer)\n") + } + + override func viewDidLoad() { + super.viewDidLoad() + // Set initial UI values for demo + txtAddr.stringValue = serverAddr + txtPort.intValue = serverPort + txtNWID.stringValue = "8056c2e21c000001" + selectedProtocol = SOCK_STREAM // Just for selecting test mode. Not necessary for zt API + + zt.start_service("."); + zt.join_network(txtNWID.stringValue); + + // Update UI on RX of data + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { + self.rx_thread = NSThread(target:self, selector:#selector(ViewController.update_rx), object:nil) + self.rx_thread.start() + }); + } + + override var representedObject: AnyObject? { + didSet { + // Update the view, if already loaded. + } + } +} + diff --git a/examples/apple/example_app/OSX/README.md b/examples/apple/example_app/OSX/README.md new file mode 100644 index 0000000..742afba --- /dev/null +++ b/examples/apple/example_app/OSX/README.md @@ -0,0 +1,78 @@ +OSX + ZeroTier SDK +==== + +Welcome! + +Imagine a flat, encrypted, no-configuration LAN for all of the instances of your OSX app. + +*** + +## Via Traditional Linking (Service and Intercept) + + - This will allow the interception of traditional socket API calls such as `socket()`, `connect()`, `bind()`, etc. + +Build against our library: + + gcc app.c -o app libztintercept.so + export ZT_NC_NETWORK=/tmp/sdk-test-home/nc_8056c2e21c000001 + +Start service + + ./zerotier-sdk-service -d -p8000 /tmp/sdk-test-home & + +Run application + + ./app + +## Via `DYLD_LIBRARY_PATH` (Injecting code dynamically at runtime) + +As of the release of El Capitan, Apple requires one to turn off System Integrity Protection for code injection from external libraries. This method of intercepting network calls is now deprecated and we are investigating new methods for future releases of the SDK. If you still wish to use this method just `export DYLD_LIBRARY_PATH=./path/to/libztintercept.so:$DYLD_LIBRARY_PATH`. Also set `ZT_NC_NETWORK` appropriately. + + +## Via App Framework in XCode + +*** +**Step 1: Build OSX framework** + +- `make osx_app_framework` +- This will output to `build/osx_app_framework/Release/ZeroTierSDK_OSX.framework` + +**Step 2: Integrate SDK into project** + +- Add the resultant framework package to your project +- Add `src` directory to *Build Settings -> Header Search Paths* +- Add `build/osx_app_framework/Release/` to *Build Settings -> Framework Search Paths* +- Add `ZeroTierSDK.frameworkOSX` to *General->Embedded Binaries* +- Add `src/wrappers/swift/ZTSDK.swift`, `src/wrappers/swift/XcodeWrapper.cpp`, and `src/wrappers/swift/XcodeWrapper.hpp` to your project: +- Set `src/wrappers/swift/Apple-Bridging-Header.h` as your bridging-header in *Build Settings -> Objective-C Bridging-header* + +**Step 3: Start the ZeroTier service** + +Start the service: + +``` + zt.start_service("."); // Where the ZeroTier config files for this app will be stored + zt.join_network(nwid); +``` + +Listen for incoming connections: + +``` + let sock: Int32 = zt.socket(AF_INET, SOCK_STREAM, 0) + let ztaddr: ZTAddress = ZTAddress(AF_INET, serverAddr, Int16(serverPort)) + let bind_err: Int32 = zt.bind(sock, ztaddr) + zt_listen(sock, 1); + let accepted_sock: Int32 = zt.accept(sock, ztaddr) +``` + +Or, establish a connection: + +``` + let sock: Int32 = zt.socket(AF_INET, SOCK_STREAM, 0) + let ztaddr: ZTAddress = ZTAddress(AF_INET, serverAddr, Int16(serverPort)) + let connect_err: Int32 = zt.connect(sock, ztaddr) +``` + +**Alternative APIs** + +Click [here](../../../../docs/api_discussion.md) to learn more about alternative APIs such as the Intercept and SOCKS5 Proxy. \ No newline at end of file diff --git a/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/project.pbxproj b/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/project.pbxproj new file mode 100644 index 0000000..fe23ba8 --- /dev/null +++ b/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/project.pbxproj @@ -0,0 +1,346 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 7C7F16901DBEB94700C7AFFD /* XcodeWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C7F168B1DBEB92600C7AFFD /* XcodeWrapper.cpp */; }; + 7C7F16911DBEB94700C7AFFD /* ztsdk.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C7F168D1DBEB92600C7AFFD /* ztsdk.swift */; }; + 7C7F16921DBEBDF000C7AFFD /* Apple-Bridging-Header.h in Sources */ = {isa = PBXBuildFile; fileRef = 7C7F168A1DBEB92600C7AFFD /* Apple-Bridging-Header.h */; }; + 7C7F16931DBEBDF000C7AFFD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8BC03D1D3348A6001E1B6F /* ViewController.swift */; }; + 7C7F16941DBEBE0600C7AFFD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8BC03B1D3348A6001E1B6F /* AppDelegate.swift */; }; + 7C8BC0411D3348A6001E1B6F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7C8BC03F1D3348A6001E1B6F /* Main.storyboard */; }; + 7C8BC0431D3348A6001E1B6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7C8BC0421D3348A6001E1B6F /* Assets.xcassets */; }; + 7C8BC0461D3348A6001E1B6F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7C8BC0441D3348A6001E1B6F /* LaunchScreen.storyboard */; }; + 7C9B10DA1D36C81F005BA825 /* ZeroTierSDK_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C9B10D81D36C615005BA825 /* ZeroTierSDK_iOS.framework */; }; + 7C9B10DB1D36C81F005BA825 /* ZeroTierSDK_iOS.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7C9B10D81D36C615005BA825 /* ZeroTierSDK_iOS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 7C9B10DC1D36C81F005BA825 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 7C9B10DB1D36C81F005BA825 /* ZeroTierSDK_iOS.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 7C7F168A1DBEB92600C7AFFD /* Apple-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Apple-Bridging-Header.h"; path = "../../../../../src/wrappers/swift/Apple-Bridging-Header.h"; sourceTree = ""; }; + 7C7F168B1DBEB92600C7AFFD /* XcodeWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XcodeWrapper.cpp; path = ../../../../../src/wrappers/swift/XcodeWrapper.cpp; sourceTree = ""; }; + 7C7F168C1DBEB92600C7AFFD /* XcodeWrapper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = XcodeWrapper.hpp; path = ../../../../../src/wrappers/swift/XcodeWrapper.hpp; sourceTree = ""; }; + 7C7F168D1DBEB92600C7AFFD /* ztsdk.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ztsdk.swift; path = ../../../../../src/wrappers/swift/ztsdk.swift; sourceTree = ""; }; + 7C8BC0381D3348A6001E1B6F /* Example_iOS_App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example_iOS_App.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7C8BC03B1D3348A6001E1B6F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7C8BC03D1D3348A6001E1B6F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 7C8BC0401D3348A6001E1B6F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 7C8BC0421D3348A6001E1B6F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7C8BC0451D3348A6001E1B6F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 7C8BC0471D3348A6001E1B6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7C9B10D81D36C615005BA825 /* ZeroTierSDK_iOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ZeroTierSDK_iOS.framework; path = "../../../../build/ios_app_framework/Debug-iphoneos/ZeroTierSDK_iOS.framework"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7C8BC0351D3348A6001E1B6F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7C9B10DA1D36C81F005BA825 /* ZeroTierSDK_iOS.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7C8BC02F1D3348A6001E1B6F = { + isa = PBXGroup; + children = ( + 7C9B10D81D36C615005BA825 /* ZeroTierSDK_iOS.framework */, + 7C8BC03A1D3348A6001E1B6F /* Example_iOS_App */, + 7C8BC0391D3348A6001E1B6F /* Products */, + ); + sourceTree = ""; + }; + 7C8BC0391D3348A6001E1B6F /* Products */ = { + isa = PBXGroup; + children = ( + 7C8BC0381D3348A6001E1B6F /* Example_iOS_App.app */, + ); + name = Products; + sourceTree = ""; + }; + 7C8BC03A1D3348A6001E1B6F /* Example_iOS_App */ = { + isa = PBXGroup; + children = ( + 7C7F168A1DBEB92600C7AFFD /* Apple-Bridging-Header.h */, + 7C7F168B1DBEB92600C7AFFD /* XcodeWrapper.cpp */, + 7C7F168C1DBEB92600C7AFFD /* XcodeWrapper.hpp */, + 7C7F168D1DBEB92600C7AFFD /* ztsdk.swift */, + 7C8BC03B1D3348A6001E1B6F /* AppDelegate.swift */, + 7C8BC03D1D3348A6001E1B6F /* ViewController.swift */, + 7C8BC03F1D3348A6001E1B6F /* Main.storyboard */, + 7C8BC0421D3348A6001E1B6F /* Assets.xcassets */, + 7C8BC0441D3348A6001E1B6F /* LaunchScreen.storyboard */, + 7C8BC0471D3348A6001E1B6F /* Info.plist */, + ); + path = Example_iOS_App; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7C8BC0371D3348A6001E1B6F /* Example_iOS_App */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7C8BC04A1D3348A6001E1B6F /* Build configuration list for PBXNativeTarget "Example_iOS_App" */; + buildPhases = ( + 7C8BC0341D3348A6001E1B6F /* Sources */, + 7C8BC0351D3348A6001E1B6F /* Frameworks */, + 7C8BC0361D3348A6001E1B6F /* Resources */, + 7C9B10DC1D36C81F005BA825 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Example_iOS_App; + productName = Example_iOS_App; + productReference = 7C8BC0381D3348A6001E1B6F /* Example_iOS_App.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7C8BC0301D3348A6001E1B6F /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = "ZeroTier Inc."; + TargetAttributes = { + 7C8BC0371D3348A6001E1B6F = { + CreatedOnToolsVersion = 7.3; + DevelopmentTeam = 57AG88JR8A; + LastSwiftMigration = 0810; + }; + }; + }; + buildConfigurationList = 7C8BC0331D3348A6001E1B6F /* Build configuration list for PBXProject "Example_iOS_App" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7C8BC02F1D3348A6001E1B6F; + productRefGroup = 7C8BC0391D3348A6001E1B6F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7C8BC0371D3348A6001E1B6F /* Example_iOS_App */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7C8BC0361D3348A6001E1B6F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7C8BC0461D3348A6001E1B6F /* LaunchScreen.storyboard in Resources */, + 7C8BC0431D3348A6001E1B6F /* Assets.xcassets in Resources */, + 7C8BC0411D3348A6001E1B6F /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7C8BC0341D3348A6001E1B6F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7C7F16941DBEBE0600C7AFFD /* AppDelegate.swift in Sources */, + 7C7F16921DBEBDF000C7AFFD /* Apple-Bridging-Header.h in Sources */, + 7C7F16931DBEBDF000C7AFFD /* ViewController.swift in Sources */, + 7C7F16901DBEB94700C7AFFD /* XcodeWrapper.cpp in Sources */, + 7C7F16911DBEB94700C7AFFD /* ztsdk.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 7C8BC03F1D3348A6001E1B6F /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7C8BC0401D3348A6001E1B6F /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 7C8BC0441D3348A6001E1B6F /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7C8BC0451D3348A6001E1B6F /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 7C8BC0481D3348A6001E1B6F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 7C8BC0491D3348A6001E1B6F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 7C8BC04B1D3348A6001E1B6F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../../../../build/iOS_app_framework/debug-iphoneos"; + HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../../../../src"; + INFOPLIST_FILE = Example_iOS_App/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(SRC_ROOT)/../../"; + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.Example-iOS-App"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/../../../../src/wrappers/swift/Apple-Bridging-Header.h"; + SWIFT_VERSION = 2.3; + }; + name = Debug; + }; + 7C8BC04C1D3348A6001E1B6F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../../../../build/iOS_app_framework/debug-iphoneos"; + HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../../../../src"; + INFOPLIST_FILE = Example_iOS_App/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(SRC_ROOT)/../../"; + PRODUCT_BUNDLE_IDENTIFIER = "zerotier.Example-iOS-App"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/../../../../src/wrappers/swift/Apple-Bridging-Header.h"; + SWIFT_VERSION = 2.3; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7C8BC0331D3348A6001E1B6F /* Build configuration list for PBXProject "Example_iOS_App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7C8BC0481D3348A6001E1B6F /* Debug */, + 7C8BC0491D3348A6001E1B6F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7C8BC04A1D3348A6001E1B6F /* Build configuration list for PBXNativeTarget "Example_iOS_App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7C8BC04B1D3348A6001E1B6F /* Debug */, + 7C8BC04C1D3348A6001E1B6F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7C8BC0301D3348A6001E1B6F /* Project object */; +} diff --git a/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..92c673d --- /dev/null +++ b/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..20ff1bb --- /dev/null +++ b/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/Example_iOS_App.xcscheme b/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/Example_iOS_App.xcscheme new file mode 100644 index 0000000..f7c9333 --- /dev/null +++ b/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/Example_iOS_App.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist b/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ce178c4 --- /dev/null +++ b/examples/apple/example_app/iOS/Example_iOS_App.xcodeproj/xcuserdata/Joseph.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + Example_iOS_App.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 7C8BC0371D3348A6001E1B6F + + primary + + + + + diff --git a/examples/apple/example_app/iOS/Example_iOS_App/AppDelegate.swift b/examples/apple/example_app/iOS/Example_iOS_App/AppDelegate.swift new file mode 100644 index 0000000..ef6f9cd --- /dev/null +++ b/examples/apple/example_app/iOS/Example_iOS_App/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// Example_iOS_App +// +// Created by Joseph Henry on 7/10/16. +// Copyright © 2016 ZeroTier Inc. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/examples/apple/example_app/iOS/Example_iOS_App/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/apple/example_app/iOS/Example_iOS_App/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..eeea76c --- /dev/null +++ b/examples/apple/example_app/iOS/Example_iOS_App/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,73 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/apple/example_app/iOS/Example_iOS_App/Base.lproj/LaunchScreen.storyboard b/examples/apple/example_app/iOS/Example_iOS_App/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..ebf48f6 --- /dev/null +++ b/examples/apple/example_app/iOS/Example_iOS_App/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apple/example_app/iOS/Example_iOS_App/Base.lproj/Main.storyboard b/examples/apple/example_app/iOS/Example_iOS_App/Base.lproj/Main.storyboard new file mode 100644 index 0000000..6bc9fee --- /dev/null +++ b/examples/apple/example_app/iOS/Example_iOS_App/Base.lproj/Main.storyboard @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apple/example_app/iOS/Example_iOS_App/Info.plist b/examples/apple/example_app/iOS/Example_iOS_App/Info.plist new file mode 100644 index 0000000..40c6215 --- /dev/null +++ b/examples/apple/example_app/iOS/Example_iOS_App/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/examples/apple/example_app/iOS/Example_iOS_App/ViewController.swift b/examples/apple/example_app/iOS/Example_iOS_App/ViewController.swift new file mode 100644 index 0000000..bfd4d71 --- /dev/null +++ b/examples/apple/example_app/iOS/Example_iOS_App/ViewController.swift @@ -0,0 +1,295 @@ +// +// ViewController.swift +// Example_iOS_App +// +// Created by Joseph Henry on 7/10/16. +// Copyright © 2016 ZeroTier Inc. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + let zt = ZTSDK(); + + var serverPort:Int16 = 8080 + var serverAddr:String = "10.9.9.100" + var selectedProtocol:Int32 = 0 + var sock:Int32 = -1 + var accepted_sock:Int32 = -1 + + @IBOutlet weak var txtAddr: UITextField! + @IBOutlet weak var txtPort: UITextField! + @IBOutlet weak var txtTX: UITextField! + @IBOutlet weak var txtRX: UITextField! + @IBOutlet weak var btnTX: UIButton! + @IBOutlet weak var btnConnect: UIButton! + @IBOutlet weak var btnBind: UIButton! + + @IBOutlet weak var btnRX: UIButton! + @IBAction func UI_RX(sender: AnyObject) { + // Use ordinary read/write calls on ZeroTier socket + + // TCP + if(selectedProtocol == SOCK_STREAM) { + var buffer = [UInt8](count: 100, repeatedValue: 0) + read(accepted_sock, &buffer, 100); + print(buffer) + + } + // UDP + if(selectedProtocol == SOCK_DGRAM) { + var buffer = [UInt8](count: 100, repeatedValue: 0) + read(Int32(sock), &buffer, 100); + print(buffer) + } + } + + + @IBAction func UI_TX(sender: AnyObject) { + // Use ordinary read/write calls on ZeroTier socket + // TCP + if(selectedProtocol == SOCK_STREAM) { + write(Int32(sock), txtTX.description, txtTX.description.characters.count); + } + // UDP + if(selectedProtocol == SOCK_DGRAM) { + sendto(Int32(sock), txtTX.description, txtTX.description.characters.count, 0, UnsafePointer([udp_addr]), UInt32(udp_addr.sin_len)) + } + } + + + @IBOutlet weak var txtNWID: UITextField! + + @IBOutlet weak var btnJoinNetwork: UIButton! + @IBAction func UI_JoinNetwork(sender: AnyObject) { + zt.join_network(txtNWID.text!) + } + + @IBOutlet weak var btnLeaveNetwork: UIButton! + @IBAction func UI_LeaveNetwork(sender: AnyObject) { + zt.leave_network(txtNWID.text!) + } + + @IBOutlet weak var segmentProtocol: UISegmentedControl! + @IBAction func protocolSelected(sender: AnyObject) { + switch sender.selectedSegmentIndex + { + case 0: + selectedProtocol = SOCK_STREAM + case 1: + selectedProtocol = SOCK_DGRAM + default: + break; + } + } + + + // CONNECT + var connect_thread : NSThread! + func attempt_connect() + { + // TCP + if(selectedProtocol == SOCK_STREAM) + { + sock = zt.socket(AF_INET, SOCK_STREAM, 0) + let ztaddr: ZTAddress = ZTAddress(AF_INET, serverAddr, serverPort) + let connect_err = zt.connect(sock, ztaddr) + + print("connect_err = \(connect_err),\(errno)") + if connect_err < 0 { + let err = errno + print("Error connecting IPv4 socket \(err)") + return + } + } + + // UDP + if(selectedProtocol == SOCK_DGRAM) + { + + } + } + + // Connect to remote host on ZeroTier virtual network + @IBAction func UI_Connect(sender: AnyObject) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { + self.connect_thread = NSThread(target:self, selector:#selector(ViewController.attempt_connect), object:nil) + self.connect_thread.start() + }); + } + + // BIND + var bind_thread : NSThread! + func attempt_bind() + { + var err:Int32 + + // TCP + if(selectedProtocol == SOCK_STREAM) + { + sock = zt_socket(AF_INET, SOCK_STREAM, 0) + let ztaddr: ZTAddress = ZTAddress(AF_INET, serverAddr, serverPort) + let bind_err = zt.bind(sock, ztaddr) + + print("bind_err = \(bind_err),\(errno)") + + if bind_err < 0 { + let err = errno + print("Error binding IPv4 socket \(err)") + return + } + + // Put socket into listening state + zt_listen(Int32(sock), 1); + + while(accepted_sock < 0) { + accepted_sock = zt.accept(sock, ztaddr) + } + print("accepted connection") + } + + // UDP + if(selectedProtocol == SOCK_DGRAM) + { + let ztaddr: ZTAddress = ZTAddress(AF_INET, serverAddr, serverPort) + + sock = zt_socket(AF_INET, SOCK_DGRAM, 0) + err = zt.bind(sock, ztaddr) + print("bind_err = ", err) + + err = zt.listen(sock, 0) + print("listen_err = ", err) + } + } + + @IBOutlet weak var txtAddress: UITextField! + // Bind a ZeroTier socket + @IBAction func UI_Bind(sender: AnyObject) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { + self.bind_thread = NSThread(target:self, selector:#selector(ViewController.attempt_bind), object:nil) + self.bind_thread.start() + }); + } + + @IBOutlet weak var lblAddress: UILabel! + + + var udp_addr:sockaddr_in! + + // Watch for incoming data + var rx_thread : NSThread! + func update_rx() { + while(true) + { + sleep(1) + dispatch_async(dispatch_get_main_queue()) { + var str_buf = [Int8](count: 16, repeatedValue: 0) + self.zt.get_ipv4_address(self.txtNWID.text!, &str_buf) + self.lblAddress.text = String.fromCString(str_buf) + print("addr = ", String.fromCString(str_buf)) + } + + + // TCP + if(selectedProtocol == SOCK_STREAM) + { + let len = 32 + var buffer = [UInt8](count: len, repeatedValue: 0) + let n = read(accepted_sock, &buffer, len); + if(n > 0) + { + if let str = String(data: NSData(bytes: &buffer, length: len), encoding: NSUTF8StringEncoding) { + dispatch_async(dispatch_get_main_queue()) { + self.txtRX.text = str + } + } else { + print("not a valid UTF-8 sequence") + } + } + } + // UDP + /* + if(selectedProtocol == SOCK_DGRAM) + { + let len = 32 + var buffer = [UInt8](count: len, repeatedValue: 0) + + //udp_addr = sockaddr_in(sin_len: UInt8(sizeof(sockaddr_in)), + // sin_family: UInt8(AF_INET), + // sin_port: UInt16(0).bigEndian, + // sin_addr: in_addr(s_addr: 0), + // sin_zero: (0,0,0,0,0,0,0,0)) + + //var addrlen:socklen_t = 0; + //var legIntPtr = withUnsafeMutablePointer(&addrlen, { $0 }) + //let n = recvfrom(sock, &buffer, len, 0, UnsafeMutablePointer([udp_addr]), legIntPtr) + + + var socketAddress = sockaddr_storage() + var socketAddressLength = socklen_t(sizeof(sockaddr_storage.self)) + + let bytesRead = withUnsafeMutablePointers(&socketAddress, &socketAddressLength) { + recvfrom(sock, UnsafeMutablePointer(buffer), len, 0, UnsafeMutablePointer($0), UnsafeMutablePointer($1)) + //recvfrom(<#T##Int32#>, <#T##UnsafeMutablePointer#>, <#T##Int#>, <#T##Int32#>, <#T##UnsafeMutablePointer#>, <#T##UnsafeMutablePointer#>) + } + + if(bytesRead > 0) + { + print("socketAddressLength = ", socketAddressLength); + let bytesWritten = withUnsafePointer(&socketAddress) { + print("TXing...\n"); + sendto(sock, UnsafePointer(buffer), bytesRead, 0, UnsafePointer($0), socketAddressLength) + } + + print("bytesWritten = ", bytesWritten); + + //let bytesWritten = withUnsafePointer(&socketAddress.sin) { + // sendto(sock, buffer, len, 0, UnsafePointer($0), socklen_t(socketAddress.sin.sin_len)) + //} + + if let str = String(data: NSData(bytes: &buffer, length: len), encoding: NSUTF8StringEncoding) { + dispatch_async(dispatch_get_main_queue()) { + self.txtRX.text = str + } + } else { + print("not a valid UTF-8 sequence") + } + } + } + */ + } + } + + override func viewDidLoad() { + super.viewDidLoad() + + txtNWID.text = "8056c2e21c000001" + txtTX.text = "welcome to the machine" + txtAddr.text = "0.0.0.0" + serverAddr = "0.0.0.0" + txtPort.text = "8080" + serverPort = 8080 + + selectedProtocol = SOCK_STREAM + print("Starting ZeroTier...\n"); + zt.start_service(nil); + print("Joining network...\n"); + zt.join_network(txtNWID.text!); + print("Complete\n"); + + // UI RX update + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { + self.rx_thread = NSThread(target:self, selector:#selector(ViewController.update_rx), object:nil) + self.rx_thread.start() + }); + + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } +} + diff --git a/examples/apple/example_app/iOS/README.md b/examples/apple/example_app/iOS/README.md new file mode 100644 index 0000000..968008f --- /dev/null +++ b/examples/apple/example_app/iOS/README.md @@ -0,0 +1,54 @@ +iOS + ZeroTier SDK +==== + +Welcome! + +Imagine a flat, encrypted, no-configuration LAN for all of the instances of your iOS app. + +This short tutorial will show you how to enable ZeroTier functionality for your iOS app with little to no code modification. Check out our [ZeroTier SDK](https://www.zerotier.com/blog) page for more info on how the integration works. + +*** +**Step 1: Build iOS framework** + +- `make ios_app_framework` +- This will output to `build/ios_app_framework/Release-iphoneos/ZeroTierSDK_iOS.framework` + +**Step 2: Integrate SDK into project** + +- Add the resultant framework package to your project +- Add `src` directory to *Build Settings -> Header Search Paths* +- Add `build/ios_app_framework/Release-iphoneos/` to *Build Settings -> Framework Search Paths* +- Add `ZeroTierSDK.frameworkiOS` to *General->Embedded Binaries* +- Add `src/wrappers/swift/ZTSDK.swift`, `src/wrappers/swift/XcodeWrapper.cpp` and `src/wrappers/swift/XcodeWrapper.hpp` to your project: +- Set `src/wrappers/swift/Apple-Bridging-Header.h` as your bridging-header in *Build Settings -> Objective-C Bridging-header* + +**Step 3: Start the ZeroTier service** + +Start the service: + +``` + zt.start_service(nil); + zt.join_network(nwid); +``` + +Listen for incoming connections: + +``` + let sock: Int32 = zt.socket(AF_INET, SOCK_STREAM, 0) + let ztaddr: ZTAddress = ZTAddress(AF_INET, serverAddr, Int16(serverPort)) + let bind_err = zt.bind(sock, ztaddr) + zt_listen(sock, 1); + let accepted_sock: Int32 = zt.accept(sock, ztaddr) +``` + +Or, establish a connection: + +``` + let sock: Int32 = zt.socket(AF_INET, SOCK_STREAM, 0) + let ztaddr: ZTAddress = ZTAddress(AF_INET, serverAddr, Int16(serverPort)) + let connect_err: Int32 = zt.connect(sock, ztaddr) +``` + +**Alternative APIs** + +CLick [here](../../../../docs/api_discussion.md) to learn more about alternative APIs such as the Intercept and SOCKS5 Proxy. \ No newline at end of file