Exports.xcconfig file missing
sunkumar opened this issue ยท 13 comments
Seems Exports.xcconfig are not added to the git.
That is auto generated by Unity iOS build, and excluded by .gitignore intentionally.
Before building Xcode project, you have to build Unity project first (using iOS platform).
It would be better to have it mentioned in the Readme file.
Ok, this may be a dumb question on this topic but when I build my unity project for IOS I get all the necessary files and structure to run this on a device captive inside unity but as far as I can tell there is no Exports.xconfig file generated. Am I missing something. I am generally following BLITZ and the-nerd for building the Unity project and it's just not clear how/why the exports.config file is generated at the build stage in Unity.
@DeanSCND Exports.xcconfig
is generated by the post build scripts. If you clone the repo and build the demo Unity project, you will find it in the demo Swift Xcode project.
If you're building your own Unity project, make sure you put the post build script in Editor
folder. It should generate the file to the path defined by ExportsConfigProjectPath
constant. Make sure you update constants defined in the post build script that reflects your environment.
I am probably making a mistake somewhere, but I'd like to report that cloning the repo, then building Demo.unity for iOS does not add Exports.xcconfig xcode/DemoApp/Unity.
Unity version is 2017.3.1f1
EDIT: This was caused by a path issue in XcodePostBuild.cs.
"XcodeProjectRoot =" didn't resolve properly since I unzipped master on my desktop.
The post build scripts only appear to get executed if there is a scene in the Build Settings. No scenes, no post-build script, no Exports.xcconfig file generated. Add the Demo scene to the Build Settings and everything happens as it should.
I've tried tips above but did get Exports.xcconfig until I ticked this option:
development build in build settings, hope this can help.
Also happened here. I fixed it by updating the XcodeProjectRoot relative path to a absolute path.
Hi,
I'm tried above solutions but not get .xcconfig file
Any other solution for getting .xcconfig file
-
Create new Xcode project (using swift)
-
Create new class File -> New -> Cocvatouch class and select lang Objective C it will ask for create bridging header choose create
-
Goto https://github.com/jiulongw/swift-unity and download zip file
-
Open downloaded file and unzip it. Go to Xcode folder -> DempApp-> You will find Unity Folder copy paste to your project (if you drag and drop it make sure you check the check box for copy at destination)
-
open your new Xcode project and auto generated unity project side by side soy can copy paste it easily
-
copy Classes Folder from unity Xcode project to your Xcode project to the unity Folder of step 4
-
copy Library Folder from unity Xcode project to your Xcode project to the unity Folder of step 4
-
copy Data Folder from unity Xcode project to your Xcode project to the unity Folder of step 4
-
Important Goto Xcode project tap on name of project on left side there will be two options Project and target. Select project on centre main window you can see Configuration Expand it and against the name of your project choose Unity from drop drown
-
Goto Classes Folder that you have copied in step 6. And either delete main.mm file or comment everything
-
goto folder you have downloaded in step3 Copy all code of AppDelegate.swift to your AppDelegate.swift file
-
In your Xcode project search for YourProjectFileName-Bridging-Header and copy paste
#ifndef BRIDGING_HEADER
#define BRIDGING_HEADER
#import <UIKit/UIKit.h>
#import "UnityUtils.h"
#import "UnityAppController.h"
#import "UnityInterface.h"
#endif /* BRIDGING_HEADER */
-
Copy paste LaunchScreen-iPad.xib and LaunchScreen-iPhone.xib to your project and delete LaunchScreen.storyboard
-
Compile it :] it should compile successfully (not in my case I got error that DeviceSettings.mm there is return statement missing so I just added return deviceUnknown; before the })
-
You can see step3 downloaded view controller.swift file for see how to show unity view in your screen
9. Important Goto Xcode project tap on name of project on left side there will be two options Project and target. Select project on centre main window you can see Configuration Expand it and against the name of your project choose Unity from drop drown
HI @PrashantKT
I'm following your steps but 9th step is
Step 9 inside the configuration dropdown is empty
@Ramprasathselvam Copy entire Unity folder to the root of your Swift project and add it to Xcode source tree. Make sure all the .mm files are added to correct build target.
Hi @PrashantKT
i am tried more than the best but i get the same issue in the stpe 9"configuration dropdown is empty" i have attached the unity exported to IOS project.
I working on integrate unity_ios_project to native_ios_project i faced the above issue.
@Ramprasathselvam Copy entire Unity folder to the root of your Swift project and add it to Xcode source tree. Make sure all the .mm files are added to correct build target.
https://github.com/jiulongw/swift-unity
Showing Recent Messages
/Unity.xcconfig:1: could not find included file 'Exports.xcconfig' in search paths