Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exports.xcconfig file missing #8

Closed
sunkumar opened this issue Oct 18, 2017 · 13 comments
Closed

Exports.xcconfig file missing #8

sunkumar opened this issue Oct 18, 2017 · 13 comments

Comments

@sunkumar
Copy link

Seems Exports.xcconfig are not added to the git.

@jiulongw
Copy link
Owner

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).

@alexanrdmatsakov
Copy link

It would be better to have it mentioned in the Readme file.

@DeanSCND
Copy link

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.

@jiulongw
Copy link
Owner

jiulongw commented Oct 31, 2017

@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.

@RamblinWreck77
Copy link

RamblinWreck77 commented Mar 7, 2018

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.

@KonajuGames
Copy link

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.

@LiamZ95
Copy link

LiamZ95 commented May 2, 2018

I've tried tips above but did get Exports.xcconfig until I ticked this option:
development build in build settings, hope this can help.

@tangamampilia
Copy link

Also happened here. I fixed it by updating the XcodeProjectRoot relative path to a absolute path.

@Ramprasathselvam
Copy link

Ramprasathselvam commented Feb 27, 2019

Hi,
I'm tried above solutions but not get .xcconfig file
Any other solution for getting .xcconfig file

@PrashantKT
Copy link

@Ramprasathselvam

  1. Create new Xcode project (using swift)

  2. Create new class File -> New -> Cocvatouch class and select lang Objective C it will ask for create bridging header choose create

  3. Goto https://github.com/jiulongw/swift-unity and download zip file

  4. 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)

  5. open your new Xcode project and auto generated unity project side by side soy can copy paste it easily

  6. copy Classes Folder from unity Xcode project to your Xcode project to the unity Folder of step 4

  7. copy Library Folder from unity Xcode project to your Xcode project to the unity Folder of step 4

  8. copy Data Folder from unity Xcode project to your Xcode project to the unity Folder of step 4

  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

  10. Goto Classes Folder that you have copied in step 6. And either delete main.mm file or comment everything

  11. goto folder you have downloaded in step3 Copy all code of AppDelegate.swift to your AppDelegate.swift file

  12. 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 */

  1. Copy paste LaunchScreen-iPad.xib and LaunchScreen-iPhone.xib to your project and delete LaunchScreen.storyboard

  2. 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 })

  3. You can see step3 downloaded view controller.swift file for see how to show unity view in your screen

@Ramprasathselvam
Copy link

Ramprasathselvam commented Feb 27, 2019

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

screenshot 2019-02-27 at 6 31 10 pm

@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.

@PrashantKT
Copy link

@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.

@suddenly1990 suddenly1990 mentioned this issue Mar 22, 2019
@punitg862
Copy link

https://github.com/jiulongw/swift-unity
Showing Recent Messages
/Unity.xcconfig:1: could not find included file 'Exports.xcconfig' in search paths

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests