Skip to content

Commit

Permalink
Try to fix iOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
emc2314 committed Oct 6, 2022
1 parent c980e79 commit 405726e
Show file tree
Hide file tree
Showing 5 changed files with 476 additions and 10 deletions.
38 changes: 30 additions & 8 deletions codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ workflows:
source "$HOME/.cargo/env"
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android aarch64-apple-ios
cargo install cargo-ndk
- |
# build Android
source "$HOME/.cargo/env"
flutter build apk --release
- find . -name "Podfile" -execdir pod install \;
- flutter build ios --release --no-codesign
- |
# build iOS
source "$HOME/.cargo/env"
find . -name "Podfile" -execdir pod install \;
flutter build ios --release --no-codesign
- |
#!/bin/sh
mv build/app/outputs/apk/release/app-release.apk build/app/outputs/apk/release/arujisho.apk
Expand All @@ -71,6 +77,7 @@ workflows:
xcode: latest
cocoapods: default
scripts:
- sed -i'.bak' -e 's/isRelease = true/isRelease = false/g' lib/main.dart
- |
# set up debug keystore
rm -f ~/.android/debug.keystore
Expand All @@ -88,19 +95,34 @@ workflows:
echo "flutter.sdk=$HOME/programs/flutter" > "$FCI_BUILD_DIR/android/local.properties"
- flutter packages pub get
- |
#!/bin/sh
# fetch db and sudachi.rs dict
wget https://jp.xydustc.me/f/arujisho.db.zip -O db/arujisho.db.zip
sed -i'.bak' -e 's/isRelease = true/isRelease = false/g' lib/main.dart
- flutter build apk --release
- find . -name "Podfile" -execdir pod install \;
- flutter build ios --release --no-codesign
cd sudachi.rs
sh prepare_diczip.sh
cd ..
- |
# install rust
brew install rustup
rustup-init -y
source "$HOME/.cargo/env"
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android aarch64-apple-ios
cargo install cargo-ndk
- |
# build Android
source "$HOME/.cargo/env"
flutter build apk --release
- |
# build iOS
source "$HOME/.cargo/env"
find . -name "Podfile" -execdir pod install \;
flutter build ios --release --no-codesign
- |
#!/bin/sh
mv build/app/outputs/apk/release/app-release.apk build/app/outputs/apk/release/arujisho.apk
mkdir -p Payload
mkdir -p build/ios/ipa
mv ./build/ios/iphoneos/Runner.app Payload
zip -r -y -0 Payload.zip Payload/Runner.app
zip -r -y -3 Payload.zip Payload/Runner.app
mv Payload.zip build/ios/ipa/arujisho.ipa
artifacts:
- build/**/outputs/apk/**/*.apk
Expand Down
2 changes: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
71 changes: 70 additions & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,43 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
5A4B403228EE4FC000676B9D /* libsudachi_ffi_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A4B402D28EE4F0000676B9D /* libsudachi_ffi_static.a */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
5A4B402C28EE4F0000676B9D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5A4B402728EE4F0000676B9D /* sudachi-ffi.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = CA60FABBBEDA84FAB6863CBB;
remoteInfo = "sudachi_ffi-staticlib";
};
5A4B402E28EE4F0000676B9D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5A4B402728EE4F0000676B9D /* sudachi-ffi.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = CA602C3E891A131743C7E4D3;
remoteInfo = "sudachi_ffi-cdylib";
};
5A4B403028EE4F9000676B9D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5A4B402728EE4F0000676B9D /* sudachi-ffi.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = CA60FABBBEDA9C324205F5D1;
remoteInfo = "sudachi_ffi-staticlib";
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
Expand All @@ -32,6 +57,7 @@
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
5A4B402728EE4F0000676B9D /* sudachi-ffi.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "sudachi-ffi.xcodeproj"; path = "../../sudachi.rs/sudachi-ffi/sudachi-ffi.xcodeproj"; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
Expand All @@ -49,12 +75,22 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5A4B403228EE4FC000676B9D /* libsudachi_ffi_static.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
5A4B402828EE4F0000676B9D /* Products */ = {
isa = PBXGroup;
children = (
5A4B402D28EE4F0000676B9D /* libsudachi_ffi_static.a */,
5A4B402F28EE4F0000676B9D /* sudachi_ffi.dylib */,
);
name = Products;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -86,6 +122,7 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
5A4B402728EE4F0000676B9D /* sudachi-ffi.xcodeproj */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -115,6 +152,7 @@
buildRules = (
);
dependencies = (
5A4B403128EE4F9000676B9D /* PBXTargetDependency */,
);
name = Runner;
productName = Runner;
Expand Down Expand Up @@ -147,13 +185,36 @@
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 5A4B402828EE4F0000676B9D /* Products */;
ProjectRef = 5A4B402728EE4F0000676B9D /* sudachi-ffi.xcodeproj */;
},
);
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
);
};
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
5A4B402D28EE4F0000676B9D /* libsudachi_ffi_static.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libsudachi_ffi_static.a;
remoteRef = 5A4B402C28EE4F0000676B9D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5A4B402F28EE4F0000676B9D /* sudachi_ffi.dylib */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.dylib";
path = sudachi_ffi.dylib;
remoteRef = 5A4B402E28EE4F0000676B9D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
Expand Down Expand Up @@ -211,6 +272,14 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
5A4B403128EE4F9000676B9D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "sudachi_ffi-staticlib";
targetProxy = 5A4B403028EE4F9000676B9D /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
Expand Down
Loading

0 comments on commit 405726e

Please sign in to comment.