Skip to content

Commit

Permalink
new libs + use local package
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Nov 29, 2024
1 parent 1379773 commit a995766
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 425 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ios-browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,20 @@ jobs:
- run:
pip3 install requests

- name: Install Cocoapods
run: gem install cocoapods

- name: Make build dir
run: mkdir ddp

- name: Copy test_resources
run: ./copy_test_resources.sh

- name: Run Cocoapods
run: pod install

- name: Inject AccessKey
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
FalconAppTestUITests/FalconAppTestUITests.swift

- name: XCode Build
run: xcrun xcodebuild build-for-testing
-configuration Debug
-workspace FalconAppTest.xcworkspace
-project FalconAppTest.xcodeproj
-sdk iphoneos
-scheme FalconAppTest
-derivedDataPath ddp
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/ios-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,12 @@ jobs:
- run:
pip3 install requests

- name: Install Cocoapods
run: gem install cocoapods

- name: Make build dir
run: mkdir ddp

- name: Copy test_resources
run: ./copy_test_resources.sh

- name: Run Cocoapods
run: pod install

- name: Inject AccessKey
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
PerformanceTest/PerformanceTest.swift
Expand All @@ -70,7 +64,7 @@ jobs:
- name: XCode Build
run: xcrun xcodebuild build-for-testing
-configuration Debug
-workspace FalconAppTest.xcworkspace
-project FalconAppTest.xcodeproj
-sdk iphoneos
-scheme PerformanceTest
-derivedDataPath ddp
Expand Down
14 changes: 14 additions & 0 deletions binding/ios/Falcon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,26 @@ public class Falcon {
var modelPathArg = modelPath

if modelPath == nil {

#if SWIFT_PACKAGE

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

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

#else

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

#endif

}

if !FileManager().fileExists(atPath: modelPathArg!) {
Expand Down
263 changes: 39 additions & 224 deletions binding/ios/FalconAppTest/FalconAppTest.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions binding/ios/FalconAppTest/Podfile

This file was deleted.

21 changes: 0 additions & 21 deletions binding/ios/FalconAppTest/Podfile.lock

This file was deleted.

124 changes: 30 additions & 94 deletions demo/ios/FalconDemo/FalconDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,32 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 60;
objects = {

/* Begin PBXBuildFile section */
32769079E5BC2BA141FA659F /* ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 327695EA9D71F6A29C6D079A /* ViewModel.swift */; };
3276967434C9CEBD0AF09237 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 327694975368499C3B7946DD /* Assets.xcassets */; };
327698EADFD16D8F70823520 /* FalconDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 327697358B823E5B2EF0FA8C /* FalconDemoApp.swift */; };
32769B2E1B2C5A2A897FFB10 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32769F3923C69C8C0C435CCF /* ContentView.swift */; };
467D8E38BB3521519FB3E678 /* libPods-FalconDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FA58F77E1B131740569D44F3 /* libPods-FalconDemo.a */; };
E1CF9E2D2CFA698C004BA9A9 /* Falcon in Frameworks */ = {isa = PBXBuildFile; productRef = E1CF9E2C2CFA698C004BA9A9 /* Falcon */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
1449455E6EE77D08E73952D5 /* Pods-FalconDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FalconDemo.release.xcconfig"; path = "Target Support Files/Pods-FalconDemo/Pods-FalconDemo.release.xcconfig"; sourceTree = "<group>"; };
327694975368499C3B7946DD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
327695EA9D71F6A29C6D079A /* ViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewModel.swift; sourceTree = "<group>"; };
327697358B823E5B2EF0FA8C /* FalconDemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FalconDemoApp.swift; sourceTree = "<group>"; };
327699927E572962C40A7A04 /* FalconDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FalconDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
32769E49F724E169E0E13E27 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = "<group>"; };
32769F3923C69C8C0C435CCF /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
B6FB75AA0D3B7FBE121325BC /* Pods-FalconDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FalconDemo.debug.xcconfig"; path = "Target Support Files/Pods-FalconDemo/Pods-FalconDemo.debug.xcconfig"; sourceTree = "<group>"; };
FA58F77E1B131740569D44F3 /* libPods-FalconDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FalconDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
32769FD78B69EE3D028A9BD8 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
467D8E38BB3521519FB3E678 /* libPods-FalconDemo.a in Frameworks */,
E1CF9E2D2CFA698C004BA9A9 /* Falcon in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -43,8 +40,6 @@
children = (
32769B87809678D96B1C6C55 /* Products */,
32769C17C8FD0599F872D3D1 /* FalconDemo */,
B33A5E35B83D1A4F9DED308C /* Frameworks */,
77A75FFA94942AD5A249D70D /* Pods */,
);
sourceTree = "<group>";
};
Expand All @@ -68,36 +63,16 @@
path = FalconDemo;
sourceTree = "<group>";
};
77A75FFA94942AD5A249D70D /* Pods */ = {
isa = PBXGroup;
children = (
B6FB75AA0D3B7FBE121325BC /* Pods-FalconDemo.debug.xcconfig */,
1449455E6EE77D08E73952D5 /* Pods-FalconDemo.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
B33A5E35B83D1A4F9DED308C /* Frameworks */ = {
isa = PBXGroup;
children = (
FA58F77E1B131740569D44F3 /* libPods-FalconDemo.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
327696DE3A6139B4D33CA898 /* FalconDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 32769440EBAF1B96C25C64E5 /* Build configuration list for PBXNativeTarget "FalconDemo" */;
buildPhases = (
C840BDAD8FD210974A550955 /* [CP] Check Pods Manifest.lock */,
32769E8C15D0D566DE02D742 /* Sources */,
32769FD78B69EE3D028A9BD8 /* Frameworks */,
327698D80053ADD919041906 /* Resources */,
7585D986E68559590C0FC8E7 /* [CP] Embed Pods Frameworks */,
C51691C8D18CE69EE82647B3 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -131,6 +106,9 @@
en,
);
mainGroup = 327692BCE8C735F3534C318E;
packageReferences = (
E1CF9E2B2CFA698C004BA9A9 /* XCLocalSwiftPackageReference "../../../../falcon" */,
);
productRefGroup = 32769B87809678D96B1C6C55 /* Products */;
projectDirPath = "";
projectRoot = "";
Expand All @@ -151,67 +129,6 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
7585D986E68559590C0FC8E7 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FalconDemo/Pods-FalconDemo-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/Falcon-iOS/PvFalcon.framework/PvFalcon",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PvFalcon.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FalconDemo/Pods-FalconDemo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
C51691C8D18CE69EE82647B3 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FalconDemo/Pods-FalconDemo-resources.sh",
"${PODS_ROOT}/Falcon-iOS/lib/common/falcon_params.pv",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/falcon_params.pv",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FalconDemo/Pods-FalconDemo-resources.sh\"\n";
showEnvVarsInLog = 0;
};
C840BDAD8FD210974A550955 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-FalconDemo-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
32769E8C15D0D566DE02D742 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -277,15 +194,15 @@
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_INCLUDE_PATHS = "${SRCROOT}";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
3276957BE00965E54B1F13C1 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B6FB75AA0D3B7FBE121325BC /* Pods-FalconDemo.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
Expand All @@ -301,7 +218,10 @@
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = ai.picovoice.FalconDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -313,7 +233,6 @@
};
327698DB666EFBD22F7AB2D5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1449455E6EE77D08E73952D5 /* Pods-FalconDemo.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
Expand All @@ -329,7 +248,10 @@
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = ai.picovoice.FalconDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -425,6 +347,20 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
E1CF9E2B2CFA698C004BA9A9 /* XCLocalSwiftPackageReference "../../../../falcon" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../../../../falcon;
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
E1CF9E2C2CFA698C004BA9A9 /* Falcon */ = {
isa = XCSwiftPackageProductDependency;
productName = Falcon;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 32769964E3C57B4A4BE3CC9E /* Project object */;
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit a995766

Please sign in to comment.