a bunch of changes
This commit is contained in:
|
Before Width: | Height: | Size: 452 KiB After Width: | Height: | Size: 452 KiB |
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"filename" : "icon.png",
|
"filename" : "App-Icon-1024x1024@1x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"platform" : "ios",
|
"platform" : "ios",
|
||||||
"size" : "1024x1024"
|
"size" : "1024x1024"
|
||||||
@@ -24,6 +24,7 @@ const withClipInfoPlist = (config, {targetName}) => {
|
|||||||
CFBundleExecutable: '$(EXECUTABLE_NAME)',
|
CFBundleExecutable: '$(EXECUTABLE_NAME)',
|
||||||
CFBundlePackageType: '$(PRODUCT_BUNDLE_PACKAGE_TYPE)',
|
CFBundlePackageType: '$(PRODUCT_BUNDLE_PACKAGE_TYPE)',
|
||||||
CFBundleShortVersionString: config.version,
|
CFBundleShortVersionString: config.version,
|
||||||
|
CFBundleIconName: 'AppIcon',
|
||||||
UIViewControllerBasedStatusBarAppearance: 'NO',
|
UIViewControllerBasedStatusBarAppearance: 'NO',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,14 @@ const withFiles = (config, {targetName}) => {
|
|||||||
fs.copyFileSync(sourcePath, targetPath)
|
fs.copyFileSync(sourcePath, targetPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const imagesBasePath = path.join(basePath, 'Images.xcassets')
|
||||||
|
const imagesTargetPath = path.join(
|
||||||
|
config.modRequest.platformProjectRoot,
|
||||||
|
targetName,
|
||||||
|
'Images.xcassets',
|
||||||
|
)
|
||||||
|
fs.cpSync(imagesBasePath, imagesTargetPath, {recursive: true})
|
||||||
|
|
||||||
return config
|
return config
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,20 +15,26 @@ const withXcodeTarget = (config, {targetName}) => {
|
|||||||
'Sources',
|
'Sources',
|
||||||
target.uuid,
|
target.uuid,
|
||||||
'application',
|
'application',
|
||||||
'"$(CONTENTS_FOLDER_PATH)/AppClips"',
|
'"AppClips"',
|
||||||
)
|
)
|
||||||
pbxProject.addBuildPhase(
|
pbxProject.addBuildPhase(
|
||||||
[],
|
[`${targetName}/Images.xcassets`],
|
||||||
'PBXResourcesBuildPhase',
|
'PBXResourcesBuildPhase',
|
||||||
'Resources',
|
'Resources',
|
||||||
target.uuid,
|
target.uuid,
|
||||||
'application',
|
'application',
|
||||||
'"$(CONTENTS_FOLDER_PATH)/AppClips"',
|
'"AppClips"',
|
||||||
)
|
)
|
||||||
|
|
||||||
const pbxGroupKey = pbxProject.pbxCreateGroup(targetName, targetName)
|
const pbxGroup = pbxProject.addPbxGroup([
|
||||||
pbxProject.addFile(`${targetName}/Info.plist`, pbxGroupKey)
|
'AppDelegate.swift',
|
||||||
|
'ViewController.swift',
|
||||||
|
'Images.xcassets',
|
||||||
|
`${targetName}.entitlements`,
|
||||||
|
'Info.plist',
|
||||||
|
])
|
||||||
|
|
||||||
|
pbxProject.addFile(`${targetName}/Info.plist`, pbxGroup.uuid)
|
||||||
const configurations = pbxProject.pbxXCBuildConfigurationSection()
|
const configurations = pbxProject.pbxXCBuildConfigurationSection()
|
||||||
for (const key in configurations) {
|
for (const key in configurations) {
|
||||||
if (typeof configurations[key].buildSettings !== 'undefined') {
|
if (typeof configurations[key].buildSettings !== 'undefined') {
|
||||||
@@ -68,27 +74,13 @@ const withXcodeTarget = (config, {targetName}) => {
|
|||||||
target.uuid,
|
target.uuid,
|
||||||
])
|
])
|
||||||
|
|
||||||
// pbxProject.addProductFile(targetName, {
|
|
||||||
// basename: `${targetName}.app`,
|
|
||||||
// groupName: 'Embed App Clips',
|
|
||||||
// explicitFileType: 'wrapper.application',
|
|
||||||
// settings: {
|
|
||||||
// ATTRIBUTES: ['RemoveHeadersOnCopy'],
|
|
||||||
// },
|
|
||||||
// includeInIndex: 0,
|
|
||||||
// path: `${targetName}.app`,
|
|
||||||
// sourceTree: 'BUILT_PRODUCTS_DIR',
|
|
||||||
// })
|
|
||||||
|
|
||||||
pbxProject.addToPbxNativeTargetSection(target)
|
|
||||||
|
|
||||||
pbxProject.addBuildPhase(
|
pbxProject.addBuildPhase(
|
||||||
[`${targetName}.app`],
|
[`${targetName}.app`],
|
||||||
'PBXCopyFilesBuildPhase',
|
'PBXCopyFilesBuildPhase',
|
||||||
'Embed App Clips',
|
'Embed App Clips',
|
||||||
pbxProject.getFirstTarget().uuid,
|
pbxProject.getFirstTarget().uuid,
|
||||||
'application',
|
'application',
|
||||||
'"$(CONTENTS_FOLDER_PATH)/AppClips"',
|
'"AppClips"',
|
||||||
)
|
)
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|||||||
Reference in New Issue
Block a user