Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Dec 2, 2024
1 parent fec24bd commit f30da2a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 16 deletions.
14 changes: 14 additions & 0 deletions binding/ios/Eagle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,26 @@ public class Eagle: EagleBase {
var modelPathArg = modelPath

if modelPath == nil {

#if SWIFT_PACKAGE

if let bundleURL = Bundle.module.url(forResource: "eagle_params", withExtension: "pv") {
modelPathArg = bundleURL.path
} else {
throw EagleIOError("Could not retrieve default model from the package bundle")
}

#else

let bundle = Bundle(for: type(of: self))

modelPathArg = bundle.path(forResource: "eagle_params", ofType: "pv")
if modelPathArg == nil {
throw EagleIOError("Could not retrieve default model from app bundle")
}

#endif

}

if !FileManager().fileExists(atPath: modelPathArg!) {
Expand Down
40 changes: 24 additions & 16 deletions binding/ios/EagleAppTest/EagleAppTest.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
1E0064D427CEEA66006FF6E9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1E0064D227CEEA66006FF6E9 /* LaunchScreen.storyboard */; };
1E00654627CFF260006FF6E9 /* EagleAppTestUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0064E827CEEA66006FF6E9 /* EagleAppTestUITests.swift */; };
1E5B7B042800D9BE00F8BDDB /* PerformanceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E5B7B032800D9BE00F8BDDB /* PerformanceTest.swift */; };
36696536961DE78B3E1C06FA /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
36696536961DE78B3E1C06FA /* (null) in Frameworks */ = {isa = PBXBuildFile; };
C757D8CD28A1C77100F391C8 /* BaseTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C757D8CB28A1C77100F391C8 /* BaseTest.swift */; };
C790A6FB2A2012C40074FF7A /* audio_samples in Resources */ = {isa = PBXBuildFile; fileRef = C790A6FA2A2012C40074FF7A /* audio_samples */; };
C790A6FC2A2012C40074FF7A /* audio_samples in Resources */ = {isa = PBXBuildFile; fileRef = C790A6FA2A2012C40074FF7A /* audio_samples */; };
E17FFF042CFE3B3E00AA5CA9 /* Eagle in Frameworks */ = {isa = PBXBuildFile; productRef = E17FFF032CFE3B3E00AA5CA9 /* Eagle */; };
E17FFF062CFE3B4300AA5CA9 /* Eagle in Frameworks */ = {isa = PBXBuildFile; productRef = E17FFF052CFE3B4300AA5CA9 /* Eagle */; };
E17FFF082CFE3B4600AA5CA9 /* Eagle in Frameworks */ = {isa = PBXBuildFile; productRef = E17FFF072CFE3B4600AA5CA9 /* Eagle */; };
E173C8FE2CFE43C900A0903C /* Eagle in Frameworks */ = {isa = PBXBuildFile; productRef = E173C8FD2CFE43C900A0903C /* Eagle */; };
E173C9002CFE43CF00A0903C /* Eagle in Frameworks */ = {isa = PBXBuildFile; productRef = E173C8FF2CFE43CF00A0903C /* Eagle */; };
E173C9022CFE43D400A0903C /* Eagle in Frameworks */ = {isa = PBXBuildFile; productRef = E173C9012CFE43D400A0903C /* Eagle */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -63,24 +63,24 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E17FFF042CFE3B3E00AA5CA9 /* Eagle in Frameworks */,
E173C8FE2CFE43C900A0903C /* Eagle in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1E0064FB27CFEC95006FF6E9 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
36696536961DE78B3E1C06FA /* BuildFile in Frameworks */,
E17FFF062CFE3B4300AA5CA9 /* Eagle in Frameworks */,
36696536961DE78B3E1C06FA /* (null) in Frameworks */,
E173C9002CFE43CF00A0903C /* Eagle in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1E5B7AF82800D98500F8BDDB /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E17FFF082CFE3B4600AA5CA9 /* Eagle in Frameworks */,
E173C9022CFE43D400A0903C /* Eagle in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -93,6 +93,7 @@
1E5B7B022800D9A500F8BDDB /* PerformanceTest */,
1E0064C627CEEA65006FF6E9 /* EagleAppTest */,
1E0064E727CEEA66006FF6E9 /* EagleAppTestUITests */,
E173C8FC2CFE43C900A0903C /* Frameworks */,
1E0064C527CEEA65006FF6E9 /* Products */,
);
sourceTree = "<group>";
Expand Down Expand Up @@ -140,6 +141,13 @@
path = PerformanceTest;
sourceTree = "<group>";
};
E173C8FC2CFE43C900A0903C /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -229,7 +237,7 @@
);
mainGroup = 1E0064BB27CEEA65006FF6E9;
packageReferences = (
E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "eagle" */,
E173C8FB2CFE40F000A0903C /* XCLocalSwiftPackageReference "../../../../eagle" */,
);
productRefGroup = 1E0064C527CEEA65006FF6E9 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -644,26 +652,26 @@
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "eagle" */ = {
E173C8FB2CFE40F000A0903C /* XCLocalSwiftPackageReference "../../../../eagle" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../../../../eagle;
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
E17FFF032CFE3B3E00AA5CA9 /* Eagle */ = {
E173C8FD2CFE43C900A0903C /* Eagle */ = {
isa = XCSwiftPackageProductDependency;
package = E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "eagle" */;
package = E173C8FB2CFE40F000A0903C /* XCLocalSwiftPackageReference "../../../../eagle" */;
productName = Eagle;
};
E17FFF052CFE3B4300AA5CA9 /* Eagle */ = {
E173C8FF2CFE43CF00A0903C /* Eagle */ = {
isa = XCSwiftPackageProductDependency;
package = E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "eagle" */;
package = E173C8FB2CFE40F000A0903C /* XCLocalSwiftPackageReference "../../../../eagle" */;
productName = Eagle;
};
E17FFF072CFE3B4600AA5CA9 /* Eagle */ = {
E173C9012CFE43D400A0903C /* Eagle */ = {
isa = XCSwiftPackageProductDependency;
package = E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "eagle" */;
package = E173C8FB2CFE40F000A0903C /* XCLocalSwiftPackageReference "../../../../eagle" */;
productName = Eagle;
};
/* End XCSwiftPackageProductDependency section */
Expand Down

0 comments on commit f30da2a

Please sign in to comment.