We have different build configurations in our project, like the release, debug, sandbox, etc. The interesting case is when I archived from the release or debug build configuration, all archive files extracted as expected as shown in Image 1, but If I change build configuration to sandbox, some files and folders are missing as shown in Image 2.
Although we created custom build configurations by duplicating from debug or release, the archive doesn't contain all files or folders like in Image 1.
We use carthage(for internal network) and cocoapods(for others) as a dependency manager.
I tried many suggestions but couldn't find a solution.
Like,
setting skip install to NO in build settings,
removing all archive and derived data files, clean and re-archive,
giving the archive folder to read & write permission
Thank you all
If you're using Carthage for internal frameworks you should have same custom build configurations for them, too. Otherwise, it will bootstrap with Release configuration automatically which won't generate SwiftSupport files etc.
You also can avoid this by adding below before archiving in your custom configurations.
carthage bootstrap --configuration Debug
You should make sure that those files are included in Build Phases -> Copy Bundle Resources
Related
building an XCode project with an .xcodeproj file generated by unity 2021.3.3f1 fails with the message "Build input file cannot be found: 'users/---/ --project name--/Libraries/com.unity.services.core/Runtime/Device/UserIdProviders/NSUserDefinitions.mm' "
When I look in Finder, I notice that the com.unity.services.core does not exist under the Libraries folder.
Some background. I recently moved to trash many Xcode files to free up disk space. I also did a new remove and Install of XCode, in case I deleted anything important accidentally. Non unity files work fine in XCode.
This might be the first project I used 2021.3.3f1 for. I previously used 2019.4.14f1 without encountering this problem.
Is there something I should set in the IOS Player settings of Unity BuildSettings to avoid this problem? (or something that would force the com.unity.services.core folder to be generated in the output project)?
I am very inexperienced in Mac and infrastructure so I apologize in advance if I am missing something very basic.
Thank you
You should clean your build folders and build anew, should work.
In Xcode you can do this by going to Product > Clean Build Folder, in Unity you just manually delete the whole Build output folder (I hope you created a seperate folder specifically for the Build output and didn't just export to the project directory in that case don't delete your project directory just set a new Build output folder ;).
I created two schemes with configurations one for development and one for production. And i just moved the info.plist file to another folder called configs.
Now when I try to build I get this build error.
Multiple commands produce '/Users/keghamkarsian/Library/Developer/Xcode/DerivedData/Etadweer-fdhqhseczzvpnebpsxgxctnzasvc/Build/Products/Debug (Development)-iphoneos/Etadweer.app/Info.plist':
Target 'Etadweer' (project 'Etadweer') has copy command from '/Users/keghamkarsian/Documents/APPS/Etadweer/Etadweer/Configs/Info.plist' to '/Users/keghamkarsian/Library/Developer/Xcode/DerivedData/Etadweer-fdhqhseczzvpnebpsxgxctnzasvc/Build/Products/Debug (Development)-iphoneos/Etadweer.app/Info.plist'
Target 'Etadweer' (project 'Etadweer') has process command with output '/Users/keghamkarsian/Library/Developer/Xcode/DerivedData/Etadweer-fdhqhseczzvpnebpsxgxctnzasvc/Build/Products/Debug (Development)-iphoneos/Etadweer.app/Info.plist'
I tried reinstalling the pods, updating the Cocoapods, I tried deleting the info.plist file from the build phases copy bundle resources it displays another error that it could't locate the plist file. So I have to add it to the target again.
What should I do now?
In my ios app, I'm trying to distinguish environments, to make web api calls to the proper environment (Development, Staging and Production).
For that I have created a configuration.plist file with the different endpoints for each environment and:
Duplicated the Debug Configuration and called it Development Build.
Created a new Scheme called Development (duplicated the Debug scheme)
and in the Info tab (Run section) chose the Development Build
configuration.
When I run in Debug mode, everything runs normally.
I'm using cocoa pods.
If I select Development scheme, I get a No such module 'JazzHands'
If I edit the Development scheme to use the Debug build, it works fine.
So I must be missing some thing for this not to work.
For those running into this question, try pod install this will generate some .xcconfig files with your configuration name. Clean your build folder and build again.
This worked for me with Cocoapods 1.0
Solution:
Create the same custom build configuration in JazzHands
Root cause:
Compilation error No such module is thrown because it can't locate the JazzHands for your custom build configuration
Background:
Every time you compile a folder is created in DerivedData.
This folder corresponds to your device / simulator and your app.
Inside this folder there would be a Build folder which would contain a folder corresponding to each build configuration for your project.
In your case Development folder would not contain the framework JazzHands binary
However Debug folder would contain the framework JazzHands binary
Example:
Given below is an example:
~/Library/Developer/Xcode/DerivedData/SomeApp-skjahjkdhsakjhdaskjdhaskjlhs/Build/Development-iphonesimulator
SomeApp - Name of the app
Development - Custom Build configuration
I created a project with static library.
When I tried to archive, It fails and library Headers are missing.
But when I build the app, it works fine.
And in build folder headers, bundle resources and library are created outside app file.
Is it possible to create these file in app file and archive
or any other process available for archiving?
Thanks in advance.
If you are able to build the app but not archive then it seems that the build settings that you are using for archive build configuration (probably Release) is not correct. Quick test will be to change the build configuration for archive to same as build, most probably Debug (you can do that in Product->Scheme->Edit Scheme).
To fix this you can open the Build Settings for your target, search for "Header Search Path", click the ">" to open this setting and fix it for the build configuration that is used by archive (i.e. make it same as the build configuration used by Build)
I keep some miscellaneous files in the folder for my project, files not actually involved in the build. I was wondering, however, wether Xcode will include these in the build. I need to make sure these files aren't taking up space and slowing down builds. Do these files have any effect?
Xcode will only include files that have been added to the projects copy bundle resources build phase.
You can see these files by selecting your project , click on the target , the select the build phases tab, and click on the Copy Bundle Resources.