From 2a268d6d4f166ce9e831d4948bd2849eeecacb97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Tue, 21 May 2019 10:55:25 -0400 Subject: [PATCH] build for iOS --- .vsts-ci.Windows.yml | 2 +- .vsts-ci.iOS.yml | 68 ++++++++++++++++++++++++ .vsts-ci.yml | 1 + src/Calculator.iOS/Calculator.iOS.csproj | 20 ++++++- src/Calculator.iOS/Info.plist | 4 +- 5 files changed, 90 insertions(+), 5 deletions(-) create mode 100644 .vsts-ci.iOS.yml diff --git a/.vsts-ci.Windows.yml b/.vsts-ci.Windows.yml index c4246f3..0bb13cc 100644 --- a/.vsts-ci.Windows.yml +++ b/.vsts-ci.Windows.yml @@ -32,4 +32,4 @@ jobs: inputs: pathToPublish: $(build.artifactstagingdirectory) artifactType: container - artifactName: UnoBanner + artifactName: Calculator diff --git a/.vsts-ci.iOS.yml b/.vsts-ci.iOS.yml new file mode 100644 index 0000000..5064c84 --- /dev/null +++ b/.vsts-ci.iOS.yml @@ -0,0 +1,68 @@ +jobs: +- job: iOS + + pool: + vmImage: 'macOS-10.14' + + variables: + NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget + + steps: + - checkout: self + clean: true + + - bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_18_1" + displayName: Select Xamarin Version + + - bash: | + shopt -s nullglob + function join_by { local IFS="$1"; shift; echo "$*"; } + lib_path=$(join_by ';' $(Agent.WorkFolder)/_tasks/GitVersion*/4.0.*/lib/osx) + echo LD_LIBRARY_PATH: $lib_path + echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]$lib_path" + displayName: Update LD_LIBRARY_PATH for GitVersion + + - task: GitVersion@4 + inputs: + updateAssemblyInfo: false + + - task: InstallAppleCertificate@2 + displayName: 'Install an Apple certificate' + inputs: + certSecureFile: 'nventive-appstore-prod-20190521.p12' + certPwd: '$(iOSSigning.CertificatePwd)' + signingIdentity: '$(iOSSigning.CertificateIdentity)' + + - task: InstallAppleProvisioningProfile@1 + displayName: 'Install an Apple provisioning profile' + inputs: + provProfileSecureFile: 'Uno_Calculator.mobileprovision' + + - task: MSBuild@1 + inputs: + solution: '$(build.sourcesdirectory)/src/Calculator.iOS/Calculator.iOS.csproj' + msbuildLocationMethod: version + msbuildVersion: latest + msbuildArchitecture: x86 + msbuildArguments: /r /p:Configuration=Release /p:Platform=iPhone /detailedsummary /m:16 /nr:false "/p:InformationalVersion=%GITVERSION_InformationalVersion%" + clean: false + maximumCpuCount: true + restoreNugetPackages: false + logProjectEvents: true + createLogFile: true + + - task: CopyFiles@2 + displayName: 'Publish iOS Binaries' + inputs: + SourceFolder: $(build.sourcesdirectory)/src/Calculator.iOS/bin/iPhone/Release + Contents: '*.ipa' + TargetFolder: $(build.artifactstagingdirectory) + CleanTargetFolder: false + OverWrite: false + flattenFolders: false + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: $(build.artifactstagingdirectory) + ArtifactName: Uno-Calculator-iOS + ArtifactType: Container diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 8a41e23..32caa33 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -6,3 +6,4 @@ resources: jobs: - template: .vsts-ci.Windows.yml - template: .vsts-ci.Linux.yml +- template: .vsts-ci.iOS.yml diff --git a/src/Calculator.iOS/Calculator.iOS.csproj b/src/Calculator.iOS/Calculator.iOS.csproj index 209ef91..1271279 100644 --- a/src/Calculator.iOS/Calculator.iOS.csproj +++ b/src/Calculator.iOS/Calculator.iOS.csproj @@ -26,6 +26,13 @@ None true -gcc_flags "-lc++ -lstdc++" + + + iPhone Developer + + + + portable @@ -37,6 +44,11 @@ x86_64 false -gcc_flags "-lc++ -lstdc++" + iPhone Distribution + + + + true @@ -59,11 +71,15 @@ bin\iPhone\Release prompt 4 - Entitlements.plist + + ARM64 false - iPhone Developer -gcc_flags "-lc++ -lstdc++" + Uno Calculator + iPhone Distribution + + none diff --git a/src/Calculator.iOS/Info.plist b/src/Calculator.iOS/Info.plist index 3d4e583..fe17686 100644 --- a/src/Calculator.iOS/Info.plist +++ b/src/Calculator.iOS/Info.plist @@ -3,9 +3,9 @@ CFBundleDisplayName - UnoQuickStart.iOS + Calculator CFBundleIdentifier - com.companyname.WindowsCalculator + uno.platform.calculator CFBundleShortVersionString 1.0 CFBundleVersion