PageSourceSearch

https://game.ci/assets/js/56ee4a47.2a29fc7b.js

js game.ci collected 2026-09-25 18:56:18 UTC 11,691 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkgame_ci=self.webpackChunkgame_ci||[]).push([[4717],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(67294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t){if(null==e)return{};var n,a,l=function(e,t){if(null==e)return{};var n,a,l={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,i=e.originalType,p=e.parentName,u=r(e,["components","mdxType","originalType","parentName"]),m=s(n),d=l,k=m["".concat(p,".").concat(d)]||m[d]||c[d]||i;return n?a.createElement(k,o(o({ref:t},u),{},{components:n})):a.createElement(k,o({ref:t},u))}));function k(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var i=n.length,o=new Array(i);o[0]=d;var r={};for(var p in t)hasOwnProperty.call(t,p)&&(r[p]=t[p]);r.originalType=e,r[m]="string"==typeof e?e:l,o[1]=r;for(var s=2;s<i;s++)o[s]=n[s];return a.createElement.apply(null,o)}return a.createElement.apply(null,n)}d.displayName="MDXCreateElement"},44267:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>r,toc:()=>s});var a=n(87462),l=(n(67294),n(3905));const i={},o="iOS",r={unversionedId:"gitlab/deployment/ios",id:"gitlab/deployment/ios",title:"iOS",description:"Setup (only one time per mac)",source:"@site/docs/05-gitlab/06-deployment/ios.mdx",sourceDirName:"05-gitlab/06-deployment",slug:"/gitlab/deployment/ios",permalink:"/docs/gitlab/deployment/ios",draft:!1,editUrl:"https://github.com/game-ci/documentation/tree/main/docs/05-gitlab/06-deployment/ios.mdx",tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Android",permalink:"/docs/gitlab/deployment/android"},next:{title:"Getting started",permalink:"/docs/circleci/getting-started"}},p={},s=[{value:"Setup (only one time per mac)",id:"setup-only-one-time-per-mac",level:2},{value:"Unity Settings",id:"unity-settings",level:2},{value:"XCode project",id:"xcode-project",level:2},{value:"App on portal",id:"app-on-portal",level:2},{value:"Fastlane initialization",id:"fastlane-initialization",level:2},{value:"Provisioning profile",id:"provisioning-profile",level:2},{value:"Make lane",id:"make-lane",level:2},{value:"Related documentation",id:"related-documentation",level:3},{value:"Run tests locally",id:"run-tests-locally",level:2},{value:"Gitlab-runner - register your mac",id:"gitlab-runner---register-your-mac",level:2}],u={toc:s},m="wrapper";function c(e){let{components:t,...n}=e;return(0,l.kt)(m,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"ios"},"iOS"),(0,l.kt)("h2",{id:"setup-only-one-time-per-mac"},"Setup (only one time per mac)"),(0,l.kt)("p",null,"Install the latest Xcode command line tools :"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"xcode-select --install\n")),(0,l.kt)("p",null,"Install fastlane using:"),(0,l.kt)("pre",null,(0,l.kt)("c
1ode",{parentName:"pre",className:"language-bash"},"# Using RubyGems\nsudo gem install fastlane -NV\n\n# Alternatively using Homebrew\nbrew install fastlane\n")),(0,l.kt)("h2",{id:"unity-settings"},"Unity Settings"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"Switch target to iOS"),(0,l.kt)("li",{parentName:"ol"},"In ",(0,l.kt)("inlineCode",{parentName:"li"},"PlayerSettings -> Other Settings"),(0,l.kt)("ol",{parentName:"li"},(0,l.kt)("li",{parentName:"ol"},"Fill the field ",(0,l.kt)("inlineCode",{parentName:"li"},"Signing Team ID")),(0,l.kt)("li",{parentName:"ol"},"Ensure ",(0,l.kt)("inlineCode",{parentName:"li"},"Automatically Sign")," is unchecked"),(0,l.kt)("li",{parentName:"ol"},"iOS Provisioning Profile",(0,l.kt)("ol",{parentName:"li"},(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"ProfileID"),": ",(0,l.kt)("inlineCode",{parentName:"li"},"match AppStore your_bundle_identifier")," ",(0,l.kt)("em",{parentName:"li"},"Replace ",(0,l.kt)("inlineCode",{parentName:"em"},"your_bundle_identifier")," by\nyours")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"ProfileType"),": ",(0,l.kt)("inlineCode",{parentName:"li"},"Distribution"))))))),(0,l.kt)("h2",{id:"xcode-project"},"XCode project"),(0,l.kt)("p",null,"Make a first iOS build using your mac from Unity, that will create an xcode project. Ensure you\ntarget the same path as the CI. Ex: if you let ",(0,l.kt)("inlineCode",{parentName:"p"},"BUILD_NAME: ExampleProjectName")," in ",(0,l.kt)("inlineCode",{parentName:"p"},".gitlab-ci.yml"),",\nyour xcode project must be at the root of the following path: ",(0,l.kt)("inlineCode",{parentName:"p"},".\\Builds\\iOS\\ExampleProjectName\\")),(0,l.kt)("h2",{id:"app-on-portal"},"App on portal"),(0,l.kt)("p",null,"Make sure that you have setup your app on the Apple Developer Portal and the App Store Connect or\nuse ",(0,l.kt)("a",{parentName:"p",href:"https://docs.fastlane.tools/actions/produce/"},"fastlane produce")," to create it."),(0,l.kt)("h2",{id:"fastlane-initialization"},"Fastlane initialization"),(0,l.kt)("p",null,"Open the terminal at the same path then run ",(0,l.kt)("inlineCode",{parentName:"p"},"fastlane init"),", follow instructions to generate Appfile\nand default Fastfile."),(0,l.kt)("h2",{id:"provisioning-profile"},"Provisioning profile"),(0,l.kt)("p",null,"Run ",(0,l.kt)("inlineCode",{parentName:"p"},"fastlane match init"),", follow instructions, select ",(0,l.kt)("inlineCode",{parentName:"p"},"appstore")," provisioning profile type.\n(",(0,l.kt)("a",{parentName:"p",href:"https://docs.fastlane.tools/actions/match/"},"Documentation"),")"),(0,l.kt)("h2",{id:"make-lane"},"Make lane"),(0,l.kt)("p",null,"Copy the following instructions on your ",(0,l.kt)("inlineCode",{parentName:"p"},"fastlane/Fastfile"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ruby"},'default_platform(:ios)\n\nplatform :ios do\n  desc "Push a new beta build to TestFlight"\n  lane :beta do\n    sync_code_signing(type:"appstore", readonly: is_ci)\n    increment_build_number({\n        build_number: latest_testflight_build_number + 1\n    })\n    build_app(scheme:"Unity-iPhone")\n    upload_to_testflight(groups:["Team"])\n  end\nend\n')),(0,l.kt)("p",null,"Note about ",(0,l.kt)("inlineCode",{parentName:"p"},"upload_to_testflight"),': Change "Team" to your internal tester or remove\n',(0,l.kt)("inlineCode",{parentName:"p"},'(groups:["Team"])')," if you want set manually who can test the build"),(0,l.kt)("h3",{id:"related-documentation"},"Related documentation"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://docs.fastlane.tools/actions/sync_code_signing/"},"sync_code_signing (alias for match)")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://docs.fastlane.tools/actions/increment_build_number/"},"increment_build_number")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://docs.fastlane.tools/actions/build_app/"},"build_app (alias for gym)")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://docs.fastlane.tools/actions/testflight/"},"upload_to_testflight (alias for pilot)"))),(0,l.kt)("h2",{id:"run-tests-locally"},"Run tests locally"),(0,l.kt)("p",null,"Run the following command to test the build and the deployment locally:"),(0,l.kt)("pre",null,(0,l.kt)("c
1ode",{parentName:"pre",className:"language-bash"},"fastlane ios beta\n")),(0,l.kt)("p",null,"If the build and upload are ok, you have to force add some file to your git using command below"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"git add -f pathToTheFileToAdd\n")),(0,l.kt)("p",null,"you have to add the following files:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"Gemfile")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"Gemfile.lock")," (if here)"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"fastlane/Appfile")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"fastlane/Fastfile")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"fastlane/Matchfile"))),(0,l.kt)("h2",{id:"gitlab-runner---register-your-mac"},"Gitlab-runner - register your mac"),(0,l.kt)("p",null,"To automate your build with gitlab, you need to setup your mac as a gitlab runner. Installation:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"sudo curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64\n")),(0,l.kt)("p",null,"Give permission to execute :"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"sudo chmod +x /usr/local/bin/gitlab-runner\n")),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://docs.gitlab.com/runner/install/osx.html"},"Source (if you would like to check)"))),(0,l.kt)("p",null,"Go to your project gitlab page, then go to ",(0,l.kt)("inlineCode",{parentName:"p"},"settings")," -> ",(0,l.kt)("inlineCode",{parentName:"p"},"CI/CD")," -> ",(0,l.kt)("inlineCode",{parentName:"p"},"Runners")," -> ",(0,l.kt)("inlineCode",{parentName:"p"},"Specitic Runners"),"\n-> ",(0,l.kt)("inlineCode",{parentName:"p"},"Set up a specific Runner manually")," -> take note of the token"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://docs.gitlab.com/runner/register/index.html"},"Follow these instructions")," to register your mac\nas a gitlab-runner for your specific project. Follow ",(0,l.kt)("strong",{parentName:"p"},"macOS")," instructions ",(0,l.kt)("strong",{parentName:"p"},"without")," sudo command\nfor registration."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Tags: set ",(0,l.kt)("inlineCode",{parentName:"li"},"mac,ios")),(0,l.kt)("li",{parentName:"ul"},"Executor: set ",(0,l.kt)("inlineCode",{parentName:"li"},"shell"))),(0,l.kt)("p",null,"Then, to install/launch the runner:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"cd ~\ngitlab-runner install\ngitlab-runner start\n")),(0,l.kt)("p",null,"Runner is installed and will be run after a system reboot."),(0,l.kt)("p",null,"Now, you can uncomment the job ",(0,l.kt)("inlineCode",{parentName:"p"},"build-and-deploy-ios")," in ",(0,l.kt)("inlineCode",{parentName:"p"},".gitlab-ci.yml")," to make the app build and\ndeployement work."))}c.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.