├── .gitignore ├── README.md ├── ShipOTDemo-Bridging-Header.h ├── ShipOTDemo.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── ShipOTDemo ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── SceneDelegate.h ├── SceneDelegate.m ├── SwfitFile.swift ├── ViewController.h ├── ViewController.m └── main.m └── SwiftTest └── SwiftTest.swift /.gitignore: -------------------------------------------------------------------------------- 1 | ShipOTDemo.xcodeproj/project.xcworkspace/xcuserdata/ 2 | ShipOTDemo.xcodeproj/xcshareddata/xcschemes/ShipOTDemo.xcscheme 3 | ShipOTDemo.xcodeproj/xcuserdata/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 这是SOT热更新方案示例工程的git仓库,使用文档请移步官网https://www.sotvm.com/doc 2 | -------------------------------------------------------------------------------- /ShipOTDemo-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /ShipOTDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 4E1049C9268ED53C008FF0C3 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EAB64AD26158966000D3D22 /* AppDelegate.m */; }; 11 | 4E1049CF268ED53F008FF0C3 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EAB64B026158966000D3D22 /* SceneDelegate.m */; }; 12 | 4E1049D5268ED542008FF0C3 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EAB64B326158966000D3D22 /* ViewController.m */; }; 13 | 4E3E932626B577E900E972D1 /* SwiftTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E3E932526B577E900E972D1 /* SwiftTest.swift */; }; 14 | 4E3E933826B58EF900E972D1 /* SwfitFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E3E933726B58EF900E972D1 /* SwfitFile.swift */; }; 15 | 4E3E933D26B58F4500E972D1 /* libSwiftTest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E3E932326B577E900E972D1 /* libSwiftTest.a */; }; 16 | 4EAB64B726158966000D3D22 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4EAB64B526158966000D3D22 /* Main.storyboard */; }; 17 | 4EAB64B926158967000D3D22 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4EAB64B826158967000D3D22 /* Assets.xcassets */; }; 18 | 4EAB64BC26158967000D3D22 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4EAB64BA26158967000D3D22 /* LaunchScreen.storyboard */; }; 19 | 4EAB64BF26158967000D3D22 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EAB64BE26158967000D3D22 /* main.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXCopyFilesBuildPhase section */ 23 | 4E3E932126B577E900E972D1 /* CopyFiles */ = { 24 | isa = PBXCopyFilesBuildPhase; 25 | buildActionMask = 2147483647; 26 | dstPath = "include/$(PRODUCT_NAME)"; 27 | dstSubfolderSpec = 16; 28 | files = ( 29 | ); 30 | runOnlyForDeploymentPostprocessing = 0; 31 | }; 32 | /* End PBXCopyFilesBuildPhase section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 4E3E932326B577E900E972D1 /* libSwiftTest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSwiftTest.a; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 4E3E932526B577E900E972D1 /* SwiftTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftTest.swift; sourceTree = ""; }; 37 | 4E3E933626B58EF900E972D1 /* ShipOTDemo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ShipOTDemo-Bridging-Header.h"; sourceTree = ""; }; 38 | 4E3E933726B58EF900E972D1 /* SwfitFile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwfitFile.swift; sourceTree = ""; }; 39 | 4E3E934526B593F600E972D1 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 40 | 4E5EF7E92618CB090040CAD7 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; 41 | 4EAB64A926158966000D3D22 /* ShipOTDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ShipOTDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 4EAB64AC26158966000D3D22 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 43 | 4EAB64AD26158966000D3D22 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 44 | 4EAB64AF26158966000D3D22 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; 45 | 4EAB64B026158966000D3D22 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; 46 | 4EAB64B226158966000D3D22 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 47 | 4EAB64B326158966000D3D22 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 48 | 4EAB64B626158966000D3D22 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 49 | 4EAB64B826158967000D3D22 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 50 | 4EAB64BB26158967000D3D22 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 51 | 4EAB64BD26158967000D3D22 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 4EAB64BE26158967000D3D22 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 53 | 4EAD40002A5A447800E622C8 /* NativeInterface.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = NativeInterface.cpp; path = ../../../../../Applications/sot/irvm/cpphotfix/NativeInterface.cpp; sourceTree = ""; }; 54 | 4EAD40012A5A450800E622C8 /* NativeApi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeApi.h; path = ../../../../../Applications/sot/irvm/cpphotfix/NativeApi.h; sourceTree = ""; }; 55 | 4EAD40022A5A492600E622C8 /* ffihelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ffihelper.h; path = ../../../../../Applications/sot/irvm/ffihelper.h; sourceTree = ""; }; 56 | 4EAD40032A5A4B6B00E622C8 /* ffihelper.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ffihelper.cpp; path = ../../../../../Applications/sot/irvm/vm/ffihelper.cpp; sourceTree = ""; }; 57 | 4EC233302A65723B00D29210 /* sotvm.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = sotvm.cpp; path = ../../../../../Applications/sot16/irvm/vm/sotvm.cpp; sourceTree = ""; }; 58 | 4EC233322A6C1BDD00D29210 /* SotWebService.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = SotWebService.mm; path = ../sot16/iOSsot/sotlib/sotlib/SotWebService.mm; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 4E3E932026B577E900E972D1 /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | 4EAB64A626158966000D3D22 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | 4E3E933D26B58F4500E972D1 /* libSwiftTest.a in Frameworks */, 74 | ); 75 | runOnlyForDeploymentPostprocessing = 0; 76 | }; 77 | /* End PBXFrameworksBuildPhase section */ 78 | 79 | /* Begin PBXGroup section */ 80 | 4E3E932426B577E900E972D1 /* SwiftTest */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 4E3E932526B577E900E972D1 /* SwiftTest.swift */, 84 | ); 85 | path = SwiftTest; 86 | sourceTree = ""; 87 | }; 88 | 4EAB64A026158966000D3D22 = { 89 | isa = PBXGroup; 90 | children = ( 91 | 4EAB64AB26158966000D3D22 /* ShipOTDemo */, 92 | 4E3E932426B577E900E972D1 /* SwiftTest */, 93 | 4EAB64AA26158966000D3D22 /* Products */, 94 | 4EAB64E526158DA5000D3D22 /* Frameworks */, 95 | 4E3E933626B58EF900E972D1 /* ShipOTDemo-Bridging-Header.h */, 96 | ); 97 | sourceTree = ""; 98 | }; 99 | 4EAB64AA26158966000D3D22 /* Products */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 4EAB64A926158966000D3D22 /* ShipOTDemo.app */, 103 | 4E3E932326B577E900E972D1 /* libSwiftTest.a */, 104 | ); 105 | name = Products; 106 | sourceTree = ""; 107 | }; 108 | 4EAB64AB26158966000D3D22 /* ShipOTDemo */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 4E3E933726B58EF900E972D1 /* SwfitFile.swift */, 112 | 4EAB64AC26158966000D3D22 /* AppDelegate.h */, 113 | 4EAB64AF26158966000D3D22 /* SceneDelegate.h */, 114 | 4EAB64B226158966000D3D22 /* ViewController.h */, 115 | 4EAB64B526158966000D3D22 /* Main.storyboard */, 116 | 4EAB64B826158967000D3D22 /* Assets.xcassets */, 117 | 4EAB64BA26158967000D3D22 /* LaunchScreen.storyboard */, 118 | 4EAB64BD26158967000D3D22 /* Info.plist */, 119 | 4EAB64BE26158967000D3D22 /* main.m */, 120 | 4EAB64AD26158966000D3D22 /* AppDelegate.m */, 121 | 4EAB64B026158966000D3D22 /* SceneDelegate.m */, 122 | 4EAB64B326158966000D3D22 /* ViewController.m */, 123 | ); 124 | path = ShipOTDemo; 125 | sourceTree = ""; 126 | }; 127 | 4EAB64E526158DA5000D3D22 /* Frameworks */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 4EC233322A6C1BDD00D29210 /* SotWebService.mm */, 131 | 4EC233302A65723B00D29210 /* sotvm.cpp */, 132 | 4EAD40002A5A447800E622C8 /* NativeInterface.cpp */, 133 | 4EAD40032A5A4B6B00E622C8 /* ffihelper.cpp */, 134 | 4EAD40022A5A492600E622C8 /* ffihelper.h */, 135 | 4EAD40012A5A450800E622C8 /* NativeApi.h */, 136 | 4E3E934526B593F600E972D1 /* libz.tbd */, 137 | 4E5EF7E92618CB090040CAD7 /* libc++.tbd */, 138 | ); 139 | name = Frameworks; 140 | sourceTree = ""; 141 | }; 142 | /* End PBXGroup section */ 143 | 144 | /* Begin PBXNativeTarget section */ 145 | 4E3E932226B577E900E972D1 /* SwiftTest */ = { 146 | isa = PBXNativeTarget; 147 | buildConfigurationList = 4E3E932726B577E900E972D1 /* Build configuration list for PBXNativeTarget "SwiftTest" */; 148 | buildPhases = ( 149 | 4E3E931F26B577E900E972D1 /* Sources */, 150 | 4E3E932026B577E900E972D1 /* Frameworks */, 151 | 4E3E932126B577E900E972D1 /* CopyFiles */, 152 | ); 153 | buildRules = ( 154 | ); 155 | dependencies = ( 156 | ); 157 | name = SwiftTest; 158 | productName = SwiftTest; 159 | productReference = 4E3E932326B577E900E972D1 /* libSwiftTest.a */; 160 | productType = "com.apple.product-type.library.static"; 161 | }; 162 | 4EAB64A826158966000D3D22 /* ShipOTDemo */ = { 163 | isa = PBXNativeTarget; 164 | buildConfigurationList = 4EAB64C226158967000D3D22 /* Build configuration list for PBXNativeTarget "ShipOTDemo" */; 165 | buildPhases = ( 166 | 4EAB64A526158966000D3D22 /* Sources */, 167 | 4EAB64A626158966000D3D22 /* Frameworks */, 168 | 4EAB64A726158966000D3D22 /* Resources */, 169 | ); 170 | buildRules = ( 171 | ); 172 | dependencies = ( 173 | ); 174 | name = ShipOTDemo; 175 | productName = ShipOTDemo; 176 | productReference = 4EAB64A926158966000D3D22 /* ShipOTDemo.app */; 177 | productType = "com.apple.product-type.application"; 178 | }; 179 | /* End PBXNativeTarget section */ 180 | 181 | /* Begin PBXProject section */ 182 | 4EAB64A126158966000D3D22 /* Project object */ = { 183 | isa = PBXProject; 184 | attributes = { 185 | LastSwiftUpdateCheck = 1240; 186 | LastUpgradeCheck = 1220; 187 | TargetAttributes = { 188 | 4E3E932226B577E900E972D1 = { 189 | CreatedOnToolsVersion = 12.4; 190 | }; 191 | 4EAB64A826158966000D3D22 = { 192 | CreatedOnToolsVersion = 12.2; 193 | LastSwiftMigration = 1240; 194 | }; 195 | }; 196 | }; 197 | buildConfigurationList = 4EAB64A426158966000D3D22 /* Build configuration list for PBXProject "ShipOTDemo" */; 198 | compatibilityVersion = "Xcode 9.3"; 199 | developmentRegion = en; 200 | hasScannedForEncodings = 0; 201 | knownRegions = ( 202 | en, 203 | Base, 204 | ); 205 | mainGroup = 4EAB64A026158966000D3D22; 206 | productRefGroup = 4EAB64AA26158966000D3D22 /* Products */; 207 | projectDirPath = ""; 208 | projectRoot = ""; 209 | targets = ( 210 | 4EAB64A826158966000D3D22 /* ShipOTDemo */, 211 | 4E3E932226B577E900E972D1 /* SwiftTest */, 212 | ); 213 | }; 214 | /* End PBXProject section */ 215 | 216 | /* Begin PBXResourcesBuildPhase section */ 217 | 4EAB64A726158966000D3D22 /* Resources */ = { 218 | isa = PBXResourcesBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | 4EAB64BC26158967000D3D22 /* LaunchScreen.storyboard in Resources */, 222 | 4EAB64B926158967000D3D22 /* Assets.xcassets in Resources */, 223 | 4EAB64B726158966000D3D22 /* Main.storyboard in Resources */, 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | }; 227 | /* End PBXResourcesBuildPhase section */ 228 | 229 | /* Begin PBXSourcesBuildPhase section */ 230 | 4E3E931F26B577E900E972D1 /* Sources */ = { 231 | isa = PBXSourcesBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | 4E3E932626B577E900E972D1 /* SwiftTest.swift in Sources */, 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | 4EAB64A526158966000D3D22 /* Sources */ = { 239 | isa = PBXSourcesBuildPhase; 240 | buildActionMask = 2147483647; 241 | files = ( 242 | 4E1049D5268ED542008FF0C3 /* ViewController.m in Sources */, 243 | 4E1049CF268ED53F008FF0C3 /* SceneDelegate.m in Sources */, 244 | 4E1049C9268ED53C008FF0C3 /* AppDelegate.m in Sources */, 245 | 4E3E933826B58EF900E972D1 /* SwfitFile.swift in Sources */, 246 | 4EAB64BF26158967000D3D22 /* main.m in Sources */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | /* End PBXSourcesBuildPhase section */ 251 | 252 | /* Begin PBXVariantGroup section */ 253 | 4EAB64B526158966000D3D22 /* Main.storyboard */ = { 254 | isa = PBXVariantGroup; 255 | children = ( 256 | 4EAB64B626158966000D3D22 /* Base */, 257 | ); 258 | name = Main.storyboard; 259 | sourceTree = ""; 260 | }; 261 | 4EAB64BA26158967000D3D22 /* LaunchScreen.storyboard */ = { 262 | isa = PBXVariantGroup; 263 | children = ( 264 | 4EAB64BB26158967000D3D22 /* Base */, 265 | ); 266 | name = LaunchScreen.storyboard; 267 | sourceTree = ""; 268 | }; 269 | /* End PBXVariantGroup section */ 270 | 271 | /* Begin XCBuildConfiguration section */ 272 | 4E3E932826B577E900E972D1 /* Debug */ = { 273 | isa = XCBuildConfiguration; 274 | buildSettings = { 275 | CODE_SIGN_STYLE = Automatic; 276 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 277 | OTHER_CFLAGS = ""; 278 | OTHER_LDFLAGS = "-ObjC"; 279 | OTHER_LIBTOOLFLAGS = ""; 280 | OTHER_SWIFT_FLAGS = ""; 281 | PRODUCT_NAME = "$(TARGET_NAME)"; 282 | SKIP_INSTALL = YES; 283 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 284 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 285 | SWIFT_VERSION = 5.0; 286 | TARGETED_DEVICE_FAMILY = "1,2"; 287 | }; 288 | name = Debug; 289 | }; 290 | 4E3E932926B577E900E972D1 /* Release */ = { 291 | isa = XCBuildConfiguration; 292 | buildSettings = { 293 | CODE_SIGN_STYLE = Automatic; 294 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 295 | OTHER_CFLAGS = ""; 296 | OTHER_LDFLAGS = "-ObjC"; 297 | OTHER_LIBTOOLFLAGS = ""; 298 | OTHER_SWIFT_FLAGS = ""; 299 | PRODUCT_NAME = "$(TARGET_NAME)"; 300 | SKIP_INSTALL = YES; 301 | SWIFT_COMPILATION_MODE = singlefile; 302 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 303 | SWIFT_VERSION = 5.0; 304 | TARGETED_DEVICE_FAMILY = "1,2"; 305 | }; 306 | name = Release; 307 | }; 308 | 4EAB64C026158967000D3D22 /* Debug */ = { 309 | isa = XCBuildConfiguration; 310 | buildSettings = { 311 | ALWAYS_SEARCH_USER_PATHS = NO; 312 | CLANG_ANALYZER_NONNULL = YES; 313 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 314 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 315 | CLANG_CXX_LIBRARY = "libc++"; 316 | CLANG_ENABLE_MODULES = YES; 317 | CLANG_ENABLE_OBJC_ARC = YES; 318 | CLANG_ENABLE_OBJC_WEAK = YES; 319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 320 | CLANG_WARN_BOOL_CONVERSION = YES; 321 | CLANG_WARN_COMMA = YES; 322 | CLANG_WARN_CONSTANT_CONVERSION = YES; 323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 325 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 326 | CLANG_WARN_EMPTY_BODY = YES; 327 | CLANG_WARN_ENUM_CONVERSION = YES; 328 | CLANG_WARN_INFINITE_RECURSION = YES; 329 | CLANG_WARN_INT_CONVERSION = YES; 330 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 331 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 332 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 333 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 334 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 335 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 336 | CLANG_WARN_STRICT_PROTOTYPES = YES; 337 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 338 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 339 | CLANG_WARN_UNREACHABLE_CODE = YES; 340 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 341 | COPY_PHASE_STRIP = NO; 342 | DEBUG_INFORMATION_FORMAT = dwarf; 343 | ENABLE_BITCODE = NO; 344 | ENABLE_STRICT_OBJC_MSGSEND = YES; 345 | ENABLE_TESTABILITY = YES; 346 | GCC_C_LANGUAGE_STANDARD = gnu11; 347 | GCC_DYNAMIC_NO_PIC = NO; 348 | GCC_NO_COMMON_BLOCKS = YES; 349 | GCC_OPTIMIZATION_LEVEL = 0; 350 | GCC_PREPROCESSOR_DEFINITIONS = ( 351 | "DEBUG=1", 352 | "$(inherited)", 353 | ); 354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 356 | GCC_WARN_UNDECLARED_SELECTOR = YES; 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 358 | GCC_WARN_UNUSED_FUNCTION = YES; 359 | GCC_WARN_UNUSED_VARIABLE = YES; 360 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 361 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 362 | MTL_FAST_MATH = YES; 363 | ONLY_ACTIVE_ARCH = YES; 364 | SDKROOT = iphoneos; 365 | }; 366 | name = Debug; 367 | }; 368 | 4EAB64C126158967000D3D22 /* Release */ = { 369 | isa = XCBuildConfiguration; 370 | buildSettings = { 371 | ALWAYS_SEARCH_USER_PATHS = NO; 372 | CLANG_ANALYZER_NONNULL = YES; 373 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 374 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 375 | CLANG_CXX_LIBRARY = "libc++"; 376 | CLANG_ENABLE_MODULES = YES; 377 | CLANG_ENABLE_OBJC_ARC = YES; 378 | CLANG_ENABLE_OBJC_WEAK = YES; 379 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 380 | CLANG_WARN_BOOL_CONVERSION = YES; 381 | CLANG_WARN_COMMA = YES; 382 | CLANG_WARN_CONSTANT_CONVERSION = YES; 383 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 384 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 385 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 386 | CLANG_WARN_EMPTY_BODY = YES; 387 | CLANG_WARN_ENUM_CONVERSION = YES; 388 | CLANG_WARN_INFINITE_RECURSION = YES; 389 | CLANG_WARN_INT_CONVERSION = YES; 390 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 391 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 392 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 393 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 394 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 395 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 396 | CLANG_WARN_STRICT_PROTOTYPES = YES; 397 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 398 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 399 | CLANG_WARN_UNREACHABLE_CODE = YES; 400 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 401 | COPY_PHASE_STRIP = NO; 402 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 403 | ENABLE_BITCODE = NO; 404 | ENABLE_NS_ASSERTIONS = NO; 405 | ENABLE_STRICT_OBJC_MSGSEND = YES; 406 | GCC_C_LANGUAGE_STANDARD = gnu11; 407 | GCC_NO_COMMON_BLOCKS = YES; 408 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 409 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 410 | GCC_WARN_UNDECLARED_SELECTOR = YES; 411 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 412 | GCC_WARN_UNUSED_FUNCTION = YES; 413 | GCC_WARN_UNUSED_VARIABLE = YES; 414 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 415 | MTL_ENABLE_DEBUG_INFO = NO; 416 | MTL_FAST_MATH = YES; 417 | SDKROOT = iphoneos; 418 | VALIDATE_PRODUCT = YES; 419 | }; 420 | name = Release; 421 | }; 422 | 4EAB64C326158967000D3D22 /* Debug */ = { 423 | isa = XCBuildConfiguration; 424 | buildSettings = { 425 | ARCHS = "$(ARCHS_STANDARD)"; 426 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 427 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 428 | CLANG_ENABLE_MODULES = YES; 429 | CODE_SIGN_IDENTITY = "Apple Development"; 430 | CODE_SIGN_STYLE = Manual; 431 | DEVELOPMENT_TEAM = ""; 432 | EXCLUDED_ARCHS = ""; 433 | GCC_PREPROCESSOR_DEFINITIONS = ( 434 | "DEBUG=1", 435 | "$(inherited)", 436 | ); 437 | INFOPLIST_FILE = ShipOTDemo/Info.plist; 438 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 439 | LD_RUNPATH_SEARCH_PATHS = ( 440 | "$(inherited)", 441 | "@executable_path/Frameworks", 442 | ); 443 | OTHER_CFLAGS = ""; 444 | OTHER_LDFLAGS = ""; 445 | OTHER_SWIFT_FLAGS = ""; 446 | PRODUCT_BUNDLE_IDENTIFIER = com.sotvm.shipdd; 447 | PRODUCT_NAME = "$(TARGET_NAME)"; 448 | PROVISIONING_PROFILE_SPECIFIER = ""; 449 | SWIFT_OBJC_BRIDGING_HEADER = "ShipOTDemo-Bridging-Header.h"; 450 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 451 | SWIFT_VERSION = 5.0; 452 | TARGETED_DEVICE_FAMILY = "1,2"; 453 | }; 454 | name = Debug; 455 | }; 456 | 4EAB64C426158967000D3D22 /* Release */ = { 457 | isa = XCBuildConfiguration; 458 | buildSettings = { 459 | ARCHS = "$(ARCHS_STANDARD)"; 460 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 461 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 462 | CLANG_ENABLE_MODULES = YES; 463 | CODE_SIGN_IDENTITY = "Apple Development"; 464 | CODE_SIGN_STYLE = Manual; 465 | DEVELOPMENT_TEAM = ""; 466 | EXCLUDED_ARCHS = ""; 467 | GCC_PREPROCESSOR_DEFINITIONS = ""; 468 | INFOPLIST_FILE = ShipOTDemo/Info.plist; 469 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 470 | LD_RUNPATH_SEARCH_PATHS = ( 471 | "$(inherited)", 472 | "@executable_path/Frameworks", 473 | ); 474 | LLVM_LTO = NO; 475 | ONLY_ACTIVE_ARCH = NO; 476 | OTHER_CFLAGS = ""; 477 | OTHER_LDFLAGS = ""; 478 | OTHER_SWIFT_FLAGS = ""; 479 | PRODUCT_BUNDLE_IDENTIFIER = com.sotvm.shipdd; 480 | PRODUCT_NAME = "$(TARGET_NAME)"; 481 | PROVISIONING_PROFILE_SPECIFIER = ""; 482 | SWIFT_OBJC_BRIDGING_HEADER = "ShipOTDemo-Bridging-Header.h"; 483 | SWIFT_VERSION = 5.0; 484 | TARGETED_DEVICE_FAMILY = "1,2"; 485 | }; 486 | name = Release; 487 | }; 488 | /* End XCBuildConfiguration section */ 489 | 490 | /* Begin XCConfigurationList section */ 491 | 4E3E932726B577E900E972D1 /* Build configuration list for PBXNativeTarget "SwiftTest" */ = { 492 | isa = XCConfigurationList; 493 | buildConfigurations = ( 494 | 4E3E932826B577E900E972D1 /* Debug */, 495 | 4E3E932926B577E900E972D1 /* Release */, 496 | ); 497 | defaultConfigurationIsVisible = 0; 498 | defaultConfigurationName = Release; 499 | }; 500 | 4EAB64A426158966000D3D22 /* Build configuration list for PBXProject "ShipOTDemo" */ = { 501 | isa = XCConfigurationList; 502 | buildConfigurations = ( 503 | 4EAB64C026158967000D3D22 /* Debug */, 504 | 4EAB64C126158967000D3D22 /* Release */, 505 | ); 506 | defaultConfigurationIsVisible = 0; 507 | defaultConfigurationName = Release; 508 | }; 509 | 4EAB64C226158967000D3D22 /* Build configuration list for PBXNativeTarget "ShipOTDemo" */ = { 510 | isa = XCConfigurationList; 511 | buildConfigurations = ( 512 | 4EAB64C326158967000D3D22 /* Debug */, 513 | 4EAB64C426158967000D3D22 /* Release */, 514 | ); 515 | defaultConfigurationIsVisible = 0; 516 | defaultConfigurationName = Release; 517 | }; 518 | /* End XCConfigurationList section */ 519 | }; 520 | rootObject = 4EAB64A126158966000D3D22 /* Project object */; 521 | } 522 | -------------------------------------------------------------------------------- /ShipOTDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ShipOTDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ShipOTDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface AppDelegate : UIResponder 4 | 5 | 6 | @end 7 | 8 | -------------------------------------------------------------------------------- /ShipOTDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | @interface AppDelegate () 4 | 5 | @end 6 | 7 | @implementation AppDelegate 8 | 9 | 10 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 11 | // Override point for customization after application launch. 12 | return YES; 13 | } 14 | 15 | 16 | #pragma mark - UISceneSession lifecycle 17 | 18 | 19 | - (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { 20 | // Called when a new scene session is being created. 21 | // Use this method to select a configuration to create the new scene with. 22 | return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; 23 | } 24 | 25 | 26 | - (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { 27 | // Called when the user discards a scene session. 28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 30 | } 31 | 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /ShipOTDemo/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ShipOTDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /ShipOTDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ShipOTDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /ShipOTDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ShipOTDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | SceneDelegate 36 | UISceneStoryboardFile 37 | Main 38 | 39 | 40 | 41 | 42 | UIApplicationSupportsIndirectInputEvents 43 | 44 | UILaunchStoryboardName 45 | LaunchScreen 46 | UIMainStoryboardFile 47 | Main 48 | UIRequiredDeviceCapabilities 49 | 50 | armv7 51 | 52 | UISupportedInterfaceOrientations 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationLandscapeLeft 56 | UIInterfaceOrientationLandscapeRight 57 | 58 | UISupportedInterfaceOrientations~ipad 59 | 60 | UIInterfaceOrientationPortrait 61 | UIInterfaceOrientationPortraitUpsideDown 62 | UIInterfaceOrientationLandscapeLeft 63 | UIInterfaceOrientationLandscapeRight 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /ShipOTDemo/SceneDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SceneDelegate : UIResponder 4 | 5 | @property (strong, nonatomic) UIWindow * window; 6 | 7 | @end 8 | 9 | -------------------------------------------------------------------------------- /ShipOTDemo/SceneDelegate.m: -------------------------------------------------------------------------------- 1 | #import "SceneDelegate.h" 2 | 3 | @interface SceneDelegate () 4 | 5 | @end 6 | 7 | @implementation SceneDelegate 8 | 9 | 10 | - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { 11 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 12 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 13 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 14 | } 15 | 16 | 17 | - (void)sceneDidDisconnect:(UIScene *)scene { 18 | // Called as the scene is being released by the system. 19 | // This occurs shortly after the scene enters the background, or when its session is discarded. 20 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 21 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). 22 | } 23 | 24 | 25 | - (void)sceneDidBecomeActive:(UIScene *)scene { 26 | // Called when the scene has moved from an inactive state to an active state. 27 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 28 | } 29 | 30 | 31 | - (void)sceneWillResignActive:(UIScene *)scene { 32 | // Called when the scene will move from an active state to an inactive state. 33 | // This may occur due to temporary interruptions (ex. an incoming phone call). 34 | } 35 | 36 | 37 | - (void)sceneWillEnterForeground:(UIScene *)scene { 38 | // Called as the scene transitions from the background to the foreground. 39 | // Use this method to undo the changes made on entering the background. 40 | } 41 | 42 | 43 | - (void)sceneDidEnterBackground:(UIScene *)scene { 44 | // Called as the scene transitions from the foreground to the background. 45 | // Use this method to save data, release shared resources, and store enough scene-specific state information 46 | // to restore the scene back to its current state. 47 | } 48 | 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /ShipOTDemo/SwfitFile.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import SwiftTest 3 | 4 | public class TestSwift: NSObject 5 | { 6 | @objc 7 | public func test(_ input:String)->String 8 | { 9 | let i = SwiftTestInframework() 10 | return i.test(input) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ShipOTDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ViewController : UIViewController 4 | 5 | @property IBOutlet UITextField *versionkey; 6 | @property IBOutlet UITextField *input1; 7 | @property IBOutlet UITextView *outcome; 8 | @property NSString *save_info_filepath; 9 | @property NSMutableDictionary *save_info; 10 | 11 | -(IBAction) SotUpdate:(id)sender; 12 | -(IBAction) RunDemoCode:(id)sender; 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /ShipOTDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | #import "ViewController.h" 2 | #import "ShipOTDemo-Swift.h" 3 | 4 | //#ifdef USE_SOT 5 | //#import "../sotsdk/libs/SotWebService.h" 6 | //#endif 7 | 8 | @interface ViewController () 9 | 10 | @end 11 | 12 | @implementation ViewController 13 | 14 | @synthesize versionkey; 15 | @synthesize input1; 16 | @synthesize outcome; 17 | @synthesize save_info_filepath; 18 | @synthesize save_info; 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | 23 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 24 | NSString *documentsDirectory = [paths objectAtIndex:0]; 25 | save_info_filepath = [documentsDirectory stringByAppendingString:@"/sotdemosave.plist"]; 26 | NSFileManager *fileManager = [NSFileManager defaultManager]; 27 | if ([fileManager fileExistsAtPath:save_info_filepath]) 28 | { 29 | save_info = [NSMutableDictionary dictionaryWithContentsOfFile:save_info_filepath]; 30 | NSString* saved_version_key = save_info[@"versionkey"]; 31 | if(saved_version_key) 32 | [versionkey setText:saved_version_key]; 33 | } 34 | else 35 | { 36 | save_info = [[NSMutableDictionary alloc] init]; 37 | } 38 | } 39 | 40 | - (IBAction)SotUpdate:(id)sender 41 | { 42 | NSString* version_key_str = [versionkey text]; 43 | [save_info setValue:version_key_str forKey:@"versionkey"]; 44 | [save_info writeToFile:save_info_filepath atomically:YES]; 45 | 46 | NSString* msg = [NSString stringWithFormat:@"versionkey: %@", version_key_str]; 47 | NSLog(@"%@", msg); 48 | 49 | //#ifdef USE_SOT 50 | // SotApplyCachedResult ApplyShipResult = [SotWebService ApplyCachedAndPullShip:version_key_str is_dev:false cb:^(SotDownloadScriptStatus status) 51 | // { 52 | // if(status == SotScriptShipAlreadyNewest) 53 | // { 54 | // NSLog(@"SyncOnly SotScriptShipAlreadyNewest"); 55 | // } 56 | // else if(status == SotScriptShipHasSyncNewer) 57 | // { 58 | // NSLog(@"SyncOnly SotScriœœptShipHasSyncNewer"); 59 | // } 60 | // else if(status == SotScriptShipDisable) 61 | // { 62 | // NSLog(@"SyncOnly SotScriptShipDisable"); 63 | // } 64 | // else 65 | // { 66 | // NSLog(@"SyncOnly SotScriptStatusFailure"); 67 | // } 68 | // }]; 69 | // 70 | // if(ApplyShipResult.Success) 71 | // { 72 | // if(ApplyShipResult.ShipMD5) 73 | // NSLog(@"sot success apply cached ship md5:%@", ApplyShipResult.ShipMD5); 74 | // } 75 | //#endif 76 | } 77 | 78 | - (IBAction)RunDemoCode:(id)sender 79 | { 80 | NSString* input1_str = [input1 text]; 81 | TestSwift* swift_ins = [[TestSwift alloc] init]; 82 | input1_str = [swift_ins test:input1_str]; 83 | NSString* outcome_str = [NSString stringWithFormat:@"hello SOT:%@", input1_str]; 84 | [outcome setText:outcome_str]; 85 | } 86 | @end 87 | -------------------------------------------------------------------------------- /ShipOTDemo/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "AppDelegate.h" 3 | 4 | int main(int argc, char * argv[]) { 5 | NSString * appDelegateClassName; 6 | @autoreleasepool { 7 | // Setup code that might create autoreleased objects goes here. 8 | appDelegateClassName = NSStringFromClass([AppDelegate class]); 9 | } 10 | return UIApplicationMain(argc, argv, nil, appDelegateClassName); 11 | } 12 | -------------------------------------------------------------------------------- /SwiftTest/SwiftTest.swift: -------------------------------------------------------------------------------- 1 | public class SwiftTestInframework { 2 | 3 | public init(){} 4 | 5 | public func test(_ input:String) -> String { 6 | var a:String 7 | a = input + input 8 | // a = a + a; 9 | return a; 10 | } 11 | } 12 | --------------------------------------------------------------------------------