Skip to content

Commit

Permalink
feat: Dynamic Update (#294)
Browse files Browse the repository at this point in the history
* feat: Dynamic Update

* Update installation for iOS
  • Loading branch information
WindowsMEMZ authored Mar 2, 2024
1 parent 6622d4d commit fb83cf8
Show file tree
Hide file tree
Showing 13 changed files with 2,181 additions and 1,114 deletions.
532 changes: 532 additions & 0 deletions DarockBili.dynamic/AppMain.swift

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions DarockBili.dynamic/DarockBili_dynamic.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
//
// DarockBili_dynamic.swift
// DarockBili.dynamic
//
// Created by memz233 on 2024/3/2.
//
//===----------------------------------------------------------------------===//
//
// This source file is part of the MeowBili open source project
//
// Copyright (c) 2024 Darock Studio and the MeowBili project authors
// Licensed under GNU General Public License v3
//
// See https://darock.top/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import SwiftUI
import DarockKit
import Alamofire
import SwiftyJSON

@_silgen_name("testPrint")
public func testPrint() {
print("Darock Dynamic Here!")
}

@_silgen_name("GetAppMainView")
public func GetAppMainView() -> UnsafeMutableRawPointer {
return UnsafeMutableRawPointer(Unmanaged.passRetained(Wrapper(view: AnyView(AppMainView()))).toOpaque())
}
final class Wrapper {
let view: AnyView
init(view: AnyView) {
self.view = view
}
}

@_cdecl("GetDylibVersion")
public func GetDylibVersion() -> String {
return "1.0.2"
}
1,212 changes: 770 additions & 442 deletions DarockBili.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8CE523BB2B935D6100C89318"
BuildableName = "DarockBili.dynamic.watch.dylib"
BlueprintName = "DarockBili.dynamic.watch"
ReferencedContainer = "container:DarockBili.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8CE523BB2B935D6100C89318"
BuildableName = "DarockBili.dynamic.watch.dylib"
BlueprintName = "DarockBili.dynamic.watch"
ReferencedContainer = "container:DarockBili.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8CA68EF92B93224B00870AAA"
BuildableName = "DarockBili.dynamic.dylib"
BlueprintName = "DarockBili.dynamic"
ReferencedContainer = "container:DarockBili.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8CA68EF92B93224B00870AAA"
BuildableName = "DarockBili.dynamic.dylib"
BlueprintName = "DarockBili.dynamic"
ReferencedContainer = "container:DarockBili.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading

0 comments on commit fb83cf8

Please sign in to comment.