Skip to content

Commit

Permalink
Merge pull request #18 from emaf/master
Browse files Browse the repository at this point in the history
Fixes AdHoc IPA with ODR failing to install from iTunes
  • Loading branch information
jstedfast committed May 2, 2016
2 parents cb65578 + d25da2a commit 24e1e29
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1613,6 +1613,9 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
<_IntermediateODRDir Condition="'$(_DistributionType)' == 'AdHoc' And '$(EmbedOnDemandResources)' == 'false'">$(DeviceSpecificIntermediateOutputPath)OnDemandResourcesPackage\OnDemandResources\</_IntermediateODRDir>

<OnDemandResourcesUrl Condition="'$(_DistributionType)' == 'AdHoc' And '$(EmbedOnDemandResources)' == 'true'">OnDemandResources</OnDemandResourcesUrl>

<IsStreamable>false</IsStreamable>
<IsStreamable Condition="$(EmbedOnDemandResources) == 'false'">true</IsStreamable>
</PropertyGroup>

<RemoveDir SessionId="$(BuildSessionId)" Condition="'$(MtouchTargetsEnabled)'" Directories="$(_IntermediateODRDir)" />
Expand Down Expand Up @@ -1650,7 +1653,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
<!-- Sign assetpacks -->
<Codesign
SessionId="$(BuildSessionId)"
Condition="'$(MtouchTargetsEnabled)' And '@(_AssetPack)' != ''"
Condition="'$(MtouchTargetsEnabled)' And '@(_AssetPack)' != '' And '$(_DistributionType)' == 'AppStore'"
ToolExe="$(CodesignExe)"
ToolPath="$(CodesignPath)"
CodesignAllocate="$(_CodesignAllocate)"
Expand All @@ -1668,11 +1671,26 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
TemplatePath="$(_IpaAppBundleDir)AssetPackManifestTemplate.plist"
OutputFile="$(_IpaAppBundleDir)AssetPackManifest.plist"
OnDemandResourceUrl="$(OnDemandResourcesUrl)"
IsStreamable="true"
IsStreamable="$(IsStreamable)"
/>

<Delete SessionId="$(BuildSessionId)" Condition="'$(MtouchTargetsEnabled)' And '$(_DistributionType)' == 'AdHoc' And Exists('$(_IntermediateODRDir)')" Files="$(_IpaAppBundleDir)AssetPackManifestTemplate.plist" />

<!-- Re-sign app bundle if anything changed inside of it -->
<Codesign
SessionId="$(BuildSessionId)"
Condition="'$(MtouchTargetsEnabled)' And '$(_DistributionType)' == 'AdHoc' And Exists('$(_IntermediateODRDir)')"
ToolExe="$(CodesignExe)"
ToolPath="$(CodesignPath)"
CodesignAllocate="$(_CodesignAllocate)"
Keychain="$(CodesignKeychain)"
Entitlements="$(DeviceSpecificIntermediateOutputPath)Entitlements.xcent"
ResourceRules="$(_PreparedResourceRules)"
Resource="$(_IpaAppBundleDir)"
SigningKey="$(_CodeSigningKey)"
ExtraArgs="$(CodesignExtraArgs)"
/>

<RemoveDir SessionId="$(BuildSessionId)" Condition="'$(MtouchTargetsEnabled)' And '$(EmbedOnDemandResources)' == 'false'" Directories="$(_IpaOutputDir)OnDemandResources\" />
<MakeDir SessionId="$(BuildSessionId)" Condition="'$(MtouchTargetsEnabled)' And '$(EmbedOnDemandResources)' == 'false'" Directories="$(_IpaOutputDir)OnDemandResources\" />

Expand Down

0 comments on commit 24e1e29

Please sign in to comment.