Android build fix
This commit is contained in:
@@ -22,6 +22,8 @@ LOCAL_LDLIBS := -llog
|
|||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
$(ZTSDK)/SDK_RPC.c \
|
$(ZTSDK)/SDK_RPC.c \
|
||||||
$(ZTSDK)/SDK_Proxy.cpp \
|
$(ZTSDK)/SDK_Proxy.cpp \
|
||||||
|
$(ZTSDK)/SDK_Sockets.c \
|
||||||
|
$(ZTSDK)/SDK_Debug.c \
|
||||||
$(ZTSDK)/SDK_ServiceSetup.cpp \
|
$(ZTSDK)/SDK_ServiceSetup.cpp \
|
||||||
$(ZTSDK)/SDK_EthernetTap.cpp
|
$(ZTSDK)/SDK_EthernetTap.cpp
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
NDK_TOOLCHAIN_VERSION := clang
|
NDK_TOOLCHAIN_VERSION := clang
|
||||||
APP_STL := c++_static
|
APP_STL := c++_static
|
||||||
APP_CPPFLAGS := -O3 -DUSE_SOCKS_PROXY -DZT_SDK -fPIC -fPIE -fvectorize -Wall -fstack-protector -fexceptions -fno-strict-aliasing -Wno-deprecated-register -DZT_NO_TYPE_PUNNING=1
|
APP_CPPFLAGS := -O3 -DUSE_SOCKS_PROXY -DSDK -fPIC -fPIE -fvectorize -Wall -fstack-protector -fexceptions -fno-strict-aliasing -Wno-deprecated-register -DZT_NO_TYPE_PUNNING=1
|
||||||
APP_PLATFORM := android-14
|
APP_PLATFORM := android-14
|
||||||
|
|
||||||
# Architectures
|
# Architectures
|
||||||
|
|||||||
@@ -29,8 +29,5 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
SocketAddress proxyAddr = new InetSocketAddress("0.0.0.0", 1337);
|
SocketAddress proxyAddr = new InetSocketAddress("0.0.0.0", 1337);
|
||||||
Proxy proxy = new Proxy(Proxy.Type.SOCKS, proxyAddr);
|
Proxy proxy = new Proxy(Proxy.Type.SOCKS, proxyAddr);
|
||||||
|
|
||||||
// proxy.
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -10,15 +10,47 @@
|
|||||||
ignoreCount = "0"
|
ignoreCount = "0"
|
||||||
continueAfterRunningActions = "No"
|
continueAfterRunningActions = "No"
|
||||||
filePath = "Example_OSX_App/ViewController.swift"
|
filePath = "Example_OSX_App/ViewController.swift"
|
||||||
timestampString = "489532561.868006"
|
timestampString = "489623400.349295"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "79"
|
startingLineNumber = "78"
|
||||||
endingLineNumber = "79"
|
endingLineNumber = "78"
|
||||||
landmarkName = "UI_Connect(_:)"
|
landmarkName = "UI_Connect(_:)"
|
||||||
landmarkType = "5">
|
landmarkType = "5">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Example_OSX_App/ViewController.swift"
|
||||||
|
timestampString = "489623400.349295"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "155"
|
||||||
|
endingLineNumber = "155"
|
||||||
|
landmarkName = "UI_SendData(_:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Example_OSX_App/ViewController.swift"
|
||||||
|
timestampString = "489623686.632265"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "137"
|
||||||
|
endingLineNumber = "137"
|
||||||
|
landmarkName = "UI_Bind(_:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
<BreakpointProxy
|
<BreakpointProxy
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
<BreakpointContent
|
<BreakpointContent
|
||||||
@@ -26,12 +58,28 @@
|
|||||||
ignoreCount = "0"
|
ignoreCount = "0"
|
||||||
continueAfterRunningActions = "No"
|
continueAfterRunningActions = "No"
|
||||||
filePath = "Example_OSX_App/ViewController.swift"
|
filePath = "Example_OSX_App/ViewController.swift"
|
||||||
timestampString = "489532593.971514"
|
timestampString = "489623690.124704"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "141"
|
startingLineNumber = "139"
|
||||||
endingLineNumber = "141"
|
endingLineNumber = "139"
|
||||||
landmarkName = "UI_SendData(_:)"
|
landmarkName = "UI_Bind(_:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Example_OSX_App/ViewController.swift"
|
||||||
|
timestampString = "489624182.476645"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "182"
|
||||||
|
endingLineNumber = "182"
|
||||||
|
landmarkName = "UI_ReadData(_:)"
|
||||||
landmarkType = "5">
|
landmarkType = "5">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
|
|||||||
@@ -798,20 +798,6 @@
|
|||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<segmentedControl verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HqO-Gc-zPt">
|
|
||||||
<rect key="frame" x="9" y="100" width="436" height="24"/>
|
|
||||||
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="zJe-Qg-KiM">
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<segments>
|
|
||||||
<segment label="BSD-style socket API"/>
|
|
||||||
<segment label="SOCKS5 Proxy of NSStream" selected="YES" tag="1"/>
|
|
||||||
<segment label="Changeling"/>
|
|
||||||
</segments>
|
|
||||||
<connections>
|
|
||||||
<action selector="UI_SelectAPI:" target="XfG-lQ-9wD" id="TFz-Eh-tzM"/>
|
|
||||||
</connections>
|
|
||||||
</segmentedCell>
|
|
||||||
</segmentedControl>
|
|
||||||
</subviews>
|
</subviews>
|
||||||
</view>
|
</view>
|
||||||
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
|
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
|
||||||
@@ -823,45 +809,9 @@
|
|||||||
<rect key="frame" x="1" y="1" width="535" height="219"/>
|
<rect key="frame" x="1" y="1" width="535" height="219"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<scrollView fixedFrame="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qu5-Bf-5GJ">
|
|
||||||
<rect key="frame" x="13" y="49" width="240" height="135"/>
|
|
||||||
<clipView key="contentView" ambiguous="YES" id="M0a-oS-fil">
|
|
||||||
<rect key="frame" x="1" y="1" width="223" height="133"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<subviews>
|
|
||||||
<textView ambiguous="YES" importsGraphics="NO" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" usesFontPanel="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="f4i-xS-SFt">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="223" height="133"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
|
||||||
<size key="minSize" width="223" height="133"/>
|
|
||||||
<size key="maxSize" width="463" height="10000000"/>
|
|
||||||
<attributedString key="textStorage">
|
|
||||||
<fragment content="Welcome to the machine">
|
|
||||||
<attributes>
|
|
||||||
<font key="NSFont" size="12" name="Helvetica"/>
|
|
||||||
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
|
|
||||||
</attributes>
|
|
||||||
</fragment>
|
|
||||||
</attributedString>
|
|
||||||
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<size key="minSize" width="223" height="133"/>
|
|
||||||
<size key="maxSize" width="463" height="10000000"/>
|
|
||||||
</textView>
|
|
||||||
</subviews>
|
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
|
||||||
</clipView>
|
|
||||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="Qoj-Bu-TDB">
|
|
||||||
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
|
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
|
||||||
</scroller>
|
|
||||||
<scroller key="verticalScroller" verticalHuggingPriority="750" horizontal="NO" id="wfH-rX-ZRv">
|
|
||||||
<rect key="frame" x="224" y="1" width="15" height="133"/>
|
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
|
||||||
</scroller>
|
|
||||||
</scrollView>
|
|
||||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kBj-wv-ccA">
|
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kBj-wv-ccA">
|
||||||
<rect key="frame" x="7" y="13" width="71" height="32"/>
|
<rect key="frame" x="7" y="13" width="80" height="32"/>
|
||||||
<buttonCell key="cell" type="push" title="Send" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="e7E-6Z-Uc3">
|
<buttonCell key="cell" type="push" title="write()" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="e7E-6Z-Uc3">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
</buttonCell>
|
</buttonCell>
|
||||||
@@ -877,34 +827,6 @@
|
|||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<scrollView fixedFrame="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="f93-eE-nJ9" userLabel="TxtRX">
|
|
||||||
<rect key="frame" x="271" y="49" width="240" height="135"/>
|
|
||||||
<clipView key="contentView" ambiguous="YES" id="yrD-Hg-n1d">
|
|
||||||
<rect key="frame" x="1" y="1" width="223" height="133"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<subviews>
|
|
||||||
<textView ambiguous="YES" importsGraphics="NO" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" usesFontPanel="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="qFX-qC-cRl">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="223" height="133"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
|
||||||
<size key="minSize" width="223" height="133"/>
|
|
||||||
<size key="maxSize" width="463" height="10000000"/>
|
|
||||||
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<size key="minSize" width="223" height="133"/>
|
|
||||||
<size key="maxSize" width="463" height="10000000"/>
|
|
||||||
</textView>
|
|
||||||
</subviews>
|
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
|
||||||
</clipView>
|
|
||||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="zrM-VY-Okp">
|
|
||||||
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
|
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
|
||||||
</scroller>
|
|
||||||
<scroller key="verticalScroller" verticalHuggingPriority="750" horizontal="NO" id="xzd-CY-U0n">
|
|
||||||
<rect key="frame" x="224" y="1" width="15" height="133"/>
|
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
|
||||||
</scroller>
|
|
||||||
</scrollView>
|
|
||||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="mrX-1m-syb">
|
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="mrX-1m-syb">
|
||||||
<rect key="frame" x="269" y="192" width="22" height="17"/>
|
<rect key="frame" x="269" y="192" width="22" height="17"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="RX" id="pcF-Pj-FM2">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="RX" id="pcF-Pj-FM2">
|
||||||
@@ -913,6 +835,32 @@
|
|||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
|
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nDD-6g-OyX">
|
||||||
|
<rect key="frame" x="265" y="13" width="77" height="32"/>
|
||||||
|
<buttonCell key="cell" type="push" title="read()" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="kHN-4R-l9P">
|
||||||
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
</buttonCell>
|
||||||
|
<connections>
|
||||||
|
<action selector="UI_ReadData:" target="XfG-lQ-9wD" id="dZg-Sy-8dp"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hCM-du-WCV">
|
||||||
|
<rect key="frame" x="271" y="49" width="244" height="135"/>
|
||||||
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="XKV-3C-B0n">
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
</textFieldCell>
|
||||||
|
</textField>
|
||||||
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Nrt-y7-5kB">
|
||||||
|
<rect key="frame" x="13" y="49" width="244" height="135"/>
|
||||||
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="I3i-bf-V92">
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
</textFieldCell>
|
||||||
|
</textField>
|
||||||
</subviews>
|
</subviews>
|
||||||
</view>
|
</view>
|
||||||
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
|
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
|
||||||
@@ -950,17 +898,15 @@
|
|||||||
<outlet property="btnConnect" destination="4eY-GQ-b8o" id="JOV-ky-esd"/>
|
<outlet property="btnConnect" destination="4eY-GQ-b8o" id="JOV-ky-esd"/>
|
||||||
<outlet property="btnJoinNetwork" destination="uMn-O6-Lab" id="kuE-Lk-ipe"/>
|
<outlet property="btnJoinNetwork" destination="uMn-O6-Lab" id="kuE-Lk-ipe"/>
|
||||||
<outlet property="btnLeaveNetwork" destination="mGU-Lt-Mi0" id="t18-og-FtK"/>
|
<outlet property="btnLeaveNetwork" destination="mGU-Lt-Mi0" id="t18-og-FtK"/>
|
||||||
|
<outlet property="btnReadData" destination="nDD-6g-OyX" id="Me0-HY-lil"/>
|
||||||
<outlet property="btnSend" destination="kBj-wv-ccA" id="Bg5-qM-tLw"/>
|
<outlet property="btnSend" destination="kBj-wv-ccA" id="Bg5-qM-tLw"/>
|
||||||
<outlet property="segmentAPISelector" destination="zJe-Qg-KiM" id="B1u-ja-2o3"/>
|
|
||||||
<outlet property="segmentProtocolSelector" destination="TgD-cF-oG9" id="Lbo-Pn-lgi"/>
|
<outlet property="segmentProtocolSelector" destination="TgD-cF-oG9" id="Lbo-Pn-lgi"/>
|
||||||
<outlet property="txtAddr" destination="anE-Lb-OeR" id="9cH-6T-dE3"/>
|
<outlet property="txtAddr" destination="anE-Lb-OeR" id="9cH-6T-dE3"/>
|
||||||
<outlet property="txtNWID" destination="7LM-Q0-D7l" id="3QF-tw-Hws"/>
|
<outlet property="txtNWID" destination="7LM-Q0-D7l" id="3QF-tw-Hws"/>
|
||||||
<outlet property="txtPort" destination="imQ-Xu-9iD" id="gxQ-sZ-nio"/>
|
<outlet property="txtPort" destination="imQ-Xu-9iD" id="gxQ-sZ-nio"/>
|
||||||
<outlet property="txtPortChanged" destination="imQ-Xu-9iD" id="NqB-2s-Og3"/>
|
<outlet property="txtPortChanged" destination="imQ-Xu-9iD" id="NqB-2s-Og3"/>
|
||||||
<outlet property="txtR" destination="f93-eE-nJ9" id="Sbh-vb-Ycb"/>
|
<outlet property="txtRX" destination="hCM-du-WCV" id="pY2-Go-s7C"/>
|
||||||
<outlet property="txtRX" destination="f93-eE-nJ9" id="Gyx-ss-gDU"/>
|
<outlet property="txtTX" destination="Nrt-y7-5kB" id="LOI-b7-hMa"/>
|
||||||
<outlet property="txtRx" destination="f93-eE-nJ9" id="yPZ-sv-Ctq"/>
|
|
||||||
<outlet property="txtTX" destination="qu5-Bf-5GJ" id="a8Y-u3-u1A"/>
|
|
||||||
</connections>
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||||
|
|||||||
@@ -20,15 +20,14 @@ class ViewController: NSViewController {
|
|||||||
@IBOutlet weak var btnConnect: NSButton!
|
@IBOutlet weak var btnConnect: NSButton!
|
||||||
@IBOutlet weak var btnBind: NSButton!
|
@IBOutlet weak var btnBind: NSButton!
|
||||||
|
|
||||||
@IBOutlet weak var txtTX: NSScrollView!
|
@IBOutlet weak var txtTX: NSTextField!
|
||||||
@IBOutlet weak var txtRX: NSScrollView!
|
@IBOutlet weak var txtRX: NSTextField!
|
||||||
|
|
||||||
@IBOutlet weak var btnSend: NSButton!
|
|
||||||
|
|
||||||
var serverPort:Int32 = 8080
|
var serverPort:Int32 = 8080
|
||||||
var serverAddr:String = "10.147.18.5"
|
var serverAddr:String = "10.147.18.5"
|
||||||
|
|
||||||
var sock:Int32 = -1
|
var sock:Int32 = -1
|
||||||
|
var accepted_sock:Int32 = -1
|
||||||
|
|
||||||
@IBAction func txtAddrChanged(sender: AnyObject) {
|
@IBAction func txtAddrChanged(sender: AnyObject) {
|
||||||
if(sender.stringValue != nil) {
|
if(sender.stringValue != nil) {
|
||||||
@@ -119,6 +118,7 @@ class ViewController: NSViewController {
|
|||||||
inet_pton(AF_INET, serverAddr, &(addr.sin_addr));
|
inet_pton(AF_INET, serverAddr, &(addr.sin_addr));
|
||||||
|
|
||||||
let bind_err = zts_bind(sock, UnsafePointer<sockaddr>([addr]), UInt32(addr.sin_len))
|
let bind_err = zts_bind(sock, UnsafePointer<sockaddr>([addr]), UInt32(addr.sin_len))
|
||||||
|
|
||||||
print("bind_err = \(bind_err),\(errno)")
|
print("bind_err = \(bind_err),\(errno)")
|
||||||
|
|
||||||
if bind_err < 0 {
|
if bind_err < 0 {
|
||||||
@@ -126,6 +126,17 @@ class ViewController: NSViewController {
|
|||||||
print("Error binding IPv4 socket \(err)")
|
print("Error binding IPv4 socket \(err)")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Put socket into listening state
|
||||||
|
zts_listen(sock, 1);
|
||||||
|
|
||||||
|
// Accept connection
|
||||||
|
var len:socklen_t = 0;
|
||||||
|
var legIntPtr = withUnsafeMutablePointer(&len, { $0 })
|
||||||
|
while(accepted_sock < 0) {
|
||||||
|
accepted_sock = zts_accept(sock, UnsafeMutablePointer<sockaddr>([addr]), legIntPtr)
|
||||||
|
}
|
||||||
|
print("accepted connection")
|
||||||
}
|
}
|
||||||
|
|
||||||
// UDP
|
// UDP
|
||||||
@@ -135,23 +146,85 @@ class ViewController: NSViewController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send data to a remote host
|
// TX
|
||||||
|
@IBOutlet weak var btnSend: NSButton!
|
||||||
@IBAction func UI_SendData(sender: AnyObject) {
|
@IBAction func UI_SendData(sender: AnyObject) {
|
||||||
// Use ordinary read/write calls on ZeroTier socket
|
// Use ordinary read/write calls on ZeroTier socket
|
||||||
|
|
||||||
// TCP
|
// TCP
|
||||||
if(selectedProtocol == SOCK_STREAM)
|
if(selectedProtocol == SOCK_STREAM)
|
||||||
{
|
{
|
||||||
write(sock, "test", 4);
|
write(sock, txtTX.description, 4);
|
||||||
}
|
}
|
||||||
// UDP
|
// UDP
|
||||||
if(selectedProtocol == SOCK_DGRAM)
|
if(selectedProtocol == SOCK_DGRAM)
|
||||||
{
|
{
|
||||||
|
// 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)
|
||||||
|
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)
|
||||||
|
|
||||||
|
// read(accepted_sock, UnsafeMutablePointer<Void>([txtTX.stringValue]), 128);
|
||||||
|
read(accepted_sock, &buffer, 100);
|
||||||
|
print(buffer)
|
||||||
|
|
||||||
|
}
|
||||||
|
// UDP
|
||||||
|
if(selectedProtocol == SOCK_DGRAM)
|
||||||
|
{
|
||||||
|
// recvfrom
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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")
|
||||||
|
}
|
||||||
|
|
||||||
var service_thread : NSThread!
|
var service_thread : NSThread!
|
||||||
func ztnc_start_service() {
|
func ztnc_start_service() {
|
||||||
let path = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)
|
let path = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)
|
||||||
|
|||||||
@@ -0,0 +1,299 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 46;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
7C8BC03C1D3348A6001E1B6F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8BC03B1D3348A6001E1B6F /* AppDelegate.swift */; };
|
||||||
|
7C8BC03E1D3348A6001E1B6F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8BC03D1D3348A6001E1B6F /* ViewController.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 */; };
|
||||||
|
7C8BC04E1D334911001E1B6F /* ZeroTierSDK_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C8BC04D1D334911001E1B6F /* ZeroTierSDK_iOS.framework */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
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 = "<group>"; };
|
||||||
|
7C8BC03D1D3348A6001E1B6F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||||
|
7C8BC0401D3348A6001E1B6F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||||
|
7C8BC0421D3348A6001E1B6F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
7C8BC0451D3348A6001E1B6F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
|
7C8BC0471D3348A6001E1B6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
7C8BC04D1D334911001E1B6F /* ZeroTierSDK_iOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ZeroTierSDK_iOS.framework; path = "../../../../build/ios_app_framework/Debug-iphoneos/ZeroTierSDK_iOS.framework"; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
7C8BC0351D3348A6001E1B6F /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
7C8BC04E1D334911001E1B6F /* ZeroTierSDK_iOS.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
7C8BC02F1D3348A6001E1B6F = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
7C8BC04D1D334911001E1B6F /* ZeroTierSDK_iOS.framework */,
|
||||||
|
7C8BC03A1D3348A6001E1B6F /* Example_iOS_App */,
|
||||||
|
7C8BC0391D3348A6001E1B6F /* Products */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
7C8BC0391D3348A6001E1B6F /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
7C8BC0381D3348A6001E1B6F /* Example_iOS_App.app */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
7C8BC03A1D3348A6001E1B6F /* Example_iOS_App */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
7C8BC03B1D3348A6001E1B6F /* AppDelegate.swift */,
|
||||||
|
7C8BC03D1D3348A6001E1B6F /* ViewController.swift */,
|
||||||
|
7C8BC03F1D3348A6001E1B6F /* Main.storyboard */,
|
||||||
|
7C8BC0421D3348A6001E1B6F /* Assets.xcassets */,
|
||||||
|
7C8BC0441D3348A6001E1B6F /* LaunchScreen.storyboard */,
|
||||||
|
7C8BC0471D3348A6001E1B6F /* Info.plist */,
|
||||||
|
);
|
||||||
|
path = Example_iOS_App;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* 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 */,
|
||||||
|
);
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
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 = (
|
||||||
|
7C8BC03E1D3348A6001E1B6F /* ViewController.swift in Sources */,
|
||||||
|
7C8BC03C1D3348A6001E1B6F /* AppDelegate.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
7C8BC03F1D3348A6001E1B6F /* Main.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
7C8BC0401D3348A6001E1B6F /* Base */,
|
||||||
|
);
|
||||||
|
name = Main.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
7C8BC0441D3348A6001E1B6F /* LaunchScreen.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
7C8BC0451D3348A6001E1B6F /* Base */,
|
||||||
|
);
|
||||||
|
name = LaunchScreen.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* 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;
|
||||||
|
INFOPLIST_FILE = Example_iOS_App/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "zerotier.Example-iOS-App";
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
7C8BC04C1D3348A6001E1B6F /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
INFOPLIST_FILE = Example_iOS_App/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "zerotier.Example-iOS-App";
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 7C8BC0301D3348A6001E1B6F /* Project object */;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "self:Example_iOS_App.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
Binary file not shown.
@@ -0,0 +1,91 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0730"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7C8BC0371D3348A6001E1B6F"
|
||||||
|
BuildableName = "Example_iOS_App.app"
|
||||||
|
BlueprintName = "Example_iOS_App"
|
||||||
|
ReferencedContainer = "container:Example_iOS_App.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7C8BC0371D3348A6001E1B6F"
|
||||||
|
BuildableName = "Example_iOS_App.app"
|
||||||
|
BlueprintName = "Example_iOS_App"
|
||||||
|
ReferencedContainer = "container:Example_iOS_App.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7C8BC0371D3348A6001E1B6F"
|
||||||
|
BuildableName = "Example_iOS_App.app"
|
||||||
|
BlueprintName = "Example_iOS_App"
|
||||||
|
ReferencedContainer = "container:Example_iOS_App.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7C8BC0371D3348A6001E1B6F"
|
||||||
|
BuildableName = "Example_iOS_App.app"
|
||||||
|
BlueprintName = "Example_iOS_App"
|
||||||
|
ReferencedContainer = "container:Example_iOS_App.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>SchemeUserState</key>
|
||||||
|
<dict>
|
||||||
|
<key>Example_iOS_App.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>SuppressBuildableAutocreation</key>
|
||||||
|
<dict>
|
||||||
|
<key>7C8BC0371D3348A6001E1B6F</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -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:.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
|
||||||
|
<dependencies>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
|
||||||
|
</dependencies>
|
||||||
|
<scenes>
|
||||||
|
<!--View Controller-->
|
||||||
|
<scene sceneID="EHf-IW-A2E">
|
||||||
|
<objects>
|
||||||
|
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||||
|
<layoutGuides>
|
||||||
|
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
|
||||||
|
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
|
||||||
|
</layoutGuides>
|
||||||
|
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<animations/>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||||
|
</view>
|
||||||
|
</viewController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
<point key="canvasLocation" x="53" y="375"/>
|
||||||
|
</scene>
|
||||||
|
</scenes>
|
||||||
|
</document>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||||
|
</dependencies>
|
||||||
|
<scenes>
|
||||||
|
<!--View Controller-->
|
||||||
|
<scene sceneID="tne-QT-ifu">
|
||||||
|
<objects>
|
||||||
|
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Example_iOS_App" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
|
<layoutGuides>
|
||||||
|
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||||
|
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||||
|
</layoutGuides>
|
||||||
|
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||||
|
</view>
|
||||||
|
</viewController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
</scene>
|
||||||
|
</scenes>
|
||||||
|
</document>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>UILaunchStoryboardName</key>
|
||||||
|
<string>LaunchScreen</string>
|
||||||
|
<key>UIMainStoryboardFile</key>
|
||||||
|
<string>Main</string>
|
||||||
|
<key>UIRequiredDeviceCapabilities</key>
|
||||||
|
<array>
|
||||||
|
<string>armv7</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
//
|
||||||
|
// 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 {
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
// 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.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -47,7 +47,6 @@
|
|||||||
#include "OSUtils.hpp"
|
#include "OSUtils.hpp"
|
||||||
|
|
||||||
#include "SDK.h"
|
#include "SDK.h"
|
||||||
void zt_init_rpc(const char * path, const char * nwid);
|
|
||||||
|
|
||||||
#include "SDK_Debug.h"
|
#include "SDK_Debug.h"
|
||||||
#include "SDK_ServiceSetup.hpp"
|
#include "SDK_ServiceSetup.hpp"
|
||||||
@@ -64,6 +63,8 @@ std::string netDir;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void zt_init_rpc(const char * path, const char * nwid);
|
||||||
|
|
||||||
#if defined(__UNITY_3D__)
|
#if defined(__UNITY_3D__)
|
||||||
// .NET Interop-friendly debug mechanism
|
// .NET Interop-friendly debug mechanism
|
||||||
typedef void (*FuncPtr)( const char * );
|
typedef void (*FuncPtr)( const char * );
|
||||||
@@ -134,7 +135,7 @@ extern "C" {
|
|||||||
// JNI naming convention: Java_PACKAGENAME_CLASSNAME_METHODNAME
|
// JNI naming convention: Java_PACKAGENAME_CLASSNAME_METHODNAME
|
||||||
JNIEXPORT void JNICALL Java_ZeroTier_SDK_startOneService(JNIEnv *env, jobject thisObj, jstring path) {
|
JNIEXPORT void JNICALL Java_ZeroTier_SDK_startOneService(JNIEnv *env, jobject thisObj, jstring path) {
|
||||||
//char * path;
|
//char * path;
|
||||||
homeDir = (*env)->GetStringUTFChars(env, path, NULL);
|
homeDir = env->GetStringUTFChars(path, NULL);
|
||||||
#else
|
#else
|
||||||
void *startOneService(void *thread_id) {
|
void *startOneService(void *thread_id) {
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ extern std::string homeDir;
|
|||||||
/* If you define anything else in this file it that you wish to expose to your Android
|
/* If you define anything else in this file it that you wish to expose to your Android
|
||||||
Java application you *must* follow that convention and any corresponding Java package/classes
|
Java application you *must* follow that convention and any corresponding Java package/classes
|
||||||
in your Android project must match this as well */
|
in your Android project must match this as well */
|
||||||
JNIEXPORT void JNICALL Java_ZeroTier_SDK_startOneService(JNIEnv *env, jobject thisObj);
|
JNIEXPORT void JNICALL Java_ZeroTier_SDK_startOneService(JNIEnv *env, jobject thisObj, jstring path);
|
||||||
#else
|
#else
|
||||||
void *startOneService(void *thread_id);
|
void *startOneService(void *thread_id);
|
||||||
void init_service(int key, const char * path);
|
void init_service(int key, const char * path);
|
||||||
|
|||||||
Reference in New Issue
Block a user