Skip to content

Commit

Permalink
Fixed ios build, added readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vedmant committed Mar 7, 2024
1 parent 53c2e41 commit 3956e46
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
13 changes: 13 additions & 0 deletions @react-native-community+datetimepicker+7.6.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m b/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
index c139440..4ff3362 100644
--- a/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
+++ b/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
@@ -41,7 +41,7 @@
YGNodeMarkDirty(self.yogaNode);
}

-static YGSize RNDateTimePickerShadowViewMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
+static YGSize RNDateTimePickerShadowViewMeasure(YGNodeConstRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
{
RNDateTimePickerShadowView *shadowPickerView = (__bridge RNDateTimePickerShadowView *)YGNodeGetContext(node);

4 changes: 3 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"resizeMode": "contain",
"backgroundColor": "#ffffff",
"dark": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#6b7280"
}
},
Expand All @@ -20,7 +22,7 @@
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.vedmant.running-time"
"bundleIdentifier": "com.vedmant.runningtime"
},
"android": {
"versionCode": 3145733,
Expand Down
Binary file modified bun.lockb
Binary file not shown.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"android": "expo run:android",
"android-build": "eas build -p android --local",
"ios": "expo run:ios --device",
"ios-build": "expo run:ios --device --configuration Release"
"ios-build1": "expo run:ios --device --configuration Release",
"ios-build": "react-native run-ios --mode Release --terminal terminal",
"ios-bundle": "expo export:embed --entry-file='node_modules/expo/AppEntry.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'",
"postinstall": "git apply @react-native-community+datetimepicker+7.6.2.patch"
},
"dependencies": {
"@react-native-async-storage/async-storage": "1.21.0",
Expand Down Expand Up @@ -39,7 +42,6 @@
},
"devDependencies": {
"@babel/core": "^7.20.0",
"babel-plugin-module-resolver": "^5.0.0",
"nativewind": "^2.0.11",
"tailwindcss": "3.3.2"
},
Expand Down
12 changes: 12 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ It will open Expo tab in your browser where you can select to run it on Android
- Admin panel for admin user
- Continuos integration setup


### How to build and run on iOs device

1. `bunx expo prebuild`
2. `open ios/YourProject.xcworkspace`
3. Go to project settings "Signing & Capabilities" and select your team
4. Go to project settings "Signing & Capabilities" and remove "Push Notifications"
5. Click on top bar your project name, select "Edit Scheme", select "Build Configuration" - Release
6. Build bundle with `bun ios-bundle`
7. In Xcode in Build phases -> Bundle React Native code and images -> Check off "For install builds only" if it's checked
8. Go to Xcode and run the project, select your connected device

### License ###

And of course:
Expand Down

0 comments on commit 3956e46

Please sign in to comment.