Skip to content

Commit e1d588b

Browse files
committed
Merge branch 'develop'
2 parents a6395f3 + b00a473 commit e1d588b

File tree

9 files changed

+125
-183
lines changed

9 files changed

+125
-183
lines changed

.github/workflows/cd.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,38 @@ jobs:
1616
uses: actions/checkout@v2
1717

1818
- name: Setup .NET
19-
uses: actions/setup-dotnet@v1
20-
21-
- name: Setup XCFramework converter
22-
run: brew install keith/formulae/xcframework-to-fat
23-
24-
- name: Build device archive
19+
uses: actions/setup-dotnet@v3
20+
with:
21+
dotnet-version: '7.0.x'
22+
23+
- name: Install the iOS workload
24+
run: dotnet workload install ios --ignore-failed-sources
25+
26+
- name: Build device version
27+
working-directory: BSImagePicker
28+
run: xcodebuild -sdk iphoneos -project "BSImagePicker.xcodeproj" -configuration Release
29+
30+
- name: Build simulator version
2531
working-directory: BSImagePicker
26-
run: xcodebuild archive -project BSImagePicker.xcodeproj -scheme BSImagePicker -destination "generic/platform=iOS" -archivePath BSImagePicker-iOS SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
32+
run: xcodebuild -sdk iphonesimulator -project "BSImagePicker.xcodeproj" -configuration Release
2733

28-
- name: Build simulator archive
34+
- name: Copy one of the frameworks as an initial version of the final output
2935
working-directory: BSImagePicker
30-
run: xcodebuild archive -project BSImagePicker.xcodeproj -scheme BSImagePicker -destination "generic/platform=iOS Simulator" -archivePath BSImagePicker-Simulator SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
36+
run: cp -R "build/Release-iphoneos" "build/Release-fat"
3137

32-
- name: Make XCFramework
38+
- name: Combine module from another build
3339
working-directory: BSImagePicker
34-
run: xcodebuild -create-xcframework -framework BSImagePicker-iOS.xcarchive/Products/Library/Frameworks/BSImagePicker.framework -framework BSImagePicker-Simulator.xcarchive/Products/Library/Frameworks/BSImagePicker.framework -output BSImagePicker.xcframework
40+
run: cp -R "build/Release-iphonesimulator/BSImagePicker.framework/Modules/BSImagePicker.swiftmodule/" "build/Release-fat/BSImagePicker.framework/Modules/BSImagePicker.swiftmodule/"
3541

36-
- name: Make fat framework
42+
- name: Combine iphoneos + iphonesimulator configuration
3743
working-directory: BSImagePicker
38-
run: xcframework-to-fat BSImagePicker.xcframework ./ x86_64-apple-ios-simulator arm64-apple-ios
44+
run: lipo -create -output "build/Release-fat/BSImagePicker.framework/BSImagePicker" "build/Release-iphoneos/BSImagePicker.framework/BSImagePicker" "build/Release-iphonesimulator/BSImagePicker.framework/BSImagePicker"
3945

4046
- name: Restore NuGet packages
41-
run: nuget restore
47+
run: dotnet restore
4248

4349
- name: Build
44-
run: MSBuild /t:SByteDev_Xamarin_iOS_BSImagePicker /p:Configuration=Release /p:Platform=iPhone
50+
run: dotnet msbuild /t:SByteDev_Xamarin_iOS_BSImagePicker /p:Configuration=Release /p:Platform=iPhone
4551

4652
- name: Pack
4753
run: nuget pack Package.nuspec

.github/workflows/ci.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,35 @@ jobs:
1717
uses: actions/checkout@v2
1818

1919
- name: Setup .NET
20-
uses: actions/setup-dotnet@v1
21-
22-
- name: Setup XCFramework converter
23-
run: brew install keith/formulae/xcframework-to-fat
24-
25-
- name: Build device archive
20+
uses: actions/setup-dotnet@v3
21+
with:
22+
dotnet-version: '7.0.x'
23+
24+
- name: Install the iOS workload
25+
run: dotnet workload install ios --ignore-failed-sources
26+
27+
- name: Build device version
2628
working-directory: BSImagePicker
27-
run: xcodebuild archive -project BSImagePicker.xcodeproj -scheme BSImagePicker -destination "generic/platform=iOS" -archivePath BSImagePicker-iOS SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
29+
run: xcodebuild -sdk iphoneos -project "BSImagePicker.xcodeproj" -configuration Release
2830

29-
- name: Build simulator archive
31+
- name: Build simulator version
3032
working-directory: BSImagePicker
31-
run: xcodebuild archive -project BSImagePicker.xcodeproj -scheme BSImagePicker -destination "generic/platform=iOS Simulator" -archivePath BSImagePicker-Simulator SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
33+
run: xcodebuild -sdk iphonesimulator -project "BSImagePicker.xcodeproj" -configuration Release
3234

33-
- name: Make XCFramework
35+
- name: Copy one of the frameworks as an initial version of the final output
3436
working-directory: BSImagePicker
35-
run: xcodebuild -create-xcframework -framework BSImagePicker-iOS.xcarchive/Products/Library/Frameworks/BSImagePicker.framework -framework BSImagePicker-Simulator.xcarchive/Products/Library/Frameworks/BSImagePicker.framework -output BSImagePicker.xcframework
37+
run: cp -R "build/Release-iphoneos" "build/Release-fat"
3638

37-
- name: Make fat framework
39+
- name: Combine module from another build
3840
working-directory: BSImagePicker
39-
run: xcframework-to-fat BSImagePicker.xcframework ./ x86_64-apple-ios-simulator arm64-apple-ios
41+
run: cp -R "build/Release-iphonesimulator/BSImagePicker.framework/Modules/BSImagePicker.swiftmodule/" "build/Release-fat/BSImagePicker.framework/Modules/BSImagePicker.swiftmodule/"
42+
43+
- name: Combine iphoneos + iphonesimulator configuration
44+
working-directory: BSImagePicker
45+
run: lipo -create -output "build/Release-fat/BSImagePicker.framework/BSImagePicker" "build/Release-iphoneos/BSImagePicker.framework/BSImagePicker" "build/Release-iphonesimulator/BSImagePicker.framework/BSImagePicker"
4046

4147
- name: Restore NuGet packages
42-
run: nuget restore
48+
run: dotnet restore
4349

4450
- name: Build
45-
run: MSBuild /t:SByteDev_Xamarin_iOS_BSImagePicker /p:Configuration=Release /p:Platform=iPhone
51+
run: dotnet msbuild /t:SByteDev_Xamarin_iOS_BSImagePicker /p:Configuration=Release /p:Platform=iPhone

BSImagePicker/BSImagePicker.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,8 @@
651651
DYLIB_COMPATIBILITY_VERSION = 1;
652652
DYLIB_CURRENT_VERSION = 1;
653653
DYLIB_INSTALL_NAME_BASE = "@rpath";
654+
EXCLUDED_ARCHS = "";
655+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
654656
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
655657
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
656658
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -682,6 +684,8 @@
682684
DYLIB_COMPATIBILITY_VERSION = 1;
683685
DYLIB_CURRENT_VERSION = 1;
684686
DYLIB_INSTALL_NAME_BASE = "@rpath";
687+
EXCLUDED_ARCHS = "";
688+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
685689
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
686690
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
687691
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";

Package.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>SByteDev.Xamarin.iOS.BSImagePicker</id>
5-
<version>1.0.3</version>
5+
<version>1.0.4</version>
66
<authors>Prin53, SByteDev</authors>
77
<owners>Prin53, SByteDev</owners>
88
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@@ -12,7 +12,7 @@
1212
<iconUrl>https://i.imgur.com/DtkfyPTm.jpg</iconUrl>
1313
<title>A multiple image picker for iOS.</title>
1414
<description>BSImagePicker bindings for Xamarin.iOS</description>
15-
<releaseNotes>Update to BSImagePicker version 3.3.1</releaseNotes>
15+
<releaseNotes>Migrate to .Net 7</releaseNotes>
1616
<copyright>SByteDev</copyright>
1717
<tags>Xamarin ImagePicker BSImagePicker</tags>
1818
<dependencies>
@@ -21,6 +21,6 @@
2121
</dependencies>
2222
</metadata>
2323
<files>
24-
<file src="SByteDev.Xamarin.iOS.BSImagePicker/bin/Release/SByteDev.Xamarin.iOS.BSImagePicker.dll" target="lib/Xamarin.iOS10/SByteDev.Xamarin.iOS.BSImagePicker.dll" />
24+
<file src="SByteDev.Xamarin.iOS.BSImagePicker/bin/Release/net7.0-ios/SByteDev.Xamarin.iOS.BSImagePicker.dll" target="lib/Xamarin.iOS10/SByteDev.Xamarin.iOS.BSImagePicker.dll" />
2525
</files>
2626
</package>

SByteDev.Xamarin.iOS.BSImagePicker.Demo/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 66 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
@@ -14,6 +14,10 @@
1414
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
1515
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
1616
<ProvisioningType>automatic</ProvisioningType>
17+
<TargetFramework>net7.0-ios</TargetFramework>
18+
<SupportedOSPlatformVersion>13.5</SupportedOSPlatformVersion>
19+
<Nullable>enable</Nullable>
20+
<Platforms>iPhoneSimulator;iPhone;AnyCPU</Platforms>
1721
</PropertyGroup>
1822
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
1923
<DebugSymbols>true</DebugSymbols>
@@ -26,6 +30,7 @@
2630
<MtouchArch>x86_64</MtouchArch>
2731
<MtouchLink>None</MtouchLink>
2832
<MtouchDebug>true</MtouchDebug>
33+
<CreatePackage>false</CreatePackage>
2934
</PropertyGroup>
3035
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
3136
<DebugType>none</DebugType>
@@ -35,6 +40,7 @@
3540
<WarningLevel>4</WarningLevel>
3641
<MtouchLink>None</MtouchLink>
3742
<MtouchArch>x86_64</MtouchArch>
43+
<CreatePackage>false</CreatePackage>
3844
</PropertyGroup>
3945
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
4046
<DebugSymbols>true</DebugSymbols>
@@ -48,6 +54,7 @@
4854
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
4955
<CodesignKey>iPhone Developer</CodesignKey>
5056
<MtouchDebug>true</MtouchDebug>
57+
<CreatePackage>false</CreatePackage>
5158
</PropertyGroup>
5259
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
5360
<DebugType>none</DebugType>
@@ -58,80 +65,76 @@
5865
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
5966
<MtouchArch>ARM64</MtouchArch>
6067
<CodesignKey>iPhone Developer</CodesignKey>
68+
<CreatePackage>false</CreatePackage>
69+
</PropertyGroup>
70+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
71+
<CreatePackage>false</CreatePackage>
72+
</PropertyGroup>
73+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
74+
<CreatePackage>false</CreatePackage>
6175
</PropertyGroup>
6276
<ItemGroup>
63-
<Reference Include="System" />
64-
<Reference Include="System.Xml" />
65-
<Reference Include="System.Core" />
66-
<Reference Include="Xamarin.iOS" />
67-
<Reference Include="System.Numerics" />
68-
<Reference Include="System.Numerics.Vectors" />
69-
<Reference Include="SByteDev.Xamarin.iOS.BSImagePicker">
70-
<HintPath>..\SByteDev.Xamarin.iOS.BSImagePicker\bin\Release\SByteDev.Xamarin.iOS.BSImagePicker.dll</HintPath>
71-
</Reference>
72-
</ItemGroup>
73-
<ItemGroup>
74-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
75-
<Visible>false</Visible>
76-
</ImageAsset>
77-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon1024.png">
78-
<Visible>false</Visible>
79-
</ImageAsset>
80-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon167.png">
81-
<Visible>false</Visible>
82-
</ImageAsset>
83-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon120.png">
84-
<Visible>false</Visible>
85-
</ImageAsset>
86-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon152.png">
87-
<Visible>false</Visible>
88-
</ImageAsset>
89-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon180.png">
90-
<Visible>false</Visible>
91-
</ImageAsset>
92-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon29.png">
93-
<Visible>false</Visible>
94-
</ImageAsset>
95-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon40.png">
96-
<Visible>false</Visible>
97-
</ImageAsset>
98-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon58.png">
99-
<Visible>false</Visible>
100-
</ImageAsset>
101-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon76.png">
102-
<Visible>false</Visible>
103-
</ImageAsset>
104-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon80.png">
105-
<Visible>false</Visible>
106-
</ImageAsset>
107-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon87.png">
108-
<Visible>false</Visible>
109-
</ImageAsset>
110-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon20.png">
111-
<Visible>false</Visible>
112-
</ImageAsset>
113-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon60.png">
114-
<Visible>false</Visible>
115-
</ImageAsset>
77+
11678
</ItemGroup>
11779
<ItemGroup>
11880
<Folder Include="Resources\" />
11981
</ItemGroup>
12082
<ItemGroup>
121-
<InterfaceDefinition Include="LaunchScreen.storyboard" />
122-
<InterfaceDefinition Include="Main.storyboard" />
83+
<None Remove="SByteDev.Xamarin.iOS.BSImagePicker" />
12384
</ItemGroup>
12485
<ItemGroup>
12586
<None Include="Info.plist" />
12687
<None Include="Entitlements.plist" />
12788
</ItemGroup>
12889
<ItemGroup>
129-
<Compile Include="AppDelegate.cs" />
130-
<Compile Include="SceneDelegate.cs" />
131-
<Compile Include="ViewController.cs" />
132-
<Compile Include="ViewController.designer.cs">
133-
<DependentUpon>ViewController.cs</DependentUpon>
134-
</Compile>
13590
</ItemGroup>
136-
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
91+
<ItemGroup>
92+
<Reference Include="SByteDev.Xamarin.iOS.BSImagePicker">
93+
<HintPath>..\SByteDev.Xamarin.iOS.BSImagePicker\bin\Release\net7.0-ios\SByteDev.Xamarin.iOS.BSImagePicker.dll</HintPath>
94+
</Reference>
95+
</ItemGroup>
96+
<ItemGroup>
97+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Contents.json">
98+
<Link>Assets.xcassets\AppIcon.appiconset\Contents.json</Link>
99+
</ImageAsset>
100+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon1024.png">
101+
<Link>Assets.xcassets\AppIcon.appiconset\Icon1024.png</Link>
102+
</ImageAsset>
103+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon167.png">
104+
<Link>Assets.xcassets\AppIcon.appiconset\Icon167.png</Link>
105+
</ImageAsset>
106+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon120.png">
107+
<Link>Assets.xcassets\AppIcon.appiconset\Icon120.png</Link>
108+
</ImageAsset>
109+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon152.png">
110+
<Link>Assets.xcassets\AppIcon.appiconset\Icon152.png</Link>
111+
</ImageAsset>
112+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon180.png">
113+
<Link>Assets.xcassets\AppIcon.appiconset\Icon180.png</Link>
114+
</ImageAsset>
115+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon29.png">
116+
<Link>Assets.xcassets\AppIcon.appiconset\Icon29.png</Link>
117+
</ImageAsset>
118+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon40.png">
119+
<Link>Assets.xcassets\AppIcon.appiconset\Icon40.png</Link>
120+
</ImageAsset>
121+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon58.png">
122+
<Link>Assets.xcassets\AppIcon.appiconset\Icon58.png</Link>
123+
</ImageAsset>
124+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon76.png">
125+
<Link>Assets.xcassets\AppIcon.appiconset\Icon76.png</Link>
126+
</ImageAsset>
127+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon80.png">
128+
<Link>Assets.xcassets\AppIcon.appiconset\Icon80.png</Link>
129+
</ImageAsset>
130+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon87.png">
131+
<Link>Assets.xcassets\AppIcon.appiconset\Icon87.png</Link>
132+
</ImageAsset>
133+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon20.png">
134+
<Link>Assets.xcassets\AppIcon.appiconset\Icon20.png</Link>
135+
</ImageAsset>
136+
<ImageAsset Update="Assets.xcassets\AppIcon.appiconset\Icon60.png">
137+
<Link>Assets.xcassets\AppIcon.appiconset\Icon60.png</Link>
138+
</ImageAsset>
139+
</ItemGroup>
137140
</Project>

0 commit comments

Comments
 (0)