I installed Xcode 10 Beta 6 and I am updating everything and in this process I have run into a small issue with Fabric. Fabric's website has special instructions for Xcode 10 that says:
When I am in Xcode 10 I go to Build Phases an on the Run Script that has my Fabric key there is a + sign under the section Input Fields
When I click the + it automatically generates $(SRCROOT)/newInputFile where newInputFile is automatically highlighted.
I'm not understanding Fabric's instructions. Do I copy the $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH) after $(SRCROOT)/ Do I replace INFOPLIST_PATH with the file path to my info.plist?
I've tried all these options but Fabric is still crashing in Xcode 10. I know it is Fabric because I've commented out Fabric.with([Crashlytics.self]) in my App Delegate's didFinishLaunchingWithOptions
For Xcode 10 only, user's who face issue in final setup of fabric is your project.
From Xcode 10 you need to make one more setup in Build Phase's Input Files field.
Simply You need to copy this $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH) and paste to Build Phase's Input Files field under Run Script as display in below image.
Read more on this link : https://fabric.io/kits/ios/crashlytics/install
I had same problem, if your info.plist is in your root directory like this:
yo should change $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH) like this:
I did exactly what was recommend by Mahdi RB. Also followed the steps on official manual guide, didn't work.
When I build using XCode I see it processes about 2k tasks. The fabric builds usually works when I start the machine, open xcode and execute archive. After that the build starts to break most of the time. I'm using the latest fabric & crashlytics downloaded on 03/OCT/18. It's really weird as it works for my other projects, it's just this one that fails. This started with XCode 10 - Version 10.0 (10A255). It was working with previous XCode 9.
This is some proof of what I'm talking:
My workaround was to add this command before calling the fabric command. E.g
sleep 15
"${PROJECT_DIR}/Fabric.framework/run" aaaaa aaaa
I noticed on my mac console app loads of this error, not sure if it's related:
IBAgent-iOS - assertion failed - libxpc.dylib - and some numbers here.
Error on XCode
2018-10-03 13:53:58.698 uploadDSYM[46168:550157] Fabric.framework/run 1.7.2 (210)
2018-10-03 13:53:58.704 uploadDSYM[46168:550157] Using API Key: "123"
2018-10-03 13:53:58.704 uploadDSYM[46168:550157] Launched uploader in validation mode
error: Fabric: Info.plist Error
Unable to process Info.plist at path /Users/someuser/Library/Developer/Xcode/DerivedData/SampleApp-amwweapikvrbgafmmnyeyorkiufq/Build/Intermediates.noindex/ArchiveIntermediates/SampleApp/BuildProductsPath/Release-iphoneos/SampleApp.app/Info.plist
This could be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved Inspector.app from the location Xcode generated it. You can also add '$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)' as an "Input Files" dependency for your Fabric run script build phase.
I tried to open that plist link, it points to a shortcut, and that shortcut points to a real file. Not sure why that is failing. My guess it has something to do with files not being present at the time the script is executed. The delay fixes the issue. I hope this can help.
I removed the original app names for privacy.
fabric info.plist error can be solved by changing the Xcode workspace settings-->build settings--> legacy build system
Go into Build settings of the your target. Find "Debug Information Format". Set this from "DWARF" in both debug and release to "DWARF with dSYM File"
source
I solved this issue by moving the "Run Script" to the bottom of the build phases. Of course I changed to "DWARF with dSYM File" and $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH).
Add script run phase at end of build phases.
Set Shell for script phase to /bin/bash.
Set input files to:
(1) $(PROJECT_DIR)/$(INFOPLIST_FILE).
(2) $(PROJECT_DIR)/Scripts/set_bundle_build_number.sh
Change path to path of script so changes you make to the script
cause a re-run.
(3) $(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)
Fixes XCode 10 issues of duplicate output phases.
Check image for more reference
The solution for me was to replace the round brackets with curly brackets like this
${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}
You can check if the path actually exists if you call echo $(BUILT_PRODUCTS_DIR) in the script phase. Using round brackets gave me following info in the Xcode build console "BUILT_PRODUCTS_DIR: command not found"
Replacing the round brackets with curly brackets will print the actuall path and therefore the script finally worked for me.
None of the above works for me. If someone using Cocoapods, do these steps.
Add $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH) to Input Files on Run Script section.
Replace ./Fabric.framework/run to "${PODS_ROOT}/Fabric/run" in Run Script box.
Go to Build Settings, search for Debug Information, Change it to DWARF with dSYM File.
It worked for me, at least.
For me changing the build system to "Legacy Build system" fixed the archiving error.
To change the build system go to File -> Workspace Settings, and change the build system from default "New Build system" to "Legacy Build system".
Related
Version control woes.
When I pulled my project onto another machine it refused to compile - giving error
Multiple commands produce '/Users/.../Build/Products/Debug-iphonesimulator/cocoapods-artifacts-Debug.txt':
1) That command depends on command in Target '____' (project '____'): script phase “[CP] Prepare Artifacts”
2) That command depends on command in Target '___UITests' (project '_____'): script phase “[CP] Prepare Artifacts”
And it was deeply annoying and frustrating.
So the fix was as follows:
I had used pod update when I should have used pod install (or possibly vice versa. I am trying to be a good citizen recording notes - but I don't want to break my project again to recreate the steps!).
I also reinstalled cocoapods on my backup machine this may or may not have been part of the fix.
While installing the hybris, my localextension.xml is creating in comment form. I am very new in hybris ecommerce development.
So I have followed below steps for installing the hyrbis -
Installed the zip version of Hybris 6.6
Unzip it
From Platform folder, I opened the terminal and ran ". ./setantenv.sh" And after that I ran "ant clean all" and after the build completed succesfully all folders got created in Hybris folder.
Then I ran "./hybrisserver.sh" and my server got started successfully.
Then I ran "https://localhost:9002/" over that I initialize and it also went successfully.
When I try to access hmc or backoffice it is giving me 404 page not found error.
I checked my localextension.xml file and found all the extensions generated as a comment as shown below.
Could anyone help me out where I am doing the mistake.
Thanks in advance.
If you are using original package you need to install a receipt. Go to install folder.
Run below command for listing existing receipt
./install.sh -l
Prepare b2c with acc:
./install.sh -r b2c_acc
Initialize b2c with acc (Also you can use ant clean all for this step):
./install.sh -r b2c_acc initialize
Start hybris (Also you can use ./hybrisserver.sh start for this step):
./install.sh -r b2c_acc start
When you do "ant all" for the first time and set-up the config folder, it generates a localextensions.xml file which contains extensions that are commented out. If you initialize and start Hybris using this setting, you get nothing, except the HAC.
To enable HMC, you need to at least have "platformhmc" extension enabled (i.e. not commented out) in localextensions. So, stop Hybris, uncomment platformhmc, and do another build (i.e. "ant all"). After that, you can do a Platform Update, or a Platform Initialize (to build from scratch again). When it's done, and you've started Hybris, HMC should be accessible.
Or, if you want more features enabled by default, you can do #mkysoft's suggestion and use recipes.
I am running a on-commit Bot to build, analyze, unit tes and archive my App and it works perfectly.
I have a script (*.sh) in my porject that I want to run at the end of a success analysis. I am using xcode 7.3 now and i tried the following:
In the trigger section call ./myscript.sh, but the bot could not find it.
I tried to add $SCROOT, still no luck
I tried to copy the script to bin but since the bot runs under that __xcbuild user it did not see it, and I do not want to mess with adding permission to /bin and /usr/bin
All I want is to run a script against the code the that the bot just pulled on success.
The source used by Xcode CI will be under a cache folder stored in an environment variable called:
$XCS_SOURCE_DIR
Your file should be somewhere under that path
We're using svn for version control on our Mac. Its working cool. But the only problem is we're multiple devs developing together and everyone can see any file changes status inside their Xcode ( attributes next to the file ) in their Xcode except me. How to resolve this?
This is what I want (see "M" next to the file name),
Even Xcode Source Control Menu is showing no changes.
I'm not sure if there's anything to set here?
I have checkout the code again and again, but still the problem persist.
I'm not sure, why this "Working Copies" menu "iOS" is disabled? Its enabled on other machine.
Any help would be highly appreciated.
I also encountered this problem, the following is my solution, hope I can help you.
Start the terminal, enter the code in the folder.
Type the command - svn status.
The output will be similar to this
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: The working copy at '/Users/chao/svn/project'
is too old (format 29) to work with client version '1.9.4 (r1740329)' (expects
format 31). You need to upgrade the working copy first.
Type the command - svn upgrade.
The problem is resolved,I wish you good luck.
SVN can define status of working copy files and directories comparing your local files with the current repository located on the remote SVN server.
I believe that checking "Refresh server status automatically" will do the job.
You can say this is true when your local files will have attributes aside (U, M etc)
Having no luck, you may run the command line tool, which is usually more verbose. More details here: https://stackoverflow.com/a/19922150/195812
Trying to incorporate Continuous Integration into my Xcode builds.
I have setup OS X Server on my MacBook and everything seems to work fine except for the actual submit/upload script for Crashlytics.
I am getting this error in the 'Trigger' log:
/var/folders/1d/5y5tn0hd1qj01wbxgd3sxrs4000086/T/EFFB7FF5-CFF5-41CF-8AEB-D8813069D831-16127-000004A29A1D79A7: line 2: /Crashlytics.framework/submit: No such file or directory
Couple things to note:
I am able to manually archive/distribute my builds through Crashlytics without any problems.
Crashlytics is installed via PODS and my Run Script looks like this (with my real keys obviously):
${PODS_ROOT}/Crashlytics.framework/submit MYAPIKEY MYCLIENTKEY -emails myEmail#myEmail.com -notesPath ~/Notes/ReleaseNotes.txt -groupAliases myGroupAlias -notifications YES
${PODS_ROOT} is not available to the post trigger action.
You should use
${XCS_SOURCE_DIR}/*RepoName*/Pods/Crashlytics/Crashlytics.framework/submit etc
Where *RepoName* is the name of your repo. Sadly, I haven't been able to find a env variable for it or something.