Skip to content

Commit

Permalink
Merge pull request #5 from OP-Solutions/Events
Browse files Browse the repository at this point in the history
Fix: added option to run package on simulator
  • Loading branch information
dbejanishvili authored Jun 27, 2021
2 parents a45b8e4 + a8ddb80 commit 0f70f3b
Show file tree
Hide file tree
Showing 67 changed files with 3,891 additions and 49 deletions.
82 changes: 82 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/MavisSDK.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "NO">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MavisSDK"
BuildableName = "MavisSDK"
BlueprintName = "MavisSDK"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MavisSDKToBeWrapped"
BuildableName = "MavisSDKToBeWrapped"
BlueprintName = "MavisSDKToBeWrapped"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MavisSDK"
BuildableName = "MavisSDK"
BlueprintName = "MavisSDK"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@

import PackageDescription


let package = Package(
name: "MavisSDK",
products: [
.library(
name: "MavisSDK",
targets: ["MavisSDK","UnityFramework","WikitudeSDK"]),
targets: ["MavisSDK"]),
],
dependencies: [
],
targets: [
.target(
name: "MavisSDK",
dependencies: ["UnityFramework", "WikitudeSDK"]),
dependencies: ["UnityFramework","WikitudeSDK"]),
.binaryTarget(
name: "UnityFramework",
path: "UnityFramework.xcframework"),
Expand Down
15 changes: 14 additions & 1 deletion Sources/MavisSDK/Mavis.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
#if !targetEnvironment(simulator)
import UnityFramework

public class Mavis: UIResponder, UIApplicationDelegate {
Expand Down Expand Up @@ -100,4 +101,16 @@ public class Mavis: UIResponder, UIApplicationDelegate {
}



#else
import UIKit
public class Mavis{
public static func Init(_ options : MavisOptions){
}
public static func Launch(_ parentWindow: UIWindow?) {
}
public static func setEventHandler(_ customEventHandler: MavisEventHandlerBase!){
}
public static func unloadUnity(){
}
}
#endif
8 changes: 8 additions & 0 deletions Sources/MavisSDK/MavisUnityListener.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@
//

import Foundation
#if !targetEnvironment(simulator)
import UnityFramework

class MavisUnityListener: UIResponder, UIApplicationDelegate, UnityFrameworkListener {
public func unityDidUnload(_ notification: Notification!) {
Mavis.unloadUnity();
}
}
#else
class MavisUnityListener {
public func unityDidUnload(_ notification: Notification!) {
}
}

#endif
14 changes: 14 additions & 0 deletions UnityFramework.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-x86_64-simulator</string>
<key>LibraryPath</key>
<string>UnityFramework.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,13 @@
"moduleName": "",
"usedInScenes": []
},
{
"managedAssemblyName": "Assembly-CSharp.dll",
"nativeClass": "",
"fullManagedTypeName": "SafeAreaFilter",
"moduleName": "",
"usedInScenes": []
},
{
"managedAssemblyName": "UnityEngine.UI.dll",
"nativeClass": "",
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<type fullname="AugmentationEvents" preserve="nothing"/>
<type fullname="CloseButtonScript" preserve="nothing"/>
<type fullname="DotsAnimationScript" preserve="nothing"/>
<type fullname="SafeAreaFilter" preserve="nothing"/>
</assembly>
<assembly fullname="UnityEngine.UI">
<type fullname="UnityEngine.EventSystems.EventSystem" preserve="nothing"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-out="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/tempStrip" -x="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x="/var/folders/rp/14gmxxms0pjc96j56ckdks1w0000gn/T/tmpc8b05ba.tmp" -x="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/TypesInScenes.xml" -x="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Assets/Wikitude/Dependencies/link.xml" -d="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed" --include-unity-root-assembly="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" --include-unity-root-assembly="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" --include-unity-root-assembly="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/WikitudeUnityPlugin.dll" --dotnetruntime=il2cpp --dotnetprofile=unityaot --use-editor-options --include-directory="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed" --rule-set=Conservative --editor-data-file="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json" --platform=iOS --enable-engine-module-stripping --engine-modules-asset-file="/Applications/Unity/Hub/Editor/2019.4.17f1/PlaybackEngines/iOSSupport/Whitelists/../modules.asset"
-out="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/tempStrip" -x="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x="/var/folders/rp/14gmxxms0pjc96j56ckdks1w0000gn/T/tmp6f091e37.tmp" -x="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/TypesInScenes.xml" -x="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Assets/Wikitude/Dependencies/link.xml" -d="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed" --include-unity-root-assembly="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" --include-unity-root-assembly="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" --include-unity-root-assembly="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/WikitudeUnityPlugin.dll" --dotnetruntime=il2cpp --dotnetprofile=unityaot --use-editor-options --include-directory="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed" --rule-set=Conservative --editor-data-file="/Users/lashabukhnikashvili/Desktop/Dzliera/MavisUnity/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json" --platform=iOS --enable-engine-module-stripping --engine-modules-asset-file="/Applications/Unity/Hub/Editor/2019.4.17f1/PlaybackEngines/iOSSupport/Whitelists/../modules.asset"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 0f70f3b

Please sign in to comment.