Skip to content

Commit dbc0a76

Browse files
author
Eric Miller
committed
Resolve issue with iOS project search the incorrect folder name for Unity files
1 parent 6fe9ee5 commit dbc0a76

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

Sources/UBKit/Files/Xcode/SpecFile.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,26 @@ extension File {
3030
It is specifically indented and formatted in order
3131
to work once the data is written to the spec file.
3232
*/
33-
class func specFile(projectName: String, bundleIdentifier: String, unityVersion: String) -> Data? {
33+
class func specFile(iOSProjectName: String, bundleIdentifier: String, unityProjectName: String, unityVersion: String) -> Data? {
3434
let file = """
35-
name: \(projectName)
35+
name: \(iOSProjectName)
3636
configs:
3737
Debug: debug
3838
Release: release
3939
targets:
40-
\(projectName):
40+
\(iOSProjectName):
4141
type: application
4242
platform: iOS
4343
sources:
44-
- \(projectName)
44+
- \(iOSProjectName)
4545
- Vendor
4646
settings:
4747
PRODUCT_BUNDLE_IDENTIFIER: \(bundleIdentifier)
4848
IOS_DEPLOYMENT_TARGET: 11.0
4949
IPHONEOS_DEPLOYMENT_TARGET: 11.0
5050
UNITY_RUNTIME_VERSION: \(unityVersion)
5151
UNITY_SCRIPTING_BACKEND: il2cpp
52-
UNITY_IOS_EXPORT_PATH: ${SRCROOT}/../Unity/\(projectName)/ios_build
52+
UNITY_IOS_EXPORT_PATH: ${SRCROOT}/../Unity/\(unityProjectName)/ios_build
5353
GCC_PREFIX_HEADER: $(UNITY_IOS_EXPORT_PATH)/Classes/Prefix.pch
5454
OTHER_LDFLAGS: -weak-lSystem -liconv.2 -liPhone-lib -weak_framework CoreMotion -weak_framework iAd -framework OpenGLES
5555
HEADER_SEARCH_PATHS: $(UNITY_IOS_EXPORT_PATH)/Classes $(UNITY_IOS_EXPORT_PATH)/Classes/Native $(UNITY_IOS_EXPORT_PATH)/Libraries/libil2cpp/include
@@ -58,7 +58,7 @@ extension File {
5858
OTHER_CFLAGS: $(inherited) -DINIT_SCRIPTING_BACKEND=1 -fno-strict-overflow -DRUNTIME_IL2CPP=1
5959
CLANG_CXX_LANGUAGE_STANDARD: c++11
6060
CLANG_CXX_LIBRARY: libc++
61-
SWIFT_OBJC_BRIDGING_HEADER: \(projectName)/UnityBridge/UnityBridge.h
61+
SWIFT_OBJC_BRIDGING_HEADER: \(iOSProjectName)/UnityBridge/UnityBridge.h
6262
CLANG_ENABLE_MODULES: NO
6363
CLANG_WARN_BOOL_CONVERSION: NO
6464
CLANG_WARN_CONSTANT_CONVERSION: NO

Sources/UBKit/Workers/XcodeProject.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ private extension XcodeProject {
114114
}
115115

116116
let contents = File.specFile(
117-
projectName: config.iOS.projectName,
117+
iOSProjectName: config.iOS.projectName,
118118
bundleIdentifier: config.iOS.bundleId,
119+
unityProjectName: config.unity.projectName,
119120
unityVersion: config.unity.version
120121
)
121122

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
32
<plist version="1.0">
43
<dict>
5-
<key>CFBundleDevelopmentRegion</key>
6-
<string>en</string>
7-
<key>CFBundleExecutable</key>
8-
<string>$(EXECUTABLE_NAME)</string>
9-
<key>CFBundleIdentifier</key>
10-
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11-
<key>CFBundleInfoDictionaryVersion</key>
12-
<string>6.0</string>
13-
<key>CFBundleName</key>
14-
<string>$(PRODUCT_NAME)</string>
15-
<key>CFBundlePackageType</key>
16-
<string>FMWK</string>
17-
<key>CFBundleShortVersionString</key>
18-
<string>1.1.1</string>
19-
<key>CFBundleSignature</key>
20-
<string>????</string>
21-
<key>CFBundleVersion</key>
22-
<string>$(CURRENT_PROJECT_VERSION)</string>
23-
<key>NSPrincipalClass</key>
24-
<string></string>
4+
<key>CFBundleDevelopmentRegion</key>
5+
<string>en</string>
6+
<key>CFBundleExecutable</key>
7+
<string>$(EXECUTABLE_NAME)</string>
8+
<key>CFBundleIdentifier</key>
9+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
10+
<key>CFBundleInfoDictionaryVersion</key>
11+
<string>6.0</string>
12+
<key>CFBundleName</key>
13+
<string>$(PRODUCT_NAME)</string>
14+
<key>CFBundlePackageType</key>
15+
<string>FMWK</string>
16+
<key>CFBundleShortVersionString</key>
17+
<string>1.0</string>
18+
<key>CFBundleSignature</key>
19+
<string>????</string>
20+
<key>CFBundleVersion</key>
21+
<string>$(CURRENT_PROJECT_VERSION)</string>
22+
<key>NSPrincipalClass</key>
23+
<string></string>
2524
</dict>
2625
</plist>

0 commit comments

Comments
 (0)