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
32 changes: 32 additions & 0 deletions lib/definitions/project.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,38 @@ 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 @@ -839,7 +839,6 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
}
}

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