Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ export enum IOSNativeTargetTypes {
watchApp = "watch_app",
watchExtension = "watch_extension",
appExtension = "app_extension",
application = 'application',
}

const pathToLoggerAppendersDir = join(
Expand Down
26 changes: 25 additions & 1 deletion lib/definitions/nativescript-dev-xcode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,27 @@ declare module "nativescript-dev-xcode" {
}

class project {
hash: any;
filepath: string;
constructor(filename: string);

parse(callback: () => void): void;
parseSync(): void;

generateUuid(): string;

writeSync(options: any): string;

addFramework(filepath: string, options?: Options): void;
removeFramework(filePath: string, options?: Options): void;


getProductFile(watchApptarget: target): any;
addToPbxFrameworksBuildPhase(file);
addToPbxCopyfilesBuildPhase(file, comment: string, targetid: string);
pbxFrameworksBuildPhaseObj(targetid: string): any;
pbxBuildFileSection(): {[k: string] : any};

addPbxGroup(
filePathsArray: any[],
name: string,
Expand All @@ -27,17 +38,30 @@ declare module "nativescript-dev-xcode" {

removePbxGroup(groupName: string, path: string): void;

addTargetDependency(target: string, dependencyTargets: string[]);

findTargetKey(name: string);
pbxTargetByName(name: string): target;
pbxNativeTargetSection(): {[key: string]: any};

addToHeaderSearchPaths(options?: Options): void;
removeFromHeaderSearchPaths(options?: Options): void;
updateBuildProperty(key: string, value: any): void;

pbxXCBuildConfigurationSection(): any;

buildPhaseObject(
buildPhaseType: string,
comment: string,
target: tstring
)

addTarget(
targetName: string,
targetType: string,
targetPath?: string,
parentTarget?: string
parentTarget?: string,
productTargetType?: string
): target;
addBuildPhase(
filePathsArray: string[],
Expand Down
39 changes: 35 additions & 4 deletions lib/definitions/project.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,7 @@ interface INativePrepare {
}

interface IBuildConfig
extends IAndroidBuildOptionsSettings,
IiOSBuildConfig,
IProjectDir {
extends IAndroidBuildOptionsSettings, IiOSBuildConfig, IProjectDir {
clean?: boolean;
architectures?: string[];
buildOutputStdio?: string;
Expand All @@ -615,7 +613,8 @@ interface IBuildConfig
* Describes iOS-specific build configuration properties
*/
interface IiOSBuildConfig
extends IBuildForDevice,
extends
IBuildForDevice,
IiCloudContainerEnvironment,
IDeviceIdentifier,
IProvision,
Expand Down Expand Up @@ -865,6 +864,7 @@ interface IAddExtensionsFromPathOptions extends IAddTargetFromPathOptions {

interface IAddWatchAppFromPathOptions extends IAddTargetFromPathOptions {
watchAppFolderPath: string;
disableStubBinary?: boolean;
}

interface IRemoveExtensionsOptions {
Expand All @@ -873,6 +873,37 @@ interface IRemoveExtensionsOptions {

interface IRemoveWatchAppOptions extends IRemoveExtensionsOptions {}

interface IWatchAppJSONConfigModule {
name?: string;
path: string;
targetType?: string;
embed?: boolean;
frameworks?: Array<string | Record<string, string>>;
dependencies?: string[];
headerSearchPaths?: string[];
resources?: string[];
src?: string[];
linkerFlags?: string[];
buildConfigurationProperties?: Record<string, string>;
SPMPackages?: Array<IOSSPMPackage | string>;
}
interface IWatchAppJSONConfig {
targetType?: string;
forceAddEmbedWatchContent?: boolean;
sharedModulesBuildConfigurationProperties?: Record<string, string>;
basedir?: string;
infoPlistPath?: string;
xcprivacyPath?: string;
importSourcesFromMainFolder?: boolean;
importResourcesFromMainFolder?: boolean;
resources?: string[];
src?: string[];
resourcesExclude?: string[];
srcExclude?: string[];
modules: IWatchAppConfigModule[];
SPMPackages?: Array<IOSSPMPackage>;
}

interface IRubyFunction {
functionName: string;
functionParameters?: string;
Expand Down
1 change: 0 additions & 1 deletion lib/services/ios-project-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,6 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
}
}

this.$iOSWatchAppService.removeWatchApp({ pbxProjPath });
const addedWatchApp = await this.$iOSWatchAppService.addWatchAppFromPath({
watchAppFolderPath: path.join(
resourcesDirectoryPath,
Expand Down
Loading
Loading